Piston Flow Reactor package¶
Reactor¶
PFR construction.
- class reactord.flowreactors.stationary_1d.pfr.PFR(kinetic: Kinetic, reactor_length: float, transversal_area: float, grid_size: int, mass_balance, energy_balance, pressure_balance)[source]¶
Bases:
objectPiston flow reactor.
No radial and no axial dispersion tubular reactor. Reaction on the tube side.
- Parameters:
kinetic (Kinetic) – kinetic object.
reactor_length (float) – Reactor length. [m]
transversal_area (float) – Reactor transversal area. [m²]
grid_size (int) – Number of discretization points of the reactor’s length.
mass_balance – Mass balance setting.
energy_balance – Energy balance setting.
pressure_balance – Pressure balance setting.
- property mix¶
Set mix of reaction.
- initial_profile_builder() None[source]¶
Construct initial profile of the reactor’s dependent variables.
Constructs the initial profile calling the initial_profile() method of each balance. This method sets the molar flow profile, reactor’s temperature, refrigerant’s temperature and reactor’s pressure over the reactor’s length.
- border_conditions_builder() None[source]¶
Extract the border conditions of each balance.
Constructs the border conditions calling the border_conditions() method of each balance.
- border_conditions(ya, yb) ndarray[Any, dtype[float64]][source]¶
Border condition builder for scipy.solve_bvp.
- Parameters:
ya (List[float]) – Border conditions on reactor’s inlet.
yb (List[float]) – Border conditions on reactor’s outlet.
- Returns:
Border conditions for scipy.solve_bvp.
- Return type:
NDArray[np.float64]
- evaluate_balances(z: ndarray[Any, dtype[float64]], variables: ndarray[Any, dtype[float64]]) ndarray[Any, dtype[float64]][source]¶
Evaluate mass, energy and pressure balance.
- Parameters:
z (NDArray[np.float64]) – Reactor length
Variables (NDArray[np.float64]) – Matrix of the molar flows, temperatures and pressure over the reactor’s length.
- Returns:
Matrix of the gradients of molar flows, temperatures and pressure over the reactor’s length.
- Return type:
NDArray[np.float64]
- simulate(tol=0.001, max_nodes=1000, verbose=0, bc_tol=None) None[source]¶
Simulate reactor.
- Parameters:
tol (_type_, optional) – Scipy solve_bvp tol value, by default 1e-3
max_nodes (int, optional) – Scipy solve_bvp max_nodes value, by default 1000
verbose (int, optional) – Scipy solve_bvp verbose parameter, by default 0
bc_tol (optional) – Scipy solve_bvp bc_tol value, by default None
- property irepr: None¶
Represent for ipython.