|
[Sponsors] |
Measuring total pressure with simpleFunctionObjects |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
Member
Cedric Van Holsbeke
Join Date: Dec 2009
Location: Belgium
Posts: 81
Rep Power: 17 ![]() |
I want to monitor the mass flow rate and the total pressure every iteration at the outlet of my geometry. A good way to do this is using the simpleFunctionObjects (http://openfoamwiki.net/index.php/Co...unctionObjects).
Using simpleFoam, I am able to calculate the mass flow rate, but not the total pressure. My code in the controlDict file is given as: Code:
functions ( massFlow { type patchMassFlow; functionObjectLibs ( "libsimpleFunctionObjects.so" ); verbose true; patches ( outlet ); } totPress { type patchAverage; functionObjectLibs ( "libsimpleFunctionObjects.so" ); verbose true; fields ( ptot ); patches ( outlet ); } ); In post-processing, I would first calculate the total pressure with the command "ptot" and then averaging it with the command "patchAverage ptot outlet" Does anybody know how to implement this using simpleFunctionObjects? Last edited by CedricVH; February 18, 2010 at 10:38. |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Member
Cedric Van Holsbeke
Join Date: Dec 2009
Location: Belgium
Posts: 81
Rep Power: 17 ![]() |
Solved: I have modified the simpleFoam solver so that it calculates ptot every iteration.
|
|
![]() |
![]() |
![]() |
![]() |
#3 |
Member
Michael
Join Date: Mar 2009
Posts: 48
Rep Power: 17 ![]() |
Hi Cedric,
could you please explain me how you modified the solver that it calculates ptot every iteration??? |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Member
Cedric Van Holsbeke
Join Date: Dec 2009
Location: Belgium
Posts: 81
Rep Power: 17 ![]() |
I've copied simpleFoam to another directory and renamed all files (mysimpleFoam)
In createFields.H, I changed this: Code:
Info << "Reading field U\n" << endl; volVectorField U ( IOobject ( "U", runTime.timeName(), mesh, IOobject::MUST_READ, IOobject::AUTO_WRITE ), mesh ); // BEGIN ADD CODE Info<< "Reading field ptot\n" <<endl; volScalarField ptot ( IOobject ( "ptot", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), p + 0.5*magSqr(U) ); // END ADD CODE # include "createPhi.H" Code:
{ #include "UEqn.H" #include "pEqn.H" } turbulence->correct(); // BEGIN ADD CODE ptot = p + 0.5*magSqr(U); // END ADD CODE runTime.write(); |
|
![]() |
![]() |
![]() |
![]() |
#5 |
Member
Join Date: Jun 2010
Posts: 33
Rep Power: 16 ![]() |
Does anybody know how I can modified the rhoSimpleFoam solver so that it calculates ptot every iteration?
|
|
![]() |
![]() |
![]() |
![]() |
#6 |
Member
Claudio
Join Date: Mar 2010
Posts: 57
Rep Power: 16 ![]() |
||
![]() |
![]() |
![]() |
![]() |
#7 | |
Member
Join Date: Jun 2010
Posts: 33
Rep Power: 16 ![]() |
Quote:
Hello Claudio, I have written a tool, which is able to calculate total pressure. But i haven't integrated it into the solver. You can use it for post processing. Are you interesting in this tool? I can also integrate it (after writing some tools and other stuff, i am able to programming on my own) into the solver, but then I need some time. Regards Ralph |
||
![]() |
![]() |
![]() |
![]() |
#8 | |
Member
Claudio
Join Date: Mar 2010
Posts: 57
Rep Power: 16 ![]() |
Quote:
can I kindly have this tool in order to integrate it into the solver (by myself)? Thank You in advance. Best, Claudio |
||
![]() |
![]() |
![]() |
![]() |
#9 |
Member
Join Date: Jun 2010
Posts: 33
Rep Power: 16 ![]() |
Dear Claudio,
no problem, here is the tool. my_ptot.C attach folder Make: options: EXE_INC = \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/compressible/RAS/RASModel \ -I$(LIB_SRC)/finiteVolume/cfdTools \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ -lbasicThermophysicalModels \ -lspecie \ -lcompressibleTurbulenceModel \ -lcompressibleRASModels \ -lfiniteVolume \ -lmeshTools files: my_ptot.C
EXE = $(FOAM_USER_APPBIN)/my_ptot |
|
![]() |
![]() |
![]() |
![]() |
#10 | |
Member
Claudio
Join Date: Mar 2010
Posts: 57
Rep Power: 16 ![]() |
Quote:
Claudio |
||
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
"Pressure Inlet" Boundary Setup | Wijaya | FLUENT | 15 | May 18, 2016 11:08 |
Static Pressure, Total Pressure | ufechner | FloEFD, FloWorks & FloTHERM | 5 | March 2, 2015 08:56 |
Pressure BC for combustion chamber | Giuki | FLUENT | 1 | July 19, 2011 12:35 |
total pressure in CFX | Atit Koonsrisuk | CFX | 0 | January 1, 2005 06:46 |
Total pressure to static pressure ratio | roadracer | Siemens | 1 | April 17, 2003 06:31 |