smod_equil_ivp_demo Submodule

Demonstration of the initial-value solver. A uniform isothermal medium in Cartesian geometry with a Gaussian density perturbation centred in the domain. This is the simplest possible IVP setup and is intended as a reference example.

Note

Default values are:

  • cte_rho0 = 1 : background density
  • cte_T0 = 1 : background temperature (= isothermal sound speed squared)
  • k2 = 0
  • k3 = 1

IVP mode is enabled by default. Relevant parfile settings: @code{fortran} &physicslist physics_type = "isothermal-1d" / &ivplist enabled = .true. t_end = 5.0 n_steps = 500 n_snapshots = 50 / @endcode



Functions

function rho0()

Arguments

None

Return Value real(kind=dp)

function T0()

Arguments

None

Return Value real(kind=dp)

pure function gaussian_rho(x) result(rho1)

Gaussian density perturbation centred at x = 0.5.

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: x(:)

Return Value real(kind=dp), (size(x))

pure function gaussian_drho(x) result(drho1)

Derivative of the Gaussian density perturbation.

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: x(:)

Return Value real(kind=dp), (size(x))


Module Procedures

module procedure /home/runner/work/legolas/legolas/docs/ford/module/smod_equil_ivp_demo.html ivp_demo_eq module subroutine ivp_demo_eq(settings, grid, background, physics, iv_initial_conditions)

Sets the equilibrium.

Arguments

Type IntentOptional Attributes Name
type(settings_t), intent(inout) :: settings
type(grid_t), intent(inout) :: grid
type(background_t), intent(inout) :: background
type(physics_t), intent(inout) :: physics
type(initial_conditions_t), intent(inout) :: iv_initial_conditions