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

Automatically write Mach number field during runtime

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By MikeC

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

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

However, this is tedious and also problematic when I examine a running case via paraview, because I would have to run
Code:
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
Code:
systemCall
writeCalls 1( "Mach -latestTime");
to
Code:
controlDict
.
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, 21:55
Default
  #2
New Member
 
Dumbledore
Join Date: Jun 2019
Posts: 10
Rep Power: 7
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, 01:43
Default
  #3
New Member
 
Mike
Join Date: Dec 2016
Posts: 14
Rep Power: 9
MikeC is on a distinguished road
Functional objects can be added to the controlDict, such as:

Code:
functions
{

    MachNumber
    {
        type                       MachNo;
        libs                        ("libfieldFunctionObjects.so");
        executeControl     timeStep;
        writeControl          writeTime;
    }

}
TommyGun likes this.
MikeC is offline   Reply With Quote

Old   August 23, 2019, 04:11
Default
  #4
Senior Member
 
Carlo_P
Join Date: May 2019
Location: Italy
Posts: 176
Rep Power: 8
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"


Cheers,
Carlo
Carlo_P is offline   Reply With Quote

Reply

Tags
mach, post processing, sonicfoam, systemcall


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


All times are GMT -4. The time now is 22:38.