|
[Sponsors] |
October 26, 2018, 10:21 |
TotalIncompressiblePressure evaluation
|
#1 |
New Member
Christian Wolf
Join Date: Mar 2009
Posts: 27
Rep Power: 17 |
Hello!
I am using OF4.1. I am struggeling with the evaluation of total pressure at patches named "IN" and "OUT". I was able to calculate the total pressure field. But I have no idea how to extract the mass-flow weighted total pressure at my boundary patches. Solver: simpleFoam controlDict: . . runTimeModifiable true; functions { #includeFunc flowRatePatch(name=IN) #includeFunc flowRatePatch(name=OUT) #includeFunc residuals pressure1 { type pressure; libs ("libfieldFunctionObjects.so"); patches (IN); writeControl timeStep; writeInterval 1; log on; pRef 1; // Calculate the total pressure calcTotal yes; // yes | no // Calculate the (total) pressure coefficient calcCoeff no; // yes | no } } BTW: The flowRatePatches evaluation work perfect. And I would like to have total pressure value each for "IN" and "OUT". Thanks for support! |
|
November 5, 2018, 04:53 |
|
#2 |
New Member
Christian Wolf
Join Date: Mar 2009
Posts: 27
Rep Power: 17 |
No ideas? Are there information missing?
|
|
November 5, 2018, 08:44 |
|
#3 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
This works with OF-5.0:
Code:
pIN { type surfaceFieldValue; functionObjectLibs ("libfieldFunctionObjects.so"); writeFields false; writeControl timeStep; writeInterval 1; // Output to log&file (true) or to file only log true; valueOutput true; source patch; sourceName "IN"; regionType patch; name "IN"; surfaceFormat ensight; // Operation: areaAverage/sum/weightedAverage ... operation areaAverage; fields ( p ); }
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. |
|
November 5, 2018, 09:09 |
|
#4 | ||
New Member
Christian Wolf
Join Date: Mar 2009
Posts: 27
Rep Power: 17 |
Thanks! I works. I had to change 'type surfaceFieldValue' -> 'type surfaceRegion'. Then it can be used for OP4.1.
How can I evaluate the total pressure at patch called 'IN'? Changing the 'fields' to total(p) is not working: Quote:
Quote:
|
|||
November 5, 2018, 10:13 |
|
#5 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
You can't do in-situ postprocessing of the total pressure, because it is not available by default. Easiest solution is to compute the total pressure and the samples in post after the simulation has completed.
Your first stop for information on how to use the postprocessing tools is the openfoam manual.
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. |
|
November 7, 2018, 07:19 |
|
#6 |
New Member
Christian Wolf
Join Date: Mar 2009
Posts: 27
Rep Power: 17 |
Here is my ./system/controlDict file to get relevant data during simulation. Maybe it helps other users with same problem.
It works well for OF4.1 and simpleFoam. Code:
functions { #includeFunc flowRatePatch(name=IN) #includeFunc flowRatePatch(name=OUT) #includeFunc residuals #includeFunc totalPressureIncompressible #includeFunc pressureDifferencePatch #includeFunc singleGraph #includeFunc surfaces #includeFunc streamlines yPlus1 { type yPlus; libs ("libfieldFunctionObjects.so"); result WALL; executeControl writeTime; writeControl writeTime; } pressureTools1 { type pressure; functionObjectLibs ("libutilityFunctionObjects.so"); enabled yes; //region 0; calcTotal yes; calcCoeff no; timeStart 1; timeEnd 100000; writeControl outputTime; writeInterval 1; pRef 0; rhoInf 1.17663; pInf 101325; UInf (0 0 0); } reloadPcalc { type readFields; functionObjectLibs ("libfieldFunctionObjects.so"); //region 0; enabled yes; timeStart 1; timeEnd 10000; writeControl writeTime; writeInterval 1; outputInterval 1; // 5000; fields ( total(p) p ); } outlet_avg_p { type surfaceRegion; libs ("libfieldFunctionObjects.so"); enabled true; log true; valueOutput false; timeStart 1; writeControl timeStep; writeInterval 1; writeFields off; regionType patch; name OUT; surfaceFormat none; operation areaAverage; fields ( // total(p) p ); } outlet_avg_ptot { type surfaceRegion; libs ("libfieldFunctionObjects.so"); enabled true; log true; valueOutput false; timeStart 1; writeControl timeStep; writeInterval 1; writeFields off; regionType patch; name OUT; surfaceFormat none; operation areaAverage; fields ( total(p) //p ); } inlet_avg_p { type surfaceRegion; libs ("libfieldFunctionObjects.so"); enabled true; log true; valueOutput false; timeStart 1; writeControl timeStep; writeInterval 1; writeFields off; regionType patch; name IN; surfaceFormat none; operation areaAverage; fields ( // total(p) p ); } inlet_avg_ptot { type surfaceRegion; libs ("libfieldFunctionObjects.so"); enabled true; log true; valueOutput false; timeStart 1; writeControl timeStep; writeInterval 1; writeFields off; regionType patch; name IN; surfaceFormat none; operation areaAverage; fields ( total(p) //p ); Code:
controlDict decomposeParDict fvSolution topoSetDict fvSchemes pressureDifferencePatch residuals singleGraph streamlines surfaces yPlus |
|
Tags |
post-processing pressure, pressure tools, simplefoam, total pressure |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Tecplot 360 2011 R2 preview with OpenFOAM data loader available for evaluation | scott_rumage | OpenFOAM Post-Processing | 50 | January 23, 2017 03:49 |
Use of K-Epsilon Model for Hotspot Evaluation | nomi.tahir | Main CFD Forum | 0 | May 9, 2016 14:06 |
Evaluation of "diffusive flux" of Compressible Navier-Stoke in the corner | tranhophu | Main CFD Forum | 5 | January 19, 2016 10:30 |
yPlusRAS evaluation in OpenFOAM 2.2x | MaLa | OpenFOAM Post-Processing | 1 | December 10, 2013 10:34 |
Evaluation method for design improvement of bioreactor to prevent biofouling/biofilm | kevinlipps | FLUENT | 0 | March 8, 2012 10:53 |