%%%%% Addition notes by Santiago Benavides ([email protected])
All changes only apply to the following 3D solvers (other 3D solvers may not work):
- HD
- ROTH
- MHD
- MHDB
- RMHDB
- QMHD (new solver added)
All changes work for anistropic box sizes and resolutions.
Changes:
- Added CFL condition.
- Added hyper- and hypo-dissipation.
- Added a new solver called QMHD, representing quasistatic MHD, valid in the limit of strong background magnetic field and low magnetic Reynolds numer (see Knaepen and Moreau, Annu. Rev. Fluid Mech. 2008. 40:25–45). Includes the possibility of rotation (in an arbitrary direction). The background magnetic field is in the z-x plane.
- Modified 'initialfv.f90_random' to include the possibility of constant injection of energy (of amplitude f0) if 'rand' equals 1. Added 'initialfv.f90_random_2', which is a different forcing function meant to be used for random forcing, but which forces the k_z = 0 modes. Similarly, 'initialfv.f90_random_x' forces randomly in k_x=0 modes.
- Added a new random initial condition, 'initialv.f90_random', which gives constant energy to modes k < kup and zero energy for k > kup. Random phases.
- Modified some of the global outputs. Including |u(k_f)|^2 for all of the modified solvers, |J x B|^2 and hybrid helicity for RMHDB when the magnetic field and rotation are aligned, as well as energy parallel/perpendicular to rotation/magnetic field for those solvers with rotation and a background field (also QMHD).
- Added specpara_x, which measures the spectrum in the x-direction (because in misaligned runs using RMHDB and QMHD, the magnetic field is in the x-direction, whereas rotation in the z).
- For solvers with rotation, added two new functions (with respective outputs):
- 'spec2D_yavg', which takes the 2D spectrum, but instead of integrating azimuthally, it integrates in the y-direction. Meant to be used with misaligned Omega and B_0 (with B_0 only x and z, not y component).
- 'energy_arbdir', measures the total kinetic energy, split up into a parallel and perpendicular component, with respect to an arbitrary vector that is an input, e.g. B_0 or \Omega".
%%%%%
GHOST (the Geophysical High-Order Suite for Turbulence) is an accurate and highly scalable pseudospectral code that solves a variety of PDEs often encountered in studies of turbulent flows. It is mainly developed by Pablo Mininni and Duane Rosenberg, with contributions from many users. The code uses a hybrid parallelization method combining MPI and OpenMP (GHOST also has support for GPUs using CUDA). This allows the code to run efficiently in laptops and small clusters, as well as to scale up to over 100,000 CPU cores in production runs in supercomputers. The hybrid parallelization method used in GHOST was recognized by two awards: an NCAR/CISL award, and the best paper award (technology track) at the TeraGrid 2010 conference.
The stable release found in the "master" branch supports cubic periodic domains with NxNxN grid points (in three-dimensions). For elongated domains with arbitrary linear sizes, and arbitrary resolutions in each spatial direction, check out the "pre-release-2" branch of GHOST.
GHOST can solve PDEs in periodic domains in two and three dimensions, to tackle many problems including:
- Compressible and incompressible hydrodynamic equations.
- Compressible and incompressible magnetohydrodynamic (MHD) equations.
- Hall-MHD equations and other kinetic plasma effects.
- Rotating flows.
- Rotating and stratified flows using the Boussinesq approximation.
- Passive scalars.
- Superfluids and Bose-Einstein condensates using the Gross-Pitaevskii Equation (GPE).
- Ginzburg-Landau equations.
- Integration of many types of particles.
- Several subgrid scale (SGS) models.
GHOST can integrate trajectories of Lagrangian particles, test particles (charged particles in a conducting fluid or a plasma), and inertial particles. It also includes two types of SGS models: one group of models derived from regularizations of the primitive equations of motion (Lagrangian Averaged, Clark, and Leray models), and another group of models based on computation of eddy viscosity and eddy noise using the Eddy-Damped Quasi-Normal Markovian approximation.
GHOST is mostly written in Fortran 90/95, with some C bindings, code in Fortran 2003 for the particles, and code in CUDA for GPUs. To build the main code, without particles and without GPU support, only a C and a Fortran 95 compiler are required. More details on how to compile GHOST can be found in the directory 3D/src/README.txt. GHOST also includes examples of scripts in Python, Matlab, IDL, and Mathematica, to do post-analysis of the numerical simulations. Moreover, it can be used together with VAPOR (the Visualization and Analysis Platform for Ocean, Atmosphere, and Solar Researchers) to do still frame renderings and animations. VAPOR provides an interactive environment for 3D visualization of GHOST outputs, allowing powerful analysis of turbulent flows in systems with 3D graphics cards (https://www.vapor.ucar.edu/).