latom.surrogate.om_metamodels_llo2heo¶
@authors: Alberto FOSSA’ Giuliana Elena MICELI
Functions
|
Save an object. |
Classes
|
MetaModel class sets up an OpenMDAO Problem object and a MetaModelStructuredComp subsystem to compute and exploit a surrogate model for different transfer trajectories. |
|
Plots the response surface resulting from the surrogate models computations. |
|
Spacecraft class defines the spacecraft characteristics. |
|
TwoDim3PhasesLLO2HEOMetaModel implements MetaModel for a two-dimensional transfer from an LLO to an HEO modeled as a three-phases trajectory. |
|
TwoDim3PhasesLLO2HEONLP transcribes an optimal control problem for a three-phases ascent trajectory from a circular Low Lunar Orbit (LLO) to an Highly Elliptical Orbit (HEO) into a Non Linear Programming Problem (NLP) using the OpenMDAO and dymos libraries. |
|
TwoDimLLO2HEOAnalyzer class defines the methods to analyze the results of a two dimensional simulation from a Low Lunar Orbit to an Highly Elliptical Orbit. |
|
TwoDimLLO2ApoContinuationAnalyzer class defines the methods to analyze the results of a two dimensional simulation from a Low Lunar Orbit to an Highly Elliptical Orbit using a continuation method over several thrust/weight ratios. |
TwoDimLLO2ApoContinuationMetaModel implements MetaModel for a two-dimensional escape burn from an LLO to an intermediate ballistic arc to reach the specified HEO apoapsis radius. |
|
|
TwoDimLLO2ApoMetaModel implements MetaModel for a two-dimensional escape burn from an LLO to an intermediate ballistic arc to reach the specified HEO apoapsis radius. |
-
class
latom.surrogate.om_metamodels_llo2heo.TwoDimLLO2ApoMetaModel(distributed=False, extrapolate=False, method='scipy_cubic', training_data_gradients=True, vec_size=1, rec_file=None)[source]¶ Bases:
latom.surrogate.om_metamodels.MetaModelTwoDimLLO2ApoMetaModel implements MetaModel for a two-dimensional escape burn from an LLO to an intermediate ballistic arc to reach the specified HEO apoapsis radius.
-
static
solve(body, sc, alt, t_bounds, method, nb_seg, order, solver, snopt_opts=None, u_bound=None, **kwargs)[source]¶ Solve the NLP for the i-th twr and k-th Isp values.
- Parameters
body (Primary) – Central attracting body
sc (Spacecraft) – Spacecraft object characterized by the i-th twr and k-th Isp values
alt (float) – Orbit altitude [m]
t_bounds (iterable) – Time of flight lower and upper bounds expressed as fraction of tof
method (str) – Transcription method used to discretize the continuous time trajectory into a finite set of nodes, allowed
gauss-lobatto,radau-psandrunge-kuttanb_seg (int) – Number of segments in which the phase is discretized
order (int) – Transcription order within the phase, must be odd
solver (str) – NLP solver, must be supported by OpenMDAO
snopt_opts (dict or None, optional) – SNOPT optional settings expressed as key-value pairs. Default is None
u_bound (str, optional) – Specify the bounds on the radial velocity along the transfer as
lower,upperorNone. Default isNone
- Other Parameters
rp (float) – HEO periapsis radius [m]
t (float) – HEO period [s]
- Returns
m_prop (float) – Propellant fraction [-]
f (bool) – Failure status
-
static
abs_path(rec_file)¶ Returns the absolute path of the file where the meta model is stored.
- Parameters
rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored
- Returns
fid – Full path where the meta model is stored
- Return type
str
-
compute_grid(twr_lim, isp_lim, nb_samp)¶ Computes a regular sampling grid in the input space twr, Isp.
- Parameters
twr_lim (iterable) – Thrust/weight ratio lower and upper limits [-]
isp_lim (iterable) – Specific impulse lower and upper limits [s]
nb_samp (iterable) – Number of samples along the twr and Isp axes
-
load(rec_file)¶ Loads stored data to instantiate a meta model.
- Parameters
rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored
-
plot(nb_lines=50, kind='prop', log_scale=False)¶ Plot the response surface corresponding to the loaded meta model.
- Parameters
nb_lines (int, optional) – Number of contour lines. Default is
50kind (str) –
propto display the propellant fraction m_prop,finalto display the final spacecraft mass 1 - m_proplog_scale (bool, optional) – Set to
Trueif the twr values are in logarithmic scale. Default isFalse
-
sampling(body, twr_lim, isp_lim, alt, t_bounds, method, nb_seg, order, solver, nb_samp, snopt_opts=None, u_bound=None, rec_file=None, **kwargs)¶ Compute a new set of training data starting from a given sampling grid.
- Parameters
body (Primary) – Central attracting body
twr_lim (iterable) – Thrust/weight ratio lower and upper limits [-]
isp_lim (iterable) – Specific impulse lower and upper limits [s]
alt (float) – Orbit altitude [m]
t_bounds (iterable) – Time of flight lower and upper bounds expressed as fraction of tof
method (str) – Transcription method used to discretize the continuous time trajectory into a finite set of nodes, allowed
gauss-lobatto,radau-psandrunge-kuttanb_seg (int or iterable) – Number of segments in which each phase is discretized
order (int or iterable) – Transcription order within each phase, must be odd
solver (str) – NLP solver, must be supported by OpenMDAO
nb_samp (iterable) – Number of samples along the twr and Isp axes
snopt_opts (dict or None, optional) – SNOPT optional settings expressed as key-value pairs. Default is None
u_bound (str, optional) – Specify the bounds on the radial velocity along the transfer as
lower,upperorNone. Default isNonerec_file (str, optional) – Name of the file in latom.data.metamodels where the meta model will be stored. Default is
None
-
save(rec_file)¶ Saves data corresponding to a meta model instance.
- Parameters
rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored
-
setup()¶ Setup the OpenMDAO Problem object with known data for twr, Isp and m_prop.
-
static
-
class
latom.surrogate.om_metamodels_llo2heo.TwoDimLLO2ApoContinuationMetaModel(distributed=False, extrapolate=False, method='scipy_cubic', training_data_gradients=True, vec_size=1, rec_file=None)[source]¶ Bases:
latom.surrogate.om_metamodels.MetaModelTwoDimLLO2ApoContinuationMetaModel implements MetaModel for a two-dimensional escape burn from an LLO to an intermediate ballistic arc to reach the specified HEO apoapsis radius.
For each Isp value in the sampling grid, the training data are computed using a continuation method for decreasing twr values.
- Parameters
distributed (bool, optional) –
Trueif the component has variables that are distributed across multiple processes,Falseotherwise. Default isFalseextrapolate (bool, optional) – Sets whether extrapolation should be performed when an input is out of bounds. Default is
Falsemethod (str, optional) – Spline interpolation method to use for all outputs among
cubic,slinear,lagrange2,lagrange3,akima,scipy_cubic,scipy_slinear,scipy_quintic. Default isscipy_cubictraining_data_gradients (bool, optional) – Sets whether gradients with respect to output training data should be computed. Default is
Truevec_size (int, optional) – Number of points to evaluate at once. Default is
1rec_file (str or
None, optional) – Name of the file in latom.data.metamodels where the meta model is stored orNoneif a new model has to be built. Default isNone
- Variables
energy (ndarray) – Spacecraft specific energy at the end of the transfer on all training points [m^2/s^2]
-
load(rec_file)[source]¶ Loads stored data to instantiate a meta model.
- Parameters
rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored
-
save(rec_file)[source]¶ Saves data corresponding to a meta model instance.
- Parameters
rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored
-
compute_grid(twr_lim, isp_lim, nb_samp)[source]¶ Computes a regular sampling grid in the input space twr, Isp.
- Parameters
twr_lim (iterable) – Thrust/weight ratio lower and upper limits [-]
isp_lim (iterable) – Specific impulse lower and upper limits [s]
nb_samp (iterable) – Number of samples along the twr and Isp axes
-
sampling(body, twr_lim, isp_lim, alt, t_bounds, method, nb_seg, order, solver, nb_samp, snopt_opts=None, u_bound=None, rec_file=None, **kwargs)[source]¶ Compute a new set of training data starting from a given sampling grid.
- Parameters
body (Primary) – Central attracting body
twr_lim (iterable) – Thrust/weight ratio lower and upper limits [-]
isp_lim (iterable) – Specific impulse lower and upper limits [s]
alt (float) – Orbit altitude [m]
t_bounds (iterable) – Time of flight lower and upper bounds expressed as fraction of tof
method (str) – Transcription method used to discretize the continuous time trajectory into a finite set of nodes, allowed
gauss-lobatto,radau-psandrunge-kuttanb_seg (int or iterable) – Number of segments in which each phase is discretized
order (int or iterable) – Transcription order within each phase, must be odd
solver (str) – NLP solver, must be supported by OpenMDAO
nb_samp (iterable) – Number of samples along the twr and Isp axes
snopt_opts (dict or None, optional) – SNOPT optional settings expressed as key-value pairs. Default is None
u_bound (str, optional) – Specify the bounds on the radial velocity along the transfer as
lower,upperorNone. Default isNonerec_file (str, optional) – Name of the file in latom.data.metamodels where the meta model will be stored. Default is
None
- Other Parameters
rp (float) – HEO periapsis radius [m]
t (float) – HEO period [s]
log_scale (bool) –
Trueif twr values are given in logarithmic scale as log(twr)
-
plot(nb_lines=50, kind='prop', log_scale=False)[source]¶ Plot the response surface corresponding to the loaded meta model.
- Parameters
nb_lines (int, optional) – Number of contour lines. Default is
50kind (str) –
propto display the propellant fraction m_prop,finalto display the final spacecraft mass 1 - m_proplog_scale (bool, optional) – Set to
Trueif the twr values are in logarithmic scale. Default isFalse
-
static
abs_path(rec_file)¶ Returns the absolute path of the file where the meta model is stored.
- Parameters
rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored
- Returns
fid – Full path where the meta model is stored
- Return type
str
-
setup()¶ Setup the OpenMDAO Problem object with known data for twr, Isp and m_prop.
-
static
solve(body, sc, alt, t_bounds, method, nb_seg, order, solver, snopt_opts=None, u_bound=None, **kwargs)¶ Solve the NLP for the i-th twr and k-th Isp values.
- Parameters
body (Primary) – Central attracting body
sc (Spacecraft) – Spacecraft object characterized by the i-th twr and k-th Isp values
alt (float) – Orbit altitude [m]
t_bounds (iterable) – Time of flight lower and upper bounds expressed as fraction of tof
method (str) – Transcription method used to discretize the continuous time trajectory into a finite set of nodes, allowed
gauss-lobatto,radau-psandrunge-kuttanb_seg (int or iterable) – Number of segments in which each phase is discretized
order (int or iterable) – Transcription order within each phase, must be odd
solver (str) – NLP solver, must be supported by OpenMDAO
snopt_opts (dict or None, optional) – SNOPT optional settings expressed as key-value pairs. Default is None
u_bound (str, optional) – Specify the bounds on the radial velocity along the transfer as
lower,upperorNone. Default isNone
- Returns
m_prop (float) – Propellant fraction [-]
f (bool) – Failure status
-
class
latom.surrogate.om_metamodels_llo2heo.TwoDim3PhasesLLO2HEOMetaModel(distributed=False, extrapolate=False, method='scipy_cubic', training_data_gradients=True, vec_size=1, rec_file=None)[source]¶ Bases:
latom.surrogate.om_metamodels.MetaModelTwoDim3PhasesLLO2HEOMetaModel implements MetaModel for a two-dimensional transfer from an LLO to an HEO modeled as a three-phases trajectory.
-
static
solve(body, sc, alt, t_bounds, method, nb_seg, order, solver, snopt_opts=None, u_bound=None, **kwargs)[source]¶ Solve the NLP for the i-th twr and k-th Isp values.
- Parameters
body (Primary) – Central attracting body
sc (Spacecraft) – Spacecraft object characterized by the i-th twr and k-th Isp values
alt (float) – Orbit altitude [m]
t_bounds (iterable) – Time of flight lower and upper bounds expressed as fraction of tof
method (str) – Transcription method used to discretize the continuous time trajectory into a finite set of nodes, allowed
gauss-lobatto,radau-psandrunge-kuttanb_seg (int) – Number of segments in which the phase is discretized
order (int) – Transcription order within the phase, must be odd
solver (str) – NLP solver, must be supported by OpenMDAO
snopt_opts (dict or None, optional) – SNOPT optional settings expressed as key-value pairs. Default is None
u_bound (str, optional) – Specify the bounds on the radial velocity along the transfer as
lower,upperorNone. Default isNone
- Other Parameters
rp (float) – HEO periapsis radius [m]
t (float) – HEO period [s]
phase_name (iterable) – Names for the three phases within OpenMDAO
- Returns
m_prop (float) – Propellant fraction [-]
f (bool) – Failure status
-
static
abs_path(rec_file)¶ Returns the absolute path of the file where the meta model is stored.
- Parameters
rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored
- Returns
fid – Full path where the meta model is stored
- Return type
str
-
compute_grid(twr_lim, isp_lim, nb_samp)¶ Computes a regular sampling grid in the input space twr, Isp.
- Parameters
twr_lim (iterable) – Thrust/weight ratio lower and upper limits [-]
isp_lim (iterable) – Specific impulse lower and upper limits [s]
nb_samp (iterable) – Number of samples along the twr and Isp axes
-
load(rec_file)¶ Loads stored data to instantiate a meta model.
- Parameters
rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored
-
plot(nb_lines=50, kind='prop', log_scale=False)¶ Plot the response surface corresponding to the loaded meta model.
- Parameters
nb_lines (int, optional) – Number of contour lines. Default is
50kind (str) –
propto display the propellant fraction m_prop,finalto display the final spacecraft mass 1 - m_proplog_scale (bool, optional) – Set to
Trueif the twr values are in logarithmic scale. Default isFalse
-
sampling(body, twr_lim, isp_lim, alt, t_bounds, method, nb_seg, order, solver, nb_samp, snopt_opts=None, u_bound=None, rec_file=None, **kwargs)¶ Compute a new set of training data starting from a given sampling grid.
- Parameters
body (Primary) – Central attracting body
twr_lim (iterable) – Thrust/weight ratio lower and upper limits [-]
isp_lim (iterable) – Specific impulse lower and upper limits [s]
alt (float) – Orbit altitude [m]
t_bounds (iterable) – Time of flight lower and upper bounds expressed as fraction of tof
method (str) – Transcription method used to discretize the continuous time trajectory into a finite set of nodes, allowed
gauss-lobatto,radau-psandrunge-kuttanb_seg (int or iterable) – Number of segments in which each phase is discretized
order (int or iterable) – Transcription order within each phase, must be odd
solver (str) – NLP solver, must be supported by OpenMDAO
nb_samp (iterable) – Number of samples along the twr and Isp axes
snopt_opts (dict or None, optional) – SNOPT optional settings expressed as key-value pairs. Default is None
u_bound (str, optional) – Specify the bounds on the radial velocity along the transfer as
lower,upperorNone. Default isNonerec_file (str, optional) – Name of the file in latom.data.metamodels where the meta model will be stored. Default is
None
-
save(rec_file)¶ Saves data corresponding to a meta model instance.
- Parameters
rec_file (str) – Name of the file in latom.data.metamodels where the meta model is stored
-
setup()¶ Setup the OpenMDAO Problem object with known data for twr, Isp and m_prop.
-
static