|
[Sponsors] |
February 23, 2016, 11:54 |
How to set the fieldValue function?
|
#1 |
New Member
Join Date: Oct 2015
Location: Oviedo, Asturias, Espaņa
Posts: 17
Rep Power: 11 |
Hello!
I am modelling a 3D flow field around a building with the K-epsilon and k-omega SST models. One thing that i would like to analyse is how the initial velocity profile develops before getting to the building. I have read that the initial profile usually decreases its energy since it starts to move from the inlet boundary. That's why I have planned to use the fieldValueDelta function in order to measure how big is the difference between U at the inlet and just a few meters before the building. I have been reading the fieldValueData.H file, where it is explained what must be added to the controlDict file. However,as I have seen, it needs to set 2 additional fieldValue functions inside of it, which I cannot find any useful information about. I have found the fieldValue.H and fieldValue.C files, but they only restrain the code, and not what i should type in the controlDict file. In addition, I haven't found any single example or tutorial about fieldValue nor fieldValueDelta. In summarise, I need some advise about the fieldValue function or an example that i could take as model. I hope you might help me. Thanks in advance. Pelayo |
|
February 23, 2016, 13:03 |
|
#2 |
Senior Member
|
Hi,
Did you look into $FOAM_SRC/postProcessing/functionObjects/field/fieldValues/controlDict? fieldValue is really just a base class with two children: faceSource and cellSource (so examples of fieldValue usage are in faceSource.H and cellSource.H). |
|
January 20, 2017, 00:47 |
|
#3 |
New Member
Hamed
Join Date: Dec 2013
Location: Istanbul
Posts: 16
Rep Power: 12 |
hi,
it may help you ! . . . *********************************// startFrom latestTime; startTime 0; stopAt endTime; endTime 500; deltaT 1; writeControl timeStep; writeInterval 50; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression off; timeFormat general; timePrecision 6; runTimeModifiable true; functions { patch-weighted-area-average { type faceSource; functionObjectLibs ("libfieldFunctionObjects.so"); enabled true; outputControl outputTime; // Output to log&file (true) or to file only log true; // Output field values as well valueOutput true; // Type of source: patch/faceZone/sampledSurface source patch; // if patch or faceZone: name of patch or faceZone sourceName outlet; // Operation: areaAverage/sum/weightedAverage ... operation weightedAreaAverage; surfaceFormat null; fields ( p phi // surface fields not supported for sampledSurface U ); } } // ************************************************** *********************** // |
|
Tags |
fieldvalue, fieldvaluedelta, functions, openfoam, post-processing |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Other] refineWallLayer Error | Yuby | OpenFOAM Meshing & Mesh Conversion | 2 | November 11, 2021 12:04 |
Compile problem | ivanyao | OpenFOAM Running, Solving & CFD | 1 | October 12, 2012 10:31 |
channelFoam for a 3D pipe | AlmostSurelyRob | OpenFOAM | 3 | June 24, 2011 14:06 |
latest OpenFOAM-1.6.x from git failed to compile | phsieh2005 | OpenFOAM Bugs | 25 | February 9, 2010 05:37 |
OpenFoam 14 installation problem | gfcoppola | OpenFOAM Installation | 20 | November 2, 2007 14:38 |