CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

Starting field averaging using libFunctionObject after certain time

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

Like Tree6Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   May 7, 2013, 11:51
Default solution to non updating trackDict
  #21
Senior Member
 
Eelco van Vliet
Join Date: Mar 2009
Location: The Netherlands
Posts: 123
Rep Power: 10
eelcovv is on a distinguished road
The answer can be found in the function object source code: the fileModificationSkew si not allowed to be too large. Just create a directory

$HOME/.OpenFOAM/2.2.x

or what ever you version is, copy $WM_PROJECT_DIR/etc/controlDict to this directory and modify the line

fileModificationSkew 30 to something smaller.

Then an update of a dictionary being tracked will result in a reread of it.

Regards
Eelco
eelcovv is offline   Reply With Quote

Old   May 15, 2013, 16:06
Default reread the subdictionaries from an regIOobject
  #22
Senior Member
 
Eelco van Vliet
Join Date: Mar 2009
Location: The Netherlands
Posts: 123
Rep Power: 10
eelcovv is on a distinguished road
One more question on this topic

When a dictionary is re-read after an file-update, only the content at the 'top-level is read, not the sub-dictionaries. This can be seen in the file

$FOAM_SRC/OpenFOAM/db/regIOobject/regIOobjectRead.C, line 285-292. It says: reread object name(), which is the name of the dictionary.

however, sometimes you want to read the subdictionaries as well. For instance in kinematicCloudProperties, you want to update the mass flow rate of the injectors by modifying the file during the run.

Is there an easy way to force OF to re-read the subdictionaries during a run ?

Well, not so important, but it would be handy

Thanks for the hints!
Regards
Eelco
eelcovv is offline   Reply With Quote

Old   November 19, 2014, 09:53
Default
  #23
Member
 
Muhammad Waqas
Join Date: Jul 2014
Location: Germany
Posts: 53
Rep Power: 4
mwaqas is on a distinguished road
Send a message via Skype™ to mwaqas
Hello Everyone

I am beginner in OpenFoam, may be my question looks very busy, I am sorry for that.
I am using fieldAverage to get time-averaged of velocity. I get the time-averaged file in respective time step folder but I don't know how can I view this average field using paraview. When I load my case to paraview, it shows only entities which are present in "0" folder. It does not show averaged field i.e. UMean

Regards
Waqas
mwaqas is offline   Reply With Quote

Old   October 19, 2015, 02:25
Default
  #24
Member
 
Manjura Maula Md. Nayamatullah
Join Date: May 2013
Location: San Antonio, Texas, USA
Posts: 42
Rep Power: 5
mmmn036 is on a distinguished road
Hello Steven,

I am using 2.2.x version of OpenFoam. The averaging utility you attached give me a compilation error. Do you have an updated version of this utility? I greatly appreciate your support.

MMMN
mmmn036 is offline   Reply With Quote

Old   December 7, 2015, 23:06
Default compile field meet error
  #25
Member
 
