CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   setup of inital condition (

gija79 September 9, 2010 06:55

setup of inital condition
1 Attachment(s)
I would like to simulate an unsteady flow with a linear thermal gradient (with the vertical depth Z) at inlet.
The all dominion should be initialized with the same gradient.
How can I impose these value of temperature to the internal mesh? the simplified problem is something like the image attached.
Suggestion about the solver to use?
Thanks Silvia

Edison_Ge September 10, 2010 12:14

You may need to do some modification on the source code for new inlet boundary.
This pdf may help you find a way.

Edison_Ge September 10, 2010 12:25

actually, it may be easier that. Take a look at the discussion
and then check the user guide 4.2.9. Hope it may help.

santiagomarquezd September 10, 2010 13:52

Did you try funkySetFields?


gija79 September 23, 2010 12:30

thanks for the suggestions. I used funkysetfields for temperature gradient and
timeVaryingUniformFixedValue for unsteady conditions at inlet.
The fluid to simlate to is water, so uncompressible
About the solver:
I tried to use bouyantboussinesqpimpleFoam putting the following boundary conditions:

internalField uniform (0 0 0);

inlet : timeVaryingUniformFixedValue;

outlet: zeroGradient;

bottom fixed value uniform (0 0 0);

atmosphere zeroGradient;

defaultFaces empty (2D case)


type fixedValue;
value nonuniform
All other boundaries are set as zerogradient.

type zeroGradient;

type fixedValue;
value uniform 0;

type zeroGradient;
type fixedValue;
value uniform 0;

type empty;

For thermopysical aspect I use the folowing:

thermoType hPsiThermo<pureMixture<constTransport<specieThermo <hConstThermo<icoPolynomial>>>>>;

mixture water 1 18 4190 0 1.001e-03 10;

pRef 100000;

I tried with and without gravity but the temperature field seems to become crazy, with value too high!

Did I make some big mistake or should I consider a different solver?
and which one?
thank you

All times are GMT -4. The time now is 15:23.