# why UEqn.H of buoyantSimpleFoam has no gravity term?

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

 January 14, 2013, 16:50 why UEqn.H of buoyantSimpleFoam has no gravity term? #1 Member   yijin Mao Join Date: May 2010 Location: Columbia, MO Posts: 48 Rep Power: 8 This might be silly question, but it confused me a lot.. these snippet code comes from buoyantSimpleFoam of OpenFOAM-2.1.1 3 tmp 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 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 }

 January 14, 2013, 17:38 #2 Senior Member     Anton Kidess Join Date: May 2009 Location: Delft, Netherlands Posts: 1,139 Rep Power: 20 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. *Join the OpenFOAM stackexchange Q&A site: http://area51.stackexchange.com/prop...oHPxcPqde7HtA2

 January 14, 2013, 18:12 #3 Senior Member     Marco A. Turcios Join Date: Mar 2009 Location: Vancouver, BC, Canada Posts: 727 Rep Power: 20 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.

 January 14, 2013, 18:14 #4 Member   yijin Mao Join Date: May 2010 Location: Columbia, MO Posts: 48 Rep Power: 8 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.

January 14, 2013, 18:18
#5
Member

yijin Mao
Join Date: May 2010
Location: Columbia, MO
Posts: 48
Rep Power: 8
Quote:
 Originally Posted by mturcios777 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!

January 15, 2013, 03:53
#6
Senior Member

Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 1,139
Rep Power: 20
Quote:
 Originally Posted by alundilong 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.
Problems in understanding BuoyantBoussinesqSimpleFoam
__________________
*Spend as much time formulating your questions as you expect people to spend on their answer.
*Join the OpenFOAM stackexchange Q&A site: http://area51.stackexchange.com/prop...oHPxcPqde7HtA2

 October 22, 2013, 13:35 #7 New Member   Christiano Molossi Join Date: Sep 2013 Posts: 10 Rep Power: 4 Hello! I'm new to OpenFOAM, I started using about 1 month ago. And I have created and account here just now. So i didn't know if it was better to create a new topic or just replay an old one since my doubt is related to this topic. So, I'm working on a simulation with the twoLiquidMixingFoam solver. And just like the UEqn.H posted here before, there is this: * mesh.magSf(). I would like to know what it is, what does it for? What this meaning? Besides this, I want to learn the mathematical modelling form OpenFOAM, for example, in twoLiquidMixingFoam, what is the equations that the solver use to run? If someone could me introduce to a book or anything that may help me to understand the math from this software I would be very thankful. Best regards!

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post OMN OpenFOAM 1 April 30, 2014 06:49 DanM OpenFOAM Running, Solving & CFD 4 May 24, 2013 11:30 DanM Main CFD Forum 0 November 28, 2012 13:59 Balakrshnan Ramakrishnan OpenFOAM 2 April 5, 2011 10:58 Joseph CFX 14 April 20, 2010 15:45

All times are GMT -4. The time now is 10:52.