Fengjiao Bian
Join Date: Nov 2013
Location: beijing
Posts: 30
Rep Power: 4
jiaojiao is on a distinguished road
Hi, Steven !I also want to start field averaging at a certain time when the field is fully developed.I down load the field.zip and unzip it.Then I put the directory at the path home/OpenFoam and run 'wmake libso' to compile it. But it come to error like this:
[hpc@hpcserver:~/OpenFOAM/field$ wmake libso
SOURCE=fieldAverage/fieldAverage/fieldAverage.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam222/src/finiteVolume/lnInclude -I/opt/openfoam222/src/meshTools/lnInclude -I/opt/openfoam222/src/lagrangian/basic/lnInclude -I/opt/openfoam222/src/sampling/lnInclude -IlnInclude -I. -I/opt/openfoam222/src/OpenFOAM/lnInclude -I/opt/openfoam222/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/fieldAverage.o
In file included from /opt/openfoam222/src/OpenFOAM/lnInclude/className.H:34:0,
from /opt/openfoam222/src/OpenFOAM/lnInclude/typeInfo.H:57,
from /opt/openfoam222/src/OpenFOAM/lnInclude/token.H:46,
from /opt/openfoam222/src/OpenFOAM/lnInclude/Istream.H:47,
from /opt/openfoam222/src/OpenFOAM/lnInclude/ISstream.H:39,
from /opt/openfoam222/src/OpenFOAM/lnInclude/IOstreams.H:38,
from /opt/openfoam222/src/OpenFOAM/lnInclude/VectorSpace.C:27,
from /opt/openfoam222/src/OpenFOAM/lnInclude/VectorSpace.H:171,
from /opt/openfoam222/src/OpenFOAM/lnInclude/Vector.H:44,
from /opt/openfoam222/src/OpenFOAM/lnInclude/vector.H:39,
from /opt/openfoam222/src/OpenFOAM/lnInclude/fieldTypes.H:35,
from /opt/openfoam222/src/finiteVolume/lnInclude/volFieldsFwd.H:37,
from fieldAverage/fieldAverage/fieldAverage.H:88,
from fieldAverage/fieldAverage/fieldAverage.C:26:
/opt/openfoam222/src/OpenFOAM/lnInclude/debugName.H:45:11: error: ?.ddFoam?.has not been declared
class add##Tag##ToDebug \
^
/opt/openfoam222/src/OpenFOAM/lnInclude/debugName.H:125:5: note: in expansion of macro ?.egisterDebugSwitchWithName?
registerDebugSwitchWithName(Type, Type, Type::typeName_())
^
/opt/openfoam222/src/OpenFOAM/lnInclude/className.H:145:5: note: in expansion of macro ?.efineDebugSwitch?
defineDebugSwitch(Type, DebugSwitch)
^
fieldAverage/fieldAverage/fieldAverage.C:34:1: note: in expansion of macro ?.efineTypeNameAndDebug?
defineTypeNameAndDebug(Foam::fieldAverage, 0);
^
/opt/openfoam222/src/OpenFOAM/lnInclude/debugName.H:46:5: error: expected unqualified-id before ?.?.token
: \
^
/opt/openfoam222/src/OpenFOAM/lnInclude/debugName.H:125:5: note: in expansion of macro ?.egisterDebugSwitchWithName?
registerDebugSwitchWithName(Type, Type, Type::typeName_())
^
/opt/openfoam222/src/OpenFOAM/lnInclude/className.H:145:5: note: in expansion of macro ?.efineDebugSwitch?
defineDebugSwitch(Type, DebugSwitch)
^
fieldAverage/fieldAverage/fieldAverage.C:34:1: note: in expansion of macro ?.efineTypeNameAndDebug?
defineTypeNameAndDebug(Foam::fieldAverage, 0);
^
make: *** [Make/linux64GccDPOpt/fieldAverage.o] Error 1]
could you tell me how to fix the errors ?
Quote:
Originally Posted by stevenvanharen View Post
Hi Eelco,

We had the same problem, we added a keyword 'after' to the fieldAverage function. This will delay averaging untill the specified time is reached (this is specified in controlDict).

You can unzip this folder and compile it (wmake libso), in the controlDict which is in the folder you can see how to use it.

I hope this solves your problem, please let me know if you have any more questions.

Regards,

Steven
jiaojiao is offline   Reply With Quote

Old   December 7, 2015, 23:28
Default
  #26
Member
 
Fengjiao Bian
Join Date: Nov 2013
Location: beijing
Posts: 30
Rep Power: 4
jiaojiao is on a distinguished road
Hello, do you solver the problem caused by the different version? My OPENFOAM is the 2.2.2version.
Quote:
Originally Posted by mmmn036 View Post
Hello Steven,

I am using 2.2.x version of OpenFoam. The averaging utility you attached give me a compilation error. Do you have an updated version of this utility? I greatly appreciate your support.

MMMN
jiaojiao is offline   Reply With Quote

Reply

Tags
libutilityfunctionobjects, swak4foam, timeactivatedfileupdate, trackdictionary

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
TwoPhaseEulerFoam and Boundary conditions raagh77 OpenFOAM Running, Solving & CFD 98 September 23, 2013 06:31
Field averaging in a certain time interval misakagan OpenFOAM Running, Solving & CFD 1 December 11, 2009 06:39
Convergence moving mesh lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 15:09
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 02:58
Physical Reason for stability of Implicit Schemes? radhakrishnan Main CFD Forum 25 December 7, 2000 16:25


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