CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

FvSolution pRefCell and pRefValue

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

Like Tree39Likes
  • 21 Post By hjasak
  • 18 Post By ArathoN

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 17, 2005, 04:54
Default Can any one explain a little a
  #1
Senior Member
 
Maka Mohu
Join Date: Mar 2009
Posts: 305
Rep Power: 18
maka is on a distinguished road
Can any one explain a little about how to set pRefCell and pRefValue in fvSolution dictionary since they have been introduced in 1.2.

I changed the mesh for channelOodles and I got a warning message about pRefCell. Thanks.

PISO
{
nCorrectors 2;
nNonOrthogonalCorrectors 0;
pRefCell 1001;
pRefValue 0;
}

Regards,
Maka.
maka is offline   Reply With Quote

Old   October 18, 2005, 11:10
Default If you have an incompressible
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,905
Rep Power: 33
hjasak will become famous soon enough
If you have an incompressible flow in a domain where none of the boundaries uses a fixed value (or similar) boundary condition, the value of the pressure in the system is indeterminate to a constant. Iterative solvers dont like that because the solution can jump and down, so we need to do tricks to make sure it does not happen.

The way to do this is to specify the pressure level in one cell. Previously, this used to be cell zero with value zero and hard-coded in the solver, but this causes trouble when the cell is next to a coupled boundary. The new entries allow you to control in which cell the pressure is given and to which level.

Hrv
pyt, styleworker, CarCin and 18 others like this.
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   April 30, 2009, 15:44
Default
  #3
New Member
 
Suraj Deshpande
Join Date: Mar 2009
Location: Madison, WI, USA
Posts: 18
Rep Power: 17
suraj is on a distinguished road
Hello,
What is done with pdRefCell and pdRefValue when atleast one of the boundaries has a a fixed value of pressure specified? Is pdRefValue still used then?

Thanks,
Suraj
suraj is offline   Reply With Quote

Old   October 15, 2014, 05:19
Default
  #4
Member
 
Nicole Andrew
Join Date: Sep 2014
Location: Pretoria, South Africa
Posts: 58
Rep Power: 11
Nicole is on a distinguished road
Hi Suraj,

I see this is a very old post, but did you ever find an answer to your question bout the fixed boundary pressure?

Thanks,
Nicole
Nicole is offline   Reply With Quote

Old   October 22, 2014, 14:17
Default
  #5
Senior Member
 
ArathoN
Join Date: Jul 2011
Posts: 137
Rep Power: 15
ArathoN is on a distinguished road
Quote:
Originally Posted by Nicole View Post
Hi Suraj,

I see this is a very old post, but did you ever find an answer to your question bout the fixed boundary pressure?

Thanks,
Nicole
You need to see the solver files and code. In the case of PIMPLE, they are first initialized to zero then it is used a look-up function to scrape their values from fvsolution

from createFields.H
Code:
label pRefCell = 0;
scalar pRefValue = 0.0;
setRefCell(p, mesh.solutionDict().subDict("PIMPLE"), pRefCell, pRefValue);
Now if you look at the pEqn.H file, in the pressure corrector loop:
Code:
    fvScalarMatrix pEqn
    (
        fvm::laplacian(rAUf, p) == fvc::div(phiHbyA)
    );

    pEqn.setReference(pRefCell, pRefValue);

    pEqn.solve(mesh.solver(p.select(pimple.finalInnerIter())));
And here it is used the referenced pressure.

IMO if there is no declaration of pRefCell or pRefValue in pimple they will not created by createFields.H
Code:
setRefCell(p, mesh.solutionDict().subDict("PIMPLE"), pRefCell, pRefValue);
So in case of a well-conditioned problem with dirichlet (or mixed) pressure BC, the pRefValue should not be considered.

EDIT: at fvCFD.H included in pimplefoam you'll find the findRefCell.C where it is defined the serRefCell function:
Code:
if (fieldRef.needReference() || forceReference)
{................}
So if there is a need to define a reference pressure it will be used otherwise they are neglected.However i can't find where ".needReference()" is define, whis is the function that will tell the solver if it needs or not pRefCell. If i found out something i'll update the post.


EDIT2: I've found it, the function "needReference" is defined GeometricField.C as such:
Code:
bool Foam::GeometricField<Type, PatchField, GeoMesh>::needReference() const
 {
  // Search all boundary conditions, if any are
  // fixed-value or mixed (Robin) do not set reference level for solution.
 
  bool needRef = true;
 
  forAll(boundaryField_, patchi)
  {
  if (boundaryField_[patchi].fixesValue())
  {
  needRef = false;
  break;
  }
  }
 
  reduce(needRef, andOp<bool>());
 
  return needRef;
 }
Now you have the complete picture of how the "referencing process" works on OF.
ArathoN is offline   Reply With Quote

Old   February 17, 2015, 03:00
Default
  #6
Member
 
Nicole Andrew
Join Date: Sep 2014
Location: Pretoria, South Africa
Posts: 58
Rep Power: 11
Nicole is on a distinguished road
Thank you so much for your well-explained response. Sorry for only replying now, but we did find your response very useful!

Nicole is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Periodic pressure in turb channel pRefCell maka OpenFOAM Running, Solving & CFD 14 October 21, 2010 09:02
General help for fvSchemes and fvSolution settings harly OpenFOAM Running, Solving & CFD 4 September 7, 2009 10:31
Programmatically create fvSolution dictionary cliffoi OpenFOAM Running, Solving & CFD 14 February 12, 2009 02:50
What must be defined in fvSolution Marco Kupiainen (Kupiainen) OpenFOAM Running, Solving & CFD 1 February 21, 2005 05:03


All times are GMT -4. The time now is 21:58.