CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   hydrostatic pressure initializing (https://www.cfd-online.com/Forums/openfoam-solving/171907-hydrostatic-pressure-initializing.html)

sinatahmooresi May 19, 2016 14:52

hydrostatic pressure initializing
 
Hi foamers!
i got confused to set hydrostatic pressure condition in a tank, i have a tank full of water with a little nozzle in bottom of it. so hydrostatic presuure condition should be set in the internal field of the tank . how can i make it ? is that should be defined in BC or in internal field? i guess the second one has more physical sense, but internalField just accepts one value or nonuniform value as list.
so i cant set this condition by nonuniformlist(obviously!!!) :confused::confused::confused:
so ???
thank u very much

kmefun May 19, 2016 17:47

You can use funkySetFields in swak4Foam to initialise a pressure field gradient due to gravity as following link
https://openfoamwiki.net/index.php/C...ression_syntax

sinatahmooresi May 20, 2016 02:27

Hi Kaufman!
thank u very much, i visited the page and i found that my bison v is 3.0.2 ( enough for using funkysetFields) but how can i make it to use after i checked the version of bison ?
thank u very much

sinatahmooresi May 20, 2016 03:47

Hi Kaufman again!
i compile the swak4Foam and funkysetFields . it is done ( for now )!
now I"m trying to set my case with this i hope to get it worked
again, thank u !

kmefun May 20, 2016 10:31

Good to hear that. You can get enough informations to make it work form the openfoamwiki or search key word "funkysetFields" in this forum.

sinatahmooresi May 21, 2016 04:07

Hi Kaufamn!
i did initializing very good! but when i run the case it seems to solver ignores my first initial condition ( that i set up with funkySetFields) and it starts to demonstrate wrong value of p ( but still gradient is correct) so do u know what is going on ?
thank u

kmefun May 23, 2016 11:36

I guess the reason made this happen might be your boundary conditions. The interior field will be updated according to your boundary conditions setup. It will be easier to find problems if you post your test case.

sinatahmooresi May 23, 2016 16:02

Hi!
which part of dictionaries could be helpful?
i guess p and p_rgh could be.
i have tank full of water and it has a nozzle as a nozzle and the two symmetry wall and the rests are walls and i should say the front part of tank can be wall or outlet ( no difference) and i put the top BC symmetry and it could be atmosphere or wall also.
Regards
p:
dimensions [1 -1 -2 0 0 0 0];

internalField uniform 0;


boundaryField
{
bed
{
type calculated;
value $internalField;


}
atm
{
type calculated;
value $internalField;
}
symmetryis
{
type symmetry;
}
back
{
type calculated;
value $internalField;



}
outlet
{


type calculated;
value $internalField;
}
inlet
{
type calculated;
value $internalField;

}
}

p_rgh:
dimensions [1 -1 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
bed
{
type fixedFluxPressure;
value $internalField;
}
atm
{
type fixedFluxPressure;
value $internalField;
}
symmetryis
{
type symmetry;
}
back
{
type fixedFluxPressure;
value $internalField;
}
outlet
{


type prghPressure;
p $internalField;
value $internalField;
}
inlet
{
type fixedFluxPressure;

}
}

kmefun May 24, 2016 09:49

Hi,
The problem "might" be that you clamped $internalField for boundary conditions as its initial values. The funkySetFields does initiate internal field but not boundary conditions. Instead of using internalField as initial values for boundary conditions, you can try assign a piratical values as initial value for some boundary condition. This is what I guess/suggest based on the information you provided.
Good luck,


All times are GMT -4. The time now is 07:01.