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

What does pEqn.setReference(pRefCell, pRefValue) mean??

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 3 Post By Cyp

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 29, 2014, 23:25
Default What does pEqn.setReference(pRefCell, pRefValue) mean??
  #1
Member
 
Daniel
Join Date: Jun 2014
Posts: 60
Rep Power: 11
Dan1788 is on a distinguished road
Hello foamers,

In the rhoSimpleFoam solver, one of the line in the pEqn.H file reads:

pEqn.setReference(pRefCell, pRefValue);

I would like to know what this means and what happens if I remove this line. Anyone knowing this please help. Thanks
Dan1788 is offline   Reply With Quote

Old   July 30, 2014, 12:41
Default
  #2
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18
Cyp is on a distinguished road
Hi Daniel,


Actually when solving a Navier-Stokes problem, the pressure field is off by an additive constant. Most of the time, this constant is determined by a fixed value boundary condition. However, in some case (periodic conditions for instance) the boundary conditions are of no use to fix this constant and in order to help the convergence, the trick consists to arbitrarily set a reference value to a cell of the mesh. So usually, the value of p at a refCell is set to pRefValue (usually 0).

This line is only used if there is no fixedValue boundary condition in the domain. You can set up the value of pRefCell and pRefValue in fvSolution.

If you remove this line and the pressure field is no fixed somewhere, then you will face tough convergence problem.

Best,
Cyp
kaifu, ArathoN and Ali_petroleum like this.
Cyp is offline   Reply With Quote

Old   July 30, 2014, 23:39
Default
  #3
Member
 
Daniel
Join Date: Jun 2014
Posts: 60
Rep Power: 11
Dan1788 is on a distinguished road
Hi Cyprien,

Thanks so much for your reply. I noticed that the statement is present only in steady state solvers like rhoSimpleFoam but not in transient solvers like rhoPimpleFoam. Would you happen to know why that is ?
Dan1788 is offline   Reply With Quote

Old   July 31, 2014, 01:16
Default
  #4
Cyp
Senior Member
 
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18
Cyp is on a distinguished road
What you said is only true for the compressible solver (icoFoam and pisoFoam have this setReference() snippet).

Actually I never noticed that this term was missing in rhoPimpleFoam... I guess it is because of the accumulation term in the pressure equation. I don't have a real explanation, sorry.

Best,
Cyprien
Cyp 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
melting problem: looking for appropriate solvers som OpenFOAM Running, Solving & CFD 328 July 20, 2022 08:47
FvSolution pRefCell and pRefValue maka OpenFOAM Pre-Processing 5 February 17, 2015 03:00
The meaning and use of pRefCell and pRefValue jf115009 OpenFOAM Programming & Development 1 September 25, 2013 09:58
about pEqn.H in bubbleFoam kaifu OpenFOAM 1 September 12, 2013 00:16
prefcell&prefvalue meaning AmirBaqa1987 OpenFOAM Programming & Development 5 July 31, 2013 14:14


All times are GMT -4. The time now is 14:47.