|
[Sponsors] |
November 5, 2006, 18:56 |
Hi all,
I am trying to set
|
#1 |
Member
Shaun Cooper
Join Date: Mar 2009
Posts: 54
Rep Power: 17 |
Hi all,
I am trying to set up a model that requires hydrostatic equilibirum (essentially the pressure force needs to exactly balance the force from gravity, this is done by dp/dz = -p_0*H, where p_0 is the initial pressure field and H is a constant number (in our case) called the scale height). When I try to impliment a simple version of this I am able to create a pressure field that has the desired distribution but and I try to balance this with a gravitational acceleration but I still don't have it in equilibrium. I have played around with a few factors and now I think it may be that the pressure that I have specifed (i have created a pressure field that assigns a value to the center of the cells) is slighty out of sink with the gradient. This could presumably occur if the gradient is evaluated at the faces of the cells whilst the pressure is defined at the centre. In summary I would like to know where the gradients are evaluated in OF. Thanks in advance, Shaun |
|
November 5, 2006, 23:29 |
Hi there,
I would also like
|
#2 |
Member
Shaun Cooper
Join Date: Mar 2009
Posts: 54
Rep Power: 17 |
Hi there,
I would also like to know how the boundary conditions are implemented. If I use fixedGradient and give it a value at what spatial position is this stored? Is it at the boundary face or will it be in the middle of the cell closest to the boundary? This might also be creating the problem. Thanks, Shaun |
|
November 6, 2006, 08:49 |
Well, the boundary condition i
|
#3 |
Senior Member
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33 |
Well, the boundary condition is (obviously) associated with the boundary face. If you have a gradient force and you are using a zeroGradient b.c. on the pressure, you will need to be careful to compensate, change the formulation of the pressure equation or use a gravity-sensitised b.c. like for eaxmple wallBuoyantPressure.
For the evaluation of the gradient, you will need to start from the finite volume library, looking at explicit evaluation of the operators: /home/hjasak/OpenFOAM/OpenFOAM-1.3/src/finiteVolume/finiteVolume/fvc You will then find a run-time selection table for things like Gauss or least squares gradient, which brings you to the "real" code. Thus, a Gauss gradient code lives in: /home/hjasak/OpenFOAM/OpenFOAM-1.3/src/finiteVolume/finiteVolume/gradSchemes/gau ssGrad/gaussGrad.H Enjoy, Hrv
__________________
Hrvoje Jasak Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Convective term evaluated at time n+1/2 | Lionel S. | Main CFD Forum | 0 | February 12, 2007 15:22 |