![]() |
Reference pressure
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 |
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.
|
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; |
Alex, does this also work for decomposed meshes?
|
I didn't think of that. But I performed parallel computations and observed no problems.
|
Ok, good to know!
|
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. |
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; } |
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? |
Quote:
|
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. |
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;It seems that the value "pRefCell and pRefValue " read from system/fvSolution is useless since pRefCell and pRefValue is given in createFields.H. // Kai |
| All times are GMT -4. The time now is 03:53. |