Controling openfoam output

A subforum specific to the development of the OpenFoam-based workbenches ( Cfd and CfdOF )

Moderator: oliveroxtoby

Post Reply
Posts: 49
Joined: Tue Oct 10, 2017 6:41 pm

Controling openfoam output

Post by primer »


I would like to limit the amount data being written to disk for large runs. I have been running cases which have involved many time steps. Each time step generates large files for many calculated parameters which I am not interested in. Is there a way to control which parameters are written to disk? I have seen some reference to this but what I have tried does not work. For instance, it has been suggested that the following be put in the function's section of the system/controlDict file.

Code: Select all

	type        writeObjects;
	libs        ("");
	objects     (rho nut alphat k Ma pseudoCoField);
	writeOption noWrite;
	type        writeObjects;
	libs        ("");
	objects     (U p T);
	writeOption autoWrite;
If this is an approach, what I'm I doing wrong? I am using openfoam-v9.

Additionally, the way I have my domain boundary configured, I am only interested in the domain surface fields for the U p and T variables. It is a shame to write out the volume fields. I have inserted the line #includeFunc surfaces in the system.controlDict file and put this file in the system directory

Code: Select all

  type surfaces;
  libs            ("");
  writeControl    adjustableRunTime;
  writeInterval   1e-06;;

  interpolationScheme cellPoint;
  surfaceFormat vtk;
  writeFormat     binary;

       type    patch;
       patches (inlet, outlet, constraint);
       interpolate true;
       triangulate false;

  fields          (T U p);
I generated the anticipated vtk files but I get an error when I use paraview to render the files. The error I get is

Code: Select all

ERROR: In vtkOpenFOAMReader.cxx, line 11302
vtkPOpenFOAMReader (0x1b593080): Cannot open directory: /tmp/cfdof/case/postProcessing/surfaces/0.0001/constant/

ERROR: In vtkExecutive.cxx, line 741
vtkPVCompositeDataPipeline (0x1b6a1ca0): Algorithm vtkPOpenFOAMReader (0x1b593080) returned failure for request: vtkInformation (0x1b53b450)
  Debug: Off
  Modified Time: 1321417
  Reference Count: 1
  Registered Events: (none)
Any thoughts on these issues is appreciated. Also, how does one close old posts?


Code: Select all

OS: Fedora Linux 37 (MATE-Compiz) (MATE/mate)
Word size of FreeCAD: 64-bit
Version: 0.20.2.Unknown
Build type: Unknown
Python 3.11.1, Qt 5.15.8, Coin 4.0.0, Vtk 9.1.0, OCC 7.6.3
Locale: English/United States (en_US)
Installed mods: 
  * Plot 2022.4.17
  * FeedsAndSpeeds 0.5.0
  * Help 1.0.3
  * CfdOF 1.24.5
Last edited by primer on Tue Sep 19, 2023 9:10 am, edited 1 time in total.
Posts: 51071
Joined: Tue Mar 17, 2015 9:14 am

Re: Controling openfoam output

Post by chrisb »

Please edit your post and put the code in code tags using the button </>. That makes the post easier to read and shows immediately the indentations.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply