|
[Sponsors] |
pressureTools postProcessing function objects in 2.2.0 |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
August 16, 2014, 12:22 |
|
#21 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128 |
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
__________________
|
|
August 20, 2014, 08:57 |
|
#22 |
New Member
Join Date: Mar 2014
Posts: 17
Rep Power: 12 |
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 |
|
August 28, 2014, 11:02 |
|
#23 | |
Member
Brock Lee
Join Date: Sep 2012
Location: Midwest
Posts: 40
Rep Power: 13 |
Quote:
@Ben: Glad I could help! |
||
September 22, 2014, 17:22 |
pressureTools
|
#24 |
New Member
James Rodgers
Join Date: Jul 2013
Posts: 6
Rep Power: 12 |
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 Code:
--> FOAM FATAL ERROR: Unknown function type pressureTools Valid functions are : 17 ( cellSource faceSource fieldAverage fieldCoordinateSystemTransform fieldMinMax fieldValueDelta nearWallFields patchProbes probes processorField readFields regionSizeDistribution sets streamLine surfaceInterpolateFields surfaces wallBoundedStreamLine ) Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.2.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ pressuretools1 // user-defined name of function object entry { type pressureTools; libs ("libutilityFunctionObjects.so"); //region defaultRegion; enabled yes; //timeStart 0; //timeEnd 10; outputControl timeStep;//outputTime;// outputInterval 1; // 5000; calcTotal yes; calcCoeff yes; } // ************************************************************************* // Last edited by wyldckat; April 6, 2015 at 13:40. Reason: Added [CODE][/CODE] |
|
September 23, 2014, 04:41 |
|
#25 |
New Member
James Rodgers
Join Date: Jul 2013
Posts: 6
Rep Power: 12 |
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 |
|
April 6, 2015, 13:48 |
|
#26 | ||
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128 |
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 { //... } pressuretools2 { //... } Best regards, Bruno
__________________
|
|||
March 28, 2016, 16:15 |
|
#28 | |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128 |
Quote:
|
||
April 8, 2016, 09:23 |
|
#29 |
Senior Member
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 10 |
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 { pressureTools1 { type pressureTools; functionObjectLibs ("libutilityFunctionObjects.so"); source wall; sourceName cylinder; log yes; outputControl timeStep; outputInterval 1; //enabled yes; calcTotal no; calcCoeff yes; pRef 0; rhoInf 1.0; pInf 101325; UInf (0.4208 0 0); } } 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? |
|
April 10, 2016, 14:09 |
|
#30 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128 |
Quick answers:
Try changing to this: Code:
outputControl outputTime;
After the function object has done its job, either while the solver was running or by running execFlowFunctionObjects, these pressure fields will have been written to the time folder(s). Then you can use sample to sample over the data in the written fields. Another alternative I can think of is the tutorial "incompressible/simpleFoam/motorBike/", which in file "system/forceCoeffs" has an example of a function object for calculating the Cd and Cl, if I remember correctly. This file is included by the file "system/controlDict", which is why it will be executed while the solver is running. |
|
April 11, 2016, 06:30 |
|
#31 |
Senior Member
ArielJ
Join Date: Aug 2015
Posts: 127
Rep Power: 10 |
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++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object transportProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // phases (water air); water { transportModel Newtonian; nu nu [ 0 2 -1 0 0 0 0 ] 0.0631; // Re = 40 rho rho [ 1 -3 0 0 0 0 0 ] 1028; CrossPowerLawCoeffs { nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06; nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06; m m [ 0 0 1 0 0 0 0 ] 1; n n [ 0 0 0 0 0 0 0 ] 0; } BirdCarreauCoeffs { nu0 nu0 [ 0 2 -1 0 0 0 0 ] 0.0142515; nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06; k k [ 0 0 1 0 0 0 0 ] 99.6; n n [ 0 0 0 0 0 0 0 ] 0.1003; } } air { transportModel Newtonian; nu nu [ 0 2 -1 0 0 0 0 ] 1.568e-05; //1.48e-05; --> current measurement for kinematic viscosity found at engineeringtoolbox.com rho rho [ 1 -3 0 0 0 0 0 ] 1; CrossPowerLawCoeffs { nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06; nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06; m m [ 0 0 1 0 0 0 0 ] 1; n n [ 0 0 0 0 0 0 0 ] 0; } BirdCarreauCoeffs { nu0 nu0 [ 0 2 -1 0 0 0 0 ] 0.0142515; nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06; k k [ 0 0 1 0 0 0 0 ] 99.6; n n [ 0 0 0 0 0 0 0 ] 0.1003; } } sigma sigma [ 1 0 -2 0 0 0 0 ] 0.07; // ************************************************************************* // 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 |
|
November 30, 2018, 04:46 |
|
#32 | |
New Member
Arthur
Join Date: Oct 2018
Location: Glasgow
Posts: 20
Rep Power: 7 |
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 |
||
December 22, 2018, 11:06 |
|
#33 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,974
Blog Entries: 45
Rep Power: 128 |
Quick answer: I see that you later on have gotten an answer to your question here: pressure drop using chtMultiRegionFoam
Essentially there were two issues:
__________________
|
|
December 22, 2018, 11:15 |
|
#34 | |
New Member
Arthur
Join Date: Oct 2018
Location: Glasgow
Posts: 20
Rep Power: 7 |
Quote:
|
||
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
compressible flow in turbocharger | riesotto | OpenFOAM | 50 | May 26, 2014 01:47 |
channelFoam for a 3D pipe | AlmostSurelyRob | OpenFOAM | 3 | June 24, 2011 13:06 |
ParaView for OF-1.6-ext | Chrisi1984 | OpenFOAM Installation | 0 | December 31, 2010 06:42 |
Droplet Evaporation | Christian | Main CFD Forum | 2 | February 27, 2007 06:27 |
REAL GAS UDF | brian | FLUENT | 6 | September 11, 2006 08:23 |