gemseo / problems / ode

# orbital_dynamics module¶

The 2-body astrodynamics problem.

Predict the motion and position of two massive objects viewed as point particles that only interact with one another using classical mechanics. This problem is treated here as a classical central force problem.

Consider the frame defined by one particle. The position $$(x, y)$$ and the velocity $$(v_x, v_y)$$ of the other particle as a function of time can be described by the following set of equations:

with $$r = \sqrt{x(t)^2 + y(t)^2}$$.

We use the initial conditions:

where $$e$$ is the eccentricity of the particle trajectory.

The Jacobian of the right-hand side of this ODE is:

class gemseo.problems.ode.orbital_dynamics.OrbitalDynamics(eccentricity=0.5, use_jacobian=True, state_vector=None)[source]

Bases: ODEProblem

Equations of motion of a massive point particle under a central force.

Parameters:
• eccentricity (float) –

The eccentricity of the particle trajectory.

By default it is set to 0.5.

• use_jacobian (bool) –

Whether to use the analytical expression of the Jacobian.

By default it is set to True.

• state_vector (NDArray[float] | None) – The state vector $$s(t)=(x(t), y(t), \dot{x(t)}, \dot{y(t)})$$ of the system.

The adjoint of the problem relative to the design variables.

The adjoint of the problem relative to the state.

initial_state: NumberArray

The initial conditions $$(t_0,s_0)$$ of the ODE.

integration_interval: tuple[float, float]

The interval of integration.

jac: Callable[[float, NumberArray], NumberArray] | NumberArray | None

The function to compute the Jacobian of $$f$$.

If Callable, the Jacobian is assumed to be dependent on time and state. It will be called as jac(time, state) as necessary. If NumberArray, the Jacobian is assumed to be constant. If None, the Jacobian will be approximated by finite differences.

jac_desvar: Callable[[float, NumberArray], NumberArray]

The function to compute the Jacobian of $$f$$ relative to the design variables.

result: ODEResult

The result of the ODE problem.

rhs_function: Callable[[float, NumberArray], NumberArray]

The function $$f$$.