The file NaSt2D2.0.zip is downloadable from the website http://nast2d2.de/nast/eNaSt2D.html. By unpacking the folder "NaSt2D2.0" is generated with the subdirectories "Program", "Par", "Tools" and "Grafik". The folder "Program" contains all source and header files of the program NaSt2D2.0, in detail:
File  Function  Task 



main.c  controls the program execution  
datadef.h  contains the program overall definitions  
boundary.c + boundary.h  SETBCOND  set the general boundary conditions 
SETSPECBCOND  set problemspecific boundary conditions  
flag.c + cars.c + valves.c + drachen.c + flag.h  INIT_FLAG  defined obstacle cells 
init.c + init.h  READ_PARAMETER  read in the parfile parameters 
INIT_UVP  set start values  
SCHREIBE_ERG_bin  binary writing for continued computation  
LESE_ERG_bin  binary reading at continued computation  
uvp.c + uvp.h  COMP_TEMP  calculates the dimensionless temperature T^{*} 
COMP_FG  calculates the F^{*} and G^{*}values in laminar and turbulent case  
COMP_RHS  calculates the righthandside of Poisson equation for dimensionless pressure p^{*}  
ADAP_UV  calculates the new dimensionless velocities u^{*} and v^{*}  
POISSON  solves the Poisson equation for pressure p^{*} by SORmethod  
COMP_delt  calculates the new dimensionless time step value δt^{*}  
turbulence.c + turbulence.h  COMP_NUT  calculates the dimensionless turbulent viscosity ν_{turb}^{*} 
COMP_KAEP  calculates the dimensionless k^{*} and ε^{*} values  
surface.c + surface.h  SET_PART  set problemdependent initial particles at free boundary value problems 
MARK_CELLS  marked cells, in which particles located, and determined cells on free boundaries  
SET_UVP_SURFACE  calculates the values on free boundaries  
visual.c + visual.h  OUTPUTVEC  writes δx_{W}^{*}, δy_{W}^{*}, u^{*}, v^{*}, p^{*}, T^{*}, ν_{turb}^{*}, k^{*}, ε^{*}, ζ^{*}, ψ^{*}, H^{*} and FLAG in the outfile 
COMPPSIZETA  calculates the dimensionless stream function ψ^{*} and the dimensionless vorticity ζ^{*}  
COMP_HEAT  calculates the dimensionless heat function H^{*}  
ADVANCE_PARTICLES  moved particles forward  
ADVANCE_AT_BOUND  calculates the particle position at obstacle cells  
INJECT_PARTICLES  injected particles for streaklines  
WRITE_PARTICLES  writes the actual particle positions as ASCIIfile  
WRITE_PARTICLES_bin  writes the actual particle positions binary  
PARTICLE_TRACING  writes particle positions of pathlines in the trafile  
STREAKLINES  writes particle positions of streaklines in the strfile  
Makefile_L + Makefile_W  compile + link  makefiles for the LINUX and WINDOWS environment 
zeit.gnu  script file  visualized the temporal course of computation with GNUPLOT 
The Cfiles may be compiled with gcc and taken for execution. The necessary software for LINUXenvironment is costless available from GNU Compiler Collection on the website http://gcc.gnu.org/ ; for WINDOWSenvironment on https://sourceforge.net/projects/mingw/files/Installer/. The GCCpackage contains also the compiler g77 for FORTRAN77  programs and the Makefile  tool. The graphic program GNUPLOT is downloadable costless from the website http://www.gnuplot.info/ .
In folder "Par" are stored all input files of up to now in NaSt2D2.0 implemented problems, in detail:
The folder "Tools" contains C resp. FORTRAN77  files, which are useful at the implementation of new problems with complicated geometry or at preparation of computed results for visualization with the graphic programs GNUPLOT and DISLIN, in detail:
Function  File  Task 



flagg.c + flagg.f  calculate straight lines from sequenced point couples  
implementation  kontur.c + kontur.f  scale polynomials from figfiles 
visualization  datgen.c + datgen.f  generate input files for GNUPLOT and DISLIN 
delete.c + delete.f  delete repeately occuring data points  
marker.c + marker.f  mark the data especially for splitting into 3 data sequences  
neighbor.c + neighbor.f  arrange data corresponding their adjacency  
revers.c + revers.f  write out input data in reverse order  
split.c + split.f  split data optional in 2 or 8 data sequences  
calculation  drag.c + drag.f  calculate the drag coefficient C_{W} of flow round bodies 
Fig files can generated and edited in a LINUXenvironment with the vector graphics program XFIG, which downloadable costless from the website http://ccm.net/download/download21611xfigforlinux . For WINDOWSenvironment one should purchase the shareware program WINFIG from http://winfig.com .
In folder "Grafik" are stored konfiles. These contain outline data of all implemented problems with complicated geometry, e.g. polynomials, which describe outlines of a car. They can displayed with the program GNUPLOT; a GNUPLOT operate program is here exemplarily specified. More manifold in its illustration facilities is the graphic program DISLIN, which is downloadable costless from the website http://www.dislin.de/ for LINUX and WINDOWS environment. In combination with GNUPLOT one can generate relatively unproblematic the necessary input files for DISLIN using the C resp. FORTRAN77  programs in folder "Tools". Control programs for display with DISLIN are given exemplarily in folder "Grafik". There are in detail:
Function  File  Task 



