CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   Postprocessing pressure (https://www.cfd-online.com/Forums/openfoam-post-processing/61347-postprocessing-pressure.html)

sega November 13, 2008 05:27

Hello. I want to add a smal
 
Hello.

I want to add a small procedure into the interFoam.
Its basically a solution for calculating the pressure inside a spherical bubble, but also limited to this case.

The "code" would read like this:

for all cells
********if rho > 0.99 * rho_phase1
****************nCell = nCell + 1
****************sumPressure = sumPressure + Pressure_cell
********end if
********Pressure = sumPressure / nCell
end for

How can I implement this code into C++?
I'm still not familar enought with C++ to do this on my own.

sega November 16, 2008 05:45

Meanwhile I stumbled along the
 
Meanwhile I stumbled along the codes of interFoam and some postprocessing tools.

I tried to include some field-reading like in the interFoam createFields.H and put them inside the C-file of my little code:

http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif surfaceTensionPressureDrop.C

The tool is compiling, but when I am running it there is some output from the inlcuded createPhi.H and from the selected transport model:


Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian

Time = 24.9
Number of cells = 316
Summarized pressure = 296.902
Pressure jump = 0.939563


Is there a way of suppressing these outputs?


All times are GMT -4. The time now is 02:50.