To set up the run folder, for solving a problem, few input files are needed by the FEST-3D solver. To facilitate the process of setting up all these input files, a Python code is provided at Github.
A python scipt is provided to ease the user interface with FEST-3D solver. In order to run the script provide all the input variables described below and run the script using:
python edit-automaton.py
Above command will create a new directory. This new directory host all the input files.
Before runing the solver, change directory to newly created directory with name provide in variable $RunDir
eg:
$python edit-automaton.py
$cd <New directory>
If required, tweak the input files, and after that, run the solver using
$nohup bash run.sh &
To check the current run status
$tail -f time_directories/aux/out
To plot the residual using gnuplot script gnplt
$gnuplot gnplt
First, we need to create a directory to perform simulation and save all the input/output data.
RunDir = 'Test'
Give any name to the Run directory
GridDir='Mesh'
, here Mesh is the folder in which all the grid files are kept.NumberOfBlocks = 1
Total number of blocksVariable | Expected Input | Description |
---|---|---|
Control['CFL'] | Real Number greater than zero | Courant–Friedrichs–Lewy number. Low value (less than 1) for explicit scheme and high value for implicit scheme |
Control['LoadLevel'] | Integer | Restart folder number in the time_directories/ directory |
Control['MaxIterations'] | Integer greater than SaveIterations | Maximum number of iteration |
Control['SaveIterations'] | Integer lesser than MaxIterations | Save solution state after every these many iteration |
Control['OutputFileFormat'] | 'vtk' or 'tecplot' | Format of the solution output file |
Control['OutputDataFormat'] | 'ASCII' | Type of the data in the output folder. Only ASCII for now. BINARY will be added in later release |
Control['InputFileFormat'] | 'vtk' or 'tecplot' | Format of the solution file from which solution will be restarted |
Control['InputDataFormat'] | 'ASCII' | Type of the data in the restart file . Similar to output data type, only ASCII is supported for now. |
Control['Precision'] | Integer, lesser than 14 and greater than 1 | Data precision for residual output, not used for solution output. |
Control['Purge'] | Integer | Number of recent solution folder to keep and delete others. 0 input will keep all the folders |
Control['ResidualWriteInterval'] | Integer greater than zero | Number of iteration after which to save the residual output in the file |
Control['Tolerance'] | Real number and ["Mass_abs", "Viscous_abs", "Mass_abs", "Resnorm_abs", "Viscous_abs", "Turbulent_abs", "Continuity_abs", "X-mom_abs", "Y-mom_abs", "Z-mom_abs", "Energy_abs", "Mass_rel", "Resnorm_rel", "Viscous_rel", "Turublent_rel", "Continuity_abs", "X-mom_rel", "Y-mom_rel", "Z-mom_rel", "Energy_rel", "TKE_abs", "Tv_abs", "Dissipation_abs", "Omega_abs", "Kl_abs", "TKE_rel", "Tv_rel", "Dissipation_rel", "Omega_rel", "Kl_rel"] | Tolerance value and variable. The solver will stop once this value is achived. List of tolerace variables is given in expected input column. You can use only one input at a time. |
Control['DebugLevel'] | 1, 2, 3, 4, or 5 | Print the information about the function/subroutines called in the solver. This helps in debugging the code. 5-Only important information is logged, 1-All the information is logged which helps in debuging. Will be remove in later release |
Scheme['InviscidFlux'] | 'ausm', 'slau', 'ausmUP', or 'ldfss0' | Scheme to calcualte inviscid fluxes through cell faces |
Scheme['FaceState'] | 'none', 'muscl', 'ppm', or 'weno' | Scheme for higher-order face-state reconstuction |
Scheme['Limiter'] | '1 1 1 0 0 0' or '0 0 0 0 0 0' | Switch for limiters and pressure based switching when using higher order face-state reconstuction. Three value for i,j, and k direction 1->on and 0-> off. Koren limiter is being used with MUSCL scheme. |
Scheme['TurbulenceLimiter'] | '1 1 1' or '0 0 0' | Switch for limiters when used for higher-order face-state reconstuctio of turbulent variables. 1->on and 0-> off |
Scheme['TurbulenceModel'] | 'none', 'sa', 'sst', or 'sst2003' | Turbulence model |
Scheme['TransitionModel'] | 'none', 'bc', 'lctm2015' | Transition model |
Scheme['TimeStep'] | 'l' or 'g [optional time step]' | Time-step for time-integration. 'l' for local and 'g' for global. In case for global method you can provide exact value to time-step here. |
Scheme['TimeIntegration'] | 'none', 'RK2', 'RK4', 'TVDRK2', 'TVDRK3', 'implicit', or 'plusgs' | Method for time-integration |
Scheme['HigherOrderBC'] | 0 or 1 | Higher order boundary conditions. 1->on and 0-> off. |
Flow["NumberOfVariables"] | 5 | Total number of variables to solver. Reduntant and will be depricated in later release. |
Flow["DensityInf"] | Real Number | Free-stream density |
Flow["UInf"] | Real Number | Free-stream x-component of velocity |
Flow["VInf"] | Real Number | Free-stream y-component of velocity |
Flow["WInf"] | Real Number | Free-stream z-component of velocity |
Flow["PressureInf"] | Real Number | Free-stream pressure |
Flow["TurbulenceIntensity"] | Real Number | Free-stream trubulent intensity in (percentage) |
Flow["ViscosityRatio"] | Real Number | Free-stream ratio of turbulence viscosity to molecular viscosity |
Flow["Intermitency"] | Real Number | Free-stream turbulent intermittency |
Flow["ReferenceViscosity"] | Real Number | Reference viscosity |
Flow["ViscosityLaw"] | 'sutherland_law' or 'constant' | Law used for viscosity variation |
Flow["ReferenceTemp"] | Real Number | Reference temperature for viscosity variation |
Flow["SutherlandTemp"] | Real Number | Sutherland temperature |
Flow["PrandtlNumbers"] | Two real numbers | Prandtl number and turbulent prandtl number |
Flow["SpecificHeatRatio"] | Real number | Specific heat ratio |
Flow["GasConstant"] | Real | Gas Constant |
OutputControl['Out'] | [ "Velocity" , "Density" , "Pressure" , "Mu" , "Mu_t" , "TKE" , "Omega" , "kL" , "tv" , "Wall_distance" , "DuDx", "Dudy", "DuDz" , "DvDx", "DvDy", "DvDz" , "DwDx", "DWDy", "DwDz" , "DTDx", "DTDy", "DTDz" , "DtkDx", "DtkDy", "DtkDz" , "DtwDx", "DtwDy", "DtwDz" , "DtvDx", "DtvDy", "DtvDz" , "DtkLDx", "DtkLDy", "DtkLDz"] | Variables to write in the output file |
OutputControl['In'] | ["Velocity" ,"Density" ,"Pressure" ,"viscosity" ,"TKE" ,"Omega" ,"kL" ,"tv"] | Variables to read in case of restrart |
ResidualControl['Out'] | ["Mass_abs", "Viscous_abs", "Mass_abs", "Resnorm_abs", "Viscous_abs", "Turbulent_abs", "Continuity_abs", "X-mom_abs", "Y-mom_abs", "Z-mom_abs", "Energy_abs", "Mass_rel", "Resnorm_rel", "Viscous_rel", "Turublent_rel", "Continuity_abs", "X-mom_rel", "Y-mom_rel", "Z-mom_rel", "Energy_rel", "TKE_abs", "Tv_abs", "Dissipation_abs", "Omega_abs", "Kl_abs", "TKE_rel", "Tv_rel", "Dissipation_rel", "Omega_rel", "Kl_rel"] | Residual to write in the resnorm file |
BoundaryConditions | [-3, -4, -5, -8, -6, -6] where <-1:'SUPERSONIC INLET', -2:'SUPERSONIC OUTFLOW', -3:'SUBSONIC INFLOW', -4:'SUBSONIC OUTFLOW', -5:'WALL', -6:'SYMMETRY', -7:'Pole', -8:'Far-field', -11:'Total inlet'> | Boundary conditions to used for the six face of the domain |
$python edit-automaton.py
Make sure to provide the absolute path of the FEST3D binary in the edit-automaton.py script before executing. And also the number of files in the GridDir folder should be equal to the number of blocks as input.
Executing edit-automaton.py will create a directory with usual directory structure:
out
in the time_directory/aux/ directory along with resnorm
file which store the residual values. Although, edit-automaton.py python script tries to handle the boundary condition by its own; it is still not full-proof. So, always the check the layout.md file in the system/mesh/layout directory. Make sure all the boundary condition number are as you expect. In the case of pole boundary condition, some random number will be mentioned and required to change manually to -007. The layout file in explained in the later section.
$mpiexec.hydra -np 16 bin/FEST3D
On linux os you can use following command to run FEST-3D in the background:
nohup bash run.sh &
The screen output is directed to the text file: [RunDir]/time_directories/aux/out
The residual are stored in the text file: [RunDir]/time_directories/aux/resnorm
You can output the current status or Current iteration number of the run on screen using
tail -f time_directories/aux/out
or you can check the residual by using Gnuplot or other similar software:
gnuplot gnplt
gnplt
is the script provided for the Gnuplot software. You can download Gnuplot using:
sudo apt-get install gnuplot
Use ctl-c to stop the Gnuplot.
Since FEST-3D output solution file in Tecplot and VTK format, you can use either commerical TECPLOT software or open-source softwares like: Visit, Paraview, Mayavi.