RKN1210 Integrator¶
Runge-Kutta-Nyström 12(10) high-precision integrator specialized for second-order ODEs.
RKN1210Integrator ¶
RKN1210Integrator(dimension: int, dynamics_fn: callable, jacobian: Union[DAnalyticJacobian, DNumericalJacobian] = None, sensitivity: Any = None, config: IntegratorConfig = None)
RKN12(10) Runge-Kutta-Nyström adaptive integrator (EXPERIMENTAL).
High-order specialized integrator for second-order ODEs (like orbital mechanics). More efficient and accurate than general-purpose methods for position-velocity systems.
WARNING: This integrator is experimental and may have stability issues.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dimension | int | State vector dimension (must be even: position + velocity) | required |
dynamics_fn | callable | Dynamics function with signature (t: float, state: ndarray) -> ndarray | required |
jacobian | DAnalyticJacobian or DNumericalJacobian | Jacobian provider for variational matrix propagation | None |
config | IntegratorConfig | Integration configuration | None |
Raises:
| Type | Description |
|---|---|
ValueError | If dimension is not even |
Example
Initialize instance.
step method descriptor ¶
step(t: float, state: ndarray, dt: float) -> AdaptiveStepResult
Perform one adaptive integration step.
Tolerances are read from the integrator's configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
t | float | Current time | required |
state | ndarray | State vector at time t [position, velocity] | required |
dt | float | Requested timestep | required |
Returns:
| Name | Type | Description |
|---|---|---|
AdaptiveStepResult | AdaptiveStepResult | Result containing new state, actual dt used, error estimate, and suggested next dt |
step_with_sensmat method descriptor ¶
Advance state and sensitivity matrix with adaptive step control.
Propagates the sensitivity matrix S that maps parameter uncertainties to state uncertainties. The sensitivity evolves according to dS/dt = A*S + B.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
t | float | Current time | required |
state | ndarray | State vector at time t | required |
sens | ndarray | Sensitivity matrix at time t (state_dim x param_dim) | required |
params | ndarray | Parameter vector | required |
dt | float | Requested timestep | required |
Returns:
| Name | Type | Description |
|---|---|---|
tuple | Tuple | (new_state, new_sensitivity, dt_used, error_estimate, dt_next) |
Example
step_with_varmat method descriptor ¶
Perform one adaptive integration step with variational matrix.
Tolerances are read from the integrator's configuration.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
t | float | Current time | required |
state | ndarray | State vector at time t | required |
phi | ndarray | State transition matrix (dimension x dimension) | required |
dt | float | Requested timestep | required |
Returns:
| Name | Type | Description |
|---|---|---|
tuple | Tuple | (new_state, new_phi, dt_used, error_estimate, dt_next) |
step_with_varmat_sensmat method descriptor ¶
step_with_varmat_sensmat(t: float, state: ndarray, phi: ndarray, sens: ndarray, params: ndarray, dt: float) -> Tuple
Advance state, variational matrix (STM), and sensitivity matrix with adaptive step control.
Propagates both matrices simultaneously for complete uncertainty quantification: - STM (Phi): Maps initial state uncertainties to current state uncertainties - Sensitivity (S): Maps parameter uncertainties to state uncertainties
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
t | float | Current time | required |
state | ndarray | State vector at time t | required |
phi | ndarray | State transition matrix at time t (state_dim x state_dim) | required |
sens | ndarray | Sensitivity matrix at time t (state_dim x param_dim) | required |
params | ndarray | Parameter vector | required |
dt | float | Requested timestep | required |
Returns:
| Name | Type | Description |
|---|---|---|
tuple | Tuple | (new_state, new_phi, new_sensitivity, dt_used, error_estimate, dt_next) |
Example
See Also¶
- Adaptive-Step Integrators - Guide to adaptive integration
- Configuration - Tuning tolerances for high precision
- DP54 Integrator - More efficient for moderate tolerances
- Integrators Module - Overview of all integrators