.. _fortran_modules:
===============
Fortran modules
===============
Currently, the Pencil Code contains 547 Fortran files.
.. raw:: html
Filter:
.. _src:
Main source files (src)
-----------------------
The *src* directory contains 321 Fortran files.
.. list-table::
:header-rows: 1
:widths: 20 60 20
* - File
- Description
- Scientific References
* - :doc:`src/ascalar`
- This module is used to solve the equation of supersaturation for either the Smoluchowski approach or the swarm model.
-
* - :doc:`src/bfield`
- This module directly evolves the magnetic field instead of the vector potential; special care needs to be taken to guarantee the divergence of the field remains zero.
-
* - :doc:`src/border_profiles`
-
-
* - :doc:`src/boundcond`
- Module for boundary conditions. Extracted from (no)mpicomm, since all non-periodic (external) boundary conditions require the same code for serial and parallel runs.
-
* - :doc:`src/boundcond_alt`
- Module for boundary conditions. Extracted from (no)mpicomm, since all non-periodic (external) boundary conditions require the same code for serial and parallel runs.
-
* - :doc:`src/cdata`
- Global variables are defined in this module.
-
* - :doc:`src/chemistry`
- This modules adds chemical species and reactions. The units used in the chem.in files are cm3,mole,sec,kcal and K
-
* - :doc:`src/chemistry_simple`
- ! This modules addes chemical species and reactions. The units used in the chem.in files are cm3,mole,sec,kcal and K This was found out by comparing the mechanism found in samples/0D/chemistry\_H2\_ignition\_delay with Flow Reactor Studies and Kinetic Modeling of the ReactionH/O22 of A. MUELLER, T. J. KIM, R. A. YETTER, F. L. DRYER
-
* - :doc:`src/chiral`
- This modules solves two reactive scalar advection equations This is used for modeling the spatial evolution of left and right handed aminoacids.
- * :cite:t:`2025PhRvD.111d3541V`
* :cite:t:`2004IJAsB...3..209B`
* - :doc:`src/combine_videofiles`
- Not a module
-
* - :doc:`src/cosmicray`
- This modules solves the cosmic ray energy density equation. It follows the description of Hanasz & Lesch (2002,2003) as used in their ZEUS 3D implementation.
-
* - :doc:`src/cosmicray_nolog`
- This modules solves the cosmic ray energy density equation. It follows the description of Hanasz & Lesch (2002,2003) as used in their ZEUS 3D implementation.
-
* - :doc:`src/cosmicrayflux`
- Module for calculating Cosmic Ray Flux.
-
* - :doc:`src/cparam`
- Module containing global parameters (constants).
-
* - :doc:`src/debug_io_dist`
- Distributed debug-IO (i.e. each process writes its own file data/procX)
-
* - :doc:`src/debug_io_hdf5`
- HDF5 debug-IO module
-
* - :doc:`src/debug_io_mpi`
- Parallel debug-IO via MPI2 (i.e. write to a single file in data/allprocs)
-
* - :doc:`src/density`
- This module takes care of the continuity equation.
-
* - :doc:`src/density_bcs`
-
-
* - :doc:`src/density_methods`
- 11-mar-15/MR: Created to avoid circular dependencies with EquationOfState.
-
* - :doc:`src/density_stratified`
-
-
* - :doc:`src/density_stratified_methods`
- Dummy module for density\_stratified, with which all density queries should be done in EquationOfState.
-
* - :doc:`src/deriv`
-
-
* - :doc:`src/deriv_10th`
-
-
* - :doc:`src/deriv_2nd`
-
-
* - :doc:`src/deriv_2nd_all`
- This module is a copy of the 'deriv\_2nd' module, but implements all derivatives, including up to 6th order, with 2nd order accuracy. In 'deriv\_2nd' the 3rd or higher derivatives are otherwise unavailable. To provide higher derivatives in this module, nghost must be 3.
-
* - :doc:`src/deriv_4th`
-
-
* - :doc:`src/deriv_4th_all`
- This module is a copy of the 'deriv\_4th' module, but implements all derivatives, including up to 6th order, with 4th order accuracy. In 'deriv\_4th' the 5th or higher derivatives are otherwise unavailable. To provide higher derivatives in this module, nghost must be 4.
-
* - :doc:`src/deriv_8th`
-
-
* - :doc:`src/deriv_alt`
-
-
* - :doc:`src/detonate`
- This module searches for gravitationally collapsing sites and detonates them.
-
* - :doc:`src/diagnostics`
-
-
* - :doc:`src/diagnostics_outlog`
-
-
* - :doc:`src/dustdensity`
- This module takes care of everything related to dust density.
-
* - :doc:`src/dustvelocity`
- This module takes care of everything related to dust velocity
- * :cite:t:`2004A&A...417..361J`
* :cite:t:`2022JFM...934A..37H`
* - :doc:`src/emulated`
- Module emulating not universally available intrinsics
-
* - :doc:`src/entropy`
- This module takes care of evolving the entropy.
-
* - :doc:`src/entropy_bcs`
-
-
* - :doc:`src/entropy_const`
- This module is for systems with spatially fixed entropy distribution. This implies Ds/Dt=u.grads only, which is used in Ds/Dt=(1/gamma)*Dlnp/Dt-Dlnrho/Dt, for example. This procedure has been used in the context of accretion discs (see von Rekowski et al., 2003, A&A 398, 825). The shock jump relations are modified (see Sect 9.3.6 of Brandenburg 2003, in "Computational aspects...", ed. Ferriz-Mas & Nunez, Taylor & Francis, or astro-ph/0109497.
-
* - :doc:`src/entropy_onefluid`
- This module takes care of entropy (initial condition and time advance) for a fluid consisting of gas and perfectly coupled pressureless dust.
-
* - :doc:`src/eos_chemistry`
- Equation of state for an ideal gas without ionization.
-
* - :doc:`src/eos_chemistry_simple`
- Equation of state for an ideal gas without ionization.
-
* - :doc:`src/eos_fixed_ionization`
- Thermodynamics with Fixed ionization fraction
-
* - :doc:`src/eos_idealgas`
- Equation of state for an ideal gas without ionization.
-
* - :doc:`src/eos_ionization`
- This modules contains the routines for simulation with simple hydrogen ionization.
-
* - :doc:`src/eos_temperature_ionization`
- Routine for ideal gas with variable degree of ionization and hence variable mean molecular weight. Here, the ionization fraction, yH, is allocated as an additional auxiliary array in f.
-
* - :doc:`src/equ`
- subroutines in the chosen set of physics modules.
-
* - :doc:`src/farray`
- This module allocates and manages indices in the f-array in a controlled way. This includes handling different types of variable that may be stored in the f-array like PDE variables, auxiliaries, communicated auxiliaries and global variables.
-
* - :doc:`src/farray_alloc`
- Dynamical allocation of f and df.
-
* - :doc:`src/fft_nr`
- Not a module
-
* - :doc:`src/fftpack`
- Not a module
-
* - :doc:`src/file_io_common`
- This module holds only common standard code for all File-IO modules. It is NOT meant to be used as a replacement for the other File-IO modules!
-
* - :doc:`src/file_io_dist`
- This module goes straight and implements distributed file Input/Output. We use here only F95 features and are explicitly not HPC-friendly.
-
* - :doc:`src/file_io_f2003`
- This module goes straight and implements distributed file Input/Output. We use here only F2003 features (HPC-friendly).
-
* - :doc:`src/file_io_f95`
- This module takes care of massive parallel file Input/Output. We use here only F95 features for HPC-friendly behaviour.
-
* - :doc:`src/filter`
- Filters for smoothing, removing trends (like spurious build-up of horizontal momentum) and similar.
-
* - :doc:`src/fixed_point`
- Find the fixed points of a field line mapping. Field line mappings are maps of F(x,y) through field lines which trace point at z = z0 to z = z1. Fixed points are such that F(x,y) = (x,y)
-
* - :doc:`src/forcing`
- This module contains routines both for delta-correlated and continuous forcing. The fcont pencil is only provided for continuous forcing.
-
* - :doc:`src/fourier_fft`
- This module contains FFT wrapper subroutines.
-
* - :doc:`src/fourier_fftpack`
- This module contains FFT wrapper subroutines.
-
* - :doc:`src/general`
- Module with general utility subroutines.
-
* - :doc:`src/geometrical_types`
- Collection of geometrical object types. (Presently only rectangular toroid)
-
* - :doc:`src/ghost_check`
- This module tests the ghost zones consistency. For more documentation about the ghost zones, please refer to Mpicomm.f90.
-
* - :doc:`src/ghostfold_mpicomm`
- This module folds ghost zones for a multiple processor run.
-
* - :doc:`src/ghostfold_nompicomm`
- This module folds ghost zones for a single processor run.
-
* - :doc:`src/global_pushpars`
-
-
* - :doc:`src/gpu_astaroth`
- This module contains GPU related types and functions to be used with the ASTAROTH nucleus.
-
* - :doc:`src/gravity_r`
- Radial gravity
-
* - :doc:`src/gravity_simple`
- This module takes care of simple types of gravity, i.e. where gx=gx(x) or gy=gy(y) or gz=gz(z) Here the gravity master pencils gravx\_xpencil, gravy\_ypencil and gravz\_zpencil only need to be calculated once, and then these can simply be added to the equations of motion again and again.
-
* - :doc:`src/grid`
-
-
* - :doc:`src/hdf5_io_parallel`
- This module takes care of massive parallel HDF5 file Input/Output. We use here only F95 and MPI features for HPC-friendly behaviour.
-
* - :doc:`src/hdf5_io_parallel_chunked`
- This module takes care of massive parallel HDF5 file Input/Output. We use here only F95 and MPI features for HPC-friendly behaviour.
-
* - :doc:`src/heatflux`
- This module computes the time depentend heat flux equation. The non-Fourier form is written tau * dq/dt + q = F(T,rho ...) The analytical solution for constant F is that q converges exponential to F with a time scale of tau.
-
* - :doc:`src/hydro`
- This module takes care of most of the things related to velocity. Pressure, for example, is added in the energy (entropy) module.
-
* - :doc:`src/hydro_kinematic`
- This module supplies a kinematic velocity field. Most of the content of this module was moved with revision r12019 by Dhrubaditya Mitra on 5-nov-09 away from nohydro.f90 To inspect the revision history of the file before that time, check out nohydro.f90 prior to or at revision r12018.
-
* - :doc:`src/hydro_potential`
- This module takes care of most of the things related to velocity. Pressure, for example, is added in the energy (entropy) module.
-
* - :doc:`src/hyperresi_strict_2nd`
- This module applies a sixth order hyperresistivity to the induction equation (following Brandenburg & Sarson 2002). This hyperresistivity ensures that the energy dissipation rate is positive define everywhere.
-
* - :doc:`src/hypervisc_strict_2nd`
- This module applies a sixth order hyperviscosity to the equation of motion (following Haugen & Brandenburg 2004). This hyperviscosity ensures that the energy dissipation rate is positive define everywhere.
-
* - :doc:`src/hypervisc_strict_fft`
- This module applies a sixth order hyperviscosity to the equation of motion (following Haugen & Brandenburg 2004). This hyperviscosity ensures that the energy dissipation rate is positive define everywhere.
-
* - :doc:`src/implicit_diffusion`
- This module provides general facilities to implicitly solve a diffusion equation.
-
* - :doc:`src/implicit_physics`
- This module solves the radiative diffusion implicitly thanks to an Alternate Direction Implicit Scheme (ADI) in a D'Yakonov form lambda\_x T(n+1/2) = lambda\_x + lambda\_z lambda\_z T(n+1) = T(n+1/2)
-
* - :doc:`src/initcond`
- This module contains code used by the corresponding physics modules to set up various initial conditions (stratitication, perturbations, and other structures). This module is not used during run time (although it is used by the physics modules that are used both during run time and for the initial condition).
-
* - :doc:`src/interstellar`
- This modules contains the routines for SNe-driven ISM simulations. Replaces old module relabelled as interstellar\_old Jul 15 FAG.
-
* - :doc:`src/interstellar_old`
- This modules contains the old routines for SNe-driven ISM simulations. It may be necessary to select this for using old simulation data
-
* - :doc:`src/io_collect`
- I/O via MPI root rank by collecting data from all processors. (storing data into one file, e.g. data/allprocs/var.dat)
-
* - :doc:`src/io_collect_xy`
- I/O via MPI by collecting data from all processors in the xy-plane. (storing data into files, e.g. data/proc(0,7,15,...)/var.dat)
-
* - :doc:`src/io_collect_xy_f2003`
- I/O via MPI by collecting data from all processors in the xy-plane. (storing data into files, e.g. data/proc(0,7,15,...)/var.dat)
-
* - :doc:`src/io_dist`
- Distributed IO (i.e. each process writes its own file data/procX)
-
* - :doc:`src/io_dist_outlog`
- Distributed IO (i.e. each process writes its own file data/procX)
-
* - :doc:`src/io_hdf5`
- I/O via the HDF5 hyperslab-by-chunk IO routines. (storing data into one file, e.g. data/allprocs/VAR#.h5)
-
* - :doc:`src/io_mpi2`
- I/O via the MPI v2 standard IO routines. (storing data into one file, e.g. data/allprocs/var.dat)
-
* - :doc:`src/io_wrapper`
-
-
* - :doc:`src/lorenz_gauge`
- Lorenz gauge, dphi/dt = -cphi2*divA, with possibility to add diffusion and advection terms. The difficulty is that first derivatives are applied twice during one loop in the calculation of gauge waves. This leads to wiggles that are difficult to damp.
-
* - :doc:`src/lsode_for_chemistry`
- Specific module only used by timestep\_LSODE if chemistry is solved with the implicit solver LSODE for stiff ODEs.
-
* - :doc:`src/magnetic`
- This modules deals with all aspects of magnetic fields; if no magnetic fields are invoked, a corresponding replacement dummy routine is used instead which absorbs all the calls to the magnetically relevant subroutines listed in here.
-
* - :doc:`src/messages`
- This module takes care of code messages.
-
* - :doc:`src/mpicomm`
- This module takes care of MPI communication.
-
* - :doc:`src/neutraldensity`
- This module is used both for the initial condition and during run time. It contains dlnrhon\_dt and init\_lnrhon, among other auxiliary routines.
-
* - :doc:`src/neutralvelocity`
- This module takes care of everything related to velocity
-
* - :doc:`src/noascalar`
- This modules solves the passive scalar advection equation.
-
* - :doc:`src/noborder_profiles`
-
-
* - :doc:`src/noboundcond`
- Module for boundary conditions. Extracted from (no)mpicomm, since all non-periodic (external) boundary conditions require the same code for serial and parallel runs.
-
* - :doc:`src/nochemistry`
-
-
* - :doc:`src/nochiral`
- This modules solves two reactive scalar advection equations This is used for modeling the spatial evolution of left and right handed aminoacids.
-
* - :doc:`src/nocosmicray`
- This modules solves the passive scalar advection equation
-
* - :doc:`src/nocosmicrayflux`
-
-
* - :doc:`src/nodebug`
- Not a module
-
* - :doc:`src/nodensity`
-
-
* - :doc:`src/nodensity_bcs`
-
-
* - :doc:`src/nodensity_methods`
- 11-mar-15/MR: Created to avoid circular dependencies with EquationOfState.
-
* - :doc:`src/noderiv`
-
-
* - :doc:`src/nodetonate`
- This module is dummy.
-
* - :doc:`src/nodustdensity`
- This module takes care of everything related to dust density.
-
* - :doc:`src/nodustvelocity`
- This module takes care of everything related to dust velocity.
-
* - :doc:`src/noenergy`
- Dummy module for energy equation.
-
* - :doc:`src/noenergy_bcs`
-
-
* - :doc:`src/noentropy`
- Calculates pressure gradient term for polytropic equation of state $p=\text{const}\rho^{\Gamma}$.
-
* - :doc:`src/noeos`
- This module takes care of everything related to equation of state.
-
* - :doc:`src/nofarray_alloc`
-
-
* - :doc:`src/nofixed_point`
-
-
* - :doc:`src/noforcing`
- This module contains routines both for delta-correlated and continuous forcing. The fcont pencil is only provided for continuous forcing.
-
* - :doc:`src/nofourier`
- This module contains FFT wrapper subroutines.
-
* - :doc:`src/noghostfold`
-
-
* - :doc:`src/nogpu`
- This module contains GPU related dummy types and functions.
-
* - :doc:`src/nogravity`
-
-
* - :doc:`src/nogrid`
-
-
* - :doc:`src/nohdf5_io`
- This module is a dummy module for non-HDF5 IO. 28-Oct-2016/PABoudin: coded
-
* - :doc:`src/noheatflux`
-
-
* - :doc:`src/nohydro`
- no variable $\uv$: useful for kinematic dynamo runs.
-
* - :doc:`src/nohyperresi_strict`
- This module applies a sixth order hyperresistivity to the induction equation (following Brandenburg & Sarson 2002). This hyperresistivity ensures that the energy dissipation rate is positive define everywhere.
-
* - :doc:`src/nohypervisc_strict`
- This module applies a sixth order hyperviscosity to the equation of motion (following Haugen & Brandenburg 2004).
-
* - :doc:`src/noimplicit_diffusion`
- Dummy
-
* - :doc:`src/noimplicit_physics`
-
-
* - :doc:`src/noinitial_condition`
- This module provide a way for users to specify custom initial conditions.
-
* - :doc:`src/nointerstellar`
- Dummy module.
-
* - :doc:`src/nolorenz_gauge`
- Lorenz gauge, dphi/dt = -cphi2*divA
-
* - :doc:`src/nolsode_for_chemistry`
- This module calculates the chemistry contribution to df in the case where chemistry is solved separately using the LSODE solver
-
* - :doc:`src/nomagnetic`
-
-
* - :doc:`src/nompicomm`
- Dummy module for MPI communication. This allows the code to run on a single CPU.
-
* - :doc:`src/noneutraldensity`
- This module is used both for the initial condition and during run time. It contains dlnrhon\_dt and init\_lnrhon, among other auxiliary routines.
-
* - :doc:`src/noneutralvelocity`
- This module takes care of everything related to neutral velocity
-
* - :doc:`src/noNSCBC`
- Module for NSCBC boundary conditions. To be included from boundcond.f90.
-
* - :doc:`src/noopacity`
- This module is the dummy for the opacity module(s).
-
* - :doc:`src/noparticles`
- This module takes care of everything related to dust particles.
-
* - :doc:`src/noparticles_adaptation`
- This modules takes care of adapting the number of particles in a grid cell to a desired value. This module is based on an original idea by Jacob Trier Frederiksen.
-
* - :doc:`src/noparticles_adsorbed`
- This module takes care of everything related to particle surface fractions.
-
* - :doc:`src/noparticles_breakup`
- Dummy module for particle breakup.
-
* - :doc:`src/noparticles_caustics`
- This module writes information about the local state of the gas at the positions of a selected number of particles.
-
* - :doc:`src/noparticles_chemistry`
- This module takes care of everything related to particle chemistry
-
* - :doc:`src/noparticles_coagulation`
- This modules takes care of instantaneous coagulation, shattering, erosion, and bouncing of superparticles.
-
* - :doc:`src/noparticles_collisions`
- This modules takes care of instantaneous collisions between superparticles.
-
* - :doc:`src/noparticles_condensation`
- This modules takes care of condensation / evaporation or deposition / sublimation of superparticles
-
* - :doc:`src/noparticles_density`
- This module takes care of everything related to the density represented by each (super)particle.
-
* - :doc:`src/noparticles_diagnos_dv`
- This modules takes care of instantaneous collisions between superparticles.
-
* - :doc:`src/noparticles_diagnos_state`
- This modules takes care of instantaneous collisions between superparticles.
-
* - :doc:`src/noparticles_drag`
- This module takes care of drag forces between particles and gas.
-
* - :doc:`src/noparticles_grad`
- This module tries to solve for gradient matrix of particle velocities
-
* - :doc:`src/noparticles_kmeans`
- Dummy version of k-means vector quantization algorithm using the Forgy initialisation of the codebook.
-
* - :doc:`src/noparticles_lyapunov`
- This module writes information about the local state of the gas at the positions of a selected number of particles.
-
* - :doc:`src/noparticles_main`
- This module contains all the main structure needed for particles.
-
* - :doc:`src/noparticles_map`
- This module contains subroutines for mapping particles on the mesh.
-
* - :doc:`src/noparticles_mass`
- This module takes care of everything related to the mass of the particles.
-
* - :doc:`src/noparticles_mpicomm`
- This module deals with communication of particles between processors.
-
* - :doc:`src/noparticles_number`
- This module takes care of everything related to particle number.
-
* - :doc:`src/noparticles_persistence`
- This module calculates the probability distribution function the particles that have moved a certain distance away from their initial position.
-
* - :doc:`src/noparticles_potential`
- The no module for particles potential
-
* - :doc:`src/noparticles_radius`
- This module takes care of everything related to particle radius.
-
* - :doc:`src/noparticles_selfgravity`
- This module takes care of everything related to particle self-gravity.
-
* - :doc:`src/noparticles_sink`
- This module takes care of everything related to sink particles.
-
* - :doc:`src/noparticles_spin`
- This module takes care of everything related to particle spin.
-
* - :doc:`src/noparticles_stalker`
- This module writes information about the local state of the gas at the positions of a selected number of particles.
-
* - :doc:`src/noparticles_stirring`
- This module takes care of stirring of particles.
-
* - :doc:`src/noparticles_sub`
- This module contains subroutines useful for the Particle module.
-
* - :doc:`src/noparticles_surfspec`
- This module takes care of everything related to particle surface fractions.
-
* - :doc:`src/noparticles_temperature`
- This module takes care of everything related to particle temperature.
-
* - :doc:`src/noparticles_tetrad`
-
-
* - :doc:`src/nopointmasses`
- This module takes care of direct N-body gravity between point masses.
-
* - :doc:`src/nopoisson`
- This module solves the Poisson equation.
-
* - :doc:`src/nopolymer`
- This modules deals with all aspects of polymers.
-
* - :doc:`src/nopower_spectrum`
- reads in full snapshot and calculates power spetrum of u
-
* - :doc:`src/nopscalar`
- This modules solves the passive scalar advection equation.
-
* - :doc:`src/nopython`
-
-
* - :doc:`src/noradiation`
-
-
* - :doc:`src/noselfgravity`
- This module takes care of self gravity.
-
* - :doc:`src/noSGS_hydro`
- This module is the dummy for the SGS\_hydro module in which e.g the SGS viscous force or viscous heat is computed.
-
* - :doc:`src/noshear`
- This modules deals with all aspects of shear; if no shear is invoked, a corresponding replacement dummy routine is used instead which absorbs all the calls to the shear relevant subroutines listed in here.
-
* - :doc:`src/noshock`
- This module calculates a divergence of u based shock finding profile used by shock viscosities and diffusion terms. eg. the total voscosity is taken as: nu\_total = nu + nu\_shock*dx*smooth(max5(-(div u)))) where dx*smooth(max5(-(div u)))) is the profile calculated here in.
-
* - :doc:`src/nosignal_handling`
-
-
* - :doc:`src/noslices`
- This module produces slices for animation purposes.
-
* - :doc:`src/nosolid_cells`
- This module add solid (as in no-fluid) cells in the domain. This can be used e.g. in order to simulate a cylinder in a cross flow.
-
* - :doc:`src/nosolid_cells_mpicomm`
-
-
* - :doc:`src/nosolid_cells_ogrid_cdata`
-
-
* - :doc:`src/nosolid_cells_ogrid_chemistry`
-
-
* - :doc:`src/nosolid_cells_ogrid_sub`
-
-
* - :doc:`src/nospecial`
- This module provide a way for users to specify custom (i.e. not in the standard Pencil Code) physics, diagnostics etc.
-
* - :doc:`src/nostreamlines`
-
-
* - :doc:`src/nostruct_func`
-
-
* - :doc:`src/notestfield`
- This modules deals with all aspects of testfield fields; if no testfield fields are invoked, a corresponding replacement dummy routine is used instead which absorbs all the calls to the testfield relevant subroutines listed in here.
-
* - :doc:`src/notestflow`
- This modules deals with all aspects of testfield fields; if no testfield fields are invoked, a corresponding replacement dummy routine is used instead which absorbs all the calls to the testfield relevant subroutines listed in here.
-
* - :doc:`src/notestperturb`
- test perturbation method
-
* - :doc:`src/notestscalar`
- This modules deals with all aspects of testscalar fields; if no testscalar fields are invoked, a corresponding replacement dummy routine is used instead which absorbs all the calls to the testscalar relevant subroutines listed in here.
-
* - :doc:`src/notimeavg`
-
-
* - :doc:`src/notraining`
-
-
* - :doc:`src/noviscosity`
- This module is the dummy for the viscosity module in which e.g the viscous force or viscous heat is computed.
-
* - :doc:`src/noweno_transport`
- This module take care of WENO (weighted essentially non oscillatory) transport.
-
* - :doc:`src/noyinyang`
- This module contains Yin-Yang related dummy types and functions.
-
* - :doc:`src/noyinyang_mpi`
- This module contains Yin-Yang related dummy types and functions.
-
* - :doc:`src/NSCBC`
- Module for NSCBC (Navier-Stokes Characteristic Boundary Conditions). NSCBC is an alternative way of imposing (time-dependent) boundary conditions through solving differential equations on the boundaries.
-
* - :doc:`src/param_io`
- IO of init and run parameters. Subroutines here are 'at the end of the food chain', i.e. depend on all physics modules plus possibly others. Using this module is also a compact way of referring to all physics modules at once.
-
* - :doc:`src/particles_adaptation`
- This modules takes care of adapting the number of particles in a grid cell to a desired value. This module is based on an original idea by Jacob Trier Frederiksen and was developed by Anders Johansen and Chao-Chin Yang.
-
* - :doc:`src/particles_adsorbed`
- This module takes care of the evolution of adsorbed species on the particle surface for reactive particles
-
* - :doc:`src/particles_breakup`
- Secondary breakup of Lagrangian liquid parcels.
-
* - :doc:`src/particles_caustics`
- This modules solves for the gradient matrix of flow velocities. The gradient matrix Sigma obeys the equation: (d/dt) Sigma = (1/(taup))*(S - Sigma) - Sigma^2 where A is the flow gradient matrix at the position of the particle; and taup is the Stokes time.
-
* - :doc:`src/particles_cdata`
- Global particle variables
-
* - :doc:`src/particles_charged`
- This module takes care of everything related to inertial particles.
-
* - :doc:`src/particles_chemistry`
- This module implements reactive particles.
-
* - :doc:`src/particles_coagulation`
- This modules takes care of instantaneous coagulation, shattering, erosion, and bouncing of superparticles.
-
* - :doc:`src/particles_collisions`
- This modules takes care of instantaneous collisions between superparticles.
-
* - :doc:`src/particles_density`
- This module takes care of everything related to the density represented by each (super)particle.
-
* - :doc:`src/particles_diagnos_dv`
- This module bins particle pairs in separation and relative velocity at regular intervals.
-
* - :doc:`src/particles_diagnos_state`
- This module tracks the evolution of particles in terms of user defined "states". Currently the only implemented state is in terms of the local gas velocity.
-
* - :doc:`src/particles_drag`
- This module integrates drag forces between particles and gas.
-
* - :doc:`src/particles_dust`
- This module takes care of everything related to inertial particles.
-
* - :doc:`src/particles_dust_blocks`
- This module takes care of everything related to dust particles.
-
* - :doc:`src/particles_eikonal`
- Eikonal solver, "particles" refer here to points on the trajectory.
-
* - :doc:`src/particles_grad`
- This module tries to solve for gradient matrix of particle velocities
-
* - :doc:`src/particles_lagrangian`
- This module takes care of everything related to inertial particles.
-
* - :doc:`src/particles_lyapunov`
- This module writes information about the local state of the gas at the positions of a selected number of particles.
-
* - :doc:`src/particles_main`
- This module contains all the main structure needed for particles.
-
* - :doc:`src/particles_map`
- This module contains subroutines for mapping particles on the mesh. Different domain decompositions have different versions of this module.
-
* - :doc:`src/particles_map_blocks`
- This module contains subroutines useful for mapping particles on the mesh.
-
* - :doc:`src/particles_map_index`
- This module contains subroutines for particle-mesh related operations.
-
* - :doc:`src/particles_mass`
- This module takes care of everything related to the mass of the particles.
-
* - :doc:`src/particles_mass_swarm`
- This module handles the mass of super-particles.
-
* - :doc:`src/particles_mpicomm`
- This module deals with communication of particles between processors.
-
* - :doc:`src/particles_mpicomm_blocks`
- This module deals with communication of particles between processors.
-
* - :doc:`src/particles_number`
- This module takes care of everything related to internal particle number.
-
* - :doc:`src/particles_persistence`
- This module calculates the probability distribution function the particles that have moved a certain distance away from their initial position.
-
* - :doc:`src/particles_potential`
- This module takes care of everything related to pairwise interaction of particles. It is experimental now (April 2016)
-
* - :doc:`src/particles_radius`
- This module takes care of everything related to particle radius.
-
* - :doc:`src/particles_selfgravity`
- This module takes care of everything related to particle self-gravity by inverting the Poisson equation of the particle density mapped on the grid.
-
* - :doc:`src/particles_sink`
- This module takes care of everything related to sink particles.
-
* - :doc:`src/particles_spin`
- This module takes care of everything related to particle spin including lifting forces. The module maintains a full f-array vorticity field, to be able to interpolate on the flow vorticity.
-
* - :doc:`src/particles_stalker`
- This module writes information about the local state of the gas at the positions of a selected number of particles.
-
* - :doc:`src/particles_stirring`
- This module takes care of stirring of particles.
-
* - :doc:`src/particles_sub`
- This module contains useful subroutines for the particle modules. Subroutines that depend on domain decomposition should be put in the Particles\_map module.
-
* - :doc:`src/particles_surfspec`
- This module takes care the gas phase species in the immediate vicinity of reactive particles.
-
* - :doc:`src/particles_temperature`
- This module takes care of everything related to inertial particles.
-
* - :doc:`src/particles_tetrad`
- Follow a particle. For this particle solve for three other particles that that are in the neighbourhood of the particle we were following. These four particles together forms a tetrad.
-
* - :doc:`src/particles_tracers`
- This module takes care of everything related to tracer particles.
-
* - :doc:`src/pencil_check`
-
-
* - :doc:`src/pencil_emul`
- Not a module
-
* - :doc:`src/persist`
- Module to handle variables whose state should persist between executions of run.x, e.g. the random number seeds and some other forcing state information.
-
* - :doc:`src/pointmasses`
- This module takes care of direct N-body gravity between point masses.
-
* - :doc:`src/poisson`
- This module solves the Poisson equation (d^2/dx^2 + d^2/dy^2 + d^2/dz^2 - h) f = RHS(x,y,z) [which for h/=0 could also be called inhomogenous nonuniform Helmholtz equation] for the function f(x,y,z).
-
* - :doc:`src/poisson_logspirals`
- This module contains (more or less) a replica of poisson.f90, implementing the version of poisson equation solving that I have been building (the method outlined in Clement Baruteau's thesis).
-
* - :doc:`src/poisson_multigrid`
- This module solves the Poisson equation (d^2/dx^2 + d^2/dy^2 + d^2/dz^2 - h) f = RHS(x,y,z) [which for h/=0 could also be called inhomogenous nonuniform Helmholtz equation] for the function f(x,y,z), starting from the second-order accurate 7-point discretization of that equation.
-
* - :doc:`src/polymer`
- This modules deals with all aspects of polymers.
-
* - :doc:`src/polynomialroots`
- PURPOSE - Solve for the roots of a polynomial equation with real coefficients, up to quartic order. Returns a code indicating the nature of the roots found.
-
* - :doc:`src/power_spectrum`
- reads in full snapshot and calculates power spetrum of u
-
* - :doc:`src/pscalar`
- This modules solves the passive scalar advection equation.
-
* - :doc:`src/pscalar_nolog`
- This modules solves (multiple) passive scalar advection equation(s) Solves for c, not ln(c).
-
* - :doc:`src/python`
-
-
* - :doc:`src/radiation_ray`
- Radiation (solves transfer equation along rays).
-
* - :doc:`src/read_all_videofiles`
- Not a module
-
* - :doc:`src/read_vectorfiles`
- Not a module
-
* - :doc:`src/read_videofiles`
- Not a module
-
* - :doc:`src/register`
- A module for setting up the f-array and related variables ('register' the velocity, energy, magnetic, etc modules).
-
* - :doc:`src/run`
-
-
* - :doc:`src/selfgravity`
- This module takes care of self gravity by solving the Poisson equation (d^2/dx^2 + d^2/dy^2 + d^2/dz^2)phi = 4*pi*G*rho for the potential phi.
-
* - :doc:`src/selfgravity_logspirals`
- This module takes care of self gravity by solving the Poisson equation (d^2/dx^2 + d^2/dy^2 + d^2/dz^2)phi = 4*pi*G*rho for the potential phi.
-
* - :doc:`src/SGS_hydro`
- This module is the dummy for the SGS\_hydro module in which e.g the SGS force or heat is computed.
-
* - :doc:`src/shared_variables`
- This module is an interface to allow modules to register pointers to their internal variables so that other modules may then request them by name.
-
* - :doc:`src/shear`
- This modules deals with all aspects of shear; if no shear is invoked, a corresponding replacement dummy routine is used instead which absorbs all the calls to the shear relevant subroutines listed in here.
-
* - :doc:`src/shock`
- This modules implements viscous heating and diffusion terms here for shock viscosity nu\_total = nu + nu\_shock*dx^2*smooth(max5(-(div u))))
-
* - :doc:`src/shock_highorder`
- This modules implements viscous heating and diffusion terms here for shock viscosity nu\_total = nu + nu\_shock*dx^2*smooth(max5(-(div u))))
-
* - :doc:`src/signal_handling`
-
-
* - :doc:`src/slices`
- This module produces slices for animation purposes.
-
* - :doc:`src/slices_methods`
- This module provides routines for obtaining slice data.
-
* - :doc:`src/snapshot`
- Write snapshot files (variables and power spectra).
-
* - :doc:`src/solid_cells`
- This module add solid (as in no-fluid) cells in the domain. This can be used e.g. in order to simulate a cylinder in a cross flow.
-
* - :doc:`src/solid_cells_ogrid`
- This module add solid (as in no-fluid) cells in the domain. This can be used e.g. in order to simulate a cylinder in a cross flow.
-
* - :doc:`src/solid_cells_ogrid_cdata`
-
-
* - :doc:`src/solid_cells_ogrid_chemistry`
- This modules addes chemical species and reactions. The units used in the chem.in files are cm3,mole,sec,kcal and K This was found out by comparing the mechanism found in samples/0D/chemistry\_H2\_ignition\_delay with Flow Reactor Studies and Kinetic Modeling of the ReactionH/O22 of A. MUELLER, T. J. KIM, R. A. YETTER, F. L. DRYER
-
* - :doc:`src/solid_cells_ogrid_mpicomm`
-
-
* - :doc:`src/solid_cells_ogrid_nompicomm`
-
-
* - :doc:`src/solid_cells_ogrid_sub`
-
-
* - :doc:`src/special`
-
-
* - :doc:`src/start`
- Not a module
-
* - :doc:`src/streamlines`
-
-
* - :doc:`src/struct_func`
- Calculates 2-point structure functions and/or PDFs and saves them during the run.
-
* - :doc:`src/sub`
- This module contains useful subroutines.
-
* - :doc:`src/syscalls`
- This module takes care of system calls and provides ANSI-C functionality.
-
* - :doc:`src/temperature_bcs`
-
-
* - :doc:`src/temperature_idealgas`
- This module can replace the energy module by using lnT or T (with ltemperature\_nolog=.true.) as dependent variable. For a perfect gas with constant coefficients (no ionization) we have: (1-1/gamma) * cp*T = cs20 * exp( (gamma-1)*ln(rho/rho0)-gamma*s/cp )
-
* - :doc:`src/temperature_ionization`
- This module can replace the energy module by using lnT or T (with ltemperature\_nolog=.true.) as dependent variable.
-
* - :doc:`src/testfield_axisym`
- Test-field module for axisymmetric turbulence. No special settings in cparam.local are needed.
-
* - :doc:`src/testfield_axisym2`
- Test-field module for axisymmetric turbulence. No special settings in cparam.local are needed.
-
* - :doc:`src/testfield_meri`
-
-
* - :doc:`src/testflow_z`
- This modules deals with all aspects of testflow fields; if no testflow fields are invoked, a corresponding replacement dummy routine is used instead which absorbs all the calls to the testflow relevant subroutines listed in here.
-
* - :doc:`src/thermal_energy`
- This module can replace the energy module by using the thermal energy eth as dependent variable. For a perfect gas we have
-
* - :doc:`src/timeavg`
-
-
* - :doc:`src/timestep`
- Runge-Kutta time advance, accurate to order itorder. At the moment, itorder can be 1, 2, or 3.
-
* - :doc:`src/timestep_LSODE`
- Timestepping routine corresponding to the use of LSODE to solve chemistry. The transport equations are solved as usual using RK methods but the chemistry ODEs are separated and solved implicitly using LSODE either following a sequential (1 chemistry step) or symmetric (2 chemistry steps) splitting scheme.
-
* - :doc:`src/timestep_RKC-10`
-
-
* - :doc:`src/timestep_RKC-20`
-
-
* - :doc:`src/timestep_RKC-25`
-
-
* - :doc:`src/timestep_RKC-40`
-
-
* - :doc:`src/timestep_rkf`
-
-
* - :doc:`src/timestep_rkf_1d`
-
-
* - :doc:`src/timestep_rkf_lowsto`
- Runge-Kutta-Fehlberg Low-Storage method Christopher A. Kennedy, Mark H. Carpenter, R.Michael Lewis, Low-storage, explicit Runge-Kutta schemes for the compressible Navier-Stokes equations, Applied Numerical Mathematics, Volume 35, Issue 3, 2000, Pages 177-219, ISSN 0168-9274, https://doi.org/10.1016/S0168-9274(99)00141-5.
-
* - :doc:`src/timestep_stiff`
- adapted from timestep\_rkf, and from numerical recipe stiff algorithm
-
* - :doc:`src/timestep_strang`
- Runge-Kutta time advance, accurate to order itorder. At the moment, itorder can be 1, 2, or 3. Split one dt into two dt/2 steps with RK method. Please add documentation on why this is beneficial...
-
* - :doc:`src/timestep_sts`
-
-
* - :doc:`src/timestep_subcycle`
-
-
* - :doc:`src/training_torchfort`
-
-
* - :doc:`src/viscosity`
- This modules implements viscous heating and diffusion terms here for cases 1) nu constant, 2) mu = rho.nu 3) constant and
-
* - :doc:`src/weno_transport`
- This module take care of WENO (weighted essentially non oscillatory) transport.
-
* - :doc:`src/write_default_namelists`
- Not a module
-
* - :doc:`src/yinyang`
- This module contains Yin-Yang related types and functions which are incompatible with FORTRAN 95.
-
* - :doc:`src/yinyang_mpi`
- This module contains Yin-Yang related types and functions which are incompatible with FORTRAN 95.
-
.. toctree::
:hidden:
:maxdepth: 1
src/ascalar
src/bfield
src/border_profiles
src/boundcond
src/boundcond_alt
src/cdata
src/chemistry
src/chemistry_simple
src/chiral
src/combine_videofiles
src/cosmicray
src/cosmicray_nolog
src/cosmicrayflux
src/cparam
src/debug_io_dist
src/debug_io_hdf5
src/debug_io_mpi
src/density
src/density_bcs
src/density_methods
src/density_stratified
src/density_stratified_methods
src/deriv
src/deriv_10th
src/deriv_2nd
src/deriv_2nd_all
src/deriv_4th
src/deriv_4th_all
src/deriv_8th
src/deriv_alt
src/detonate
src/diagnostics
src/diagnostics_outlog
src/dustdensity
src/dustvelocity
src/emulated
src/entropy
src/entropy_bcs
src/entropy_const
src/entropy_onefluid
src/eos_chemistry
src/eos_chemistry_simple
src/eos_fixed_ionization
src/eos_idealgas
src/eos_ionization
src/eos_temperature_ionization
src/equ
src/farray
src/farray_alloc
src/fft_nr
src/fftpack
src/file_io_common
src/file_io_dist
src/file_io_f2003
src/file_io_f95
src/filter
src/fixed_point
src/forcing
src/fourier_fft
src/fourier_fftpack
src/general
src/geometrical_types
src/ghost_check
src/ghostfold_mpicomm
src/ghostfold_nompicomm
src/global_pushpars
src/gpu_astaroth
src/gravity_r
src/gravity_simple
src/grid
src/hdf5_io_parallel
src/hdf5_io_parallel_chunked
src/heatflux
src/hydro
src/hydro_kinematic
src/hydro_potential
src/hyperresi_strict_2nd
src/hypervisc_strict_2nd
src/hypervisc_strict_fft
src/implicit_diffusion
src/implicit_physics
src/initcond
src/interstellar
src/interstellar_old
src/io_collect
src/io_collect_xy
src/io_collect_xy_f2003
src/io_dist
src/io_dist_outlog
src/io_hdf5
src/io_mpi2
src/io_wrapper
src/lorenz_gauge
src/lsode_for_chemistry
src/magnetic
src/messages
src/mpicomm
src/neutraldensity
src/neutralvelocity
src/noascalar
src/noborder_profiles
src/noboundcond
src/nochemistry
src/nochiral
src/nocosmicray
src/nocosmicrayflux
src/nodebug
src/nodensity
src/nodensity_bcs
src/nodensity_methods
src/noderiv
src/nodetonate
src/nodustdensity
src/nodustvelocity
src/noenergy
src/noenergy_bcs
src/noentropy
src/noeos
src/nofarray_alloc
src/nofixed_point
src/noforcing
src/nofourier
src/noghostfold
src/nogpu
src/nogravity
src/nogrid
src/nohdf5_io
src/noheatflux
src/nohydro
src/nohyperresi_strict
src/nohypervisc_strict
src/noimplicit_diffusion
src/noimplicit_physics
src/noinitial_condition
src/nointerstellar
src/nolorenz_gauge
src/nolsode_for_chemistry
src/nomagnetic
src/nompicomm
src/noneutraldensity
src/noneutralvelocity
src/noNSCBC
src/noopacity
src/noparticles
src/noparticles_adaptation
src/noparticles_adsorbed
src/noparticles_breakup
src/noparticles_caustics
src/noparticles_chemistry
src/noparticles_coagulation
src/noparticles_collisions
src/noparticles_condensation
src/noparticles_density
src/noparticles_diagnos_dv
src/noparticles_diagnos_state
src/noparticles_drag
src/noparticles_grad
src/noparticles_kmeans
src/noparticles_lyapunov
src/noparticles_main
src/noparticles_map
src/noparticles_mass
src/noparticles_mpicomm
src/noparticles_number
src/noparticles_persistence
src/noparticles_potential
src/noparticles_radius
src/noparticles_selfgravity
src/noparticles_sink
src/noparticles_spin
src/noparticles_stalker
src/noparticles_stirring
src/noparticles_sub
src/noparticles_surfspec
src/noparticles_temperature
src/noparticles_tetrad
src/nopointmasses
src/nopoisson
src/nopolymer
src/nopower_spectrum
src/nopscalar
src/nopython
src/noradiation
src/noselfgravity
src/noSGS_hydro
src/noshear
src/noshock
src/nosignal_handling
src/noslices
src/nosolid_cells
src/nosolid_cells_mpicomm
src/nosolid_cells_ogrid_cdata
src/nosolid_cells_ogrid_chemistry
src/nosolid_cells_ogrid_sub
src/nospecial
src/nostreamlines
src/nostruct_func
src/notestfield
src/notestflow
src/notestperturb
src/notestscalar
src/notimeavg
src/notraining
src/noviscosity
src/noweno_transport
src/noyinyang
src/noyinyang_mpi
src/NSCBC
src/param_io
src/particles_adaptation
src/particles_adsorbed
src/particles_breakup
src/particles_caustics
src/particles_cdata
src/particles_charged
src/particles_chemistry
src/particles_coagulation
src/particles_collisions
src/particles_density
src/particles_diagnos_dv
src/particles_diagnos_state
src/particles_drag
src/particles_dust
src/particles_dust_blocks
src/particles_eikonal
src/particles_grad
src/particles_lagrangian
src/particles_lyapunov
src/particles_main
src/particles_map
src/particles_map_blocks
src/particles_map_index
src/particles_mass
src/particles_mass_swarm
src/particles_mpicomm
src/particles_mpicomm_blocks
src/particles_number
src/particles_persistence
src/particles_potential
src/particles_radius
src/particles_selfgravity
src/particles_sink
src/particles_spin
src/particles_stalker
src/particles_stirring
src/particles_sub
src/particles_surfspec
src/particles_temperature
src/particles_tetrad
src/particles_tracers
src/pencil_check
src/pencil_emul
src/persist
src/pointmasses
src/poisson
src/poisson_logspirals
src/poisson_multigrid
src/polymer
src/polynomialroots
src/power_spectrum
src/pscalar
src/pscalar_nolog
src/python
src/radiation_ray
src/read_all_videofiles
src/read_vectorfiles
src/read_videofiles
src/register
src/run
src/selfgravity
src/selfgravity_logspirals
src/SGS_hydro
src/shared_variables
src/shear
src/shock
src/shock_highorder
src/signal_handling
src/slices
src/slices_methods
src/snapshot
src/solid_cells
src/solid_cells_ogrid
src/solid_cells_ogrid_cdata
src/solid_cells_ogrid_chemistry
src/solid_cells_ogrid_mpicomm
src/solid_cells_ogrid_nompicomm
src/solid_cells_ogrid_sub
src/special
src/start
src/streamlines
src/struct_func
src/sub
src/syscalls
src/temperature_bcs
src/temperature_idealgas
src/temperature_ionization
src/testfield_axisym
src/testfield_axisym2
src/testfield_meri
src/testflow_z
src/thermal_energy
src/timeavg
src/timestep
src/timestep_LSODE
src/timestep_RKC-10
src/timestep_RKC-20
src/timestep_RKC-25
src/timestep_RKC-40
src/timestep_rkf
src/timestep_rkf_1d
src/timestep_rkf_lowsto
src/timestep_stiff
src/timestep_strang
src/timestep_sts
src/timestep_subcycle
src/training_torchfort
src/viscosity
src/weno_transport
src/write_default_namelists
src/yinyang
src/yinyang_mpi
.. _experimental:
experimental source files (src/experimental)
--------------------------------------------
The *src/experimental* directory contains 41 Fortran files.
.. list-table::
:header-rows: 1
:widths: 20 60 20
* - File
- Description
- Scientific References
* - :doc:`experimental/analyzers`
- use EMD, only: analyzer\_emd
-
* - :doc:`experimental/anelastic`
- This module solves the Poisson equation for pressure for the linearized density
-
* - :doc:`experimental/barneshut`
- This module implements gas/dust self-gravity using a Barnes-Hut octree algorithm. The main function, do\_barneshut, takes the variable 'phi' as input, which is the gas/dust density grid from the selfgravity module, and modifies 'phi' in place, becoming the gravitational potential.
-
* - :doc:`experimental/boussinesq`
- 23-mar-2012/dintrans: coded
-
* - :doc:`experimental/conductivity`
- This module takes care of heat conductivity for the energy equation.
-
* - :doc:`experimental/cosmicray_current`
- Module for calculating Cosmic Ray Flux.
-
* - :doc:`experimental/cosmicray_density`
- This modules solves the cosmic ray energy density equation. It follows the description of Hanasz & Lesch (2002,2003) as used in their ZEUS 3D implementation.
-
* - :doc:`experimental/emd`
-
-
* - :doc:`experimental/entropy_anelastic`
- This module takes care of energy (initial condition and time advance)
-
* - :doc:`experimental/eos_idealgas_vapor`
- Equation of state for an ideal gas with variable water vapour.
-
* - :doc:`experimental/file_io_f2003`
- This module takes care of massive parallel file Input/Output. We use here F2003 features for HPC-friendly behaviour.
-
* - :doc:`experimental/forcing_cont_sample`
- This module contains routines both for delta-correlated and continuous forcing. The fcont pencil is only provided for continuous forcing.
-
* - :doc:`experimental/gravity_r_radpressure`
- Radial gravity
-
* - :doc:`experimental/hydro_ffreeMHDrel`
- This module solve the momentum equation for relativistic force-free MHD dS/dt = curlB x B + curlE x E + divE E where E = (BxS)/B^2
-
* - :doc:`experimental/magnetic_ffreeMHDrel`
- Relativistic treatment of force-free magnetic fields. Still quite experimental. This modules deals with all aspects of magnetic fields; if no magnetic fields are invoked, a corresponding replacement dummy routine is used instead which absorbs all the calls to the magnetically relevant subroutines listed in here.
-
* - :doc:`experimental/magnetic_shearboxJ`
- This modules deals with all aspects of magnetic fields; if no magnetic fields are invoked, a corresponding replacement dummy routine is used instead which absorbs all the calls to the magnetically relevant subroutines listed in here.
-
* - :doc:`experimental/mpicomm`
- This module takes care of MPI communication.
-
* - :doc:`experimental/neutralvelocity_matchiontemp`
- This module takes care of everything related to velocity
-
* - :doc:`experimental/noconductivity`
- Dummy module for conductivity.
-
* - :doc:`experimental/nompicomm`
- Dummy module for MPI communication. This allows the code to run on a single CPU.
-
* - :doc:`experimental/particles_dust_ajwr`
- This module takes care of everything related to inertial particles.
-
* - :doc:`experimental/particles_dust_brdeplete`
- This module takes care of everything related to inertial particles.
-
* - :doc:`experimental/particles_mpicomm_blocks_partition`
- This module deals with communication of particles between processors.
-
* - :doc:`experimental/particles_nbody_ajwr`
- This module takes care of direct N-body gravity between particles.
-
* - :doc:`experimental/particles_potential`
- This module takes care of everything related to pairwise interaction of particles. It is experimental now (April 2016)
-
* - :doc:`experimental/particles_radius_ajwr`
- This module takes care of everything related to particle radius.
-
* - :doc:`experimental/particles_radius_strubbechiang`
- This module takes care of everything related to particle radius.
-
* - :doc:`experimental/pc_h5collect`
- Not a module
-
* - :doc:`experimental/poisson_cyl`
- This module solves the Poisson equation in cylindrical coordinates (d^2/dr^2 +1/r*d/dr + 1/r^2*d^2/dy^2 + d^2/dz^2) f = RHS(x,y,z)
-
* - :doc:`experimental/poisson_expand`
- This module solves the Poisson equation (d^2/dx^2 + d^2/dy^2 + d^2/dz^2 - h) f = RHS(x,y,z) [which for h/=0 could also be called inhomogenous nonuniform Helmholtz equation] for the function f(x,y,z). The difference between this and poisson.f90 is that here we solve it in a non-periodic Cartesian grid, expanding the grid to curb the periodicity of the Fourier transforms.
-
* - :doc:`experimental/shock_finder`
-
-
* - :doc:`experimental/shock_finder_comm_uu`
-
-
* - :doc:`experimental/shock_perp`
- This modules implements viscous heating and diffusion terms here for shock viscosity nu\_total = nu + nu\_shock*dx^2*smooth(max5(-(div u))))
-
* - :doc:`experimental/solid_cells_CGEO`
- This module add solid (as in no-fluid) cells in the domain. This can be used e.g. in order to simulate a cylinder in a cross flow. Now, apart from the circle geometry, a 2D geometry file similar to STL can be used to represent the solid cells.Details can be found in the paper "A ghost-cell immersed boundary method for the simulations of heat transfer in compressible flows under different boundary conditions Part-II: Complex geometries"
-
* - :doc:`experimental/solid_cells_reactive`
- This module add solid (as in no-fluid) cells in the domain. This can be used e.g. in order to simulate a cylinder in a cross flow.
-
* - :doc:`experimental/supernova`
- This modules contains the routines for SNe-driven ISM simulations. Still in development.
-
* - :doc:`experimental/test_chemistry`
- This modules adds chemical species and reactions. The units used in the chem.in files are cm3,mole,sec,kcal and K
-
* - :doc:`experimental/test_eos_chemistry`
- Equation of state for an ideal gas without ionization.
-
* - :doc:`experimental/test_f2003`
- Not a module
-
* - :doc:`experimental/testperturb`
- test perturbation method
-
* - :doc:`experimental/timestep_DufortFrankel`
- DuFort-Frankel time stepping routine. As is well known, this proceedure has disadvantages, but it is well suited to deal with the time step constrain near the center in spherical polar coordinates.
-
.. toctree::
:hidden:
:maxdepth: 1
experimental/analyzers
experimental/anelastic
experimental/barneshut
experimental/boussinesq
experimental/conductivity
experimental/cosmicray_current
experimental/cosmicray_density
experimental/emd
experimental/entropy_anelastic
experimental/eos_idealgas_vapor
experimental/file_io_f2003
experimental/forcing_cont_sample
experimental/gravity_r_radpressure
experimental/hydro_ffreeMHDrel
experimental/magnetic_ffreeMHDrel
experimental/magnetic_shearboxJ
experimental/mpicomm
experimental/neutralvelocity_matchiontemp
experimental/noconductivity
experimental/nompicomm
experimental/particles_dust_ajwr
experimental/particles_dust_brdeplete
experimental/particles_mpicomm_blocks_partition
experimental/particles_nbody_ajwr
experimental/particles_potential
experimental/particles_radius_ajwr
experimental/particles_radius_strubbechiang
experimental/pc_h5collect
experimental/poisson_cyl
experimental/poisson_expand
experimental/shock_finder
experimental/shock_finder_comm_uu
experimental/shock_perp
experimental/solid_cells_CGEO
experimental/solid_cells_reactive
experimental/supernova
experimental/test_chemistry
experimental/test_eos_chemistry
experimental/test_f2003
experimental/testperturb
experimental/timestep_DufortFrankel
.. _inactive:
inactive source files (src/inactive)
------------------------------------
The *src/inactive* directory contains 4 Fortran files.
.. list-table::
:header-rows: 1
:widths: 20 60 20
* - File
- Description
- Scientific References
* - :doc:`inactive/deriv_3sec_insteadof_14min_compiletime`
-
-
* - :doc:`inactive/gravitational_waves_hTXk_no_xpara`
- This module provide a way for users to specify custom (i.e. not in the standard Pencil Code) physics, diagnostics etc.
-
* - :doc:`inactive/testfield`
- This modules deals with all aspects of testfield fields; if no testfield fields are invoked, a corresponding replacement dummy routine is used instead which absorbs all the calls to the testfield relevant subroutines listed in here.
-
* - :doc:`inactive/testfield_xz`
- This modules deals with all aspects of testfield fields; if no testfield fields are invoked, a corresponding replacement dummy routine is used instead which absorbs all the calls to the testfield relevant subroutines listed in here.
-
.. toctree::
:hidden:
:maxdepth: 1
inactive/deriv_3sec_insteadof_14min_compiletime
inactive/gravitational_waves_hTXk_no_xpara
inactive/testfield
inactive/testfield_xz
.. _initial_condition:
initial_condition source files (src/initial_condition)
------------------------------------------------------
The *src/initial_condition* directory contains 67 Fortran files.
.. list-table::
:header-rows: 1
:widths: 20 60 20
* - File
- Description
- Scientific References
* - :doc:`initial_condition/1D_loop_init`
-
-
* - :doc:`initial_condition/2d_accretion_disk`
- 21-feb-23/hongzhe: adapted from initial\_condition/centrifugal\_balance.f90
-
* - :doc:`initial_condition/aerosol_init`
- This module provide a way for users to specify custom initial conditions.
-
* - :doc:`initial_condition/alfven_wave`
- This module sets up an Alfven wave of amplitude init\_amp0 with wave vector init\_k0 and an optional phase init\_phase0.
-
* - :doc:`initial_condition/assimilate`
-
-
* - :doc:`initial_condition/baroclinic_init`
-
-
* - :doc:`initial_condition/binarycomparison`
- This module provide a way for users to specify custom initial conditions.
-
* - :doc:`initial_condition/blobs_domes`
- Initial condition (density, magnetic field, velocity) for a particular configuration of a braided magnetic field with magnetic domes with nulls.
-
* - :doc:`initial_condition/bonnor_ebert_sphere`
- Initial condition for a Bonnor-Ebert sphere
-
* - :doc:`initial_condition/borromean_rings`
- Initial condition (density, magnetic field, velocity) for a particular configuration of magnetic tubes.
-
* - :doc:`initial_condition/braids`
- Initial condition (density, magnetic field, velocity) for a particular configuration of a braided magnetic field.
-
* - :doc:`initial_condition/bubbles_init`
- Initial condition for bubbles in a stratified medium. Set bubble size, bubble density, surrounding medium density, temperatures, stratification and magnetic field.
-
* - :doc:`initial_condition/centrifugal_balance`
- This module provide a way for users to specify custom initial conditions.
-
* - :doc:`initial_condition/centrifugal_balance_neutrals`
- This module provide a way for users to specify custom initial conditions.
-
* - :doc:`initial_condition/cig_dynamo_benchmark`
- Set the initial conditions for the CIG Community Accuracy & Performance Benchmark: http://geodynamics.org/cig/community/workinggroups/geodyn/benchmark/ following Christensen et al. Physics of the Earth and Planetary Interiors, 128, 25-34 (2001).
-
* - :doc:`initial_condition/circumplanetary`
- This module provide a way for users to specify custom initial conditions.
-
* - :doc:`initial_condition/coronae_init`
-
-
* - :doc:`initial_condition/cylindrical_energy`
- Initial condition (density, magnetic field, velocity) for magnetohydrostatical equilibrium in a global accretion disk in a cylindrically symmetric profile in spherical coordinates. with a polytropic equation of state including entropy equation
-
* - :doc:`initial_condition/disk+corona`
- This module provide a way for users to specify custom initial conditions.
-
* - :doc:`initial_condition/dust-equilibrium`
- This module provide a way for users to specify custom initial conditions.
-
* - :doc:`initial_condition/fieldloop`
- This module provide a way for users to specify custom initial conditions.
-
* - :doc:`initial_condition/fluxring_cylindrical`
- Initial condition (density, magnetic field, velocity) for magnetohydrostatical equilibrium in a global accretion disk with an imposed (cylindrically symmetric) sound speed profile in spherical coordinates.
-
* - :doc:`initial_condition/fluxrings`
- Magnetic flux rings. Constructed from a canonical ring which is the rotated and translated; see Pencil Code manual, Section C.3.
-
* - :doc:`initial_condition/hill_vortex`
- Initial condition (density, magnetic field, velocity) for magnetohydrostatical equilibrium in a global accretion disk with an imposed (cylindrically symmetric) sound speed profile in spherical coordinates.
-
* - :doc:`initial_condition/hor-fluxlayer-By`
- Horizontal flux layer in B\_y, with tanh profiles switching on (off) at z0 (z1) Density and entropy also set appropriately. To reproduce initial condition in Catteneo & Hughes, JFM, v. 196, p. 323, 1988
-
* - :doc:`initial_condition/hs_equilibrium_ism`
- This module provide a way for users to specify custom initial conditions.
-
* - :doc:`initial_condition/hydrostat-pload`
-
-
* - :doc:`initial_condition/ice_shell`
- This module provide a way for users to specify custom initial conditions.
-
* - :doc:`initial_condition/import`
- Initial condition (density, magnetic field, velocity) for a field created externally in pencil code format. The file must be in an appropriate format with the right order of indices and match with start.in. USE WITH CAUTION!
-
* - :doc:`initial_condition/import_glemur`
- Initial condition (density, magnetic field, velocity) for a field from the code GLEMuR.
-
* - :doc:`initial_condition/iucaa_logo`
- Initial condition (density, magnetic field, velocity) for a particular configuration of a magnetic tube.
-
* - :doc:`initial_condition/kelvin_helmholtz`
- This module provide a way for users to specify custom initial conditions.
-
* - :doc:`initial_condition/kelvin_helmholtz_Lecoanet_etal16`
- Kelvin-Helmholtz initial condition from Lecoanet et al. (2016, MNRAS 455, 4274)
-
* - :doc:`initial_condition/linked_tori_twisted`
- Initial condition (density, magnetic field, velocity) for a particular configuration of magnetic tubes.
-
* - :doc:`initial_condition/magnetic_carpet`
- Initial condition (density, magnetic field, velocity) for a particular configuration of magnetic carpets.
-
* - :doc:`initial_condition/mhs_equilibrium`
- Initial condition (density, magnetic field, velocity) for magnetohydrostatical equilibrium in a global accretion disk with an imposed (cylindrically symmetric) sound speed profile in spherical coordinates.
-
* - :doc:`initial_condition/MRI_2D_Test`
- Initial condition (density, magnetic field, velocity) for magnetohydrostatical equilibrium in a global accretion disk with an imposed (cylindrically symmetric) sound speed profile in spherical coordinates.
-
* - :doc:`initial_condition/mri_cycle`
- Initial condition (magnetic field, velocity) for the MRI cycle described in
-
* - :doc:`initial_condition/mri_nonlinear`
- This module provide a way for users to specify custom initial conditions.
-
* - :doc:`initial_condition/multi_rings`
- Initial condition (density, magnetic field, velocity) for a particular configuration of magnetic tubes.
-
* - :doc:`initial_condition/nfoil`
- Initial condition (density, magnetic field, velocity) for a particular configuration of a magnetic tube.
-
* - :doc:`initial_condition/novertical_shear`
- Initial condition for run without vertical shear using the (unphysical) modified gravity profile of Klahr et al. (2023)
-
* - :doc:`initial_condition/Orszag_Tang_Vortex`
- Initial condition (density, magnetic field, velocity) for magnetohydrostatical equilibrium in a global accretion disk with an imposed (cylindrically symmetric) sound speed profile in spherical coordinates.
-
* - :doc:`initial_condition/parker_wind`
- Initial condition for the parker wind in spherical coordinates.
-
* - :doc:`initial_condition/pressure_bump_global`
- This module provide a way for users to specify custom initial conditions.
-
* - :doc:`initial_condition/random_helical`
-
-
* - :doc:`initial_condition/Rayleigh-Taylor`
-
-
* - :doc:`initial_condition/reflect`
-
-
* - :doc:`initial_condition/rti`
-
-
* - :doc:`initial_condition/shallow_water_init`
-
-
* - :doc:`initial_condition/shock_cloud`
- Shock-Cloud Initial Condition sets up a 2D version similar to The Magnetohydrodynamics of Shock-Cloud Interaction in Three Dimensions Min-Su Shin, James M Stone, and Gregory F Snyder http://adsabs.harvard.edu/cgi-bin/nph-data\_query?bibcode=2008ApJ...680..336S&link\_type=ABSTRACT
-
* - :doc:`initial_condition/shocktube`
- This module provide a way for users to specify custom initial conditions.
-
* - :doc:`initial_condition/solar_atmosphere_Omega_bfield`
- Initial condition for a stably tratified solar atmosphere from the convection zone to the corona, with a Omega shaped magnetic field loop.
-
* - :doc:`initial_condition/spherical_convection`
- Isentropic initial condition (density, entropy) for convection in spherical coordinates. Produces an isentropic stratification with given surface gravity and surface temperature, and a heat conduction profile proportional to r^-15. The setup was originally introduced in Astron. Nachr., 332, 883.
-
* - :doc:`initial_condition/star_box_layers`
- 31-oct-2011/dintrans: coded (moved here my two subroutines from the entropy module after discussions during the 2011 PC meeting in Toulouse). This module initializes the star-in-a-box setup with a central heating.
-
* - :doc:`initial_condition/star_in_a_box_poly`
- Piecewise polytopic initial condition for star-in-a-box models
- * :cite:t:`2006ApJ...638..336D`
* - :doc:`initial_condition/streaming_instability`
- This module sets up nonlinear streaming instability with multiple particle species.
-
* - :doc:`initial_condition/tabulated`
- This module loads an existing snapshot and interpolates it to the current grid as the initial condition. The snapshot should be saved as a global snapshot in a single file (default name: tabulated.dat) under the run directory. The user should specify its dimensions using nxtab, nytab, and nztab. The number of variables in the snapshot must be consistent with the current mfarray.
-
* - :doc:`initial_condition/ths1D_equilibrium_ism`
- This module provides a 1D profile of density and temperature for the initial conditions to be applied for supernova driven turbulence simulations in the interstellar medium. After the 1D profile converges to an equilibrium state save the profiles of rho and tt to init\_ism.dat, which will be imported by initial\_condition/ths\_equilibrium\_ism.f90 for 3D simulations
-
* - :doc:`initial_condition/ths_equilibrium_ism`
- Initial conditions for 3D equilibrium supernova driven turbulence simulations. First run 1D simulation using identical z grid with initial\_condition/ths1D\_equilibrium\_ism.f90. This module will load the converged 1D profiles derived and saved to init\_ism.dat (now init\_ism.in).
-
* - :doc:`initial_condition/trefoil`
- Initial condition (density, magnetic field, velocity) for a particular configuration of magnetic flux rings.
-
* - :doc:`initial_condition/twisted_tubes`
- Initial condition (density, magnetic field, velocity) for a particular configuration of a twsited magnetic field tube(s).
-
* - :doc:`initial_condition/twistedtiltedtoros`
- 17-jul-12/piyali: adapted from fluxrings.f90 but for spherical geometry. Also some major changes, hence a new initial condition
-
* - :doc:`initial_condition/viscous_ring`
- Initial condition for spherical viscous ring, according to the test of Frederic Masset,
-
* - :doc:`initial_condition/vortex_braids`
- Initial condition (density, magnetic field, velocity) for a particular configuration of a braided vortex field.
-
* - :doc:`initial_condition/wave_Bx`
- Initial condition for sin(kz) or cos(kz) magnetic field.
-
* - :doc:`initial_condition/whitehead_link`
- Initial condition (density, magnetic field, velocity) for a particular configuration of magnetic tubes.
-
.. toctree::
:hidden:
:maxdepth: 1
initial_condition/1D_loop_init
initial_condition/2d_accretion_disk
initial_condition/aerosol_init
initial_condition/alfven_wave
initial_condition/assimilate
initial_condition/baroclinic_init
initial_condition/binarycomparison
initial_condition/blobs_domes
initial_condition/bonnor_ebert_sphere
initial_condition/borromean_rings
initial_condition/braids
initial_condition/bubbles_init
initial_condition/centrifugal_balance
initial_condition/centrifugal_balance_neutrals
initial_condition/cig_dynamo_benchmark
initial_condition/circumplanetary
initial_condition/coronae_init
initial_condition/cylindrical_energy
initial_condition/disk+corona
initial_condition/dust-equilibrium
initial_condition/fieldloop
initial_condition/fluxring_cylindrical
initial_condition/fluxrings
initial_condition/hill_vortex
initial_condition/hor-fluxlayer-By
initial_condition/hs_equilibrium_ism
initial_condition/hydrostat-pload
initial_condition/ice_shell
initial_condition/import
initial_condition/import_glemur
initial_condition/iucaa_logo
initial_condition/kelvin_helmholtz
initial_condition/kelvin_helmholtz_Lecoanet_etal16
initial_condition/linked_tori_twisted
initial_condition/magnetic_carpet
initial_condition/mhs_equilibrium
initial_condition/MRI_2D_Test
initial_condition/mri_cycle
initial_condition/mri_nonlinear
initial_condition/multi_rings
initial_condition/nfoil
initial_condition/novertical_shear
initial_condition/Orszag_Tang_Vortex
initial_condition/parker_wind
initial_condition/pressure_bump_global
initial_condition/random_helical
initial_condition/Rayleigh-Taylor
initial_condition/reflect
initial_condition/rti
initial_condition/shallow_water_init
initial_condition/shock_cloud
initial_condition/shocktube
initial_condition/solar_atmosphere_Omega_bfield
initial_condition/spherical_convection
initial_condition/star_box_layers
initial_condition/star_in_a_box_poly
initial_condition/streaming_instability
initial_condition/tabulated
initial_condition/ths1D_equilibrium_ism
initial_condition/ths_equilibrium_ism
initial_condition/trefoil
initial_condition/twisted_tubes
initial_condition/twistedtiltedtoros
initial_condition/viscous_ring
initial_condition/vortex_braids
initial_condition/wave_Bx
initial_condition/whitehead_link
.. _magnetic:
magnetic source files (src/magnetic)
------------------------------------
The *src/magnetic* directory contains 5 Fortran files.
.. list-table::
:header-rows: 1
:widths: 20 60 20
* - File
- Description
- Scientific References
* - :doc:`magnetic/maxwell`
- This module provide a way for users to specify custom (i.e. not in the standard Pencil Code) physics, diagnostics etc.
-
* - :doc:`magnetic/meanfield`
- This modules solves mean-field contributions to both the induction and the momentum equations.
-
* - :doc:`magnetic/meanfield_demfdt`
- This modules solves mean-field contributions to both the induction and the momentum equations.
-
* - :doc:`magnetic/nomeanfield`
- This modules solves mean-field contributions to both the induction and the momentum equations.
-
* - :doc:`magnetic/nomeanfield_demfdt`
- Dummy module for mean-field contributions
-
.. toctree::
:hidden:
:maxdepth: 1
magnetic/maxwell
magnetic/meanfield
magnetic/meanfield_demfdt
magnetic/nomeanfield
magnetic/nomeanfield_demfdt
.. _obsolete:
obsolete source files (src/obsolete)
------------------------------------
The *src/obsolete* directory contains 16 Fortran files.
.. list-table::
:header-rows: 1
:widths: 20 60 20
* - File
- Description
- Scientific References
* - :doc:`obsolete/density_anelastic`
- This module takes care of the continuity equation.
-
* - :doc:`obsolete/global_gg_bext`
- A module container and access functions ('methods') for additional variables which are globally needed --- here this is the gravity field gg, and an external magnetic field (such that B=curl(A)+B\_ext\_pot)
-
* - :doc:`obsolete/localshock`
- This module fetchs the position of the massive n-body particles and applies extra shock dissipation around them. This allows for less shock dissipation to be used elsewhere in the quiescent regions of the simulation box.
-
* - :doc:`obsolete/magnetic_axisym`
- This modules deals with all aspects of magnetic fields; if no magnetic fields are invoked, a corresponding replacement dummy routine is used instead which absorbs all the calls to the magnetically relevant subroutines listed in here.
-
* - :doc:`obsolete/magnetic_old`
- This modules deals with all aspects of magnetic fields; if no magnetic fields are invoked, a corresponding replacement dummy routine is used instead which absorbs all the calls to the magnetically relevant subroutines listed in here.
-
* - :doc:`obsolete/nohydro_file`
-
-
* - :doc:`obsolete/nosyscalls`
- This module takes care of system calls and provides ANSI-C functionality.
-
* - :doc:`obsolete/particles_nbody`
- This module takes care of direct N-body gravity between particles.
-
* - :doc:`obsolete/radiation_fld`
- Radiation in the fluxlimited-diffusion approximation. Doesn't work convincingly (and maybe never will). Look at the (still experimental) module radiation\_ray.f90 for a more sophisticated approach.
-
* - :doc:`obsolete/radiation_nongrey`
-
-
* - :doc:`obsolete/radiation_ray_periodic`
- Radiation (solves transfer equation along rays) The direction of the ray is given by the vector (lrad,mrad,nrad), and the parameters radx0,rady0,radz0 gives the maximum number of steps of the direction vector in the corresponding direction.
-
* - :doc:`obsolete/temperature`
- This module replaces the entropy module by using lnT as dependent variable. For a perfect gas with constant coefficients (no ionization) we have (1-1/gamma) * cp*T = cs02 * exp( (gamma-1)*ln(rho/rho0)-gamma*s/cp ) At a later point we may want to rename the module Entropy into Energy
-
* - :doc:`obsolete/temperature_TT`
- This module can replace the entropy module by using \_T\_ as dependent variable. For a perfect gas with constant coefficients (no ionization) we have (1-1/gamma) * cp*T = cs02 * exp( (gamma-1)*ln(rho/rho0)-gamma*s/cp )
-
* - :doc:`obsolete/visc_hyper`
- This modules implements viscous heating and diffusion terms here for third order hyper viscosity
-
* - :doc:`obsolete/visc_smagorinsky`
- This modules implements viscous heating and diffusion terms here smagorinsky viscosity
-
* - :doc:`obsolete/visc_var`
- This modules implements viscous heating and diffusion terms here for cases 1) nu constant, 2) mu = rho.nu 3) constant and
-
.. toctree::
:hidden:
:maxdepth: 1
obsolete/density_anelastic
obsolete/global_gg_bext
obsolete/localshock
obsolete/magnetic_axisym
obsolete/magnetic_old
obsolete/nohydro_file
obsolete/nosyscalls
obsolete/particles_nbody
obsolete/radiation_fld
obsolete/radiation_nongrey
obsolete/radiation_ray_periodic
obsolete/temperature
obsolete/temperature_TT
obsolete/visc_hyper
obsolete/visc_smagorinsky
obsolete/visc_var
.. _pre_and_post_processing:
pre_and_post_processing source files (src/pre_and_post_processing)
------------------------------------------------------------------
The *src/pre_and_post_processing* directory contains 11 Fortran files.
.. list-table::
:header-rows: 1
:widths: 20 60 20
* - File
- Description
- Scientific References
* - :doc:`pre_and_post_processing/pc_collect`
- Not a module
-
* - :doc:`pre_and_post_processing/pc_collect_exp`
- Not a module
-
* - :doc:`pre_and_post_processing/pc_collect_pvar`
- Not a module
-
* - :doc:`pre_and_post_processing/pc_configtest`
- Not a module
-
* - :doc:`pre_and_post_processing/pc_distribute`
- Not a module
-
* - :doc:`pre_and_post_processing/pc_distribute_z`
- Not a module
-
* - :doc:`pre_and_post_processing/pc_extract`
- Not a module
-
* - :doc:`pre_and_post_processing/pc_reduce`
- Not a module
-
* - :doc:`pre_and_post_processing/pc_tecplot`
- Not a module
-
* - :doc:`pre_and_post_processing/pc_tecplot_solid`
- Not a module
-
* - :doc:`pre_and_post_processing/read_xyaver_alpha`
- Not a module
-
.. toctree::
:hidden:
:maxdepth: 1
pre_and_post_processing/pc_collect
pre_and_post_processing/pc_collect_exp
pre_and_post_processing/pc_collect_pvar
pre_and_post_processing/pc_configtest
pre_and_post_processing/pc_distribute
pre_and_post_processing/pc_distribute_z
pre_and_post_processing/pc_extract
pre_and_post_processing/pc_reduce
pre_and_post_processing/pc_tecplot
pre_and_post_processing/pc_tecplot_solid
pre_and_post_processing/read_xyaver_alpha
.. _special:
special source files (src/special)
----------------------------------
The *src/special* directory contains 71 Fortran files.
.. list-table::
:header-rows: 1
:widths: 20 60 20
* - File
- Description
- Scientific References
* - :doc:`special/1D_loop`
-
-
* - :doc:`special/advective_gauge`
- Advecto-resistive gauge, dLamRA/dt = -u.gradLamRA - U.A\_resistive + eta*del2A\_resistive A\_advecto-resistive=A\_resistive+grad(LamRA)
-
* - :doc:`special/alphadisk`
- This module solves for a viscously diffusive disk according to the alpha-formalism, also adding photoevaporation. It is a one-dimensional evolutionary model, that evolves the disk over its multimillion year lifetime.
-
* - :doc:`special/ascale_collapse`
- This module provide a way for users to specify custom (i.e. not in the standard Pencil Code) physics, diagnostics etc.
- * :cite:t:`2025ApJ...990..223B`
* - :doc:`special/atmosphere`
- This module incorporates all the modules used for Natalia's aerosol simulations
-
* - :doc:`special/axionSU2back`
- Solve the lucky droplet model for many realizations. The different realizations correspond to "meshpoints". To add the contributions for each step, we use the usual time step in the Pencil Code, so t is just the step, and the accumulated collision times (after 125 steps or so) for all realizations at the same time are the values in the f-array.
-
* - :doc:`special/axionU1back`
- Solve axion-U(1) inflation model for many wavenumber values. The different wavenumber correspond to 1D "meshpoints".
-
* - :doc:`special/backreact_infl`
- This module provide a way for users to specify custom (i.e. not in the standard Pencil Code) physics, diagnostics etc.
-
* - :doc:`special/baroclinic_run`
-
-
* - :doc:`special/bc_strat`
- This module sets the open boundary conditions for density in the vertical direction, scaled by stratificaiton.
-
* - :doc:`special/beta_plane`
- Add Coriolis force in the beta plane approximation to the hydro equation. The x-axis is in the direction of increasing colatitude, while the z-axis is the radial direction.
-
* - :doc:`special/boussinesq`
- This module provide a way for users to specify custom (i.e. not in the standard Pencil Code) physics, diagnostics etc.
-
* - :doc:`special/chem_stream`
- This module incorporates all the modules used for Natalia's neutron star -- disk coupling simulations (referred to as nstar)
-
* - :doc:`special/chiral_mhd`
- This module provide a way for users to specify custom (i.e. not in the standard Pencil Code) physics, diagnostics etc.
-
* - :doc:`special/collapse`
- This module provide a way for users to specify custom (i.e. not in the standard Pencil Code) physics, diagnostics etc.
-
* - :doc:`special/coronae`
-
-
* - :doc:`special/dampuu`
- Special module that damps the velocity field outside a user-specified cuboid. Useful in cases where you do not want waves reflected from the boundary to interfere with the interior of the domain.
-
* - :doc:`special/disp_current`
- Electric field, dE/dt = curlB-mu0*J, originally only for the special case of no fluid induction, but now fluid motions are also included.
-
* - :doc:`special/dynamical_resistivity`
-
-
* - :doc:`special/electroweaksu2`
- Dynamical equations for electroweak SU(2) non-Abelian gauge fields
-
* - :doc:`special/flowaroundsphere`
- This module provide a way for users to specify custom (i.e. not in the standard Pencil Code) physics, diagnostics etc.
-
* - :doc:`special/flux_limdiff`
-
-
* - :doc:`special/footpoints`
-
-
* - :doc:`special/gravitational_waves`
- This module provide a way for users to specify custom (i.e. not in the standard Pencil Code) physics, diagnostics etc.
-
* - :doc:`special/gravitational_waves_hij6`
- This module provide a way for users to specify custom (i.e. not in the standard Pencil Code) physics, diagnostics etc.
-
* - :doc:`special/gravitational_waves_hTXk`
- This module provide a way for users to specify custom (i.e. not in the standard Pencil Code) physics, diagnostics etc.
- * :cite:t:`2020GApFD.114..130R`
* :cite:t:`2020PhRvD.102h3512R`
* - :doc:`special/gross_pitaevskii`
- This module provide a way for users to specify custom (i.e. not in the standard Pencil Code) physics, diagnostics etc.
-
* - :doc:`special/internal_flow`
-
-
* - :doc:`special/jet`
-
-
* - :doc:`special/klein_gordon`
- This module provide a way for users to specify custom (i.e. not in the standard Pencil Code) physics, diagnostics etc.
-
* - :doc:`special/Lambda_CDM`
- This module provide a way for users to specify custom (i.e. not in the standard Pencil Code) physics, diagnostics etc.
-
* - :doc:`special/lorenz_gauge`
- Lorenz gauge, dphi/dt = -cphi2*divA
-
* - :doc:`special/lucky_droplet`
- Solve the lucky droplet model for many realizations. The different realizations correspond to "meshpoints". To add the contributions for each step, we use the usual time step in the Pencil Code, so t is just the step, and the accumulated collision times (after 125 steps or so) for all realizations at the same time are the values in the f-array.
-
* - :doc:`special/magneticspiral`
-
-
* - :doc:`special/meanfield_alpm`
- This module serves as a sample for a special\_XXX module that introduces additional primitive variables. Use this as a basis for your own special\_ module if you need one.
-
* - :doc:`special/meanfield_alpm_alternate`
- This module serves as a sample for a special\_XXX module that introduces additional primitive variables. Use this as a basis for your own special\_ module if you need one.
-
* - :doc:`special/meanfield_alpm_etat`
- This module serves as a sample for a special\_XXX module that introduces additional primitive variables. Use this as a basis for your own special\_ module if you need one.
-
* - :doc:`special/meanfield_dynamo_z`
- Mean field dynamo equation
-
* - :doc:`special/meanfield_e_tensor`
- This special module will contribute a mean electromotive force to the vector potential differential equation.
-
* - :doc:`special/multisp_drag_eq`
- This module handles diagnostics that are related with dust-gas velocities in drag equilibrium, computed by initial\_condition/streaming\_instability.f90.
-
* - :doc:`special/neutron_star`
- This module incorporates all the modules used for Natalia's neutron star -- disk coupling simulations (referred to as nstar)
-
* - :doc:`special/newton_cooling`
-
-
* - :doc:`special/NS_polecap`
-
-
* - :doc:`special/oscillation_0D`
- Solve for a set of two ODEs, used to test time step
-
* - :doc:`special/oscillation_0D_Lorenz`
- Solve for a set of two ODEs, used to test time step
-
* - :doc:`special/oscillation_3D`
- This module provide a way for users to specify custom (i.e. not in the standard Pencil Code) physics, diagnostics etc.
-
* - :doc:`special/param_instab`
- Parametric instability with a time-dependent forcing
-
* - :doc:`special/photoelectric_dust`
-
-
* - :doc:`special/planet_atmosphere`
- This module includes physics related to planet atmospheres.
-
* - :doc:`special/pressure_bump`
- Thie module addes pressure bumps to your simulations. They are needed e.g. when simulating the effects of a pressure bump on particle drift, particle trapping and planetesimal formation via gravitational fragmentation.
-
* - :doc:`special/radial_dist_func`
- Calculate the radial distribution function based on a pre-generated input file. This input file is generated by first reading the stored data into IDL by the routine: f90/pencil-christer/isoth\_expwave/idl/pvar.pro then the input file is generated with an adapted version of the following routine: f90/pencil-christer/isoth\_expwave/idl/rnp256.pro Finally you can then run start.csh with something like the following start.in file:
-
* - :doc:`special/reaction_0D`
- Solve for a set of two ODEs, used to test time step
-
* - :doc:`special/rel_1d`
- This module provide a way for users to specify custom (i.e. not in the standard Pencil Code) physics, diagnostics etc.
-
* - :doc:`special/rtime_phiavg`
- This module calculates a number of outputs and removes a mean (phi-averaged) emf from the simulations with net vertical fields on global accretion disks
-
* - :doc:`special/schur_triple_decomp`
- This module provide a way for users to specify custom (i.e. not in the standard Pencil Code) physics, diagnostics etc.
-
* - :doc:`special/set_gravity`
-
-
* - :doc:`special/shallow_water`
-
-
* - :doc:`special/shell`
- Runs a shell model (only GOY implemented) for turbulence Copied from Dhruba's code Uses a slaved, Adams-Bashforth scheme run in parallel with the PC time stepping
-
* - :doc:`special/solar_corona`
-
-
* - :doc:`special/spiegel`
- This module is currently fairly much obsolete. This module incorporates all the modules used for Natalia's neutron star -- disk coupling simulations (referred to as nstar)
-
* - :doc:`special/stellartide`
-
-
* - :doc:`special/streamfunction`
- This module solves for a streamfunction for the 2D velocity field.
-
* - :doc:`special/streamfunction_dimensional`
- This module solves for a streamfunction for the 2D velocity field.
-
* - :doc:`special/streamfunction_direct`
- This module solves for a streamfunction for the 2D velocity field.
-
* - :doc:`special/streamfunction_fullmultigrid`
- This module solves for a streamfunction for the 2D velocity field.
-
* - :doc:`special/streamfunction_multigrid`
- This module solves for a streamfunction for the 2D velocity field.
-
* - :doc:`special/symbreak`
- Solve for a set of two ODEs, used to test time step
-
* - :doc:`special/turbpotential`
-
-
* - :doc:`special/twist_inject`
- This module provide a way for users to specify custom (i.e. not in the standard Pencil Code) physics, diagnostics etc.
-
* - :doc:`special/twist_inject_delta`
- This module provide a way for users to specify custom (i.e. not in the standard Pencil Code) physics, diagnostics etc.
-
* - :doc:`special/van_der_pol`
- Solve the Van der Pol oscillator equations
-
.. toctree::
:hidden:
:maxdepth: 1
special/1D_loop
special/advective_gauge
special/alphadisk
special/ascale_collapse
special/atmosphere
special/axionSU2back
special/axionU1back
special/backreact_infl
special/baroclinic_run
special/bc_strat
special/beta_plane
special/boussinesq
special/chem_stream
special/chiral_mhd
special/collapse
special/coronae
special/dampuu
special/disp_current
special/dynamical_resistivity
special/electroweaksu2
special/flowaroundsphere
special/flux_limdiff
special/footpoints
special/gravitational_waves
special/gravitational_waves_hij6
special/gravitational_waves_hTXk
special/gross_pitaevskii
special/internal_flow
special/jet
special/klein_gordon
special/Lambda_CDM
special/lorenz_gauge
special/lucky_droplet
special/magneticspiral
special/meanfield_alpm
special/meanfield_alpm_alternate
special/meanfield_alpm_etat
special/meanfield_dynamo_z
special/meanfield_e_tensor
special/multisp_drag_eq
special/neutron_star
special/newton_cooling
special/NS_polecap
special/oscillation_0D
special/oscillation_0D_Lorenz
special/oscillation_3D
special/param_instab
special/photoelectric_dust
special/planet_atmosphere
special/pressure_bump
special/radial_dist_func
special/reaction_0D
special/rel_1d
special/rtime_phiavg
special/schur_triple_decomp
special/set_gravity
special/shallow_water
special/shell
special/solar_corona
special/spiegel
special/stellartide
special/streamfunction
special/streamfunction_dimensional
special/streamfunction_direct
special/streamfunction_fullmultigrid
special/streamfunction_multigrid
special/symbreak
special/turbpotential
special/twist_inject
special/twist_inject_delta
special/van_der_pol
.. _test_methods:
test_methods source files (src/test_methods)
--------------------------------------------
The *src/test_methods* directory contains 11 Fortran files.
.. list-table::
:header-rows: 1
:widths: 20 60 20
* - File
- Description
- Scientific References
* - :doc:`test_methods/testfield_axisym4`
- Test-field module for axisymmetric turbulence. No special settings in cparam.local are needed.
-
* - :doc:`test_methods/testfield_compress_z`
- This modules deals with all aspects of testfield fields; if no testfield fields are invoked, a corresponding replacement dummy routine is used instead which absorbs all the calls to the testfield relevant subroutines listed in here.
-
* - :doc:`test_methods/testfield_general`
-
-
* - :doc:`test_methods/testfield_nonlin_z`
- This modules deals with all aspects of testfield fields; if no testfield fields are invoked, a corresponding replacement dummy routine is used instead which absorbs all the calls to the testfield relevant subroutines listed in here.
-
* - :doc:`test_methods/testfield_x`
- This modules deals with all aspects of testfield fields; if no testfield fields are invoked, a corresponding replacement dummy routine is used instead which absorbs all the calls to the testfield relevant subroutines listed in here.
-
* - :doc:`test_methods/testfield_xy`
- This modules deals with all aspects of testfield fields; if no testfield fields are invoked, a corresponding replacement dummy routine is used instead which absorbs all the calls to the testfield relevant subroutines listed in here.
- * :cite:t:`2008A&A...482..739B`
* - :doc:`test_methods/testfield_xz`
- This modules deals with all aspects of testfield fields; if no testfield fields are invoked, a corresponding replacement dummy routine is used instead which absorbs all the calls to the testfield relevant subroutines listed in here.
-
* - :doc:`test_methods/testfield_z`
- This modules deals with all aspects of testfield fields; if no testfield fields are invoked, a corresponding replacement dummy routine is used instead which absorbs all the calls to the testfield relevant subroutines listed in here.
-
* - :doc:`test_methods/testscalar`
- This modules deals with all aspects of testscalar fields; if no testscalar fields are invoked, a corresponding replacement dummy routine is used instead which absorbs all the calls to the testscalar relevant subroutines listed in here.
-
* - :doc:`test_methods/testscalar_axisym`
- This modules deals with testscalar fields for axisymmetric turbulence testscalar fields are invoked, a corresponding replacement dummy routine is used instead which absorbs all the calls to the testscalar relevant subroutines listed in here.
-
* - :doc:`test_methods/testscalar_simple`
- This modules deals with all aspects of testscalar fields; if no testscalar fields are invoked, a corresponding replacement dummy routine is used instead which absorbs all the calls to the testscalar relevant subroutines listed in here.
-
.. toctree::
:hidden:
:maxdepth: 1
test_methods/testfield_axisym4
test_methods/testfield_compress_z
test_methods/testfield_general
test_methods/testfield_nonlin_z
test_methods/testfield_x
test_methods/testfield_xy
test_methods/testfield_xz
test_methods/testfield_z
test_methods/testscalar
test_methods/testscalar_axisym
test_methods/testscalar_simple
.. toctree::
:hidden:
:titlesonly:
:maxdepth: 2
:ref:`src`
:ref:`experimental`
:ref:`inactive`
:ref:`initial_condition`
:ref:`magnetic`
:ref:`obsolete`
:ref:`pre_and_post_processing`
:ref:`special`
:ref:`test_methods`