# rho in simpleFoam

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

 May 23, 2024, 08:21 rho in simpleFoam #1 New Member   Join Date: May 2024 Posts: 2 Rep Power: 0 Hi, everyone! I'm new member in OpenFOAM, currently simulating a stationary incompressible flow in a Tesla valve (velocity value at the inlet wall, 0 kPa at the outlet). Question: I see that you can enter a constant/turbulence Proportions that changes the viscosity - but how can I enter the density value of the liquid? I found on the forum that you need to multiply the resulting pressure by the value. This is true? Please help me figure it out

 May 24, 2024, 10:46 #2 Senior Member   Yann Join Date: Apr 2012 Location: France Posts: 1,108 Rep Power: 26 Hello, You don't need to define density in incompressible solvers in OpenFOAM. Incompressible solvers use kinematic pressure, which is indeed static pressure divided by density. https://doc.openfoam.com/2312/tools/...atic-pressure/ Choni likes this.

 May 25, 2024, 10:57 #3 New Member   Join Date: May 2024 Posts: 2 Rep Power: 0 Thank for your answer! Am I correct in understanding that I need to multiply the pressure result that I get when the algorithm has converged by the density value to get it in Pascals? Can you explain why this is so - after all, there is density in the momentum equation (https://openfoamwiki.net/index.php/SimpleFoam), which simpleFoam solves... Another question about the resulting pressure on the Inlet wall - I wrote in controlDict so that it would give me the result of the pressure in the middle of the rectangle (the middle of the Inlet wall) - to what extent is this approach correct? Can you suggest, perhaps there are more correct ways, perhaps taking into account the size and structure of the grid Below I have attached how I determined the points at which I want to find out the pressure (there are two of them, because I start the flow of liquid in two directions) functions { probes { type probes; libs (sampling); writeControl timeStep; writeInterval 1; fields ( p U ); probeLocations ( (0 7.5e-05 0) (-0.006255624 7.5e-05 -0.00221) ); } }

May 27, 2024, 05:28
#4
Senior Member

Yann
Join Date: Apr 2012
Location: France
Posts: 1,108
Rep Power: 26
Hello,

Quote:
 Originally Posted by Choni Thank for your answer! Am I correct in understanding that I need to multiply the pressure result that I get when the algorithm has converged by the density value to get it in Pascals?
Yes you are correct, you need to multiply the pressure results by density to get pressure in Pascal.

There is no density solved anywhere in simpleFoam, you can have a look on these threads for more details:

In what unit is pressure measured on OpenFOAM?
Pressure units in incompressible solvers

Quote:
 Originally Posted by Choni Another question about the resulting pressure on the Inlet wall - I wrote in controlDict so that it would give me the result of the pressure in the middle of the rectangle (the middle of the Inlet wall) - to what extent is this approach correct? Can you suggest, perhaps there are more correct ways, perhaps taking into account the size and structure of the grid
Using probes will give you local values. You can also use the surfaceFieldValue function object if you want to get the average value on the patch.

 Tags liquid, pressure, simplefoam