shamrock.model_ramses.ExtForceCoupling#

class shamrock.model_ramses.ExtForceCoupling#

Bases: pybind11_object

Time quadrature used to couple the external forces source term to the solver. Both modes are second order in time, and give the same momentum update for a constant acceleration.

>>> from shamrock.model_ramses import ExtForceCoupling
>>> cfg.set_ext_force_coupling(ExtForceCoupling.Trapezoidal)

Members:

Midpoint

Explicit midpoint rule. This is the default.

The forces are evaluated once, at \(t^{n+1/2}\), from the time centered state (e.g. \(\rho^{n+1/2} = \rho^n + \frac{\Delta t}{2} \partial_t \rho\), and the momentum for a velocity dependent force), and applied over the whole time step.

Trapezoidal

Trapezoidal rule (time centred source term, as in RAMSES).

The forces are evaluated at \(t^n\) and \(t^{n+1}\), each with the state at the same time, and the average of the two source terms is applied over the whole time step: \(\Delta (\rho \mathbf{v}) = \Delta t \, \frac{1}{2} (\rho^n \mathbf{a}^n + \rho^{n+1} \mathbf{a}^{n+1})\). A force evaluated at \(t^{n+1}\) may only depend on the density there (e.g. self-gravity), since it is known before the kick.

Methods

Attributes

Midpoint

Trapezoidal

name

value

Barotropic collapse of a uniform sphere in RAMSES solver

Barotropic collapse of a uniform sphere in RAMSES solver

Protoplanetary disc around a point mass in RAMSES solver

Protoplanetary disc around a point mass in RAMSES solver

Jeans instability characteristic timescales

Jeans instability characteristic timescales
property name#