CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

why UEqn.H of buoyantSimpleFoam has no gravity term?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   January 14, 2013, 15:50
Default why UEqn.H of buoyantSimpleFoam has no gravity term?
  #1
New Member
 
Edward
Join Date: May 2010
Posts: 24
Rep Power: 5
alundilong is on a distinguished road
This might be silly question, but it confused me a lot..
these snippet code comes from buoyantSimpleFoam of OpenFOAM-2.1.1
3 tmp<fvVectorMatrix> UEqn
4 (
5 fvm::div(phi, U)
6 + turbulence->divDevRhoReff(U)
7 );
8
9 UEqn().relax();
10
11 if (simple.momentumPredictor())
12 {
13 solve
14 (
15 UEqn()
16 ==
17 fvc::reconstruct
18 (
19 (
20 - ghf*fvc::snGrad(rho)
21 - fvc::snGrad(p_rgh)
22 )*mesh.magSf()
23 )
24 );
25 }
shouldn't be this?
3 tmp<fvVectorMatrix> UEqn
4 (
5 fvm::div(phi, U)
6 + turbulence->divDevRhoReff(U)
7 );
8
9 UEqn().relax();
10
11 if (simple.momentumPredictor())
12 {
13 solve
14 (
15 UEqn()
16 ==
17 fvc::reconstruct
18 (
19 (
20 - ghf*fvc::snGrad(rho)
21 - fvc::snGrad(p_rgh)
22 )*mesh.magSf()
23 )
24 + rho*g
25 );
25 }
alundilong is offline   Reply With Quote

Old   January 14, 2013, 16:38
Default
  #2
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 749
Rep Power: 13
akidess will become famous soon enough
No, the gravity term is hidden in between the usage of p_rgh and ghf*snGrad(rho). There is a thread on the forum with the derivation.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
*Check out the scientific computing exchange http://scicomp.stackexchange.com
akidess is offline   Reply With Quote

Old   January 14, 2013, 17:12
Default
  #3
Senior Member
 
mturcios777's Avatar
 
Marco A. Turcios
Join Date: Mar 2009
Location: Vancouver, BC, Canada
Posts: 502
Rep Power: 9
mturcios777 is on a distinguished road
For bouyancy driven flows that is why we use p_rgh instead of p. If prgh = p + rho*g*h, then when we do grad p in the NS equations we get grad(p) and rho*g. I don't do a lot of buoyancy driven flow so I'm not 100% on the notation.
mturcios777 is offline   Reply With Quote

Old   January 14, 2013, 17:14
Default
  #4
New Member
 
Edward
Join Date: May 2010
Posts: 24
Rep Power: 5
alundilong is on a distinguished road
thanks for your reply.
I derived, but may not correctly, so I did not see the term of rho*gravity.
How can I find that thread? some keywords are quite helpful.
alundilong is offline   Reply With Quote

Old   January 14, 2013, 17:18
Default
  #5
New Member
 
Edward
Join Date: May 2010
Posts: 24
Rep Power: 5
alundilong is on a distinguished road
Quote:
Originally Posted by mturcios777 View Post
For bouyancy driven flows that is why we use p_rgh instead of p. If prgh = p + rho*g*h, then when we do grad p in the NS equations we get grad(p) and rho*g. I don't do a lot of buoyancy driven flow so I'm not 100% on the notation.
Thanks! I got the idea. I mistakenly took grad(rho*g*h) = grad(rho)*g*h without caring rho*g*grad(h), which equals to rho*g. Shame on me!
alundilong is offline   Reply With Quote

Old   January 15, 2013, 02:53
Default
  #6
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 749
Rep Power: 13
akidess will become famous soon enough
Quote:
Originally Posted by alundilong View Post
thanks for your reply.
I derived, but may not correctly, so I did not see the term of rho*gravity.
How can I find that thread? some keywords are quite helpful.
I think it was this one:
Problems in understanding BuoyantBoussinesqSimpleFoam
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
*Check out the scientific computing exchange http://scicomp.stackexchange.com
akidess is offline   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Gravity source term in PisoFoam DanM OpenFOAM Running, Solving & CFD 3 December 4, 2012 12:17
Gravity source term in PisoFoam DanM Main CFD Forum 0 November 28, 2012 12:59
Laplacian term missing in simpleFoam - UEqn.H Balakrshnan Ramakrishnan OpenFOAM 2 April 5, 2011 10:58
mass source term in buoyantSimpleFoam OMN OpenFOAM 0 September 29, 2010 08:22
ATTENTION! Reliability problems in CFX 5.7 Joseph CFX 14 April 20, 2010 15:45


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