Mass balances¶
PFR mass balance.
- class reactord.flowreactors.stationary_1d.pfr.mass_balances.MolarFlow(molar_flows_in: dict = {}, molar_flows_out: dict = {})[source]¶
Bases:
objectPFR Molar Flow class.
\[\frac{1}{a_t}\frac{dF_i}{dz}=r_i\]\(a_t\): reactor’s transversal area.\(F_i\): molar flow of the i-th substance.\(z\): reactor’s length coordinate.\(r_i\): reaction rate of the i-th substance.- Parameters:
molar_flows_in (dict, optional) – Molar flow in the inlet reactor section
molar_flows_out (dict, optional) – Molar flow in the out reactor section
- property irepr¶
Represent for ipython.
- initial_profile(reactor: PFR)[source]¶
Set initial profile in PFR.
- Parameters:
reactor (PFR) – PFR object
- Returns:
initial mass profile in all grid
- Return type:
ndarray
- Raises:
ValueError – Raise to guarantee one condition (inlet or outlet) for each substance
ValueError – Raise to guarantee border condition
Energy balances¶
PFR energy balance.
- class reactord.flowreactors.stationary_1d.pfr.energy_balances.Adiabatic(temperature_in_or_out: dict)[source]¶
Bases:
objectPFR Adiabatic energy balance.
\[\frac{1}{a_t}\frac{dT}{dz}=\frac{\sum\Delta{H_j}_{(TP)}r_{j}}{{c_p}_ {mix}{\sum}F_i}\]\[\frac{dT_r}{dz}=0\]\(a_t\): reactor’s transversal area.\(T\): reactor’s temperature.\(T_r\): refrigerant’s temperature.\(z\): reactor’s length coordinate.\(\Delta{H_j}_{(TP)}\): enthalpy of j-th reaction.\(r_{j}\): rate of j-th reaction.\({c_p}_{mix}\): mixture’s heat capacity.\(F_i\): molar flow of the i-th substance.- Parameters:
temperature_in_or_out (dict) – Temperature of reactive mixture in the inlet or outlet position. Use {“in”: 200} for 200 K at inlet or {“out”: 200} for 200 K at outlet.
- Raises:
NotImplementedError –
Both in and out border condition for temperature not implemented. –
- property irepr¶
Represent for ipython.
- initial_profile(reactor: PFR) ndarray[Any, dtype[float64]][source]¶
Set initial energy profile in adiabatic PFR.
- Parameters:
reactor (PFR) – PFR object
- Returns:
initial temperature profile in all reactor’s length grid.
- Return type:
NDArray[np.float64]
- update_profile(reactor: PFR, variables: ndarray[Any, dtype[float64]]) None[source]¶
Update PFR’s temperature profile.
- Parameters:
reactor (PFR) – PFR object.
variables (NDArray[np.float64]) – Variables of solve_bvp ode solver.
- class reactord.flowreactors.stationary_1d.pfr.energy_balances.Isothermic(temperature: float)[source]¶
Bases:
objectPFR isothermic energy balance.
\[\frac{dT}{dz}=0\]\[\frac{dT_r}{dz}=0\]\(T\): reactor’s temperature.\(T_r\): refrigerant’s temperature.\(z\): reactor’s length coordinate.- Parameters:
temperature (float) – Isothermic temperature
- property irepr¶
Represent for ipython.
- initial_profile(reactor: PFR) ndarray[Any, dtype[float64]][source]¶
Set initial energy profile in isothermic PFR.
- Parameters:
reactor (PFR) – PFR object
- Returns:
initial temperature profile in all grid
- Return type:
NDArray[np.float64]
- update_profile(reactor: PFR, variables: ndarray[Any, dtype[float64]]) None[source]¶
Update PFR’s temperature profile.
- Parameters:
reactor (PFR) – PFR object.
variables (NDArray[np.float64]) – Variables of solve_bvp ode solver.
- class reactord.flowreactors.stationary_1d.pfr.energy_balances.NoIsothermicAllConstant(temperature_in_or_out: dict, refrigerant_in_temperature: float, heat_exchange_coefficient: float)[source]¶
Bases:
objectPFR noisothermic energy balance.
Refrigerant’s temperature and heat exchange coefficient U remains constant.
\[\frac{1}{a_t}\frac{dT}{dz}=\frac{Ua(T_r-T)+\sum\Delta{H_j}r_{j}}{{c_p}_ {mix}{\sum}F_i}\]\[\frac{dT_r}{dz}=0\]\(a_t\): reactor’s transversal area.\(U\): heat exchange coefficient.\(a\): reactor’s heat exchange area per reactor’s volume.\(T\): reactor’s temperature.\(T_r\): refrigerant’s temperature.\(z\): reactor’s length coordinate.\(\Delta{H_j}_{(TP)}\): enthalpy of j-th reaction.\(r_{j}\): rate of j-th reaction.\({c_p}_{mix}\): mixture’s heat capacity.\(F_i\): molar flow of the i-th substance.- Parameters:
temperature_in_or_out (dict) – Temperature of reactive mixture in the inlet or outlet position. Use {“in”: 200} for 200 K at inlet or {“out”: 200} for 200 K at outlet.
refrigerant_in_temperature (float) – Refrigerant temperature. [K]
heat_exchange_coefficient (float) – Heat exchange coefficient. [J/K/s/m²]
- property irepr¶
Represent for ipython.
- initial_profile(reactor: PFR) ndarray[Any, dtype[float64]][source]¶
Set initial energy profile in noisothermic PFR.
- Parameters:
reactor (PFR) – PFR object
- Returns:
initial temperature profile in all grid
- Return type:
NDArray[np.float64]
- update_profile(reactor: PFR, variables: ndarray[Any, dtype[float64]]) None[source]¶
Update the reactor’s temperature profile.
- Parameters:
reactor (PFR) – PFR object.
variables (NDArray[np.float64]) – Variables of solve_bvp ode solver.
- class reactord.flowreactors.stationary_1d.pfr.energy_balances.NoIsothermicUConstant(temperature_in_or_out: dict, refrigerant_in_temperature: float, heat_exchange_coefficient: float, refrigerant_mix: AbstractMix, refrigerant_composition: ndarray[Any, dtype[float64]], refrigerant_pressure: float, refrigerant_molar_flow: float, heat_exchange_arrangement: str = 'co-current')[source]¶
Bases:
NoIsothermicAllConstantPFR noisothermic energy balance.
Heat exchange coefficient U remains constant. Refrigerant’s pressure profile, composition profile and volumetric flow are assumed constant.
\[\frac{1}{a_t}\frac{dT}{dz}=\frac{Ua(T_r-T)+\sum\Delta{H_j}r_{j}}{{c_p}_ {mix}{\sum}F_i}\]\[\text{Co-current refrigerant energy balance: } \frac{1}{a_t}\frac{dT_r}{dz}=\frac{Ua(T-T_r)}{{c_p}_{r}{\sum}F_i}\]\[\text{Counter-current refrigerant energy balance: } \frac{1}{a_t}\frac{dT_r}{dz}=\frac{Ua(T_r-T)}{{c_p}_{r}{\sum}F_i}\]\(a_t\): reactor’s transversal area.\(U\): heat exchange coefficient.\(a\): reactor’s heat exchange area per reactor’s volume.\(T\): reactor’s temperature.\(T_r\): refrigerant’s temperature.\(z\): reactor’s length coordinate.\(\Delta{H_j}_{(TP)}\): enthalpy of j-th reaction.\(r_{j}\): rate of j-th reaction.\({c_p}_{mix}\): mixture’s heat capacity.\({c_p}_{r}\): refrigerant’s heat capacity.\(F_i\): molar flow of the i-th substance.- Parameters:
temperature_in_or_out (dict) – Temperature of reactive mixture in the inlet or outlet position. Use {“in”: 200} for 200 K at inlet or {“out”: 200} for 200 K at outlet.
refrigerant_in_temperature (float) – Refrigerant temperature. [K]
heat_exchange_coefficient (float) – Heat exchange coefficient. [J/K/s/m²]
refrigerant_mix (AbstractMix) – Refrigerant mixture.
efrigerant_composition (NDArray[np.float64]) – Mole fractions of the refrigerant mixture substances.
refrigerant_pressure (float) – Refrigerant’s pressure. [Pa]
refrigerant_moalr_flow (float) – Refrigerant’s molar flow. [mol/s]
heat_exchange_arrangement (str, optional) – Options: ‘co-current’, ‘counter-current’, by default ‘co-current’.
Pressure balances¶
PFR pressure balance.
- class reactord.flowreactors.stationary_1d.pfr.pressure_balances.Ergun(pressure: dict, porosity: float, particle_diameter: float)[source]¶
Bases:
objectPFR Ergun energy balance class.
\[\frac{dP}{dz}=-\frac{G}{{\rho}D_p}\left(\frac{1-\phi}{\phi^3} \right)\left[\frac{150(1-\phi)\mu}{D_p}+1.75G\right]\]- Parameters:
pressure (dict) – pressure of each substance in the inlet or outlet position.
porosity (float) – Packed bed porosity float between 0 and 1.
particle_diameter (float) – Diameter of particle of packed bed. [m]
- Raises:
ValueError – Only inlet or outlet border condition for pressure are allowed.
- property irepr¶
Represent for ipython.
- initial_profile(reactor: PFR) ndarray[Any, dtype[float64]][source]¶
Set initial pressure profile in non-isobaric PFR.
- Parameters:
reactor (PFR) – PFR object
- Returns:
initial pressure profile in all grid
- Return type:
NDArray[np.float64]
- update_profile(reactor: PFR, variables: ndarray[Any, dtype[float64]]) None[source]¶
Update th reactor’s presure profile.
- Parameters:
reactor (PFR) – PFR object.
variables (NDArray[np.float64]) – Variables of solve_bvp ode solver.
- class reactord.flowreactors.stationary_1d.pfr.pressure_balances.Isobaric(pressure: float)[source]¶
Bases:
objectPFR isobaric energy pressure class.
\[\frac{dP}{dz}=0\]\(P\): reactor’s pressure.\(z\): reactor’s length coordinate.- Parameters:
pressure (float) – Isobaric pressure.
- property irepr¶
Represent for ipython.
- initial_profile(reactor: PFR) ndarray[Any, dtype[float64]][source]¶
Set initial pressure profile in non-isobaric PFR.
- Parameters:
reactor (PFR) – PFR object.
- Returns:
initial pressure profile in all grid.
- Return type:
NDArray[np.float64]
- update_profile(reactor: PFR, variables: ndarray[Any, dtype[float64]]) None[source]¶
Update th reactor’s presure profile.
- Parameters:
reactor (PFR) – PFR object.
variables (NDArray[np.float64]) – Variables of solve_bvp ode solver.