|
[Sponsors] |
August 19, 2010, 05:24 |
Reference pressure
|
#1 |
New Member
Jennifer
Join Date: Aug 2009
Location: Germany
Posts: 28
Rep Power: 17 |
Hello,
for my computations I need to set a reference pressure in one cell of the outer wall (named oustide) of my geometry. But how can I find out which cells are part of the outer wall und how they are numbered, so that I can choose one from these cells? I had a look in the five files boundary, faces, neighbour, owner, points, but that didn't help me. And how can I set the reference value in one cell? By using pRefCell and pRefValue? Would be nice, if anyone could help me. Thanks, Jennifer |
|
August 19, 2010, 08:10 |
|
#2 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
You can foamToVTK -time 0, then in paraview select the cell you want to set the pressure on, open the selection inspector, make the cell label visible and select cellID (not "Cell ID"). Then use pRefCell and pRefValue to set the reference.
|
|
August 30, 2010, 17:06 |
|
#3 |
Member
Alex
Join Date: Apr 2010
Posts: 32
Rep Power: 16 |
I had the same problem when I was using different meshes for the same geometry. The cell with label 0 was on the farfield boundary on one mesh and on a wall in another mesh.
Now I use pRefPoint instead of pRefCell. Then the reference pressure is defined in the point you want, just give the x, y, and z coordinates: pRefPoint (x y z); instead of pRefCell 0; |
|
August 31, 2010, 05:01 |
|
#4 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
Alex, does this also work for decomposed meshes?
|
|
August 31, 2010, 06:34 |
|
#5 |
Member
Alex
Join Date: Apr 2010
Posts: 32
Rep Power: 16 |
I didn't think of that. But I performed parallel computations and observed no problems.
|
|
August 31, 2010, 10:37 |
|
#6 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
Ok, good to know!
|
|
September 15, 2010, 06:19 |
|
#7 |
New Member
Jennifer
Join Date: Aug 2009
Location: Germany
Posts: 28
Rep Power: 17 |
I used Paraview to find the right cell and now it works with pRefCell and pRefValue. Thanks for your answer, Anton.
But then I tried to use pRefPoint, because I think it's the easier way to set the reference pressure at a special point. So I replaced pRefCell with pRefPoint, but it didn't work. Alex, can you explain me in detail how to use it? What must be written in which file? I want to use it with the solver rhoPisoFoam... It would be nice, if you can help me. |
|
September 15, 2010, 06:35 |
|
#8 |
Member
Alex
Join Date: Apr 2010
Posts: 32
Rep Power: 16 |
In your system/fvSolution file there is something like:
SIMPLE { nNonOrthogonalCorrectors 0; pRefCell 0; pRefValue 0; } Change this to the following if you want to specify 0 pressure at point (1,0,0.5): SIMPLE { nNonOrthogonalCorrectors 0; pRefPoint (1 0 0.5); pRefValue 0; } |
|
September 15, 2010, 10:13 |
|
#9 |
New Member
Jennifer
Join Date: Aug 2009
Location: Germany
Posts: 28
Rep Power: 17 |
I changed pRefCell to pRefPoint in system/fvSolution, but it doesn't work. in the createFields.H file of rhoPisoFoam I added
scalar pRefValue = 0.0 label pRefCell = 0 setRefCell (p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue) to use pRefCell and pRefValue and I think this causes ther error. I tried to use something like point pRefPoint = (0 0 0) label pRefCell = 0 setRefCell (p, mesh.solutionDict().subDict("SIMPLE"), pRefpoint, pRefValue) but this also doesn't work. So what do I have to write in createFields.H that I can use pRefPoint? Do I have to integrate a special header-file or have I just to leave it out? |
|
September 15, 2010, 10:24 |
|
#10 | |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
Quote:
|
||
September 15, 2010, 10:28 |
|
#11 |
Member
Alex
Join Date: Apr 2010
Posts: 32
Rep Power: 16 |
Sorry, I didn't notice in your previous post that you are using rhoPisoFoam.
The reference value for the pressure is only needed for the incompressible solvers like simpleFoam or pisoFoam. Since there the actual value of the pressure does not matter, but only the pressure gradient. For simulations with rhoPisoFoam, you don't need to specify a reference pressure. Even if you specify it in the fvSolution file, it will not be used. |
|
May 17, 2011, 12:15 |
|
#12 | |
Member
|
Hi Alex
Quote:
If we want to lookup a scalar we use Code:
int pRefValue(readInt(piso.lookup("pRefValue"))); Code:
setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue); Code:
label pRefCell = 0; scalar pRefValue = 0.0; setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue); It seems that the value "pRefCell and pRefValue " read from system/fvSolution is useless since pRefCell and pRefValue is given in createFields.H. // Kai |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calculation of the Governing Equations | Mihail | CFX | 7 | September 7, 2014 07:27 |
specify a reference pressure point in FD method? | Rui | Main CFD Forum | 10 | August 30, 2010 09:50 |
Error with Wmake | skabilan | OpenFOAM Installation | 3 | July 28, 2009 01:35 |
RE: Reference Pressure dilemma | CFD USER | CFX | 7 | September 3, 2008 08:51 |
Changing reference pressure | Andrea | Siemens | 3 | May 15, 2008 19:20 |