Initial Conditions Parameters#
This sets of parameters, contained in the namelist block &INIT_PARAMS. This is used to set up the initial conditions.
Variable name, syntax, default value |
Fortran type |
Description |
|---|---|---|
|
|
Set which kind of initial condition to use. Default is the region-based initialisation |
|
|
Number of independent regions in the computational box used to set up initial flow variables. |
|
|
Geometry defining each region. |
|
|
X coordinate of the center of each region. |
|
|
Y coordinate of the center of each region. |
|
|
Z coordinate of the center of each region. |
|
|
Size in X direction of each region. |
|
|
Size in Y direction of each region. |
|
|
Size in Z direction of each region. |
|
|
Exponent defining the norm used to compute distances for the generalized ellipsoid. |
|
|
Density. For |
|
|
X velocity. For |
|
|
Y velocity. For |
|
|
Z velocity. For |
|
|
Pressure. For |
|
|
X magnetic field. |
|
|
Y magnetic field. |
|
|
Z magnetic field. |
|
|
Type of initial conditions file for particles. Possible choices are |
|
|
This parameter sets the starting expansion factor for cosmology runs only. Default value is read in the IC file. |
|
|
If |
|
|
Directory where IC files are stored (when relevant). |
Advanced initial conditions#
The condinit routine in hydro/condinit.f90 can be modified to set custom initial conditions.
The calling sequence is call condinit(x,u,dx,ncell), where
xis an input array of cell center positions,uis an output array containing the volume average of the fluid conservative variables, namely (\(\rho\), \(\rho u\), \(\rho v\), \(\rho w\) and \(E\)), in this exact order. If more variables are defined, then the user should exploit this routine to define them too.dxis a single real value containing the cell size for all the cells and ncell is the number of cells.
This routine can be used to set the initial conditions directly with Fortran instructions.
Changed in version 2025: There is now the possibility to change initial condition without recompiling each time. Just write you initial condition as a new routine and add it to the select/case structure
select case (condinit_kind)
case('region')
call condinit_default(x, u, dx, nn)
case('your_new_routine')
call condinit_your_new_routine(x, u, dx, nn)
case DEFAULT
if (myid == 1.and. first_call) write(*,*) "[condinit] Void or invalid condinit_kind, using default IC"
call condinit_default(x, u, dx, nn)
end select
Input files#
Another way to define initial conditions in RAMSES is by using input files (initfile parameter) in the grafic format.