This package contains the OpenMDAO Standard Library. It’s intended to contain all of the plugins that are officially supported and released as part of openmdao.
Bases: object
Pulls Cases from a relational DB (sqlite). It doesn’t support general sql queries, but it does allow for a series of boolean selectors, e.g., ‘x<=y’, that are ANDed together.
Bases: object
Records Cases to a relational DB (sqlite). Values other than floats or ints are pickled and are opaque to SQL queries.
Retrieve the values of specified variables from a sqlite DB containing Case data.
Returns a dict containing a list of values for each entry, keyed on variable name.
Only data from cases containing ALL of the specified variables will be returned so that all data values with the same index will correspond to the same case.
Based on command line options, display an XY plot using data from a sqlite Case DB.
Display an XY plot using Case data from a sqlite DB.
Base class for an external application that needs to be executed.
Bases: openmdao.main.component.Component
Run an external code as a component.
The command to be executed.
Environment variables required by the command.
Delay between polling for command completion. A value of zero will use an internally computed default.
Resources required to run this component.
Maximum time to wait for command completion. A value of zero implies an infinite wait.
Return code from the command.
True if the command timed-out.
Copy files from directory that match patterns to the current directory and ensure they are writable.
Copy inputs from inputs_dir that match patterns.
This can be useful for resetting problem state.
Copy files from results_dir that match patterns.
This can be useful for workflow debugging when the external code takes a long time to execute.
Metamodel provides basic Meta Modeling capability
Bases: openmdao.main.component.Component
A component that provides general Meta Modeling capability.
See Appendix B for additional information on the MetaModel component.
Socket for the Component or Assembly being encapsulated.
Records training cases
An ISurrogate instance that is used as a template for each output surrogate.
A list of names of variables to be excluded from the public interface.
A list of names of variables to be included in the public interface.
Return the list of names of public inputs that correspond to model inputs.
Return the list of names of public outputs that correspond to model outputs.
Bases: openmdao.main.component.Component
A Component that encapsulates another Component and mimics its input/output interface.
Socket for the Component or Assembly being encapsulated
A list of names of variables to be excluded from the public interface.
A list of names of variables to be included in the public interface.
Default execution behavior is to set all inputs in the model, execute it, and update all outputs with the model’s outputs. Other classes can override this function to introduce other behaviors.
Return the list of names of public inputs that correspond to model inputs.
Pareto Filter – finds non-dominated cases
Bases: openmdao.main.component.Component
Takes a set of cases and filters out the subset of cases which are pareto optimal. Assumes that smaller values for model responses are better, so all problems must be posed as minimization problems.
CaseIterator with the cases to be filtered to Find the pareto optimal subset.
List of outputs from the case to consider for filtering. Note that only case outputs are allowed as criteria.
Resulting collection of dominated cases.
resulting collection of pareto optimal cases
DOEgenerator that performs a full-factorial Design of Experiments. Plugs into the DOEgenerator socket on a DOEdriver.
Bases: enthought.traits.has_traits.HasTraits
DOEgenerator that performs a full-factorial Design of Experiments. Plugs into the DOEgenerator socket on a DOEdriver.
number of levels of values for each parameter
number of independent parameters in the DOE
Bases: object
Bases: enthought.traits.has_traits.HasTraits
IDOEgenerator which provides a latin hypercube DOE sample set. The Morris-Mitchell sampling criterion of the DOE is optimzied using an evolutionary algorithm.
Vector norm calculation method. ‘1-norm’ is faster, but less accurate
solver.py – Solver based on the nonlinear solvers found in Scipy.Optimize.
See Appendix B for additional information on the BroydenSolver.
Bases: openmdao.main.driver.Driver
MIMO Newton-Raphson Solver with Broyden approximation to the Jacobian. Algorithms are based on those found in scipy.optimize.
Nonlinear solvers
These solvers find x for which F(x)=0. Both x and F are multidimensional.
All solvers have the parameter iter (the number of iterations to compute); some of them have other parameters of the solver. See the particular solver for details.
A collection of general-purpose nonlinear multidimensional solvers.
The broyden2 is the best. For large systems, use broyden3; excitingmixing is also very effective. The remaining nonlinear solvers from SciPy are, in their own words, of “mediocre quality,” so they were not implemented.
Algorithm to use. Choose from broyden2, broyden3, and excitingmixing.
Mixing Coefficient.
Maximum Mixing Coefficient (only used with excitingmixing.)
Maximum number of iterations before termination.
Convergence tolerance. If the norm of the independentvector is lower than this, then terminate successfully.
Adds a constraint in the form of a boolean expression string to the driver.
Adds an equality constraint as two strings, a left hand side and a right hand side.
Adds a parameter to the driver.
If neither “low” nor “high” is specified, the min and max will default to the values in the metadata of the variable being referenced. If they are not specified in the metadata and not provided as arguments, a ValueError is raised.
Takes an iterator of tuples of the form (param_name, low, high) and adds the parameters to the driver.
Removes all constraints.
Removes all parameters.
Returns a list of tuples of the form (lhs, rhs, comparator, is_violated)
From SciPy, Broyden’s second method.
Updates inverse Jacobian by an optimal formula. There is NxN matrix multiplication in every iteration.
The best norm(F(x))=0.003 achieved in ~20 iterations.
from scipy, Broyden’s second (sic) method.
Updates inverse Jacobian by an optimal formula. The NxN matrix multiplication is avoided.
The best norm(F(x))=0.003 achieved in ~20 iterations.
from scipy, The excitingmixing method.
J=-1/alpha
The best norm(F(x))=0.005 achieved in ~140 iterations.
Note: SciPy uses 0.1 as the default value for alpha for this algorithm. Ours is set at 0.4, which is appropriate for Broyden2 and Broyden3, so adjust it accordingly if there are problems.
Returns an ordered dict of constraint objects.
Returns an ordered dict of parameter objects.
Return a list of strings containing constraint expressions.
Returns an alphabetized list of parameter names.
Removes the constraint with the given string.
Removes the parameter with the given name.
Pushes the values in the iterator ‘values’ into the corresponding variables in the model.
Bases: openmdao.main.driver.Driver
A base class for Drivers that run sets of cases in a manner similar to the ROSE framework. Concurrent evaluation is supported, with the various evaluations executed across servers obtained from the ResourceAllocationManager.
Something to save Cases to.
Maximum number of times to retry a failed case.
If True, reload the model between executions.
If True, evaluate cases sequentially.
Resume execution.
Bases: openmdao.lib.drivers.caseiterdriver.CaseIterDriverBase
Run a set of cases provided by an ICaseIterator. Concurrent evaluation is supported, with the various evaluations executed across servers obtained from the ResourceAllocationManager.
Iterator supplying Cases to evaluate.
conmindriver.py - Driver for the CONMIN optimizer.
See Appendix B for additional information on the CONMINDriver.
Bases: openmdao.main.driver.Driver
Driver wrapper of Fortran version of CONMIN.
Todo
Make CONMIN’s handling of user calculated gradients accessible through CONMINdriver
Array designating whether each constraint is linear.
Constraint thickness parameter.
Constraint thickness parameter for linear and side constraints.
Minimum absoluate value of ctl used in optimization.
Minimum absoluate value of ct used in optimization.
Absolute convergence tolerance.
Relative convergence tolerance.
Relative change in parameters when calculating finite difference gradients.
Minimum absolute step in finite difference gradient calculations.
Conjugate gradient restart parameter.
Print information during CONMIN solution. Higher values are more verbose.
Maximum number of iterations before termination.
Number of consecutive iterations to indicate convergence (relative or absolute).
Linear objective function flag.
User-defined gradient flag (not yet supported).
Scaling control parameter – controls scaling of decision variables.
Participation coefficient - penalty parameter that pushes designs towards the feasible region.
List of extra variables tooutput in the recorder.
Array of scaling factors for the parameters.
Mean value of the push-off factor in the method of feasible directions.
Adds a constraint to the driver
Adds an inequality constraint as three strings; a left hand side, a comparator (‘<’,’>’,’<=’, or ‘>=’), and a right hand side.
Sets the objective of this driver to be the specified expression. If there is a preexisting objective in this driver, it is replaced.
Adds a parameter to the driver.
If neither “low” nor “high” is specified, the min and max will default to the values in the metadata of the variable being referenced. If they are not specified in the metadata and not provided as arguments, a ValueError is raised.
Takes an iterator of tuples of the form (param_name, low, high) and adds the parameters to the driver.
Removes all constraints.
Removes all parameters.
Returns a list of constraint values
Returns the value of the evaluated objective.
Returns an ordered dict of inequality constraint objects.
Returns the objective object.
Returns an ordered dict of parameter objects.
Return a list of strings containing constraint expressions.
Returns the expression string for the objective.
Returns an alphabetized list of parameter names.
Removes the constraint with the given string.
Removes the parameter with the given name.
Pushes the values in the iterator ‘values’ into the corresponding variables in the model.
doedriver.py – Driver that executes a Design of Experiments.
See Appendix B for additional information on the DOEdriver.
Bases: openmdao.lib.drivers.caseiterdriver.CaseIterDriverBase
Driver for Design of Experiments
Iterator supplying normalized DOE values
A list of outputs to be saved with each case.
Adds a parameter to the driver.
If neither “low” nor “high” is specified, the min and max will default to the values in the metadata of the variable being referenced. If they are not specified in the metadata and not provided as arguments, a ValueError is raised.
Takes an iterator of tuples of the form (param_name, low, high) and adds the parameters to the driver.
Removes all parameters.
Returns an ordered dict of parameter objects.
Returns an alphabetized list of parameter names.
Removes the parameter with the given name.
Pushes the values in the iterator ‘values’ into the corresponding variables in the model.
A simple Pyevolve-based driver for OpenMDAO
See Appendix B for additional information on the Genetic driver.
Bases: openmdao.main.driver.Driver
Genetic algorithm for the OpenMDAO framework, based on the Pyevolve Genetic algorithm module.
The crossover rate used when two parent genomes reproduce to form a child genome.
Controls the use of elitism in the creation of new generations.
The maximum number of generations the algorithm will evolve to before stopping.
The mutation rate applied to population members.
Sets the optimization to either minimize or maximize the objective function.
The size of the population in each generation.
Random seed for the optimizer. Set to a specific value for repeatable results; otherwise leave as None for truly random seeding.
The selection method used to pick population members who will survive for breeding into the next generation.
The genome with the best score from the optimization.
Sets the objective of this driver to be the specified expression. If there is a preexisting objective in this driver, it is replaced.
Adds a parameter to the driver.
If neither “low” nor “high” is specified, the min and max will default to the values in the metadata of the variable being referenced. If they are not specified in the metadata and not provided as arguments, a ValueError is raised.
Takes an iterator of tuples of the form (param_name, low, high) and adds the parameters to the driver.
Removes all parameters.
Returns the value of the evaluated objective.
Returns the objective object.
Returns an ordered dict of parameter objects.
Returns the expression string for the objective.
Returns an alphabetized list of parameter names.
Removes the parameter with the given name.
Pushes the values in the iterator ‘values’ into the corresponding variables in the model.
A simple iteration driver. Basically runs a workflow, passing the output to the input for the next iteration. Relative change and number of iterations are used as termination criteria.
Bases: openmdao.main.driver.Driver
A simple fixed point iteration driver, which runs a workflow and passes the value from the output to the input for the next iteration. Relative change and number of iterations are used as termination criterea.
Maximum number of iterations before termination.
Absolute convergence tolerance between iterations.
loop output to pass to input.
loop input, taken from the input.
Multi Crit EI
Bases: openmdao.main.driver.Driver
The Multi Crit Expected Improvement method
CaseIterator which Contains pareto optimal cases, representing the target objective values.
Infill criterion about which to maximize.
String representing the objectives about which the infill criterion is maximized. Must be a NormalDistrubtion type.
Names of the output from cases to be used as the objectives.
CaseIterator which contains the case that maximizes specified infill criterion.
A simple driver that runs cases from a CaseIterator and records them with a CaseRecorder
Bases: openmdao.main.driver.Driver
A Driver that sequentially runs a set of cases provided by an ICaseIterator and records the results in a CaseRecorder. This is intended for test cases or very simple models only. For a more full- featured Driver with similar functionality, see CaseIteratorDriver.
For each case coming from the iterator, the workflow will be executed once.
Source of Cases.
Where Case results are recorded.
Driver that implements the Expected Improvement process for single criteria problems
Bases: openmdao.main.driver.Driver
Driver which implements the Expected Improvement(EI) process for single criteria problems. It uses components whose outputs are instances of NormalDistribution, combined with a provided optimal case, to find the point in the design space with the best Expected Improvement.
CaseIterator which contains a single case, representing the criteria value.
Name of the variable to maximize the expected improvement around. Must be a NormalDistrubtion type.
The expected improvement of the next_case
CaseIterator that contains the case which maximizes expected improvement.
Takes an iterator of tuples of the form (param_name, low, high) and adds the parameters to the driver.
Removes all parameters.
Returns an ordered dict of parameter objects.
Returns an alphabetized list of parameter names.
Pushes the values in the iterator ‘values’ into the corresponding variables in the model.
Surrogate model based on Kriging
Bases: enthought.traits.has_traits.HasTraits
Returns a NormalDistribution centered around the value, with a standard deviation of 0.
Trait for numpy array variables, with optional units.
Bases: enthought.traits.trait_numeric.Array
A variable wrapper for a numpy array with optional units. The unit applies to the entire array.
Bases: object
A DomainObj represents a (possibly multi-zoned) mesh and data related to that mesh.
Add zones from other to self, retaining names where possible.
Add a Zone. Returns the added zone.
Test if self and other are equivalent.
Convert to cartesian coordinate system.
Convert to cylindrical coordinate system.
Remove a zone. Returns the removed zone.
Rename a zone.
Translate coordinates.
Trait for enumerations, with optional alias list
Support for files, either as File or external files.
Bases: enthought.traits.trait_handlers.TraitType
A trait wrapper for a FileRef object. For input files legal_types may be set to a list of expected ‘content_type’ strings. Then upon assignment the actual ‘content_type’ must match one of the legal_types strings. Also for input files, if local_path is set, then upon assignent the associated file will be copied to that path.
Trait for floating point variables, with optional min, max, and units
Bases: enthought.traits.trait_handlers.TraitType
A Variable wrapper for floating point number valid within a specified range of values.
Bases: object
Contains solution variables for a Zone. All variables have the same shape and grid location.
Add a numpy.ndarray of scalar data and bind to name. Returns the added array.
Add a Vector and bind to name. Returns the added vector.
Test if self and other are equivalent.
Convert to cartesian coordinate system.
Convert to cylindrical coordinate system.
Number of ghost cells for each index direction.
Position at which data is located.
Bases: openmdao.lib.datatypes.domain.vector.Vector
Coordinate data for a Zone.
Test if self and other are equivalent.
Convert to cartesian coordinate system.
Convert to cylindrical coordinate system.
Translate coordinates.
Number of ghost cells for each index direction.
Trait for floating point variables, with optional min and max
Functions to read and write a DomainObj in Plot3D format. Many function arguments are common:
Default argument values are set for a typical 3D multiblock single-precision Fortran unformatted file. When writing, zones are assumed in Cartesian coordinates with data located at the vertices.
Returns a DomainObj initialized from Plot3D grid_file and f_file. Variables are assigned to names of the form f_N.
Returns a DomainObj initialized from Plot3D grid_file.
Returns a DomainObj initialized from Plot3D grid_file and q_file. Q variables are assigned to ‘density’, ‘momentum’, and ‘energy_stagnation_density’. Scalars are assigned to ‘mach’, ‘alpha’, ‘reynolds’, and ‘time’.
Returns a list of zone dimensions from Plot3D grid_file.
Writes domain to grid_file and f_file in Plot3D format. If varnames is None, then all arrays and then all vectors are written.
Writes domain to grid_file in Plot3D format.
Writes domain to grid_file and q_file in Plot3D format. Requires ‘density’, ‘momentum’, and ‘energy_stagnation_density’ variables as well as ‘mach’, ‘alpha’, ‘reynolds’, and ‘time’ scalars.
Register a surface probe function.
Calculate metrics on mesh surfaces. Currently only supports 3D structured grids with cell-centered data.
Returns a list of metric values in the order of the variables list.
Bases: object
Vector data for a FlowSolution. In cartesian coordinates, array indexing order is x,y,z; so an ‘i-face’ is a y,z surface. In cylindrical coordinates, array indexing order is z,r,t; so an ‘i-face’ is a r,t surface.
Test if self and other are equivalent.
Convert to cartesian coordinate system.
Bases: object
One zone in a possibly multi-zone DomainObj.
Test if self and other are equivalent.
Convert to cartesian coordinate system.
Convert to cylindrical coordinate system.
Translate coordinates.
Coordinate system in use.