CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Post-Processing

How to set the fieldValue function?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 23, 2016, 11:54
Default How to set the fieldValue function?
  #1
New Member
 
Join Date: Oct 2015
Location: Oviedo, Asturias, Espaņa
Posts: 17
Rep Power: 11
pela145 is on a distinguished road
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
pela145 is offline   Reply With Quote

Old   February 23, 2016, 13:03
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,938
Rep Power: 39
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
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).
alexeym is offline   Reply With Quote

Old   January 20, 2017, 00:47
Default
  #3
New Member
 
Hamed
Join Date: Dec 2013
Location: Istanbul
Posts: 16
Rep Power: 12
Hamed1117 is on a distinguished road
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
);
}

}

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

Reply

Tags
fieldvalue, fieldvaluedelta, functions, openfoam, post-processing


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 Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 21:24.