Skip to content

FEST3D/run

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 

Repository files navigation

run

Run directory for FEST-3D code.

How to run the code to solve a real problem

A few input files are needed by the FEST-3D solver to perform any simulation. A Python script is provided here to facilitate the process of setting up all theses input files

Caution

An edit-samplescript.py file is provided for the users. Edit the file to replace the sample values before attempting to run the file.

Dependencies

  • C++11 compiler
  • Python 3
  • bash

Inputs

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
One of the important input is the grid/mesh files. FEST-3D code requires a separate file for each process. If the domain is decomposed into 4 blocks, then 4 separate files are required. Although, you can give any unique name to the grid files, for simplicity the python code expect grid file name in grid_nn.txt, where the nn is the block-number-1. So, for 4 blocks, we will use the following: grid_00.txt, grid_01.txt, grid_02.txt, and grid_03.txt. You should keep all the grid files in a separate folder and mention name of that folder at
GridDir='Mesh', here Mesh is the folder in which all the grid files are kept.
NumberOfBlocks = 1 Total number of blocks
Now, you are required to fix different parameters of the solver based on the problem you are simulating. Meaning of the most input is self-explanatory from the name. Control['CFL'] = 1.0 Courant–Friedrichs–Lewy number
Control['LoadLevel'] = 0 Restart folder number
Control['MaxIterations'] = 100000 Maximum number of iteration
Control['SaveIterations'] = 1000 Save solution state after every these many iteration
Control['OutputFileFormat'] = 'vtk' 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' 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'] = 6 Data precision for residual output, not used for solution output.
Control['Purge'] = 2 Number of recent solution folder to keep and delete others. 0 input will keep all the folders
Control['ResidualWriteInterval'] = 100 Number of iteration after which to save the residual output in the file
Control['Tolerance'] = "1e-13 Continuity_abs" Tolerance value and variable. The solver will stop once this value is achived. List of tolerace variable that can be used is given below.
Control['DebugLevel'] = 55-Only important information is logged, 1-All the information is logged which helps in debuging. Will be remove in later release.

Scheme['InviscidFlux'] = 'ausm' Scheme to calcualte inviscid fluxes through cell faces.
Scheme['FaceState'] = 'muscl' Scheme for higher-order face-state reconstuction
Scheme['Limiter'] = '1 1 1 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
Scheme['TurbulenceLimiter'] = '1 1 1' Switch for limiters when used for higher-order face-state reconstuctio of turbulent variables. 1->on and 0-> off
Scheme['TurbulenceModel']='none' Turbulence model
Scheme['TimeStep']=' g 1e-4' 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']='RK4' Method for time-integration
Scheme['HigherOrderBC']='0' 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"] = 1.176 Free-stream density.
Flow["UInf"] = 173.59 Free-stream x-component of velocity.
Flow["VInf"] = 0.0 Free-stream y-component of velocity.
Flow["WInf"] = 0.0 Free-stream z-component of velocity.
Flow["PressureInf"] = 101325.0 Free-stream pressure.
Flow["TurbulenceIntensity"] = 0.0 Free-stream trubulent intensity in (percentage)
Flow["ViscosityRatio"] = 0.0 Free-stream ratio of turbulence viscosity to molecular viscosity.
Flow["Intermitency"] = 0.0 Free-stream turbulent intermittency.
Flow["ReferenceViscosity"] = 0.2049e-3. Reference viscosity.
Flow["ViscosityLaw"] = "sutherland_law" Law used for viscosity variation
Flow["ReferenceTemp"] = 300 Reference temperature for viscosity variation
Flow["SutherlandTemp"] = 110.5 Sutherland temperature
Flow["PrandtlNumbers"] = "0.72 0.9" Prandtl number and turbulent prandtl number
Flow["SpecificHeatRatio"]=1.4 Specific heat ratio.
Flow["GasConstant"]=287.0 Gas Constant.

