The class ODEDiscipline#
An ODEDiscipline
is the subclass of Discipline
wrapping an ODEProblem
.
The function \(f(t, y)\) defining the right-hand side of the ODE and the termination functions are encoded by
instances of Discipline
with suitable inputs and outputs, allowing to couple different instances of
ODEDiscipline
in an MDA.
Inputs and outputs#
An instance of ODEDiscipline
takes as inputs:
the initial value of the time variable,
the initial value of the state variables,
the value of eventual design variables.
Without further specifications, the outputs of ODEDiscipline
are the values of the state variables at the end
of the time interval (or, if termination events are present, at the realization of the first event).
By default, the name of the output variable corresponding to the final value of the state variable "y"
is "y_final"
.
If the boolean field output_trajectory
of the ODEDiscipline
is set to True
, the discipline provides,
as additional outputs, the value of the state variables at the instants listed in the array times
.
By default, the output representing the trajectory of the state variable "y"
is named "y"
.
Initialization#
The instantiation of an ODEDiscipline
requires at least two parameters: discipline
, representing the
function \(f(t, y)\), and times
, representing the time interval of integration of the ODE.
Further parameters can be specified at the time of the instantiation of the ODEDiscipline
.
Coupling#
Like for other types of discipline, it is possible to couple instances of ODEDiscipline
to other disciplines
in an MDA.
Coupled instances of ODEDiscipline
can be used to model the dynamics of coupled physical
systems.
Coupled instances of ODEDiscipline#
A first approach consists in modeling the different entities of the system by different instances of
ODEDiscipline
with the parameter return_trajectories
set to True
.
The coupling between the disciplines is done by passing the trajectories computed by each ODEDiscipline
as
inputs of the other ODEDiscipline
in the form of design variables.

Coupled dynamic inside an ODEDiscipline#
A different approach consists in defining a single ODEDiscipline
for the entire system, having as state
variables the collection of all the variables representing each component of the coupled system, and as dynamic the
result of an MDA on all disciplines describing the dynamics of the components of the system.
variables the collection of all the variables representing each component of the coupled system.
The dynamic of such ODEDiscipline
is the result of an MDA on all disciplines describing
the dynamics of the components of the system.

ODE Classes organization#
Here is the UML diagram of the classes in GEMSEO for the solution of ODEs.
Examples#
See the examples about ODEDiscipline
here:
examples about ODEDiscipline.