osc_schw Derived Type

type, public, extends(ode_equation) :: osc_schw

A class that defines the osculating orbit evolution equations for a particle !! moving in a Schwarzschild spacetime.

For this system nvars=6. The quantities stored in var_data are 1: , 2: , 3: , 4: , 5: , 6: , where is a variable that varies from to over a full radial cycle, is the azimuthal angle, is the semi-latus rectum, , and is the mass of the scalar charge. The quantities and are defined below. Note that is stricly constant for all other cases than a scalar charge and should stricly not be included in a generic geodesic evolution.


Inherits

type~~osc_schw~~InheritsGraph type~osc_schw osc_schw type~ode_equation ode_equation type~osc_schw->type~ode_equation type~equation equation type~ode_equation->type~equation

Contents

Source Code


Components

TypeVisibility AttributesNameInitial
integer(kind=ip), public :: ntmp

The number of temporary storage variables to allocate.

character(len=:), public, allocatable:: ename

The name of the system of equations

integer(kind=ip), public :: nvars

The number of variables in the ODE system.

real(kind=wp), public, dimension(:), allocatable:: var_data

A 1d array of reals that contains the data variables.

real(kind=wp), public, dimension(:), allocatable:: rhs_data

A 1d array of reals that contains the RHS variables.

real(kind=wp), public, dimension(:,:), allocatable:: tmp_data

A 2d array of reals that contains the temporary variables needed by the time integrator.

integer(kind=ip), public :: io_id

The file unit id used for output for this system of ODE's.

real(kind=wp), public :: En

The orbital energy per unit mass.

real(kind=wp), public :: Lz

The orbital angular momentum per unit mass.

real(kind=wp), public :: e

The orbital eccentricity, .

real(kind=wp), public :: r

The radial coordinate in Schwarzschild coordinates, .

real(kind=wp), public :: d2chidt2

The second time derivative of .

real(kind=wp), public :: drdt

The time derivative of .

real(kind=wp), public :: d2rdt2

The second time derivative of .

real(kind=wp), public :: w

The value of at periapsis.

real(kind=wp), public :: mass

Local copy of the run time parameter setting the black hole mass, .

real(kind=wp), public :: ur

The radial component of the 4-velocity, . Needed for the effective source.

real(kind=wp), public, dimension(4):: force

The self-force or any external force .

real(kind=wp), public, dimension(4):: accel

The acceleration .

real(kind=wp), public :: udota

The dot-product of the 4-velocity and the force .


Finalization Procedures

final :: close_osc_schw

The finalizer.


Type-Bound Procedures

procedure, public :: set_to_zero => ode_set_to_zero

The set_to_zero routine is provided by ode_set_to_zero.

  • interface

    public module subroutine ode_set_to_zero(this, dest)

    The interface for the ODE version of set_to_zero. This interface is consistent with eq_set_to_zero_interface.

    Arguments

    Type IntentOptional AttributesName
    class(ode_equation), intent(inout) :: this

    The routine is called on this equation.

    integer(kind=ip), intent(in) :: dest

    Can be either -1 (RHS), 0 (main) or between 1 and ntmp (temporary).

procedure, public :: update_vars => ode_update_vars

The update_vars routine is provided by ode_update_vars.

  • interface

    public module subroutine ode_update_vars(this, source, dest, source2, scalar, scalar2)

    The interface for the ODE version of update_vars. This interface is consistent with eq_update_vars_interface.

    Arguments

    Type IntentOptional AttributesName
    class(ode_equation), intent(inout), target:: this

    The routine is called on this equation.

    integer(kind=ip), intent(in) :: source

    The first source for the update. Can be either -1 (RHS), 0 (main) or between 1 and ntmp (temporary).

    integer(kind=ip), intent(in) :: dest

    The destination for the update. Can be either -1 (RHS), 0 (main) or between 1 and ntmp (temporary).

    integer(kind=ip), intent(in), optional :: source2

    The second source for the update. Can be either -1 (RHS), 0 (main) or between 1 and ntmp (temporary).

    real(kind=wp), intent(in), optional :: scalar

    The scalar multiplying the first source.

    real(kind=wp), intent(in), optional :: scalar2

    The scalar multiplying the second source.

procedure, public :: print_data => ode_print_data

The print_data routine is provided by ode_print_data.

  • interface

    public module subroutine ode_print_data(this)

    The interface for the ODE version of print_data. This interface is consistent with eq_print_data.

    Arguments

    Type IntentOptional AttributesName
    class(ode_equation), intent(inout) :: this

    The routine is called on this equation.

procedure, public :: init => osc_schw_init

The init routine is provided by osc_schw_init.

  • interface

    public module subroutine osc_schw_init(this)

    The interface for the geod_schw version of init. This interface is consistent with eq_init_interface.

    Arguments

    Type IntentOptional AttributesName
    class(osc_schw), intent(inout), target:: this

    The equation that is being initialized.

procedure, public :: rhs => osc_schw_rhs

