bio_rtd.inlet

Module with inlet profiles.

Inlet profiles defined in this module are subclasses of bio_rtd.core.Inlet.

They define starting flow rate and concentration profiles for a unit operation train.

ConstantInlet

class bio_rtd.inlet.ConstantInlet(t, f, c, species_list, inlet_id, gui_title='ConstantInlet')[source]

Bases: bio_rtd.core.Inlet

Constant flow rate and constant process fluid composition

Parameters
  • t (array) – Simulation time vector. Starts with 0 and has a constant time step.

  • f (float) – Constant flow rate.

  • c (ndarray) – Constant concentration for each specie. For single specie use np.array([c_value]).

  • species_list (Sequence[str]) – List with names of simulating process fluid species.

  • inlet_id (str) – Unique identifier of an instance. It is stored in uo_id.

  • gui_title (str) – Readable title of an instance. Default = “ConstantInlet”.

f: float

Constant flow rate.

c: _np.ndarray

Constant concentration value for each specie.

refresh()[source]

Recalculate profiles based on attributes.

get_n_species()

Get number of process fluid species.

Return type

int

get_result()

Get flow rate and concentration profiles.

Return type

Tuple[ndarray, ndarray]

Returns

  • f_out – Flow rate profile.

  • c_out – Concentration profile.

get_t()

Get simulation time vector.

Return type

ndarray

property log

Reference of the RtdLogger instance.

Setter also plants instance data tree into passed logger.

If logger is requested, but not yet set, then a bio_rtd.logger.DefaultLogger is instantiated.

Return type

RtdLogger

set_logger_from_parent(parent_id, logger)

Inherit logger from parent.

Parameters
  • parent_id (str) – Unique identifier of parent instance.

  • logger (RtdLogger) – Logger from parent instance.

species_list: _typing.Sequence[str]

List with names of simulating process fluid species.

uo_id: str

Unique identifier of the instance.

gui_title: str

Human readable title (for plots).

adj_par_list: _typing.Sequence[_adj_par.AdjustableParameter]

List of adjustable parameters exposed to the GUI.

IntervalInlet

class bio_rtd.inlet.IntervalInlet(t, f, c_inner, c_outer, species_list, inlet_id, gui_title)[source]

Bases: bio_rtd.core.Inlet

Constant flow rate and box shaped concentration profile.

Parameters
  • t (array) – Simulation time vector. Starts with 0 and has a constant time step.

  • f (float) – Constant flow rate.

  • c_inner (ndarray) – Constant concentration for each specie inside the interval. For single specie use np.array([c_value]).

  • c_outer (ndarray) – Constant concentration for each specie outside the interval. For single specie use np.array([c_value]).

  • species_list (Sequence[str]) – List with names of simulating process fluid species.

  • inlet_id (str) – Unique identifier of an instance. It is stored in uo_id.

  • gui_title (str) – Readable title of an instance. Default = “ConstantInlet”.

Variables
  • t_start – Start of interval, inclusive ( >= ). Default = 0.

  • t_end – End of interval, excluding ( < ). Default = t[-1] + time step.

  • c_inner – Concentrations inside the interval.

  • c_outer – Concentrations outside the interval.

f

Constant flow rate.

c_inner: _np.ndarray

Concentration value for each specie inside the interval.

c_outer: _np.ndarray

Concentration value for each specie outside the interval.

t_start: float

Start of interval, inclusive ( >= ). Default = 0.

get_n_species()

Get number of process fluid species.

Return type

int

get_result()

Get flow rate and concentration profiles.

Return type

Tuple[ndarray, ndarray]

Returns

  • f_out – Flow rate profile.

  • c_out – Concentration profile.

get_t()

Get simulation time vector.

Return type

ndarray

property log

Reference of the RtdLogger instance.

Setter also plants instance data tree into passed logger.

If logger is requested, but not yet set, then a bio_rtd.logger.DefaultLogger is instantiated.

Return type

RtdLogger

set_logger_from_parent(parent_id, logger)

Inherit logger from parent.

Parameters
  • parent_id (str) – Unique identifier of parent instance.

  • logger (RtdLogger) – Logger from parent instance.

species_list: _typing.Sequence[str]

List with names of simulating process fluid species.

uo_id: str

Unique identifier of the instance.

gui_title: str

Human readable title (for plots).

adj_par_list: _typing.Sequence[_adj_par.AdjustableParameter]

List of adjustable parameters exposed to the GUI.

t_end: float

End of interval, excluding ( < ).

Default = t[-1] + time step.

refresh()[source]

Recalculate profiles based on attributes.

CustomInlet

class bio_rtd.inlet.CustomInlet(t, f, c, species_list, inlet_id, gui_title)[source]

Bases: bio_rtd.core.Inlet

Custom flow rate profile and custom concentration profile.

Parameters
  • t (ndarray) – Simulation time vector.

  • f (ndarray) – Custom flow rate profile. Should have the same size as t.

  • c (ndarray) – Custom concentration profiles. c.shape == (len(species_list), t.size)

  • species_list (Sequence[str]) – List with names of simulating process fluid species.

  • inlet_id (str) – Unique identifier of an instance. It is stored in uo_id.

  • gui_title (str) – Readable title of an instance. Default = “ConstantInlet”.

get_n_species()

Get number of process fluid species.

Return type

int

get_result()

Get flow rate and concentration profiles.

Return type

Tuple[ndarray, ndarray]

Returns

  • f_out – Flow rate profile.

  • c_out – Concentration profile.

get_t()

Get simulation time vector.

Return type

ndarray

property log

Reference of the RtdLogger instance.

Setter also plants instance data tree into passed logger.

If logger is requested, but not yet set, then a bio_rtd.logger.DefaultLogger is instantiated.

Return type

RtdLogger

set_logger_from_parent(parent_id, logger)

Inherit logger from parent.

Parameters
  • parent_id (str) – Unique identifier of parent instance.

  • logger (RtdLogger) – Logger from parent instance.

species_list: _typing.Sequence[str]

List with names of simulating process fluid species.

uo_id: str

Unique identifier of the instance.

gui_title: str

Human readable title (for plots).

adj_par_list: _typing.Sequence[_adj_par.AdjustableParameter]

List of adjustable parameters exposed to the GUI.

f: _np.ndarray

Custom flow rate profile. Should be the same size as t.

c: _np.ndarray

Custom concentration profiles.

c.shape == (len(species_list), t.size)

refresh()[source]

Recalculate profiles based on attributes.