All parameters considered for solving the governing equations in Users’ Guide are specified in grid.txt. In grid.txt, all lines except line separators consist of 3 blocks. For example, first three lines of grid.txt look something like this:
---------- Control File for Flowsquare ver 4.0 (Use SI Unit) ----------
------------------------- General Control Data ------------------------
01:cmode 0 // Simulation mode,....
The first two lines are separators. Like the third line, all lines except separators consist of 3 blocks. The first block (01:cmode) denotes a name of each parameters (often similar name to the notation used in the Users’ Guide). The second block (“0″ in above example) is the number you specify for each parameter. Then the third block (// Simulation mode, …) is just a comment, and nothing to do with simulations. These three blocks have to be separated by space(s), and no space should be inserted in each block.
Some of the parameters in grid.txt are related with B.C. (bc.bmp) and/or I.C. (ic.bmp). Here is a list of all the parameters specified in grid.txt and their descriptions.
- ———- Control File for Flowsquare ver 4.0 (Use SI Unit) ———-
- ————————- General Control Data ————————
- 01:cmode
Mode of simulation, where- cmode=0: Non-reacting flow simulation
- cmode=1: Reacting (premixed) flow simulation
- cmode=2: Reacting (non-premixed) flow simulation
- cmode=3: Sub/supersonic flow simulation
- 02:nx
Number of grid points in x (horizontal) direction for discretisation. - 03:ny
Number of grid points in y (vertical) direction for discretisation. - 04:lx
Physical domain size (m) in x (horizontal) direction. - 05:ly
Physical domain size (m) in y (vertical) direction. - 06:sts
Start or restart time step of the simulation. New simulation always starts from sts=0. You can restart the simulation from the point you output the simulation results in dump folder. - 07:latts
Last time step of the simulation. (You can restart the simulation.) - 08:cflfac
Factor for time step (dt: physical time increment during the simulation). In Flowsquare, dt=lx/(nx-1)/u_max/cflfac, where u_max is defined as:- 1. maximum of speeds defined in grid.txt for cmode=0–2, or
- 2. speed of sound for cmode=3.
Typically cflfac=10~20 is preferred.
- —————- Numerical Scheme, Smoothing & Accuracy —————
- 09:iorder
Numerical scheme used in the simulation. You can use a number from 0 to 3 for iorder, and each number means- iorder=0: Low order scheme (2nd order difference, 1st order time integral)
- iorder=1: High order scheme (4th order difference, 3rd order time integral)
- iorder=2: 2nd order difference and Lax-Wendroff time marching (2nd order)
- iorder=3: 4th order difference and Lax-Wendroff time marching (2nd order)
- 10:nfil
Interval time steps of spatial filtering procedure. - 11:wfil
Relaxation parameter for the spatial filtering (see Section 4.4 of the Users’ Guide). - 12:omega
Relevant for cmode=0–2. Relaxation parameter for Poisson’s equation. 1.8 is usually best for quick convergence, but smaller omega can be used for complexed flow geometry or reactive flows with heat release (see Section 4.3 of the Users’ Guide). - 13:peps
Relevant for cmode=0–2. Tolerance of convergence for Poisson’s equation (see Section 4.3 of the Users’ Guide). - 14:loopmax
Relevant for cmode=0–2. Maximum number of iteration. Loopmax is prioritised over peps (see Section 4.3 of the Users’ Guide). - 15:wdrho
Relevant for cmode=1 and 2. wdrho=1 is correct and usually this number should be used. But during initial transient, smaller value may be used for convergence. 0<=wdrho<=1. See Eq. (6) of the Users’ Guide. - —————— General BC and Global IC (White) ——————-
- 16:perikey
Specifies periodic boundaries and their direction.- perikey=0: No periodic boundary is used.
- perikey=1: x (horizontal) direction is periodic.
- perikey=2: y (vertical) direction is periodic.
- perikey=3: Both x and y directions are periodic.
- 17:pres0
In (Pa). See Lesson 2.2 — ic.bmp - 18:uin0
In (m/s). - 19:vin0
In (m/s). - 20:rho0
In (kg/m^3). - 21:temp0
In (K). - 22:scalar0
- —————— BLUE Local BC and/or IC (optional) —————–
- 23:uin1
In (m/s). See Lesson 2.1 — bc.bmp - 24:vin1
In (m/s). - 25:rho1
In (kg/m^3). - 26:temp1
In (K). - 27:scalar1
- —————— RED Local BC and/or IC (optional) ——————
- 28:uin2
In (m/s). See Lesson 2.1 — bc.bmp - 29:vin2
In (m/s). - 30:rho2
In (kg/m^3). - 31:temp2
In (K). - 32:scalar2
- ———- PINK Local BC and/or IC (pure air flow, optional) ———-
- 33:uin3
In (m/s). See Lesson 2.1 — bc.bmp - 34:vin3
In (m/s). - 35:temp3
In (K). - ————— BLACK Wall Boundary Condition (optional) ————–
- 36:tempw
In (K). See Lesson 2.1 — bc.bmp - ————– GREEN Moving Boundary Condition (optional) ————-
- 37:imb
See Lesson 2.1 — bc.bmp - 38:umb
In (m/s). - 39:vmb
In (m/s). - 40:tempmb In (K).
- ————- YELLOW Scalar Boundary Condition (optional) ————-
- 41:scalarT
In (K). See Lesson 2.1 — bc.bmp - ———- Transport Properties & Thermochemical Conditions ———–
- 42:mu
Dynamic viscosity of the mixture. In (kg/m s). Water@300K: 8.94E-4, Air@300K: 18.6E-6. Relevant for cmode=0–2. - 43:R
Specific gas constant in (J/kg K). Air: 286.9. Relevant to cmode=1 and 2. - 44:diff
Mass diffusivity of mixture in (m^2/s). If unity Schmidt number is assumed, diff~mu/rho and Air@300K: 20.0E-6. Relevant to cmode=1, 2 and when yellow B.C. is used. - 45:Tu
Unburnt temperature in (K). Relevant to cmode=1. - 46:Tb
Burnt temperature in (K). Relevant to cmode=1 and 2. - ——————- Chemical Reaction (for cmode=1) ——————-
- 47:krate
Pre-exponential constant for a single step chemical mechanism. See Eq. (13) of the Users’ Guide. - 48:Trate
Activation temperature in (K). - 49:nrate
A constant for a single step chemical mechanism. - 50:cF
Progress variable at which flame locates (~0.5, just for visualisation purposes). - ————— Non-Premixed Reacting Flow (for cmode=2) ————–
- 51:Xst
Stoichiometric mixture fraction at which flame locates (~0.5). - 52:sigma
Relaxation parameter for density change. 0<=sigma<=1 and 1 is exact. See Eq. (28) of the Users’ Guide. - ————————– Display & Output —————————
- 53:box
Pixel size of each grid point displayed on the screen. Typically nx * nbox is less than the screen size. - 54:nfig
Interval time steps for figure output (0: no figure is generated). - 55:nfile
Interval time steps for instantaneous simulation result output (0: no simulation data is generated). - 56:bcdisp
- bcdisp=0: Wall boundaries are not overlaid.
- bcdisp=1: Wall boundaries are overlaid.
- 57:idisp
Quantity displayed in colour.- idisp=0: off
- idisp=1: Density.
- idisp=2: Velocity component in x (horizontal) direction, u.
- idisp=3: Velocity component in y (vertical) direction, v.
- idisp=4: Speed (sqrt(u*u+v*v)).
- idisp=5: Vorticity
- idisp=6: T
- idisp=7: Reaction rate (for cmode=1)
- idisp=8: Progress variable for cmode=1, mixture fraction for cmode=2, general scalar for cmode=0, 3.
- idisp=9: Pressure (minus pres0)
- idisp=10: Mixture fraction of air and progress variable (cmode=1), E/rho (J/kg) (cmode=3).
- 58:cmax
Maximum value of the colour bar for the given idisp variable (put 0 for auto scaling.) - 59:cmin
Minimum value of the colour bar for the given idisp variable (put 0 for auto scaling.) - 60:icolor
Colour map.- icolor=0: Jet
- icolor=1: Rainbow
- icolor=2: Nishiki
- icolor=3: Grey
- icolor=4: Grey (inverse)
- icolor=5: Hot
- icolor=6: Sea
- icolor=7: Leaf
- icolor=0: Jet
- 61:icont
Contour line on the reaction front (cmode=1 and 2).- icont=0: off
- icont=1: Black
- icont=2: Red
- icont=3: Green
- icont=4: Blue
- icont=5: White
- 62:linewidth
Line width of the reaction front contour line.- linewidth=1: 1 pixel
- linewidth=3: 3 pixels
- linewidth=5: 5 pixels
- linewidth=7: 7 pixels
- 63:ivec
Velocity vectors and their colour.- ivec=0: off
- ivec=1: Black
- ivec=2: Red
- ivec=3: Green
- ivec=4: Blue
- ivec=5: White
- 64:ndiv
Interval grid points between displayed velocity vectors (0: auto adjust). - 65:vecsize
Pixel size of vector arrow (0: auto adjust). - —————— Lagrangian Trajectory (optional) ——————-
- 66:lagkey
Lagrangian trajectory.- lagkey=0: off
- lagkey=1: Particles are fed from left boundary.
- lagkey=2: Particles are fed from bottom boundary.
- lagkey=3: Particles are fed from left and right boundaries.
- lagkey=4: Particles are fed from top and bottom boundaries.
- 67:lagcolor
Colour of Lagrangian particles. 0: black and 1: white. - 68:lagsize
Pixel size of particles. - 69:nlagra
Interval time steps of initialise Lagrangian particles (>=100). - 70:npart
Number of Lagrangian particles (>=1000). - ———————— Body Force (optional) ————————
- 71:gfx
Body force in the x (horizontal) direction due to the density difference in (m/s^2). - 72:gfy
Body force in the y (vertical) direction due to the density difference in (m/s^2). - 73:dref
Reference density.- dref=1: Maximum of densities calculated from grid.txt.
- dref=2: Middle value of densities calculated from grid.txt.
- dref=3: Minimum of densities calculated from grid.txt.
- ——————- Initial Perturbation (optional) ——————-
- 74:pmode
Initial perturbation switch. See Section 4.6 of the Users’ Guide.- pmode=0: off
- pmode=1: single mode
- pmode=2: multi modes
- pmode=3: multi modes (random amplitude)
- 75:umag
Amplitude of velocity perturbation in (m/s). - 76:nwave
Number of waves in x (horizontal) direction. - ——————————– Others ——————————-
- 77:nwait
Wait time (usually 0 for fastest computational speed). - ———————————————————————–
- #End of file