outline polynomial  autoA.kon  car outline type A, vintage car 
autoB.kon  car outline type B, Porsche 911  
autoC.kon  car outline type C, Audi A4 ragtop  
autoD.kon  car outline type D, bionic car  
autoE.kon  car outline type E, racing car  
ventilD.kon  gate valve outline  
ventilE.kon  angle valve outline  
ventilK.kon  Koswatype valve outline  
ventilL.kon  Leservalve outline  
ventilP.kon  PatentFreiflusstype valve outline  
ventilR.kon  Rheitype valve outline  
drachen.kon  kite  
GNUPLOT control program  iso.gnu  displays polynomials with GNUPLOT 
DISLIN control programs  Vektor.c + Vektor.for  generate a vector plot of velocity w(u,v) with DISLIN 
IsoFarb.c + IsoFarb.for  isolines + colorcoded area of data matrix ψ, p etc.  
autoBdatInc.c + autoBdatInc.for  autoB outline data (Porsche 911) for DISLIN  
autoBplotInc.c + autoBplotInc.for  display the autoB outline data (Porsche 911) with DISLIN  
Streak.c + Streak.for  generate streakline plots with DISLIN  
Trace.c + Trace.for  generate traceline plots with DISLIN  
Profil.c + Profil.for  generate profile plots with DISLIN  
e3Ddruck.c + e3Ddruck.for  generate a 3Dsurface with DISLIN 
The main algorithm in program main.c has follow structure:
Set the parameters for turbulence models; presently are set the values given in [1]: C_{μ} = 0,09 , C_{ε} = 0,07 , C_{1} = 0,126 and C_{2} = 1,92 .
Read in the start values at continued computations, if called a file name in the parfile.
Setting the start values and defining of obstacle cells in case the computation is not continued, cp. point 2.
Setting of particles for streaklines and/or pathlines, if given accordant file names in the parfile.
Setting of particles for free boundary value problems, if accessed a such problem in the parfile.
Setting of boundary conditions in case the computation is not continued, cp. point 2.
Computation of dimensionless turbulent viscosity ν_{turb}^{*} and k^{*} and ε^{*} values, if accessed a turbulence model in the parfile.
Executing the time loop from t_anf^{*} equal zero up to t_end^{*}.
Computation of dimensionless stream function ψ^{*}, vorticity ζ^{*}, heat function H^{*}, and writing of results in the outfile, if called a file name for this vector file in the parfile.
Deallocation of memory and program end.
The time loop end is given in parfile, either with t_end^{*} equal zero or greater zero. In the first case the computation will be ended by achievement of stationary flow conditions, i.e. if the absolute value of velocity gradient in a predetermined area point falls below the value 10^{4}. In the second case the computation will be ended by achievement of the userdefined end time, whereas the value t_end^{*} = 29.3 is a control parameter and can not used therefor. The called time values are dimensionless and denoted here with ^{*}. The dimensionafflicted time is t = t^{*}· L / c_{∞} with characteristic length L and inlet velocity c_{∞}.
Initially of each computation it happens more or less big fluctuations of velocity gradient, therefore one can predefine a minimum run time value for the time loop with a value for tks in main.c. Also the area point for destination of the velocity gradient is arbitrary; in normal case are ikx = imax/2 and jky = jmax/2 applicable values. Is the arbitrary area point yet located in an obstacle cell or on another fluid mechanics inapplicable place, so can be found an applicable area point with follow algorithm in main.c:
if(U[ikx][jky] == 0.) { 
printf("ikx,iky rearrange, so that the gradient not zero, see time loop in main.c\n"); 
/* return(0); here deactivate and follow search algorithm activate */ 
// return(0); 
} 
/* With activation of the follow term find the applicable values for ikx,iky */ 
/* 
for(i=1;i<=imax;i++) 
for(j=1;j<=jmax;j++){ 
if(U[i][j]!=0.) printf("ikx,jky choose: i %d j %d U %1.5g V %1.5g\n",i,j,U[i][j],V[i][j]); 
} 
*/ 
Processing the time loop includes:
Calculation of new time step value δt^{*}. In case of δt^{*} < 10^{8} is displayed a warning on desktop. The computation does not converge furthermore, i.e. the input data should be changed.
At free boundary value problems the cells are marked, in which particles located, the cells at free boundaries are assessed, and the velocities on free boundaries are computed.
Calculation of temperature T^{*}, of F^{*} and G^{*}values for laminar and turbulent flow, as well as the righthandside of Poisson's equation.
Display of remaining life time, number of SORiterations, as well as velocity gradient in the selected area point on desktop. Simultaneously are written on the file zeit.dat time t^{*}, velocity u^{*}, pressure p^{*} and velocity gradient ∂u^{*}/∂t^{*} in the selected area point. During the computation one can display with GNUPLOT, i.e. with the files zeit.gnu and zeit.dat, the gradient course, thus the calculation can be traced.
Calculation of new velocities u^{*} and v^{*}.
Calculation of new general and new problemspecific boundary conditions.
In case of turbulence ν_{turb}^{*} and k^{*} and ε^{*} values are new calculated.
At free boundary value problems the values on free boundaries are new calculated.
Whether with del_vec, del_trace and delstreak specified in the parfile, intermediate data are written on outfile and on file for continued computation, likewise particle positions in the strfile and/or the trafile.
The algorithm of function OUTPUTVEC in program visual.c controls writing out of results and should be adapted before each computation, so that a nonessential data output can be avoided by deactivation, respectively dimensionafflicted data will directly written out by transformation. All program computations underlie dimensionless variables, therefore the output variables are at first dimensionless. Would like writing out dimensionafflicted values, then should be included for the output parameters follow transformations with the reference parameters L , c_{∞} , p_{∞} , ρ_{∞} , λ_{∞} , c_{p∞} , η_{∞} :
Parameter  dimensionless  dimensionafflicted 

