THETA
The flow solver THETA (Turbulent Heat Release Extension of the TAU Code) is an incompressible RANS/LES-solver developed by DLR.
Policy & Availability
THETA is not open source. Furthermore, it is not pre-installed on FLOW. By now, its use is restricted to the scope of the ETESIAN (Extended THETA for Site Assessment) project. In case you get involved in this project and/or you have the right to work with the code, Björn Witha (bjoern.witha@forwind.de) can provide the necessary .tar file, the bash-script build_theta.sh, the folder Theta_Test and the THETA User Guide.
Description
Initially, THETA was created on the basis of the compressible DLR code TAU to simulate flow and chemical reactions in combustion chambers. However, it can be used for incompressible flows in general as long as the following condition for the Mach number Ma < 0.3 holds.
Main features of the code (source: DLR)
- 3D finite volume discretisation on unstructured dual grids
- An interface with which any number of additional transport equations can be predetermined and defined
- Automatic grid adaptation
- Pressure-based solution algorithm: SIMPLE, fast projection method
- Compressible fractional step multiscale solver and acoustic boundary conditions for acoustics simulation in combustors
- Linear equation solvers: BiCGStab, GMRES, CGS with/without LDU decomposition, multigrid acceleration
- Solver for stiff chemistry
- Region-based parallelisation
- High and low Reynolds number k-ε, k-ω and k-ω-SST turbulence models
- Four-equation model for turbulent scalar transport
- LES/RANS turbulence models
- Combustion models: Flame sheet (EDC, EDC/FRC); Flamelet-PDF, TFC; Complex (detailed) chemistry with multivariate assumed JPDF model
- Detailed soot and soot precursor model
- Lagrangian/Eulerian multiphase model (SPRAYSIM)
Usage on FLOW
Invoking build_theta.sh installs THETA locally (assuming that the Tarball is put under home and the bash script is invoked there) and puts it under $HOME/taudir. Thereby, the necessary modules NetCDF, MPI and Zoltan [1] are loaded. Note that NetCDF, MPI and Zoltan do not come with the tarball. In case Zoltan is used some further modifications are necessary in the parameter file. Consult the User Guide for further advice.
Note: Delete all potential leading spaces in $HOME/.taudef which gets created by build_theta.sh.
To run, for instance, the Sloshing_Tank test case provided in Theta_Test, do the following:
[<Username>@flow Sloshing_Tank-S-L2]$ ~/taudir/bin/compile
In this step, THETA gets compiled according to the specified user settings in user.c for the given test case. In case one names the user file user_Test.c then it has to be invoked with
compile Test
In the user file one can initialize the domain. For instance, one can set initial velocity values for the domain as a starting point for the simulation.
The preprocessing, when dual grids (grid decompositioning) are created, is done by invoking
[<Username>@flow Sloshing_Tank-S-L2]$ ~/taudir/bin/ptau3d.preprocessing para1
in case one uses the para1 parameter file. Make sure that the paths for the grids and the output (settings in the first lines of the parameter file) are set correctly. The number of domains corresponds to the number of dual grids created during the preprocessing.
All further settings like the number of time steps, CFL number, time and spatial discretization schemes, number of multigrid levels, fluid properties or further solver settings (SIMPLE or Projection method) are all set in the parameter file. The boundary mapping is also done in the parameter file.
Finally, the simulation can be started. This is done by invoking
[<Username>@flow Sloshing_Tank-S-L2]$ ./theta para1 Logfile
In case one did compile THETA with a user_Test.c user file, then the executable is called theta_Test. The second input parameter specifies the name of the logfile. It can be named anything. In this case the logfile to be created will be named Logfile.theta.stdout which covers the details for each time steps and Logfile.theta.stderr where errors are listed. Ideally, Logfile.theta.stderr is empty. Note that it is not necessary to hand over the second parameter here, however, the output will be put on the terminal otherwise what is rather inconvenient. It is recommended to monitor the run by looking into the logfile files from time to time during the run. This can be done, for instance, by
[<Username>@flow Sloshing_Tank-S-L2]$ tail -f Logfile.theta.stdout
Note that multiple logfiles are created when multiple domains (dual grids) are specified in the parameter file. However, those logfiles do not differ significantly and the DLR developers are thinking of changing this behavior. Therefore, it is sufficient to only look into one of the .stdout logfiles.
Post-Processing
The result files can be found as specified in the parameter file, in the example above the para1 file. Field data, surface data and monitoring data are created by THETA during the simulation as specified in the parameter file. Note that one has to specify in the parameter file which values are monitored. The result files can be converted via taudir/bin/tau2plt in formats readable by postprocessing tools like Tecplot or Paraview.
Furthermore, there exists an addon for THETA developed by DLR called ISO99 which can easily be used for an initial post-processing. Its usage is explained under Visualisation/iso99.
Further reading and useful links
This is a rough overview how to install, compile and run jobs with THETA on FLOW. This article does by far not cover all capabilities the THETA solver has. Therefore to consult the User Guide is recommended for further details.
In addition, the DLR Website provides some further general details regarding the THETA code.
Zoltan reference:
- Zoltan Website
- [[1] http://www.cs.sandia.gov/zoltan/Zoltan_cite.html/ Zoltan Website: How to cite ]