CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Automatically write Mach number field during runtime

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

Like Tree1Likes
  • 1 Post By MikeC

LinkBack Thread Tools Search this Thread Display Modes
Old   November 5, 2015, 11:14
Default Automatically write Mach number field during runtime
New Member
Join Date: Nov 2015
Posts: 1
Rep Power: 0
daharn is on a distinguished road

I am using sonicFoam on OF 2.1 and when I would like to calculate the Mach number in my domain I simply run

However, this is tedious and also problematic when I examine a running case via paraview, because I would have to run
Mach -latestTime
whenever a new time folder is written.

Is it possible to tell OF to calculate the Mach field at every write interval during runtime?
I have already tried to add a
writeCalls 1( "Mach -latestTime");
This should work for composed cases but won't work very well when running in parallel, since I would have to hardcode the root directories for each instance.

Am I missing something? Is there a better way?
daharn is offline   Reply With Quote

Old   August 17, 2019, 20:55
New Member
Join Date: Jun 2019
Posts: 10
Rep Power: 5
hemanthgrylls is on a distinguished road
I am also looking for the same

please kindly let me know if you know the solution
hemanthgrylls is offline   Reply With Quote

Old   August 23, 2019, 00:43
New Member
Join Date: Dec 2016
Posts: 14
Rep Power: 8
MikeC is on a distinguished road
Functional objects can be added to the controlDict, such as:


        type                       MachNo;
        libs                        ("");
        executeControl     timeStep;
        writeControl          writeTime;

TommyGun likes this.
MikeC is offline   Reply With Quote

Old   August 23, 2019, 03:11
Senior Member
Join Date: May 2019
Location: Italy
Posts: 176
Rep Power: 7
Carlo_P is on a distinguished road
Hey All,
if you need the MachNumber only for last iteration, (or for old simulations) you can also create a new controldict file (such as postDict), with all the standard entry and the functionObjects and run "application -postProcessing"

Carlo_P is offline   Reply With Quote


mach, post processing, sonicfoam, systemcall

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
AMI speed performance danny123 OpenFOAM 21 October 24, 2020 04:13
DPMFoam - Serious Error --particle-laden flow in simple geometric config benz25 OpenFOAM Running, Solving & CFD 27 December 19, 2017 20:47
Compressor Simulation using rhoPimpleDyMFoam Jetfire OpenFOAM Running, Solving & CFD 107 December 9, 2014 13:38
DecomposePar unequal number of shared faces maka OpenFOAM Pre-Processing 6 August 12, 2010 09:01
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Meshing & Mesh Conversion 2 July 15, 2005 04:15

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