Boundary Conditions¶
Every step specifies what happens at each end of the column through two boundary conditions — one at the Top (\(z = L\)) and one at the Bottom (\(z = 0\)). The boundary condition determines whether gas enters, leaves, or is sealed at that face, and with what driving force.
Every step has a Top and a Bottom boundary. The first choice for each is its boundary condition type.
Boundary condition types¶
Pressure¶
Imposes a specified pressure at the face. Use it for steps controlled by a pressure level — pressurisation, blowdown, or a constant-pressure product outlet.
- As an inlet, you also specify the inlet Temperature and Composition; gas enters at the imposed pressure.
- As an outlet, the temperature and composition are taken from the bed (zero-gradient); gas leaves at the imposed pressure. If the bed falls below the imposed pressure, gas flows back in through the outlet with the bed-end temperature and composition, and the run warns at the end (Backflow through an outlet).
The pressure follows a Pressure Profile over the step (see Profiles below), so you can ramp the pressure up or down during the step. A pump (compressor or vacuum pump) can be attached to compute compression power and heating — see Pumps.
Flow¶
Imposes a molar flow at the face, specified through one or more streams. Use it for feed steps and for flow-controlled purge or product steps.
A Flow boundary contains a list of streams (add them with Add Stream); the total flow is the sum of the streams. Each stream has:
- a Boundary Device Type — None (flow specified directly), Valve (pressure-driven), or Pump (power-driven);
- for a None device, a Flow Type and a flow profile;
- as an inlet, its own Temperature and Composition.
Multiple streams on one face let you, for example, mix a fresh feed with a recycle stream.
Closed¶
A sealed, no-flow end. Nothing enters or leaves; pressure, temperature and composition have zero gradient at the face. Use it for the closed end of a blowdown or equalisation step. A Closed boundary has no further settings.
Flow direction¶
Each boundary has a Flow direction:
- Inlet — gas flows into the reactor. You specify what enters (temperature, composition, and — for a Flow boundary — the flow rate).
- Outlet — gas flows out of the reactor. The leaving gas takes the bed's local temperature and composition.
A step must have at least one non-inlet end (an outlet or a closed end); the two ends cannot both be inlets.
Specifying inlet flow¶
For a Flow boundary with a None device, the Flow Type sets how the rate is expressed. The engine converts each one to a molar flow \(\dot n\) with the column cross-section \(A_c\) and the ideal-gas concentration at the bed-end face:
| Flow Type | Quantity | Molar flow |
|---|---|---|
| Velocity | Superficial velocity \(v\) [m s⁻¹] | \(\dot n = v\thinspace A_c\thinspace C_f\) |
| Volumetric Flow Rate | Volumetric flow \(Q\) [m³ s⁻¹] | \(\dot n = Q\thinspace C_f\) |
| Molar Flow Rate | Molar flow [mol s⁻¹] | \(\dot n\) as given |
| Mass Flow Rate | Mass flow \(\dot m\) [kg s⁻¹] | \(\dot n = \dot m / M_g\) |
with \(P_g\), \(T_g\) the ghost cell's and \(P_1\), \(T_1\) the end cell's values. So a velocity or a volumetric flow is at the actual pressure of the bed end and the face temperature (the inlet temperature while gas flows in), not at standard conditions. \(M_g = \sum_i y_{i,g} M_i\) is the molar mass of the ghost cell, which holds the inlet composition while gas flows in. The sign of a None stream's flow is set by its direction: it always flows into the bed at an inlet and out of it at an outlet, whatever the sign of the entered value.
Inlet composition and temperature¶
At an inlet you set the Temperature and the Composition (a mole fraction for each component). The mole fractions of an inlet must sum to 1. Outlets ignore these fields because the leaving gas is whatever is in the bed. When the flow through an outlet reverses, the gas that flows back into the bed carries the bed-end composition and temperature (zero gradient). An outlet's composition is used in one case: when its backflow feeds another stream that leaves through the same bed end (see Backflow through an outlet).
Several streams on one inlet. The streams of a Flow inlet mix before they enter the bed. With \(\dot n_k\) the molar flow of stream \(k\), \(y_{i,k}\) its composition and \(T_k\) its temperature (after compression heating, for a stream with a pump), the gas that enters has
The composition and temperature of a stream are its buffer tank's (once the source step has run), its connected partner's (once the partner has run), or otherwise the values you entered (see Connecting Beds and buffer tank).
Blend at zero flow. The ghost cell of a Flow inlet does not switch abruptly between the stream values and the end cell's values as the boundary flow passes through zero. It takes the blend
with \(F = \sum_k \dot n_k\) the total flow of the streams and \(u_s = 10^{-6}\) m s⁻¹; the temperature target \(T_{in}\) is blended with \(T_1\) in the same way (\(w = 1\) for \(\lvert F\rvert \ge 5 F_s\)). The weight depends on \(F^2\), so it does not depend on the direction of the flow. A Pressure inlet has no blend: its ghost cell always holds the inlet composition and the temperature \(2T_{in} - T_1\), and when gas leaves through it, the upwinded face takes the bed's gas.
Inlet temperature profile¶
The inlet temperature of a stream (or of a Pressure inlet) can change during the step, for example to ramp a TSA feed or regeneration gas from cold to hot without splitting the step. Pick a Temperature Profile:
- Constant — the default: the single Temperature above, held for the whole step. Decks saved before temperature profiles existed load as Constant and are unchanged.
- Linear — from the Start Temperature \(T_0\) to the Final Temperature \(T_1\) over the Ramp Time \(t_r\), then held at \(T_1\) (it never extrapolates past the end of the ramp):
- Exponential — a first-order approach from \(T_0\) to \(T_1\) whose remaining change has shrunk by the Exponential Factor \(F\) after the ramp time \(t_r\) (the default \(F = 100\) has covered 99 % of the change by then):
- Log-linear — a geometric ramp from \(T_0\) to \(T_1\) over the ramp time, then held at \(T_1\) (see time-varying profiles).
\(t\) is the time since the start of the step, so the ramp restarts every time the step runs. A ramp time of zero is an immediate step to \(T_1\), and a ramp longer than the step simply ends part-way. Switching from Constant starts both temperatures at the current value with a ramp time equal to the step time.
The profile replaces the typed-in temperature only. When the inlet is fed from a buffer tank or a connected stream, the gas keeps that source's temperature as before, and the profile acts as the first-cycle assumption. In an isothermal run inlet temperatures have no effect.
Heating and cooling the column¶
A step can also heat or cool the column through a heating medium: a fluid at a set temperature, constant or ramped with the same profiles as an inlet temperature.
- Jacket. The medium flows over the wall's outer face with heat transfer coefficient \(h_m\), and replaces the ambient exchange while the step runs.
- Internal heat exchanger (optional). The same medium also runs through tubes or plates in the packing and heats the bed directly: \(a_x h_x (T_m - T)\) per bed volume, with \(a_x\) the exchanger's area per bed volume (see internal heat exchanger).
- Steps without a medium keep the ambient exchange.
- The heat the medium puts in and takes out is logged per step and counted in the thermal-energy and cooling-duty KPIs.
- The values are parameters of the step:
step[ID].medium.enabled,.temperature,.heat_transfer_coefficient,.exchanger_area_per_volumeand.exchanger_heat_transfer_coefficient. - This is different from an energy source, which puts a fixed power into a layer whatever its temperature. A medium's heat flow depends on how far the column is from \(T_m\), so it stops once the column reaches \(T_m\).
Time-varying profiles¶
Flow rates, pressures and inlet temperatures can all vary during a step. The Profile Type (for flow) or Pressure-Time Profile (for pressure) offers:
- Constant — a single value held for the whole step.
- Linear — ramps linearly from a Start Value to a Final Value over a Ramp Time.
- Exponential — approaches the Final Value \(v_1\) from the Start Value \(v_0\) with a first-order response: after the ramp time \(t_r\) the change left is \(1/F\) of the initial one, where \(F\) is the Exponential Factor (default 100, i.e. 99 % of the change covered by \(t_r\); it must be greater than 1). The curve keeps approaching \(v_1\) after \(t_r\):
- Log-linear — a geometric ramp from the Start Value \(v_0\) to the Final Value \(v_1\) over the ramp time \(t_r\), then held at \(v_1\). The value is multiplied by the same factor every second, so \(\ln v\) rises linearly:
Ramps are the natural way to model gradual pressurisation or blowdown.
Pressure ramps (a Pressure boundary or a valve) start from the bed pressure at the start of the step, so they have no Start Value. By default (Use Step Time on) the ramp lasts the whole step. Turn it off to give the ramp its own Ramp Time, for example to pressurise in the first 10 s of a 30 s step and hold the final pressure for the rest; the ramp time must be no longer than the step (the run is refused otherwise). Decks saved before this option existed ramp over the step time, as before.
Choosing a pressurisation ramp¶
In upward flow the pressure gradient at the bed inlet scales roughly with \(d\ln P/dt\), the boundary pressure's rate of rise relative to the pressure itself (in the viscous regime \(-\partial P/\partial z \propto \mu R T N / (K P)\), and the molar flux \(N\) needed to fill the bed scales with \(dP/dt\)). A linear ramp from vacuum has its largest relative rise in the first seconds: from 3 kPa to 4.6 bar in 20 s it starts at 7.6 s⁻¹ and ends at 0.05 s⁻¹, which is where a spike in the approach to fluidisation appears. An exponential ramp front-loads the rise even more (35 s⁻¹ at the start). A log-linear ramp holds \(d\ln P/dt\) at \(\ln(P_1/P_0)/t_r\) (0.25 s⁻¹ here) for the whole step, so the gradient is spread evenly. The trade-off is that the bed stays at low pressure for longer (only \(\sqrt{P_0 P_1}\) halfway through) and the pressure rises fastest in absolute terms at the end of the step, so check the approach to fluidisation there too, and the cycle's performance.
A geometric ramp cannot start from or pass through zero, so when the start or final value is zero or negative the log-linear profile ramps linearly instead (for example a flow ramp that starts from zero).
- Double exponential — a two-term decay towards the Final Value: a share \(w\) of the initial excess decays at Rate 1 and the rest at Rate 2 (both in s⁻¹, entered as fitted, not as a 99 % time):
This is the form Estupiñan Perez et al. (2019) fitted to the evacuation pressure of their VSA rig (a fast term for the column gas, a slow one for the pump and piping, \(r_1 = 0.019\) and \(r_2 = 0.101\) s⁻¹), where a single exponential did not describe the measured curve. For a pressure the start is the bed pressure at the start of the step; a rate of zero freezes its term at the start value.
All numeric fields accept expressions and units, e.g.
2 [bar]or a reference to a global variable.
Starting a flow inlet into a bed at low pressure¶
A constant flow inlet switched on at the start of a step into a bed at low pressure (a feed or pressurisation step straight after evacuation or blowdown) is a step change at the boundary: the first cell sees the full molar flux at once while the gas there is thin, so the pressure and velocity at the inlet jump. The integrator often fails its first attempts at such a step, and the engine recovers by retrying (below). Ramping the flow from zero over about 1 s (a Linear profile with Start Value 0 and Ramp Time 1 s, or sk.linear(v, start=0, time=1) in Python) removes the jump and the failed attempts, and changes the amount fed by only half a second's worth of flow. A pressure boundary is smoothed the same way with a short ramp instead of a constant value.
Recovered steps in the log¶
When the integrator (IDA) fails a step (repeated error-test or convergence failures, a linear-solver failure or too much work), the engine retries it up to four times, from a smaller step or, at a step-size floor, from a consistent restart at the last accepted point. A failure the retry gets past is a recovered step:
- it does not stop the run or change the results beyond the integration tolerance;
- the log shows it at level medium as
Step "<name>" recovered step: IDA failure (code <n>) at t=... ; retry k/4 ..., followed by IDA's own message; - it counts in the run statistics,
recovered_steps(New in 0.9.result.stats["recovered_steps"]in Python,stats.recovered_stepsin the CLI--jsonsummary), and in the run-healthSTEP_RETRIESmeasure, which reads the same count.
Only a step whose retries run out is a failure: it is logged at level low with IDA's last message and the run stops. IDA's messages never go to stderr; at level high the log shows every one of them (IDA: ...).
Valves¶
Set a stream's Boundary Device Type to Valve to make its flow pressure-driven rather than prescribed. You enter a Valve Flow Coefficient (Cv) and a pressure profile; the flow through the valve is driven by the pressure difference between the valve's set pressure and the bed. The valve is linear in the pressure difference (Valve::GetMolarFlowRate in core/src/objects/valve.cpp):
so \(C_v\) is in mol s⁻¹ bar⁻¹: a valve with \(C_v = 10\) passes 10 mol/s for a 1 bar difference. Gas flows from the higher to the lower pressure, and the flow reverses if the pressures cross.
The bed side of the law is the pressure at the bed end (the boundary face, the mean of the ghost cell and the end cell). The solver setting settings.valve_bed_pressure ("Valve_Bed_Pressure" in Solver_Settings; IDASettings::valve_bed_pressure_) can instead read the pressure of the end cell, the last cell at that end of the bed, as models that treat the column as a series of well-mixed cells do (toPSAil attaches its valves to the last cell). A connected valve then reads its partner's end cell as well. The two readings differ by the pressure drop over half a cell and agree as the grid is refined; use end_cell only to compare with such a model.
Valves are the mechanism behind pressure equalisation: put a valve on each bed and connect them, and gas flows from the high-pressure bed to the low-pressure one at a rate set by Cv.
Liquid valve law¶
New in 0.19
The valve law endpoint[ID].valve.law (linear, liquid_isa) and the build op set_valve_law.
On a liquid deck a valve takes the ISA (IEC 60534) law for an incompressible liquid. Set endpoint[ID].valve.law to liquid_isa (the default, linear, is the gas law above). The flow is
with \(C_v\) in US gal min⁻¹ psi⁻⁰·⁵, \(N = 6.309 \times 10^{-5}\) m³ s⁻¹ (1 US gal/min), \(p_u = 6894.757\) Pa (1 psi), \(\rho_\text{ref} = 999\) kg m⁻³ (water at 60 °F), \(C\) the liquid EOS at the upstream state and \(M\) the molar mass of the bed-end liquid. \(\Delta P = P_\text{up} - P_\text{down}\) and the flow reverses with it. The square root is smoothed near zero, because a bare \(\sqrt{\lvert\Delta P\rvert}\) has an infinite slope there and the solver's Newton iteration fails when the flow passes through zero:
\(f\) is odd, with the slope \(\delta^{-1/2}\) at zero, and it is \(\operatorname{sign}(g)\sqrt{\lvert g\rvert}\) to better than \(3 \times 10^{-5}\) for \(\lvert g\rvert \ge 1\) kPa. Without a check valve \(g = \Delta P\). With a check valve, \(g\) is the smoothed drop of the check valve below, so the flow is zero for \(\Delta P \le 0\) and its slope is continuous at zero. The opening ramp multiplies the flow as for the gas law. \(x_T\) is not used.
| Symbol | Description | Unit |
|---|---|---|
| \(Q\) | Volumetric flow | m³ s⁻¹ |
| \(C_v\) | Valve flow coefficient | US gal min⁻¹ psi⁻⁰·⁵ |
| \(SG\) | Specific gravity of the upstream liquid | - |
| \(C\) | Molar concentration of the liquid (EOS) | mol m⁻³ |
| \(\Delta P\) | Upstream minus downstream pressure | Pa |
A liquid deck refuses a valve on the linear law, and a gas deck refuses liquid_isa.
Check valve¶
New in 0.9
The check valve (endpoint[ID].valve.check_valve) and the outlet backflow warning (settings.warn_outlet_backflow).
Turn on a valve stream's Check Valve (endpoint[ID].valve.check_valve; Python sk.ValveStream(..., check_valve=True) or endpoint.valve.check_valve = True) to stop the flow from reversing. An outlet then passes gas only out of the bed, and an inlet only into it. While the valve is shut, the stream carries no flow, so the end acts as a closed end for that stream. The closure is smooth: the valve law sees the pressure difference \(\Delta P\) in the stream's direction replaced by
with \(\delta = 10\) Pa (Valve::kCheckValveBand). Beyond 10 Pa this is the plain valve law. A hard cut-off would put a kink in the boundary residual where the flow decays through zero, and the solver's Newton iteration would then fail to converge there.
The check valve is off by default, so decks keep their results. It applies only to an unconnected stream. A connected valve ignores it, because flow both ways through a connection (pressure equalisation, light-product pressurisation) is expected.
Opening ramp¶
New in 0.9
The valve opening ramp (endpoint[ID].valve.opening_start, endpoint[ID].valve.opening_ramp_time).
A real valve takes time to open. A valve stream that opens at once onto a bed at a very different pressure passes its largest flow in the first instant, which can lift the bed (a large approach to fluidisation) at the end it feeds. The opening ramp lets the valve open from a part opening to fully open over a set time from the start of the step. The flow of the valve law is multiplied by the opening fraction
with \(f_0\) the Opening Start (endpoint[ID].valve.opening_start, in (0, 1]) and \(t_r\) the Opening Ramp Time (endpoint[ID].valve.opening_ramp_time, s). The cubic has a zero slope at both ends of the ramp, so the flow has no kink there (a kink would stall the solver's Newton iteration, as for the check valve). The effective coefficient is \(f(t)\thinspace C_v\): the ramp starts at \(f_0 C_v\) and reaches \(C_v\) at \(t_r\).
The defaults, \(f_0 = 1\) and \(t_r = 0\), give a valve that is fully open for the whole step, so decks saved before this option existed keep their results. The ramp applies to connected valves as well. For a valve between two beds (pressure equalisation, light-product pressurisation), give both ends the same ramp: each end is one side of the same valve.
In Python:
import skarstrom as sk
valve = sk.ValveStream("Feed header", pressure=1e5, cv=0.006, opening_start=0.05, opening_ramp_time=20)
print(valve.opening_start, valve.opening_ramp_time)
On a loaded deck, set endpoint.valve.opening_start and endpoint.valve.opening_ramp_time, or the registry paths above. Both accept expressions, for example a global variable shared by the two ends of a connected valve.
Backflow through an outlet¶
An outlet is zero-gradient in composition and temperature, whatever the direction of the flow. When a valve outlet's bed falls below the downstream pressure, or a pressure outlet's set pressure rises above the bed, gas flows back into the bed through the outlet. This gas has the bed-end composition and temperature, not the outlet's y and temperature, and the KPIs do not count it as feed.
If the same step also draws gas from that end, for example a light-product draw to another step, the backflow can feed that draw instead of the bed. The streams that leave through that end then carry a mix: the bed's net outflow at the bed-end composition, plus the back-fed gas at the back-feeding outlet's own composition (its y, normalised). So every component is conserved at the bed end, and the draw does not carry a copy of the bed's gas that the bed never gave. An outlet whose y is all zero has no composition of its own, and its back-fed gas takes the bed-end composition. The light-product decks give their vents the feed's inert (N2). The mix is on the composition only; the temperature of the leaving streams is the bed-end temperature.
At the end of a run, the solver warns when gas flows back in through an outlet that has no connection to another step (Outlet backflow, settings.warn_outlet_backflow). The check is on the last logged cycle. It warns when the gross moles in through one such outlet in one step exceed 0.1 % of the cycle feed (kOutletBackflowFraction; the feed is the gross moles in through every unconnected inlet). The warning names the step, the endpoint, the moles and the fraction of the feed. For a valve, it suggests the check valve. Connected endpoints are not checked.
Pumps: compressors and vacuum pumps¶
A Pump device (or a pump attached to a Pressure boundary) models mechanical compression:
- an inlet uses a compressor (with a Suction Pressure);
- an outlet uses a vacuum pump (with a Discharge Pressure).
The pump settings include an Efficiency Model (constant Isentropic Efficiency, a vacuum-pump curve, or a polynomial), a Polytropic Constant, and an Energy Model (Isothermal or Adiabatic) that determines the outlet-gas temperature rise from compression. The efficiency is evaluated at the pump's suction pressure \(P_1\) (in Pa); the polynomial is the full fifth-degree one:
The vacuum-pump curve is
(defaults \(\eta_{max} = 0.8\), \(\alpha = 19.55\)). The work is the polytropic compression work of the suction volumetric flow \(Q_1\):
with \(n > 1\) the Polytropic Constant. The Energy Model sets the temperature of the compressed gas: Isothermal gives \(T_2 = T_1\), and Adiabatic gives
with the same polytropic \(n\) and no efficiency. At an inlet, \(T_2\) is the temperature of the gas that enters the bed; an isothermal run has no compression heating. The efficiency is applied to this polytropic work, although the constant model's field is named isentropic efficiency.
| Pump | Suction \(P_1\), \(T_1\) | Discharge \(P_2\) |
|---|---|---|
| Compressor (inlet) | the Suction Pressure (for a connected Pump stream, the partner's logged pressure); the inlet (suction) temperature | the bed-end face pressure |
| Vacuum pump (outlet) | the bed-end face pressure and temperature | the Discharge Pressure (for a connected Pump stream, the partner's logged pressure) |
| Symbol | Description | Unit |
|---|---|---|
| \(W\) | Shaft power | W |
| \(\eta\) | Efficiency | - |
| \(n\) | Polytropic constant | - |
| \(P_1\), \(P_2\) | Suction and discharge pressure | Pa |
| \(T_1\), \(T_2\) | Suction and discharge temperature | K |
| \(Q_1\) | Suction volumetric flow | m³ s⁻¹ |
| \(\dot n\) | Molar flow | mol s⁻¹ |
There are two distinct uses:
-
Power-controlled flow — a Pump device on a Flow stream sets the molar flow from a specified power. The power is a constant or the polynomial \(W(P) = a + bP + cP^2 + dP^3 + eP^4 + fP^5\) in the bed-end face pressure \(P\) [Pa]. The flow is the inverse of the work equation,
\[ \dot n = \max\left(0,\ \frac{\eta\thinspace (n-1)}{n}\thinspace \frac{W}{R\thinspace T_1\thinspace g(x)}\right), \qquad x = \left(\frac{P_2}{P_1}\right)^{(n-1)/n} - 1 \]where the head factor is floored smoothly so that a fixed power never gives an infinite flow: with \(x_0 = 1.001^{(n-1)/n} - 1\) (a pressure ratio of 1.001), \(g(x) = x\) for \(x \ge x_0\), \(g(x) = x_0/2 + x^2/(2x_0)\) for \(0 < x < x_0\) and \(g(x) = x_0/2\) for \(x \le 0\). This affects the simulation. 2. Power for post-processing — ticking Calculate pump power on a Pressure boundary or a None stream computes the compression power for reporting, without changing the flow the boundary imposes. The power is \(W\) above with the boundary's molar flow. At an inlet, the energy model's \(T_2\) still sets the temperature of the gas that enters. The recorded power feeds the energy-consumption KPI.
Liquid pump¶
New in 0.19
The pump kind liquid_pump (PumpType::LIQUID_PUMP) and its suction_pressure and discharge_pressure.
On a liquid deck a pump is a liquid pump (pump kind liquid_pump). Its shaft power is the hydraulic power over the efficiency:
with \(v\) the molar volume of the liquid EOS at the suction state, \(\eta\) the efficiency model at the suction pressure, and \(s\) the smoothed closure of the check valve: \(s = 0\) for no pressure rise, so the pump uses no power then, and the power has a continuous slope where the rise starts. On an inlet the pump feeds the bed: \(P_\text{in}\) is the Suction Pressure (endpoint[ID].pump.suction_pressure) and \(P_\text{out}\) the bed-end face pressure. On an outlet it draws from the bed: \(P_\text{in}\) is the bed-end face pressure and \(P_\text{out}\) the Discharge Pressure (endpoint[ID].pump.discharge_pressure). The suction temperature is that of the power of a gas pump: the stream's temperature.
The liquid pump logs the power of a set-flow stream or a pressure end, as Calculate pump power does for a gas, and the power enters the energy-consumption KPI. It does not heat the liquid: the outlet temperature is the inlet temperature (version 1 has no viscous heating). The polytropic constant and the energy model are not used.
A liquid deck refuses a compressor or a vacuum pump, and a gas deck refuses a liquid pump. A Pump stream, whose flow follows from a set power, stays refused on a liquid deck: the flow of a fixed power is \(\eta W / \Delta p\), which has no limit as the pressure rise goes to zero.
import skarstrom as sk
kinds = sk.build_kinds()
print(kinds["pump"], kinds["valve_law"])
Ultimate pressure of a vacuum pump¶
New in 0.9
endpoint[N].pump.ultimate_pressure.
A real vacuum pump cannot pull below its ultimate (blank-off) pressure \(p_{ult}\). A Pump device on an outlet (a vacuum pump stream) takes one as endpoint[N].pump.ultimate_pressure [Pa] (alias step[<step>].<end>[<stream>].pump.ultimate_pressure). The flow that the power gives is multiplied by the effective-speed factor of a rotary pump,
with \(P_1\) the bed-end (suction) pressure. Within 2 % of the ultimate pressure (\(f < 0.02\)) the factor is rounded to \(2u^2/d - u^3/d^2\) (\(u = 1 - p_{ult}/P_1\), \(d = 0.02\)), so it falls to zero with a zero slope: the residual stays smooth for the integrator. At and below \(p_{ult}\) the pump delivers no gas, so the bed pressure approaches \(p_{ult}\) from above and is held there. The shaft power is unchanged (the pump keeps running at blank-off), so the energy KPIs still count it. The default, 0, turns the factor off, and a deck saved before 0.9 loads with it off. An inlet (compressor) stream has no ultimate pressure.
import skarstrom as sk
from skarstrom import ureg as u
sim = sk.examples.Perez2019_A.load()
evac = sim.steps["Evacuation"]
evac.bottom.set_streams("outlet", [sk.PumpStream("Vacuum pump", power=10,
pump=sk.Pump("vacuum_pump", efficiency_model="vacuum_pump",
discharge_pressure=1e5, ultimate_pressure=10 * u.kPa))])
sim.run(cycles=1)
end = next(r for r in sim.step_end_pressures() if r.step_name == "Evacuation")
print(end.bottom) # >= 1e4 Pa
To bound the pressure an evacuation ends at in a study or an optimisation, use the step-end pressure outputs.
Pumping speed of a vacuum pump¶
New in 0.19
endpoint[N].pump.speed.
A fixed shaft power drives a flow \(\propto W / (P_1\thinspace x)\) that has no limit as the pressure ratio goes to 1. A vacuum pump opened on a bed at about its discharge pressure (the start of a blowdown from 1 bar) therefore draws the capped flow of the regularised head factor \(g(x)\) for the first instants: on a 0.3 m column this is several hundred times the step's typical flow, and the approach to fluidisation can exceed 30. A real positive-displacement vacuum pump cannot do this: its pumping speed \(S\) (the volume it displaces per second at the suction state, the value on a vendor datasheet) limits the flow.
A Pump stream on an outlet (a vacuum pump stream) takes the speed as endpoint[N].pump.speed [m³/s] (alias step[<step>].<end>[<stream>].pump.speed). The suction volumetric flow is then the smaller of the power-driven flow \(Q_W\) (the work equation above) and the speed,
with \(f\) the ultimate-pressure factor. Where \(Q_W\) and \(S\) are within \(d = 0.02\thinspace S\) of each other, the minimum is rounded to \((Q_W + S)/2 - (Q_W - S)^2/(4d) - d/4\), so the residual stays smooth for the integrator. The logged shaft power is the power for the delivered flow: \(W\thinspace Q_1 / Q_W\). It is \(W\) while the power limits the flow, and less while the speed limits it (near zero while the bed end is at or above the discharge pressure, where the pump moves gas without compressing it). The energy KPIs count this power.
Two uses:
- A power-limited pump with a speed limit. Give the motor power and the pump's speed. The pump runs at its speed near the atmosphere, and at its power at low suction pressure.
- A speed-driven pump. Give the speed and a power far above what the pump uses (for example 10 times). The flow is then \(S\thinspace P_1 / (R T_1)\) at every pressure, and the power follows from the flow. Unlike a power that unloads at the discharge pressure, \(W_{max}(1 - P/p_{atm})\), this pump also starts when the bed end is above the discharge pressure.
The default, 0, turns the speed off (the flow follows the power alone), and a deck saved before 0.19 loads with it off. An inlet (compressor) stream has no speed.
import skarstrom as sk
sim = sk.examples.Perez2019_A.load()
evac = sim.steps["Evacuation"]
evac.bottom.set_streams("outlet", [sk.PumpStream("Vacuum pump", power=100,
pump=sk.Pump("vacuum_pump", efficiency_model="vacuum_pump",
discharge_pressure=1e5, speed=2e-4))])
sim.run(cycles=1)
flow = sim.stream_series(2, "Vacuum pump", "molar_flow_rate") # step 2: Evacuation
print(abs(flow.values).max()) # mol/s, at most S P1 / (R T1)
Drawing gas from another step (buffer tank)¶
An inlet can be fed from the gas produced by another step instead of from values you type in. Tick Use buffer tank from another step under Inlet Source, choose the source step and endpoint, and set the percentage of that step's produced moles to draw. This is the basis of averaged light reflux and recycle, which gives the averaging formulas. Only a None stream takes its flow from the tank. A Valve or Pump stream and a Pressure inlet take only the tank's temperature and composition; their flow still follows the valve law, the pump power or the boundary pressure.
Next, learn how to couple two beds together in Connecting Beds.