bloc.reactors.sizing#
Reactor sizing and heat-recovery helpers.
Functions#
|
Mix two gas streams adiabatically at constant pressure. |
|
qm_in = v * S_in * density <=> v = qm_in / (S_in*density). |
|
|
|
Compute the mass of the reactor based on its dimensions and the insulation layers. |
|
Compute the power recovered from the preheating of the torch and the second injection. |
|
Compute residual heat after recovery in the exchanger. |
|
Compute the H2 yield of the process from the states object. |
|
Compute carbon yield (solid C mass / total C mass in feed). |
Module Contents#
- bloc.reactors.sizing.mix_two_streams(gas_1, qm_1, gas_2, qm_2)#
Mix two gas streams adiabatically at constant pressure.
- Parameters:
gas_1 (
cantera.Solution) – States of the two streams. Only their state, species and reactions are read;gas_1is left exactly as it was found. The two must share a phase name and species list – that pair is whatct.Quantitycompares, see Notes.gas_2 (
cantera.Solution) – States of the two streams. Only their state, species and reactions are read;gas_1is left exactly as it was found. The two must share a phase name and species list – that pair is whatct.Quantitycompares, see Notes.qm_1 (
float) – Mass flow rates of the two streams in kg/s. Only their ratio sets the mixed state; the total scales the returned quantity’s mass.qm_2 (
float) – Mass flow rates of the two streams in kg/s. Only their ratio sets the mixed state; the total scales the returned quantity’s mass.
- Returns:
The mixed stream, with
mass = qm_1 + qm_2. Its.phaseholds the mixed state and no reactions: it answers thermodynamic questions (temperature, enthalpy, composition, elemental fractions). A caller that integrates chemistry on the mixture builds its own carrier from the mechanism and copies the state over – seebloc.reactors.InstantaneousMixing.solve_premixed().- Return type:
Notes
Mass and species mass are conserved and the two enthalpy flows add:
\[\begin{split}\dot m &= \dot m_1 + \dot m_2 \\ Y_k &= \frac{\dot m_1 Y_{k,1} + \dot m_2 Y_{k,2}}{\dot m} \\ h &= \frac{\dot m_1 h_1 + \dot m_2 h_2}{\dot m}\end{split}\]The mixed temperature is the \(T\) that solves \(h(T, P, Y_k) = h\) – an enthalpy balance, not a mass-weighted mean of the inlet temperatures. Mixing 1 kg/s of a H2/CH4 stream at 1700 K with 0.5 kg/s of CH4 at 300 K gives 1446 K, where a mass-weighted mean would say 1233 K, because the two streams’ heat capacities differ.
constant="HP"is what makesct.Quantitysolve that balance, and it also requires a common pressure: it raises when the two differ by more than 1e-7 relative.gas_1is copied becauseQuantity.__add__writes the mixed state into the phase of its left operand and returns aQuantitystill holding that phase. Without the copy, mixing would overwrite the caller’sgas_1and alias it into the result.The copy is built from
gas_1’s own species, with no reactions and no transport model: an enthalpy balance needs neither, and both are the whole cost of the copy on a large mechanism (installing 24041 reactions ~0.4 s, fitting mixture-averaged transport ~3 s, against ~1 ms for species alone). It also works for a phase with no file behind it at all – one frombloc.io.mechanisms.build_lite_solution(). Carrying the name across is what keeps that single route universally usable:ct.Quantitykeys compatibility onhash((phase.name, *phase.species_names)), so a copy left with the default empty name would be refused by agas_2loaded from a file.
- bloc.reactors.sizing.compute_reactor_length(qm_in, S_in, states)#
qm_in = v * S_in * density <=> v = qm_in / (S_in*density).
- qm_in: float
Mass flow rate of the input gas in kg/s
- S_in: float
Section of the reactor in m2
- states: ct.SolutionArray
contains the results of the kinetic simulation
- bloc.reactors.sizing.compute_reactor_dimensions_with_form_factor(qm_in, f_factor, states)#
- bloc.reactors.sizing.get_reactor_mass(L_reactor, d_reactor, e_insul_layers, rho_insul_layers, verbose=False)#
Compute the mass of the reactor based on its dimensions and the insulation layers.
- Parameters:
L_reactor (
float) – Length of the reactor in m.d_reactor (
float) – Diameter of the reactor in m.e_insul_layers (
listoffloat) – Thickness of the insulation layers in m.rho_insul_layers (
listoffloat) – Density of the insulation layers in kg/m3.verbose (
bool) – If True, print detailed information about the function call.
- Returns:
Mass of the reactor in kg.
- Return type:
float
- bloc.reactors.sizing.compute_recovered_power(qm_torch, T_torch_input_C, X_torch_input, qm_2nd_inj, T_2nd_inj_C, X_2nd_inj, P_bar, T_amb, gas_reac, verbose=False)#
Compute the power recovered from the preheating of the torch and the second injection.
\[P_{\mathrm{recovered}} = P_{\mathrm{preheat,torch}} + P_{\mathrm{preheat,2nd}} P_{\mathrm{preheat}} = \dot{m} \, (h_{\mathrm{in}} - h_0)\]
- bloc.reactors.sizing.compute_residual_heat(P_recovered, gas, qm_tot, T_amb_C, verbose=False)#
Compute residual heat after recovery in the exchanger.
\[P_{\mathrm{heat,tot}} = \dot{m}_{\mathrm{tot}} \, (h_{\mathrm{reactor\,out}} - h_{\mathrm{cold\,out}}) P_{\mathrm{residual}} = P_{\mathrm{heat,tot}} - P_{\mathrm{recovered}}\]
- bloc.reactors.sizing.get_H2_yield(states)#
Compute the H2 yield of the process from the states object.
- Parameters:
states (
ct.SolutionArray) – Solution array with the states of the reactor at each time step. states[0] and states[-1] must be the initial and final states of the reactor. Mass is assumed to be conserved between states[0] and states[-1].as (The H2 yield is defined)
subtracted (The initial amount of H2 in the feedstock must be)
produced. (because it is not)
Thus (
H2_yield = (Y_H2_final - Y_H2_initial) / (Y_H_tot - Y_H2_initial))math:: (..) – H2_yield = \frac{Y_{H2,final} - Y_{H2,initial}}{Y_{H,total} - Y_{H2,initial}}
- bloc.reactors.sizing.get_carbon_yield(gas, n_C_min=300)#
Compute carbon yield (solid C mass / total C mass in feed).
Assumes no solid carbon in the input gas. Carbon yield = mass fraction of solid carbon / total mass fraction of carbon element in the input gas.
- Parameters:
gas (
cantera.Solutionorcantera.SolutionArray) – Gas object with composition set.n_C_min (
int, optional) – Minimum number of carbon atoms to treat a species as solid carbon. Default 300. Use 24 for mechanisms that represent soot as large PAH only.