OutputControl['Out'] = ["Velocity", "Density", "Pressure", "Mu"] Variables to write in the output file
OutputControl['In'] = ["Velocity", "Density", "Pressure", "Mu"] Variables to read in case of restrart
ResidualControl['Out'] = ["Mass_abs", "Viscous_abs", "Continuity_abs"] Residual to write in the resnorm file
BoundaryConditions = [-3, -4, -5, -8, -6, -6] Boundary conditions to used for the six face of the domain

Expected Inputs

CFL

A floating number greater than zero.

LoadLevel

Number of any folder present in the time_directories/

MaxIterations

Integer, greater than SaveIterations

SaveIterations

Integer, lesser than MaxIteratinos

InputFileFormat

  • vtk
  • tecplot

InputDataFormat

  • ASCII

OutputFileFormat

  • vtk
  • tecplot

OutputDataFormat

  • ASCII

Precision

Integer, lesser than 14 and greater than 1

Purge

Integer

ResidualWriteInterval

Integer greater than 0

Tolerance

  • 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

DebugLevel

1, 2, 3, 4, or 5

InviscidFlux

  • ausm
  • ldfss0
  • slau
  • van_leer
  • ausmup
  • ausmp

FaceState

  • muscl
  • none
  • ppm
  • weno

Limiter

  • 1 1 1 0 0 0

TurbulenceLimiter

1 1 1

TurbulenceModel

  • none
  • sst
  • kkl
  • sa

TransitionModel

  • lctm2015
  • bc

TimeStep

  • g 1e-5
  • l

TimeIntegration

  • RK4
  • RK2
  • TVDRK2
  • TVDRK3
  • implicit
  • plusgs
  • none

HigherOrderBC

0 or 1

ViscosityLaw

  • sutherland_law
  • constant

OutputControl[Out]

  • Velocity
  • Density
  • Pressure
  • Mu
  • Mu_t
  • TKE
  • Omega
  • kL
  • tv
  • Wall_distance
  • resnorm
  • TKE_residue
  • Mass_residue
  • X_mom_residue
  • Y_mom_residue
  • Z_mom_residue,
  • energy_residue
  • DuDx, Dudy, DuDz
  • DvDx, DvDy, DvDz
  • DwDx, DWDy, DwDz
  • DTDx, DTDy, DTDz
  • DtkDx, DtkDy, DtkDz
  • DtwDx, DtwDy, DtwDz
  • DtvDx, DtvDy, DtvDz
  • DtkLDx, DtkLDy, DtkLDz

OutputControl[In]

  • Velocity
  • Density
  • Pressure
  • viscosity
  • TKE
  • Omega
  • kL
  • tv

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 ]

Boundary conditions

  • -1:'SUPERSONIC INLET'
  • -2:'SUPERSONIC OUTFLOW'
  • -3:'SUBSONIC INFLOW',
  • -4:'SUBSONIC OUTFLOW',
  • -5:'WALL',
  • -6:'SYMMETRY',
  • -7:'Pole',
  • -8:'Far-field',
  • -9:'Total inlet'

Steps to run Lid-Driven cavity tutorial

$cd Tutorials/LidDrivenCavity

Change to the directory where test cases are stored.

$cd CreateBlocks/
$cd make

This will create a decomposed grid files for FEST-3D solver to run on.

$vi edit-automaton.py
$python edit-automaton.py

Execute the edit-automaton.py script

Directory structure

Executing edit-automaton.py will create a directory with usual directory structure:

  • system:all the input files including the mesh files and boundary condition file is located in this directory
  • time_directory: all the output files will be stored in this folder.
  • bin: a softlink between original FEST-3D binary is stored here.
  • run.sh: bash script to run the solver. This helps to remove log clutter on screen and save it in a log file named out in the time_directory/axu/ directory along with resnorm file which sotre the residual values.

Check Layout file

Although edit-automaton.py python script tries to handle the boundary condition on its own, it is still not full-proof. So, always check the layout.md file in the system/mesh/layout directory. Make sure all the boundary condition numbers 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 documentation.

Execute

$mpiexec.hydra -np 16 bin/FEST3D 

Instead of above command, on linux OS, you can use following command to run FEST-3D in the background:
nohup bash run.sh &

Checkout Documentation of FEST-3D code for more details.

About

Run directory for FEST-3D code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •