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

How to sample during run

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

Reply
 
LinkBack Thread Tools Display Modes
Old   January 12, 2010, 14:52
Default How to sample during run
  #1
New Member
 
Jason Ryon
Join Date: Oct 2009
Posts: 17
Rep Power: 7
jason.ryon is on a distinguished road
Is there a way to run "sample" during a run? For example, I would like to monitor mdot through an inlet and create an animation of a 2D plane slice every 10 or so timesteps. However, to do this with a post-processing sample, I would be required to write the entire case every 10 timesteps and then run sample in the end - which is a lot of storage required.

Thanks,
Jason
jason.ryon is offline   Reply With Quote

Old   January 13, 2010, 07:44
Default
  #2
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by jason.ryon View Post
Is there a way to run "sample" during a run? For example, I would like to monitor mdot through an inlet and create an animation of a 2D plane slice every 10 or so timesteps. However, to do this with a post-processing sample, I would be required to write the entire case every 10 timesteps and then run sample in the end - which is a lot of storage required.
Since 1.5 there is a functionObject that does exactly that. I think it is called surfaces

Bernhard
gschaider is offline   Reply With Quote

Old   January 13, 2010, 13:14
Default
  #3
New Member
 
Jason Ryon
Join Date: Oct 2009
Posts: 17
Rep Power: 7
jason.ryon is on a distinguished road
Yes, the surfaces function worked great for getting animations during runtime instead of post-process. Also the simpleFunctionObjects works great to do things like mass flow and pressure averages.

Thanks!
Jason
jason.ryon is offline   Reply With Quote

Old   March 31, 2010, 16:39
Default
  #4
New Member
 
Michael Lawson
Join Date: Apr 2009
Location: NREL - Boulder, CO
Posts: 11
Rep Power: 8
mlawson is on a distinguished road
Quote:
Originally Posted by jason.ryon View Post
Yes, the surfaces function worked great for getting animations during runtime instead of post-process. Also the simpleFunctionObjects works great to do things like mass flow and pressure averages.

Thanks!
Jason
Hi Jason,

I'm trying to use the surfaces functionObject but have been unable to figure out the syntax for the controlDictionary. Could you post a quick example.

Thanks in advance,

-Mike
mlawson is offline   Reply With Quote

Old   March 31, 2010, 16:59
Default
  #5
New Member
 
Jason Ryon
Join Date: Oct 2009
Posts: 17
Rep Power: 7
jason.ryon is on a distinguished road
In system/controlDict, try to add a new section like:

functions
{
animate
{
type surfaces;
functionObjectLibs ("libsampling.so");
outputControl timeStep;
outputInterval 50;
surfaceFormat vtk;
interpolationScheme cellPointFace;

fields
(
p
U
);
surfaces
(
aplane
{
type plane;
basePoint (0.0 0.0 0.0);
normalVector (0.0 0.0 1.0);
}
pressure_inlet_001
{
type patch;
patchName pressure_inlet_001;
}
);
}

//for the simpleFunction - which you have to download this separately
massFlow
{
type patchMassFlow;
functionObjectLibs ("libsimpleFUnctionObjects.so");
verbose true;
outputControl timeStep;
outputInterval 1;
patches
(
pressure_inlet_001
pressure_outlet
);
};

//another simpleFunction
patchAverage
{
type patchAverage;
functionObjectLibs ("libsimpleFunctionObjects.so");
verbose true;
outputControl timeStep;
outputInterval 1;
patches
(
pressure_inlet_001
pressure_outlet
);
fields
(
p
U
);
}
}
jason.ryon is offline   Reply With Quote

Old   March 31, 2010, 17:18
Default
  #6
New Member
 
Michael Lawson
Join Date: Apr 2009
Location: NREL - Boulder, CO
Posts: 11
Rep Power: 8
mlawson is on a distinguished road
Thanks Jason, worked perfectly.
mlawson is offline   Reply With Quote

Old   April 5, 2010, 06:42
Default sampling for Lagrangian particle tracking
  #7
New Member
 
sankarv
Join Date: Feb 2010
Posts: 26
Rep Power: 7
sankarv is on a distinguished road
Is there a similar sampling tool for Lagrangian particles ? i.e, I would
like to collect particle statistics such as mean particle size, mean
particle velocity etc., at an arbitrary surface inside the domain ?

Please let me know

Thanks
Vaidya
sankarv is offline   Reply With Quote

Reply

Tags
sample

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
Working directory via command line Luiz CFX 4 March 6, 2011 21:02
Application sample with glibc error matthias OpenFOAM Post-Processing 1 March 29, 2008 16:24
heat conducting in a solid domain Rogerio Fernandes Brito CD-adapco 0 March 18, 2008 18:23
heat conducting in a solid domain Rogerio Fernandes Brito CFX 0 March 18, 2008 18:20
about my old post Rogerio Fernandes Brito CFX 1 February 8, 2008 20:19


All times are GMT -4. The time now is 16:07.