1.8. OpenFOAM and pyFoam¶
pyFoam was created by Bernhard F.W. Gschaider.
I am using pyFoam version 0.6.6.
1.8.1. Training Materials¶
The materials in the list below were created by Bernhard F.W. Gschaider.
This page is based on his training material (anything before 0.6.0 is categorised as “history”):
01 General (latest version was 0.5.2).
02 General (latest version was 0.5.4).
03 Quantative analysis, case control (latest version was 0.5.6).
04 Automated testing (latest version was 0.5.7).
05 General (latest version was 0.6.1).
06 Updates (latest version was 0.6.2).
07 iPython (latest version was 0.6.3).
08 Automatic case setup (latest version was 0.6.5).
09 Post-processing (latest version was 0.6.5).
10 General swak4Foam and pyFoam (latest version was 0.6.5).
11 Communicating with OpenFOAM (latest version was 0.6.8).
12 General swak4Foam and pyFoam (latest version was 0.6.8).
1.8.2. pyFoam Commands¶
Command |
Meaning |
---|---|
$ pyFoamClearCase.py <caseDirectory>
|
Removes all timesteps but the first from a case-directory. Also removes other data that is generated by sovers/utilities/PyFoam |
CourantNumber
{
expr "Courant Number mean: (%f%) max: (%f%)";
name Custom01_Courant_Number;
theTitle "Custom 1 - Courant Number";
titles
(
min
max
);
type regular;
}
|
customRegex file (put in case directory) to measure Courant Number |
$ blockMesh -case damBreak
$ setFields -case damBreak
$ pyFoamPlotRunner.py --clear interFoam -case damBreak
|
Runs blockMesh and setFields, removes all timesteps, solver is interFoam, case directory is damBreak logfile PyFoamRunner.interFoam.logfile is found in the case directory |