hydesign.reliability
Created on Thu Aug 22 13:08:01 2024
@author: mikf
Attributes
Classes
Class to inherit from when all output variables are explicit. |
|
Class to inherit from when all output variables are explicit. |
|
Class to inherit from when all output variables are explicit. |
Functions
|
|
|
|
Module Contents
- class hydesign.reliability.battery_with_reliability(life_y=25, intervals_per_hour=1, reliability_ts_battery=None, reliability_ts_trans=None)[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.
- class hydesign.reliability.wpp_with_reliability(life_y=25, intervals_per_hour=1, reliability_ts_wind=None, reliability_ts_trans=None)[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.
- class hydesign.reliability.pvp_with_reliability(life_y=25, intervals_per_hour=1, reliability_ts_pv=None, reliability_ts_trans=None)[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.
- hydesign.reliability.availability_data_set(pdf_TTF, pdf_TTR, N_components, seed, ts_start, ts_end, ts_freq, sampling_const, component_name, **kwargs)[source]
- Parameters:
pdf_TTF (probability distribution) – probability distribution of time to failure
pdf_TTR (probability distribution) – probability distribution of time to repair
N_components (INTEGER) – Number of the components for which availability time-series will be estimated.
seed (INTEGER) – It is a constant that is introduced to ensure the reproducibility of the random sampling.
ts_start (str) – time series start time in the format: ‘2030-01-01 00:00’
ts_end (str) – time series end time in the format: ‘2030-01-01 00:00’
ts_freq (str) – time series frequency in the format: ‘1h’
sampling_const (INTEGER) – It is another constant that is introduced to estimate the required samples for well-converged result.
component_name (STRING) – Name of the component, so it can be printed on the plot figure.
- Returns:
availability_ds – xarray dataset with the time to failure and time to repair indices (not the actual timeseries). The reasoning for omiting saving the full time series ond only the indices where failure or “back online” occurs is that this only takes up a fraction of the space, and the construction of the timeseries is very fast when the sampling has already been pre processed.
- Return type:
Dataset
- hydesign.reliability.generate_availability_ensamble(ts_start='2030-01-01 00:00', ts_end='2054-12-31 23:00', ts_freq='1h', seeds=range(100), component_name='WT', file_name=None, MTTF=11000.0, MTTR=110.0, N_components=200, sampling_const=50.4, pdf=cp.Exponential)[source]
- Parameters:
ts_start (str) – time series start time in the format: ‘2030-01-01 00:00’
ts_end (str) – time series end time in the format: ‘2030-01-01 00:00’
ts_freq (str) – time series frequency in the format: ‘1h’
seeds (array-like) – Iterable of seeds to run
component_name (STRING) – Name of the component, so it can be printed on the plot figure.
file_name (STRING) – Name to save the netcdf dataset to.
MTTF (float) – mean time to fail
MTTR (float) – mean time to repair
N_components (INTEGER) – Number of the components for which availability time-series will be estimated.
sampling_const (INTEGER) – It is another constant that is introduced to estimate the required samples for well-converged
pdf (probability distribution method) – probability distribution method result.
- Returns:
availability_ds (Dataset) – xarray dataset with the time to failure and time to repair indices (not the actual timeseries) for all seeds
for data sets with number of components >= 400 it will look like this
<xarray.Dataset> Size (129kB)
Dimensions ((sample: 20, component: 200, seed: 2))
Coordinates –
sample (sample) int32 80B 0 1 2 3 4 5 6 7 … 13 14 15 16 17 18 19
component (component) int32 800B 0 1 2 3 4 5 … 195 196 197 198 199 N_components int32 4B 200 ts_start <U16 64B ‘2030-01-01 00:00’ ts_end <U16 64B ‘2054-12-31 23:00’ ts_freq <U2 8B ‘1h’ N_sample int32 4B 100407 N_sample_needed (seed) int32 8B 20 17 component_name <U2 8B ‘WT’
seed (seed) int32 8B 0 1
Data variables – TTF_indices (seed, sample, component) float64 64kB 8.754e+03 … nan TTR_indices (seed, sample, component) float64 64kB 8.914e+03 … nan
for data sets with number of components > 400 it will look like this
<xarray.Dataset> Size (258kB)
Dimensions ((sample: 10, component: 400, batch_no: 2, seed: 2))
Coordinates –
sample (sample) int32 40B 0 1 2 3 4 5 6 7 8 9
component (component) int32 2kB 0 1 2 3 4 5 … 395 396 397 398 399
batch_no (batch_no) int32 8B 0 1 N_components int32 4B 400 ts_start <U16 64B ‘2030-01-01 00:00’ ts_end <U16 64B ‘2054-12-31 23:00’ ts_freq <U2 8B ‘1h’ N_sample int32 4B 100524 N_sample_needed (seed, batch_no) int32 16B 10 8 8 7 component_name <U2 8B ‘PV’
seed (seed) int32 8B 0 1
Data variables – TTF_indices (seed, batch_no, sample, component) float64 128kB 3.742e… TTR_indices (seed, batch_no, sample, component) float64 128kB 3.809e… final_seed (seed, batch_no) int32 16B 1000 2000 1001 2001