|
[Sponsors] |
What does pEqn.setReference(pRefCell, pRefValue) mean?? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
July 29, 2014, 23:25 |
What does pEqn.setReference(pRefCell, pRefValue) mean??
|
#1 |
Member
Daniel
Join Date: Jun 2014
Posts: 60
Rep Power: 11 |
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 |
|
July 30, 2014, 12:41 |
|
#2 |
Senior Member
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18 |
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 |
|
July 30, 2014, 23:39 |
|
#3 |
Member
Daniel
Join Date: Jun 2014
Posts: 60
Rep Power: 11 |
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 ? |
|
July 31, 2014, 01:16 |
|
#4 |
Senior Member
Cyprien
Join Date: Feb 2010
Location: Stanford University
Posts: 299
Rep Power: 18 |
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 |
|
|
|
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 |