CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Is it able to control the writing timestep for Lagrangian fields?

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By jairoandres

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 7, 2020, 00:01
Default Is it able to control the writing timestep for Lagrangian fields?
  #1
New Member
 
Matthew
Join Date: Aug 2017
Posts: 28
Rep Power: 8
zhangxc0223 is on a distinguished road
I know it can use functions with "libutilityFunctionObjects.so" in controlDict to control the writeInterval to some specific fields. For example the following code is for only writting the T.air' and 'U.air' fields every 1e-5 seconds.

Code:
functions
{
    writeFields
    {
        type writeObjects;
        libs ( "libutilityFunctionObjects.so" );
 
        objects
        (
	    T.air U.air 
        );

        writeControl runTime;
        writeInterval 1e-5;
    }
}
I would like to know how can I control the writeInterval for Lagrangian particles, like the 'U' and 'positions' fields?
zhangxc0223 is offline   Reply With Quote

Old   May 25, 2020, 17:47
Default
  #2
Member
 
Jairo A. Gutiérrez S
Join Date: Nov 2014
Posts: 57
Rep Power: 11
jairoandres is on a distinguished road
Did you find any solution? I am stuck in the same.
jairoandres is offline   Reply With Quote

Old   May 25, 2020, 18:13
Default
  #3
Member
 
Jairo A. Gutiérrez S
Join Date: Nov 2014
Posts: 57
Rep Power: 11
jairoandres is on a distinguished road
Well, I think I rushed to the forum without spending a good time trying to fix it. Here is the solution:

When you use a Lagrangian field inside the "objects", it cannot find it in the database as they are stored inside the kinematicCloud object. Hence if you do the following:

objects
(
kinematicCloud // list of fields/variables to be written
);


It will save all the objects inside kinematicCloud (all the Lagrangian objects).

To save specific Lagrangian objects, such as Nparticle, I guess you need to access the information inside kinematicCloud
negarnaghash likes this.
jairoandres is offline   Reply With Quote

Reply


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
Problem with an old Simulation FrankW CFX 3 February 8, 2016 04:28
Is there a way to get rid of fields at timestep output? Peter_600 OpenFOAM 1 December 17, 2009 02:39
PostChannel maka OpenFOAM Post-Processing 5 July 22, 2009 09:15
Writing solver for U p and T fields kar OpenFOAM Running, Solving & CFD 0 January 21, 2008 13:36
Timestep control via CEL? Claudia CFX 7 September 14, 2007 05:00


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