The rhs routine is provided by osc_schw_rhs.

  • interface

    public module subroutine osc_schw_rhs(this)

    The interface for the geod_schw version of rhs. This interface is consistent with eq_rhs_interface.

    Arguments

    Type IntentOptional AttributesName
    class(osc_schw), intent(inout) :: this

    The equation for which the RHS is calculated.

procedure, public :: output => osc_schw_output

The output routine is provided by osc_schw_output.

  • interface

    public module subroutine osc_schw_output(this)

    The interface for the geod_schw version of output. This interface is consistent with eq_output.

    Arguments

    Type IntentOptional AttributesName
    class(osc_schw), intent(inout) :: this

    The routine is called on this equation.

procedure, public :: save_globals_1 => osc_schw_save_globals_1

The save_globals_1 routine is provided by geod_schw_save_globals_1.

procedure, public :: save_globals_2 => osc_schw_save_globals_2

The save_globals_2 routine is provided by geod_schw_save_globals_2.

procedure, public :: load_globals => osc_schw_load_globals

The load_globals routine is provided by geod_schw_load_globals.

  • interface

    public module subroutine osc_schw_load_globals(this)

    The interface for the geod_schw version of load_globals. This interface is consistent with eq_load_globals.

    Arguments

    Type IntentOptional AttributesName
    class(osc_schw), intent(inout) :: this

    The routine is called on this equation.

procedure, public :: calc_dependent

A routine for calculating the dependent from the evolved variables.

  • interface

    public module subroutine calc_dependent(this)

    The interface for the calc_dependent routine that calculates

    Arguments

    Type IntentOptional AttributesName
    class(osc_schw), intent(inout) :: this

    The routine is called on this equation.

Source Code

  type, extends(ode_equation) :: osc_schw
  !! A class that defines the osculating orbit evolution equations for a
  !! particle !! moving in a Schwarzschild spacetime.
  !!
  !! For this system [[osc_schw:nvars]]=6. The quantities stored in
  !! [[osc_schw:var_data]] are 1: \(\chi\), 2: \(\phi\), 3: \(p\),
  !! 4: \(\alpha\), 5: \(\beta\), 6: \(m_q\), where \(\chi\) is a variable
  !! that varies from \(0\) to \(2\pi\) over a full radial cycle, \(\phi\) is
  !! the azimuthal angle, \(p\) is the semi-latus rectum, \(\alpha=e\sin(w)\),
  !! \(\beta=e\cos(w)\) and \(m_q\) is the mass of the scalar charge. The
  !! quantities \(e\) and \(w\) are defined below. Note that \(m_q\) is
  !! stricly constant for all other cases than a scalar charge
  !! and should stricly not be included in a generic geodesic evolution.
    real(wp) :: En
    !! The orbital energy per unit mass.
    real(wp) :: Lz
    !! The orbital angular momentum per unit mass.
    real(wp) :: e
    !! The orbital eccentricity, \(e=\sqrt{\alpha^2+\beta^2}\).
    real(wp) :: r
    !! The radial coordinate in Schwarzschild coordinates,
    !! \(r=\frac{p M}{1+e\cos(\chi-w)}\).
    real(wp) :: d2chidt2
    !! The second time derivative of \(\chi\).
    real(wp) :: drdt
    !! The time derivative of \(r\).
    real(wp) :: d2rdt2
    !! The second time derivative of \(r\).
    real(wp) :: w
    !! The value of \(\chi\) at periapsis.
    real(wp) :: mass
    !! Local copy of the run time parameter setting the black hole mass, \(M\).
    real(wp) :: ur
    !! The radial component of the 4-velocity, \(u^r\). Needed for the
    !! effective source.
    real(wp), dimension(4) :: force
     !! The self-force or any external force \(f_{\mu}\).
    real(wp), dimension(4) :: accel
    !! The acceleration \(a^{\mu}=
    !!   \frac{q}{m_q}(g^{\mu\nu}+u^{\mu}u^{\nu})f_{\nu}\).
    real(wp) :: udota
    !! The dot-product of the 4-velocity and the force \(q\, u^{\mu}f_{\mu}\).
  contains
    procedure :: init => osc_schw_init
    !! The [[equation:init]] routine is provided by [[osc_schw_init]].
    procedure :: rhs => osc_schw_rhs
    !! The [[equation:rhs]] routine is provided by [[osc_schw_rhs]].
    procedure :: output => osc_schw_output
    !! The [[equation:output]] routine is provided by [[osc_schw_output]].
    procedure :: save_globals_1 => osc_schw_save_globals_1
    !! The [[equation:save_globals_1]] routine is provided by
    !! [[geod_schw_save_globals_1]].
    procedure :: save_globals_2 => osc_schw_save_globals_2
    !! The [[equation:save_globals_2]] routine is provided by
    !! [[geod_schw_save_globals_2]].
    procedure :: load_globals => osc_schw_load_globals
    !! The [[equation:load_globals]] routine is provided by
    !! [[geod_schw_load_globals]].
    procedure :: calc_dependent
    !! A routine for calculating the dependent from the evolved variables.
    final :: close_osc_schw
    !! The finalizer.
  end type osc_schw