horizontal coordinate  X = x^{*}  x = x^{*}· L 
vertical coordinate  Y = y^{*}  y = y^{*}· L 
time  t = t^{*}  t = t^{*}· L / c_{∞} 
velocity in xdirection  U = u^{*}  u = u^{*}· c_{∞} 
velocity in ydirection  V = v^{*}  v = v^{*}· c_{∞} 
pressure  P = p^{*}  p = p_{∞} + p^{*}· ρ_{∞}· c_{∞}^{2} 
temperature  TEMP = T^{*}  T = T_{∞} + T^{*}· ΔT 
turbulent viscosity  NUT = ν_{turb}^{*}  ν_{turb} = ν_{turb}^{*}· L· c_{∞} 
turbulent kinetic energy  KA = k^{*}  k = k^{*}· c_{∞}^{2} 
rate of dissipation  EP = ε^{*}  ε = ε^{*}· c_{∞}^{3}/ L 
vorticity  ZETA = ζ^{*}  ζ = ζ^{*}· c_{∞} / L 
stream function  PSI = ψ^{*}  ψ = ψ^{*}· L· c_{∞} 
heat function  HEAT = H^{*}  H = H^{*}· λ_{∞}· ΔT with T_{∞} = 0 °C and ΔT = T_{hot}  T_{cold} 
In program boundary.c follow problemspecific boundary conditions are defined and may be changed there, in detail:
Problem  Definition 

backstep  inlet flow region 
dcavity  upper velocity 
spritzguss  inlet flow region 
wafa  inlet flow region 
convection  wall temperatures 
fluidtrap  wall temperatures 
rayleigh  wall temperatures 
In program flag.c problemspecific obstacle cells are defined and may be changed there. Simple geometries as steps, circles, rectangles, sinusoidal nozzles etc. are outlined with few analytical functions. Complicated geometries as valves and cars need as outline a number of polynomials. The data field FLAG(x,y) with 0 or 16 in the grid points is defined as result, whereby obstacles and nonobstacles are denoted. The simple geometries may be changed in flag.c by changing of few parameters. At the problem "kreis" it is possible, as well at the complicated geometries, FLAGdistribution write out in the outfile parfile controlled for check and correction. In detail it are about follow problems:
Problem  Definition of Geometry 

backstep  HEIGHT and length of step 
balken  lower and upper BORDER of inclined timber 
kreis  possible are circle, semicircle, semicircletriangleprofile , streamlined shape 
duese  sinusoidal nozzle outline 
spritzguss  circle 
wafa  HEIGHT and length of step 
fluidtrap  boundary walls 
In program init.c are defined the problemspecific initial conditions for the problems "backstep" and "duese", i.e. geometrydependent initial values for velocity and turbulence will set. Finally are specified in program surface.c parameters for the free boundary value problems "damm", "tropfen1" and "tropfen2", i.e. number of particle tracings, geometry of drops and of catchment tank as well as initial velocities of drops.