|
[Sponsors] |
November 28, 2016, 08:48 |
Pressuretools: pressureDifferencePatch
|
#1 |
New Member
Jeroen
Join Date: Oct 2016
Posts: 21
Rep Power: 9 |
I'm want to use this tool to calculate the pressure difference between the inlet and outlet, as I'm optimizing with respect to minimum pressure loss.
Code:
postProcess -func "pressureDifferencePatch(...)" Code:
--> FOAM Warning : From function bool Foam::functionObjectList::read() in file db/functionObjects/functionObjectList/functionObjectList.C at line 644 Caught FatalError --> FOAM FATAL ERROR: surfaceRegion pressureDifferencePatch(inletoutlet).region1: patch(<patch1>): Unknown patch name: <patch1>. Valid patch names are: 4 ( inlet outlet fixedWalls frontAndBack ) Code:
FoamFile { version 2.0; format ascii; class dictionary; object pressureDifferencePatch; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // pressureDifferencePatch { patch1 <patch1>; patch2 <patch2>; #includeEtc "caseDicts/postProcessing/pressure/pressureDifferencePatch.cfg" } I got the flow rate command working for a single patch as given in the user guide: Code:
postProcess -func "flowRatePatch(name=outlet)" |
|
February 17, 2017, 07:17 |
|
#2 |
New Member
Daniel L
Join Date: Oct 2016
Posts: 5
Rep Power: 9 |
Hi, Jeroen,
Check out the file pressureDifferencePatch at $FOAM_ETC\caseDicts\postProcessing\pressure. Names of Two patches , in your case outlet and inlet, could be defined in it. Then you can use postPrcoess by including it in controlDict file. Now it would work. |
|
February 18, 2017, 11:44 |
|
#3 | |
Member
Andrea Di Ronco
Join Date: Nov 2016
Location: Milano, Italy
Posts: 57
Rep Power: 9 |
Quote:
I'm trying too to use pressureDifferencePatch but I didn't understand what you suggested. I tried to use the dictionary in the ect/... folder by copying and modifying it in the case directory and then using the -dict attribute while calling postProcess in the command line, but it is not working. How did you make it work? Thanks |
||
February 18, 2017, 19:07 |
|
#4 |
New Member
Daniel L
Join Date: Oct 2016
Posts: 5
Rep Power: 9 |
Hi Andrea,
I didn't use the -dict attribute. Instead, I add functions { #includeFunc pressureDifferencePatch } to controlDict, and then call postProcess directly. Best, Dyle |
|
March 1, 2017, 15:18 |
|
#5 |
Member
Min Zhang
Join Date: Mar 2017
Posts: 81
Rep Power: 9 |
Hello Jeroen,
Have you fixed your problem with pressureDifferencePatch function? |
|
January 10, 2018, 05:22 |
|
#6 |
New Member
Sebastian
Join Date: Feb 2017
Posts: 22
Rep Power: 9 |
Hi together,
I try to give a solution that works for me: Add in your system directory of your case a file pressureDifferencePatch as suggested in the first post and replace <patch1> and <patch2> by the names of your patches. Then in the command line one can call the command Code:
postProcess -fields '(p)' -func pressureDifferencePatch Regards Sebastian |
|
April 9, 2018, 07:19 |
|
#7 |
Member
Robin Kamenicky
Join Date: Mar 2016
Posts: 74
Rep Power: 11 |
Hi Sebastian,
this approach works also for me. Thank you, Regards, Robin |
|
April 10, 2018, 02:03 |
|
#8 |
New Member
JD
Join Date: May 2017
Posts: 24
Rep Power: 9 |
Code:
FoamFile { version 2.0; format ascii; class dictionary; object pressureDifferencePatch; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // pressureDifferencePatch { patch1 <patch1>; patch2 <patch2>; #includeEtc "caseDicts/postProcessing/pressure/pressureDifferencePatch.cfg" } |
|
March 27, 2020, 14:07 |
|
#9 |
Senior Member
Reviewer #2
Join Date: Jul 2015
Location: Knoxville, TN
Posts: 141
Rep Power: 11 |
pressureDifferencePatch is nothing but a wrapper over fieldValueDelta.
For more controls. Just use Code:
pressureDifferencePatch1 { type fieldValueDelta; libs ("libfieldFunctionObjects.so"); operation subtract; writeControl timeStep; writeInterval 1; log true; region1 { #includeEtc "caseDicts/postProcessing/surfaceFieldValue/surfaceRegion.cfg" operation areaAverage; fields (p); regionType patch; name inlet; } region2 { #includeEtc "caseDicts/postProcessing/surfaceFieldValue/surfaceRegion.cfg" operation areaAverage; fields (p); regionType patch; name outlet; } } |
|
June 8, 2020, 13:56 |
|
#10 | |
Member
Himanshu
Join Date: Jan 2017
Posts: 34
Rep Power: 9 |
Quote:
I have internal "faceZone" (using writeZone) and I wanted to calculate total pressure on this facezone. But, as we know pressure value is stored on cell center. if we use faceSource will it interpolate the value or we have some other way to calculate total pressure. and p will give static pressure so for total pressure do we use " fields (total(p))"? |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
pressureTools postProcessing function objects in 2.2.0 | immortality | OpenFOAM Post-Processing | 33 | December 22, 2018 11:15 |
How to control output time of pressureTools functions? | Fluido | OpenFOAM Post-Processing | 1 | May 19, 2014 08:49 |