pressureTools postProcessing function objects in 2.2.0
here:
http://www.openfoam.org/version2.2.0...processing.php its mentioned about pressureTools.how can use these function objects? is there a tutorial or more guidance through? new pressureTools - enables the calculation of pressure (from kinematic pressure), total pressure, pressure coefficient and total pressure coefficient. |
Hi Ehsan,
Quick answer:
Bruno |
thank you Bruno
can use a Code:
operation areaAverage; totally can use other features of function objects like the one below with it? and is there a totalTemperature too or isn't? Code:
Average_left |
Hi Ehsan,
A bit of a confusion of ideas going on here... OK, so to sort out by items:
Bruno |
you mean I can simply add total(p) to the function as below?without adding anything other?
Code:
Average_left |
:confused: Where's the "pressureTools" entry?
I have not tested this, this is just copy-paste-adapt from the pages I posted links for: Code:
myFunctionObject // user-defined name of function object entry |
Ok.thanks.is it true now?
Code:
totalP // user-defined name of function object entry Code:
operation weightedAverage; |
I think it's all OK. I can't see nothing wrong with it.
|
hi Bruno
Really?i thought maybe those lines for weightedAverarage had another keywords as the case you sent to me before but i can't find now.please have a look into it again tomorrow. Thanks. Have a good night. |
Hi Ehsan,
:confused: Sorry, I don't understand the question. The function objects code seems to be OK. I don't see any problem with it. The reference page on how to use "faceSource" is this one: http://foam.sourceforge.net/docs/cpp...5.html#details Wait... :eek: now I see the problem! It should be: Code:
operation weightedAverage; Bruno |
Hi
if I want to use function object on a face,how should change these terms? Code:
source patch; Code:
source sampledSurface; |
in compressible case I should use pRef 0;
correct? |
it writes total(p) values in all time steps in the solution folder but not in the patch I have set:
Code:
# Source : patch left Code:
totalP // user-defined name of function object entry Code:
totalPressure_left Code:
Average_left |
Hi Ehsan,
Took me a while to get to here, but here goes:
__________________ As for the original issue on the previous post, I'll quote what I've already sent you through emails - The following function objects worked well together: Code:
functions
Bruno |
dear Bruno
it wouldn't make any trouble to use it?because I'm in middle of the run and Bernhard has told maybe it will cause some inconsistency with before versions if I have understood correctly? |
Quote:
Quote:
The second detail is likely related to groovyBC!? |
thanks.I'm compiling i now.it will replaced to before version automatically?
and I have to move old folders to postProcessing folder manually and no other issue will take place? |
Quote:
Quote:
|
Hi Ehsan and Bruno,
I found your post very interesting, since I'm trying to use the pressureTools to compute the static pressure from an incompressible case that uses kinematic pressure. I would have used the utility as follows: { type pressureTools; libs ("libutilityFunctionObjects.so"); enabled yes; outputControl timeStep;//outputTime;// calcTotal no; calcCoeff no; } It does yield a static(p) field, but the values are very low (1e-16). Have I done something wrong ? Best regards BenJ |
Quote:
I just figured this out not too long ago. You have to specify a rho value for pressure tools to use to convert from kinematic to static pressure. Add these two lines to your pressure tools functionObject... rhoName rhoInf; rhoInf 1.225; // density value ______________________________________ Gentlemen, I have an additional question related to this pressure tools function object. Is there a way to calculate static pressure for every time step and not have it write out the iteration folder every time step? I want to be able to monitor a mass-weighted static pressure at an outlet every time-step (for an in-compressible solver). I can't find a way to do this though without forcing pressure tools to write an iteration folder every time step. Here is my current pressure-tools setup... Code:
p_tools Brock |
Greetings to all!
@Brock: That wasn't possible in OpenFOAM 2.2, but it is possible to do in OpenFOAM 2.3. The source code file in question is this: Code:
$FOAM_SRC/postProcessing/functionObjects/utilities/pressureTools/pressureTools.C Best regards, Bruno |
Hi!
Thank you GRAUPS, it works perfectly now! Now I hop this static pressure field can be used to change from simpleFoam to rhoSimpleFoam :) Best regards Benjamin |
Quote:
Quote:
|
pressureTools
Dear all,
I'm trying to get "pressureTools" function to work with simpleFoam but I get the error shown below. I've checked and the files were definitely compiled so should be available to call. Can anyone offer an insight? Thanks, James :D Code:
--> FOAM FATAL ERROR: Code:
/*--------------------------------*- C++ -*----------------------------------*\ |
So.. I have had some success!
I need to change the library reference to: functionObjectLibs ("libutilityFunctionObjects.so"); However, I then needed to specify: pRef pInf rhoInf UInf And the result was total pressure coefficient (Cp0) being calculated but not static pressure coefficient (Cp)? Will the function only calculate one or the other or can you get it to calculate both? The modes of operation are: \table Mode | calcTotal | calcCoeff static pressure | no | no total pressure | yes | no pressure coefficient | no | yes total pressure coefficient | yes | yes \endtable Any advice gratefully received! Thanks |
Greetings James,
Sorry for the very late reply, but only today did I finally manage to take a look into this. From what I can see from another post you've done, you've found a solution: Quote:
Quote:
Code:
pressuretools1 Best regards, Bruno |
Is it possible to write an areaAverage pressure along an axis as asked here using pressure tools?
Thanks |
Quote:
|
Hi there,
Is it possible to use pressureTools as a sample instead of functionObject? I added this piece of code to my controlDict: Code:
functions Two questions: 1) Can I set this up in my sampleDict instead? 2) I really just want to calculate the total pressure at probes on the cylinder to calculate the drag from that.... is this the best way to do it? |
Quick answers:
Quote:
Code:
outputControl outputTime;
Quote:
Then you can use sample to sample over the data in the written fields. Quote:
|
Hi wyldckat,
Thank you for your very thorough response... I have two follow up questions/issues now: 1) I am trying to run execFlowFunctionObjects, which is giving the error that the keyword transport properties is undefined..However, here is my transportProperties file: Code:
/*--------------------------------*- C++ -*----------------------------------*\ 2) I am trying to really understand what the pressure I am getting is because I was having issues implementing the calculating for dragForce, and so I want to calculate it from the pressures instead so I can better understand it. In waveFoam, I am calculating two pressures: p_rgh and p. I am understanding that p_rgh is a reference pressure that is calculated and p would then be p = p_rgh + rho*g*h, which would mean then that the total pressure, and then pressures used in the calculation for pressure coefficient, Cp, would be: p + 0.5*rho*Uinf^2 (where I've been taking Uinf from a probe near the inlet). I'll say now that doing it this way has not been yielding results for the Cp that I'm expecting (as in, the value that I'm calculating for Cp is far too high). Is there something I am misunderstanding about the pressures? Thanks again for your help, Ariel |
1 Attachment(s)
Quote:
Hi, Can anyone help with the running of this code through chtMultiRegionFoam? (I am using OpenFOAM 6) I have copied the above into my controlDict folder and I have tried running the following: chtMultiRegionFoam -postProcess -func writeMissingFields chtMultiRegionFoam -postProcess -func totalP chtMultiRegionFoam -postProcess -func Average_left chtMultiRegionFoam -postProcess -func reloadTotalP chtMultiRegionFoam -postProcess -func totalPressure_left in that order. -I've also tried it without the inclusion of chtMultiRegionFoam in the above order. -I've also tried running each part seperately as well, but it still doesn't work - I don't get a postProcessing folder, or any sort of results. I have changed the patch name to the one I require - cyclicFluidInlet. I am completely at a loss, if anyone could help then I would be very greatful. I have included my controlDict as well (I had to zip it to upload), any other information can be supplied. Thanks, Arthur |
Quick answer: I see that you later on have gotten an answer to your question here: https://www.cfd-online.com/Forums/op...egionfoam.html
Essentially there were two issues:
|
Quote:
|
All times are GMT -4. The time now is 17:29. |