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

How to have only some field print in time steps folders?

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 11, 2020, 07:10
Exclamation How to have only some field print in time steps folders?
  #1
New Member
 
Lucie Recurt
Join Date: Jun 2020
Posts: 17
Rep Power: 2
lucie.recurt is on a distinguished road
Hello foamies!!!



I'm working on a particles track case using OpenFOAM 20.06. My case is running but I would like to have only the positions file in my time's folders. I tried to do that by adding those line in the controlDict file:



functions
{ writeObjects1
{
type writeObjects;
libs ("libutilityFunctionObjects.so");


objects (
U
boundary
cellZones
data
epsilon
faceZones
faces
fvSchemes
fvSolution
k
kinematicCloud
kinematicCloud:UCoeff
kinematicCloud:UTrans
kinematicCloudOutputProperties

kinematicCloudProperties
mu
neighbour
nu
nut
owner
phi
pointConstraints
pointMesh
pointZones
points
rho
tetBasePtIs
transportProperties
turbulenceProperties
volPointInterpolate(U)
volPointInterpolation
);// i.e fields you don't want
writeOption noWrite;//anyWrite;autoWrite
}

writeObjects1
{
type writeObjects;
libs ("libutilityFunctionObjects.so");
objects (
kinematicCloudPositions );
writeOption autoWrite;
}
}


but it's not working, I got every field write in every time step folder...


Does someone know how to do that?



Thanks in advance!
lucie.recurt is offline   Reply With Quote

Old   August 13, 2020, 16:02
Default
  #2
Senior Member
 
anonymous
Join Date: Jan 2016
Posts: 381
Rep Power: 8
simrego is on a distinguished road
Hi!


I shouldn't do this. Instead try to increase the writeInterval in the controlDict, to make sure at least sometimes you write your fields (thus you can restart the run if needed). Then you could write the needed fields more frequently with this functionObject.
simrego is offline   Reply With Quote

Old   August 19, 2020, 05:35
Default
  #3
New Member
 
Lucie Recurt
Join Date: Jun 2020
Posts: 17
Rep Power: 2
lucie.recurt is on a distinguished road
Thanks you so much for your answer. I decided to write it like that:

functions
{writeObjects1
{
type writeObjects;
libs ("libutilityFunctionObjects.so");


objects (
kinematicCloud
);// i.e fields you don't want
writeOption autoWrite;//anyWrite;autoWrite
writeControl timeStep;
writeInterval 1;
}
writeObjects2
{
type writeObjects;
libs ("libutilityFunctionObjects.so");


objects (
kinematicCloud
);// i.e fields you don't want
writeOption noWrite;//anyWrite;autoWrite
}
it prints just the folder lagrangian
lucie.recurt is offline   Reply With Quote

Old   August 19, 2020, 06:02
Default
  #4
Senior Member
 
anonymous
Join Date: Jan 2016
Posts: 381
Rep Power: 8
simrego is on a distinguished road
So is it working now or not? I'm not sure.
I just modified the aachenbomb tutorial and it's working properly for me. It writes everything at every 5e-5 seconds, but it will write the sprayCloud object for every timestep. (it is OF v1912, but I guess it should be fine with the foundation version too)
You can change the writeControl and the objects entries as you wish.
And make sure that you have only one setting for a field. In your post you set autoWrite, then noWrite in the second functionObject. You should decide if you need the fields or not.
Attached Images
File Type: png Screenshot from 2020-08-19 10-55-43.png (105.2 KB, 5 views)
simrego is offline   Reply With Quote

Reply

Tags
fields, positions, postprocessing, print

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
laplacianFoam with source term Herwig OpenFOAM Running, Solving & CFD 17 November 19, 2019 14:47
[Other] dynamicTopoFVMesh and pointDisplacement RandomUser OpenFOAM Meshing & Mesh Conversion 6 April 26, 2018 08:30
Stuck in a Rut- interDyMFoam! xoitx OpenFOAM Running, Solving & CFD 14 March 25, 2016 08:09
[blockMesh] Another cylinder question bendel_boy OpenFOAM Meshing & Mesh Conversion 5 January 6, 2015 06:09
same geometry,structured and unstructured mesh,different behaviour. sharonyue OpenFOAM Running, Solving & CFD 13 January 2, 2013 23:40


All times are GMT -4. The time now is 14:53.