-Time Sections
-Time sections are used to specify changes of parameter values during the simulation.
-A section typically corresponds to an operating step (load, wash, elute etc.), but can also be used to indicate changes in connectivity, or even discontinuities of model parameters.
-In the /input/solver/sections/
group, nsec
denotes the number of sections.
-The start and end times of a section are given in the section_times
vector.
-It should always start at 0.0
and contains nsec + 1
values, that is, the i
th section goes from section_times[i]
to section_times[i+1]
.
-The section_continuity
indicates whether a transition from one section to the next is continuous in both the inlet and the parameters.
-It has nsec - 1
number of values, since there is one transition less than there are sections.
-The continuity is used in CADET’s time integrator, which needs to decide whether to restart on entering a new section.
-If the transition is continuous, the time integrator can try to step over the transition without restarting, thus saving some computation time (since the restart is costly).
-If you are unsure about the continuity, just leave it at 0
.
-model.root.input.solver.sections.nsec = 1
-model.root.input.solver.sections.section_times = [0.0, 1200,] # s
-model.root.input.solver.sections.section_continuity = []
-
-
-As mentioned earlier, we now define the INLET
profile using a piecewise cubic polynomial.
-On each section \([ t_i, t_{i+1} ]\) a cubic polynomial \(p_i\) is defined:
-
-\[p_i( t ) = d * (t - t_i)^3 + c * (t - t_i)^2 + b * (t - t_i) + a,\]
-where the coefficients of the polynomial are const_coeff
(a), lin_coeff
(b), quad_coeff
(c), and cube_coeff
(d).
-Note that the constant coefficient const_coeff
determines the starting concentration on each section.
-The stopping concentration is given by \(p_i( t_{i+1} )\) or \(p_{i+1}( t_{i+1} )\) in case of a continuous profile.
-In this example, which has only one section, we define its coefficients by adding the field sec_000
to the inlet unit (unit_000
).
-Since the column should be constantly fed with \(1.0 \cdot 10^{-3} mol / m^3\), we set const_coeff
to [1.0e-3]
and all other cofficients to [0.0]
.
-Note that for more components, a vector of coefficients needs to be specified.
-model.root.input.model.unit_000.sec_000.const_coeff = [1.0e-3,] # mol / m^3
-model.root.input.model.unit_000.sec_000.lin_coeff = [0.0,]
-model.root.input.model.unit_000.sec_000.quad_coeff = [0.0,]
-model.root.input.model.unit_000.sec_000.cube_coeff = [0.0,]
-
-
-
-
-System Connectivity
-In order to specify the connectivity of the network, we have to provide a list of connections.
-CADET requires that we append all connections to a long vector (i.e., if each connection is a row in a matrix, CADET wants this matrix in row-major storage).
-Moreover, we have to specify the section in which the specified connectivity should be applied.
-The elements of a connection are (in order):
-
-[UnitOpID from, UnitOpID to, Component from, Component to, Volumetric flow rate]
-
-Usually, Component from
and Component to
can be set to -1
, which will connect all components from the origin and destination unit operations.
-
-
Note
-
Since CADET version 4.1, the flow rates can also be defined with piecewise cubic polynomials.
-Also, for the 2D General rate model inlet ports need to be speciefied.
-For more information on the parameters, see the file format specification.
-
-In this case, we connect all components of unit_000
to unit_001
, and from unit_001
to unit_002
.
-model.root.input.model.connections.nswitches = 1
-model.root.input.model.connections.switch_000.section = 0
-model.root.input.model.connections.switch_000.connections = [
- 0, 1, -1, -1, 60/1e6, # [unit_000, unit_001, all components, all components, Q/ m^3*s^-1
- 1, 2, -1, -1, 60/1e6] # [unit_001, unit_002, all components, all components, Q/ m^3*s^-1
-
-
-
-
Note
-
Since the flow in the column models is incompressible, the total entering flow rate must equal the total outgoing flow rate.
-This restriction does not apply to a CSTR model, because it has a variable volume.
-
-
-