CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Qeustion Regarding dimensions of UEqn.H of pisoFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 1 Post By Sereff
  • 1 Post By hjasak

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 12, 2020, 10:36
Default Qeustion Regarding dimensions of UEqn.H of pisoFoam
  #1
Member
 
Sereff
Join Date: Jan 2019
Posts: 48
Rep Power: 7
Sereff is on a distinguished road
Hi Foamers,

This might be a stupid question, but please bear with me. I am trying to understand pisoFoam source code in mathematical equations, and it is quite confusing. In UEqn.H the matrix of momentum equation for prediction stage is given by, the follwing code, and has a dimention of [m^4/s^2],
Code:
fvVectorMatrix UEqn
(
    fvm::ddt(U) + fvm::div(phi, U)
  + MRF.DDt(U)
  + turbulence->divDevReff(U)
 ==
    fvOptions(U)
);
However on the solving step we have, with dimension of [m/s^2]
Code:
solve(UEqn == -fvc::grad(p));
It seems that the UEqn is acceleration integrated over a control volume, however fvc::grad(p) on the RHS of solve() returns just acceleration. Could anyone please explain why are the dimensions not matching?


kind regards,
Sereff is offline   Reply With Quote

Old   April 12, 2020, 18:15
Default
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
Easy. p means P/rho, where P Is in Pascal and rho in kg/m^3
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   April 12, 2020, 19:40
Default
  #3
Member
 
Sereff
Join Date: Jan 2019
Posts: 48
Rep Power: 7
Sereff is on a distinguished road
Sir thank you for you reply,

Yes, I understant that "p" in pisoFoam is dynamic pressure which means Pascal over density, which is why p has dimension of [m^2/s^2] and fvc::grad(p) has dimension of [m/s^2]. What confuses me is that in the following line,
Code:
solve(UEqn == -fvc::grad(p));
term UEqn on the lhs has different dimension than the rhs which is -fvc::grad(p). It seems that fv<Type>Matrix class is integrated over control volume whereas the pressure gradient term isn't.


kind regards,
Sereff is offline   Reply With Quote

Old   April 13, 2020, 04:23
Default
  #4
Senior Member
 
Troy Snyder
Join Date: Jul 2009
Location: Akron, OH
Posts: 219
Rep Power: 18
tas38 is on a distinguished road
Quote:
Originally Posted by Sereff View Post
Sir thank you for you reply,

Yes, I understant that "p" in pisoFoam is dynamic pressure which means Pascal over density, which is why p has dimension of [m^2/s^2] and fvc::grad(p) has dimension of [m/s^2]. What confuses me is that in the following line,
Code:
solve(UEqn == -fvc::grad(p));
term UEqn on the lhs has different dimension than the rhs which is -fvc::grad(p). It seems that fv<Type>Matrix class is integrated over control volume whereas the pressure gradient term isn't.


kind regards,

It is unclear how you came to the conclusion that the lhs, i.e. the UEqn has units of [m^4/s^2]. It has units of [m/s^2] consistent with the pressure term to which it is equated. This units are most obvious in looking at the transient term... fvm::ddt(U). This is the first temporal derivative of the velocity field w.r.t time and has units 1/s * (m/s) = m/s^2.
tas38 is offline   Reply With Quote

Old   April 13, 2020, 08:00
Default
  #5
Member
 
Sereff
Join Date: Jan 2019
Posts: 48
Rep Power: 7
Sereff is on a distinguished road
Hi tas38

thank you for you reply. I agree with you that UEqn is supposed to have dimension of [m/s^2]. However, I came to this conclusion because I included the following line after UEqn is constructed.
Code:
Info << "dimension of UEqn is: " << UEqn.dimensions() << endl;
and the terminal prints out
Code:
dimension of UEqn is: [0 4 -2 0 0 0 0]

kind regards,
Attached Images
File Type: png upload.png (93.1 KB, 26 views)
ruloz likes this.
Sereff is offline   Reply With Quote

Old   April 13, 2020, 09:10
Default
  #6
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
Yes - at the point of solution, the equation is multiplied by the volume - as will be the case with the rhs. This is "integrated over the control volume"

Hrv
cryabroad likes this.
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Differences in solution method for pisoFoam and buoyantBoussinesqPisoFoam mchurchf OpenFOAM 7 August 6, 2023 09:12
pisoFoam and pimpleFoam are unstable in foam-extend 4.0/4.1 (misunderstanding ?) Kombinator OpenFOAM Running, Solving & CFD 4 January 14, 2021 04:10
pisoFoam, fully developed pipe flow using cyclic BC's thijs1909 OpenFOAM Running, Solving & CFD 17 February 21, 2018 22:07
Incompatible dimensions for operation ruben23 OpenFOAM Running, Solving & CFD 2 June 12, 2015 04:14
pisoFoam compiling error with OF 1.7.1 on MAC OSX Greg Givogue OpenFOAM Programming & Development 3 March 4, 2011 17:18


All times are GMT -4. The time now is 12:19.