|
[Sponsors] |
April 18, 2016, 11:12 |
averaged pressure over the boundary
|
#1 |
New Member
|
Hello,
I am running a transient case (of course in OpenFoam) and I wish to plot average pressure on one of the boundaries with the time. Can anybody suggest me how to do it? I tried PatchAverage p boundaryname. But I can't see anything either in paraview or something in post-processing folder (Or, I don't know how to see it). Any help or suggestion is highly appreciated. regards, Naive user |
|
April 18, 2016, 18:34 |
|
#2 |
Senior Member
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 22 |
If you install swak4foam you can use this:
https://openfoamwiki.net/index.php/C...unctionObjects |
|
April 19, 2016, 19:51 |
|
#3 |
New Member
Université de Sherbrooke
Join Date: Jul 2015
Posts: 6
Rep Power: 11 |
Hi Sachin,
This is a way to do it without having to install swak4Foam: averagePressure { type faceSource; functionObjectLibs ("libfieldFunctionObjects.so"); outputControl timeStep; log true; valueOutput true; source patch; surfaceFormat off; verbose true; sourceName upstream; // replace this with your boundary patch name operation areaAverage; fields ( p ); } Add the code above within the functions subdictionary in your controlDict file and change the sourceName to the boundary patch name that you want to calculate the average pressure over. The average pressure along the boundary will be printed out in a text file in the postProcessing folder in your case. To plot the pressure data you can easily do it with gnuplot (have a look online for a simple tutorial). Also, most solvers in OpenFOAM give pressure as the kinematic pressure (p/rho), so if you end up getting what look to be very small pressure values try multiplying them by your fluid density. Hope that helps. Last edited by Jason_Duguay; April 20, 2016 at 09:08. |
|
April 22, 2016, 05:12 |
|
#4 |
New Member
|
Many thanks, Jason and Joachim, for your solutions.
Best, Sachin |
|
May 11, 2020, 05:28 |
|
#5 | |
Senior Member
Franco
Join Date: Nov 2019
Location: Compiègne, France
Posts: 129
Rep Power: 7 |
Quote:
small question, I am in a steadystate simulation (simpleFoam) so i would like to extract the averagePressure at the inlet but only for the last time, is it possible? also when i continued my old simulation for the next time (I added the function to the controlDict) it have not created a postProssesing folder, should i do something extra to the run of the application so OF adds it? thanks |
||
May 11, 2020, 19:52 |
|
#6 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
Hi,
>> small question, I am in a steadystate simulation (simpleFoam) so i would like to extract the averagePressure at the inlet but only for the last time, is it possible? - Adding the following entry to your function object may help in this regard: `writeTime onEnd;`. >> also when i continued my old simulation for the next time (I added the function to the controlDict) it have not created a postProssesing folder, should i do something extra to the run of the application so OF adds it? - Could you please elaborate this question, if possible? The `postProcessing` folder should be created when the function object writes out the relevant information.
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
May 12, 2020, 05:23 |
|
#7 | ||
Senior Member
Franco
Join Date: Nov 2019
Location: Compiègne, France
Posts: 129
Rep Power: 7 |
Quote:
>>- Adding the following entry to your function object may help in this regard: `writeTime onEnd;`. thanks a lot! >>- Could you please elaborate this question, if possible? The `postProcessing` folder should be created when the function object writes out the relevant information. I have my case already run it (it achieved the minimum residuals I gave in fvSolutions, so to see if this was functional, I added to the functions in the controlDict file, and then change the minimum residuals (to a lower level so the simulation could continue from the lastestTime) and run de solver, but there were no postProcessing folder created ( I changed as mentioned "sourceName upstream; // replace this with your boundary patch name" for "sourceName inlet" that is the name of my patch that i want to investigate. EDIT: it shows as openFOAM (at least the version (vr7) i have does not have the same functions?) I did not saw this in the log file as it was at the beginning of the log and i though that if there was an error it would not continue at all... first it does not recognise the function faceSource: Quote:
franco Last edited by otaolafr; May 12, 2020 at 09:46. |
|||
May 18, 2020, 18:34 |
|
#8 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
Hi,
I lost track of things, and lost entries where I promised to help. Can you poke me within few weeks time if I don't come back to your problem, and you would still need something. Thanks.
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Radiation in semi-transparent media with surface-to-surface model? | mpeppels | CFX | 11 | August 22, 2019 08:30 |
Problem with SIMPLEC-like finite volume channel flow boundary conditions | ghobold | Main CFD Forum | 3 | June 15, 2015 12:14 |
An error has occurred in cfx5solve: | volo87 | CFX | 5 | June 14, 2013 18:44 |
what the result is negatif pressure at inlet | chong chee nan | FLUENT | 0 | December 29, 2001 06:13 |
Hydrostatic pressure in 2-phase flow modeling (CFX4.2) | HB &DS | CFX | 0 | January 9, 2000 14:19 |