CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM Post-Processing

How to set the fieldValue function?

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Display Modes
Old   February 23, 2016, 11:54
Default How to set the fieldValue function?
New Member
Join Date: Oct 2015
Location: Oviedo, Asturias, Espaņa
Posts: 17
Rep Power: 3
pela145 is on a distinguished road

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.

pela145 is offline   Reply With Quote

Old   February 23, 2016, 13:03
Senior Member
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,670
Rep Power: 27
alexeym will become famous soon enoughalexeym will become famous soon enough
Send a message via Skype™ to alexeym

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).
alexeym is offline   Reply With Quote

Old   January 20, 2017, 00:47
New Member
Join Date: Dec 2013
Location: Istanbul
Posts: 4
Rep Power: 5
Hamed1117 is on a distinguished road
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;

type faceSource;
functionObjectLibs ("");

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;

phi // surface fields not supported for sampledSurface


// ************************************************** *********************** //
Hamed1117 is offline   Reply With Quote


fieldvalue, fieldvaluedelta, functions, openfoam, post-processing

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
refineWallLayer Error Yuby OpenFOAM Meshing & Mesh Conversion 1 May 19, 2017 10:13
Compile problem ivanyao OpenFOAM Running, Solving & CFD 1 October 12, 2012 09:31
channelFoam for a 3D pipe AlmostSurelyRob OpenFOAM 3 June 24, 2011 13: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

All times are GMT -4. The time now is 22:55.