I'm attempting to model, using code_saturne 3.0.5, a cuboid which is periodic in the x (streamwise) and z directions. Heat is applied on walls in the y direction. (this is the same as the Kawamura DNS if you are familiar with the paper).
In this case to achieve a steady state a source (or sink) has to be included in the momentum and scalar transport equations to ensure, in the case of momentum, that the flow does not come to a halt, and, in the case of a scalar, that the addition of this scalar (i.e. heat through the walls in the case of temperature) does not cause an increase to infinity.
For the momentum equation I used a momentum balance to approximate the wall shear stress and then included that value as a momentum source (such that the two would cancel each other out at steady state). I did this through cs_user_source_terms.f90 with the following:
Code: Select all
if (.false.) return
! ----------------------------------------------
ckp = 0
qdm = <insert momentum source value here>
I've noted four options of how I might achieve this and my question is really which of these is the best to proceed with? or is there an easier way I've missed?
1. Use
2. Intepret
Once I've been able to calculate
3. Simply subtract
4. Provide a sink to the transport equation similar to how I applied a momentum source for the momentum equation
It seems to me that for calculating
Option 4. looks like something that could be achieved with cs_user_boundary_conditions.f90 unless there is some reason to do option 3.?
That being said I'm not very familiar with all of the subroutines offered so I may be missing a much easier way of doing this.
Thanks,
Martyn