hydesign.utils
Classes
Class to inherit from when all output variables are explicit. |
Functions
|
Populates weights for finite difference formulas for derivatives of various orders. |
|
Module Contents
- hydesign.utils.get_weights(grid, xtgt, maxorder)[source]
Populates weights for finite difference formulas for derivatives of various orders.
- Parameters:
grid (array-like) – Target x value where derivatives are approximated
xtgt (int) – Array of x values
maxorder (int) – Maximum order of derivative
Returns
c (array-like) – Array of weights
@article{fornberg_generation_1988 – title={Generation of finite difference formulas on arbitrarily spaced grids}, author={Fornberg, Bengt}, journal={Mathematics of computation}, volume={51}, number={184}, pages={699–706}, year={1988} doi={10.1090/S0025-5718-1988-0935077-0} }
- :paramtitle={Generation of finite difference formulas on arbitrarily spaced grids},
author={Fornberg, Bengt}, journal={Mathematics of computation}, volume={51}, number={184}, pages={699–706}, year={1988} doi={10.1090/S0025-5718-1988-0935077-0} }
- class hydesign.utils.hybridization_shifted(N_limit, life_y, N_time, life_h)[source]
Bases:
openmdao.api.ExplicitComponent
Class to inherit from when all output variables are explicit.
- Parameters:
**kwargs (dict of keyword arguments) – Keyword arguments that will be mapped into the Component options.
- compute(inputs, outputs)[source]
Compute outputs given inputs. The model is assumed to be in an unscaled state.
- Parameters:
inputs (Vector) – Unscaled, dimensional input variables read via inputs[key].
outputs (Vector) – Unscaled, dimensional output variables read via outputs[key].
discrete_inputs (dict or None) – If not None, dict containing discrete input values.
discrete_outputs (dict or None) – If not None, dict containing discrete output values.