Skip to content

Latest commit

 

History

History
284 lines (174 loc) · 12.4 KB

control_volume_0d.rst

File metadata and controls

284 lines (174 loc) · 12.4 KB

0D Control Volume Class

Contents

The ControlVolume0DBlock block is the most commonly used Control Volume class, and is used for systems where there is a well-mixed volume of fluid, or where variations in spatial domains are considered to be negligible. ControlVolume0DBlock blocks generally contain two StateBlocks <technical_specs/core/physical_property_class:State Blocks> - one for the incoming material and one for the material within and leaving the volume - and one StateBlocks <technical_specs/core/reaction_property_class:Reaction Blocks>.

idaes.core.control_volume0d

ControlVolume0DBlock

ControlVolume0DBlockData

ControlVolume0DBlock Equations

This section documents the variables and constraints created by each of the methods provided by the ControlVolume0DBlock class.

  • t indicates time index
  • p indicates phase index
  • j indicates component index
  • e indicates element index
  • r indicates reaction name index

add_geometry

The add_geometry method creates a single variable within the control volume named volume indexed by time (allowing for varying volume over time). A number of other methods depend on this variable being present, thus this method should generally be called first.

Variables

Variable Name Symbol Indices Conditions
volume Vt t None

Constraints

No additional constraints

add_phase_component_balances

Material balances are written for each component in each phase (e.g. separate balances for liquid water and steam). Physical property packages may include information to indicate that certain species do not appear in all phases, and material balances will not be written in these cases (if has_holdup is True holdup terms will still appear for these species, however these will be set to 0).

Variables

Variable Name Symbol Indices Conditions
material_holdup Mt, p, j t, p, j has_holdup = True
phase_fraction ϕt, p t, p has_holdup = True
material_accumulation $\frac{\partial M_{t,p,j}}{\partial t}$ t, p, j dynamic = True
rate_reaction_generation Nkinetic, t, p, j t, p ,j has_rate_reactions = True
rate_reaction_extent Xkinetic, t, r t, r has_rate_reactions = True
equilibrium_reaction_generation Nequilibrium, t, p, j t, p ,j has_equilibrium_reactions = True
equilibrium_reaction_extent Xequilibrium, t, r t, r has_equilibrium_reactions = True
phase_equilibrium_generation Npe, t, p, j t, p ,j has_phase_equilibrium = True
mass_transfer_term Ntransfer, t, p, j t, p ,j has_mass_transfer = True

Constraints

`material_balances(t, p, j)`:

$$\frac{\partial M_{t, p, j}}{\partial t} = F_{in, t, p, j} - F_{out, t, p, j} + N_{kinetic, t, p, j} + N_{equilibrium, t, p, j} + N_{pe, t, p, j} + N_{transfer, t, p, j} + N_{custom, t, p, j}$$

The Ncustom, t, p, j term allows the user to provide custom terms (variables or expressions) in both mass and molar basis which will be added into the material balances, which will be converted as necessary to the same basis as the material balance (by multiplying or dividing by the component molecular weight). The basis of the material balance is determined by the physical property package, and if undefined (or not mass or mole basis), an Exception will be returned.

If has_holdup is True, `material_holdup_calculation(t, p, j)`:


Mt, p, j = ρt, p, j × Vt × ϕt, p

where ρt, p, j is the density of component j in phase p at time t

If dynamic is True:

Numerical discretization of the derivative terms, $\frac{\partial M_{t,p,j}}{\partial t}$, will be performed by Pyomo.DAE.

If has_rate_reactions is True, `rate_reaction_stoichiometry_constraint(t, p, j)`:


Nkinetic, t, p, j = αr, p, j × Xkinetic, t, r

where αr, p.j is the stoichiometric coefficient of component j in phase p for reaction r (as defined in the PhysicalParameterBlock).

If has_equilibrium_reactions argument is True, `equilibrium_reaction_stoichiometry_constraint(t, p, j)`:


Nequilibrium, t, p, j = αr, p, j × Xequilibrium, t, r

where αr, p.j is the stoichiometric coefficient of component j in phase p for reaction r (as defined in the PhysicalParameterBlock).

add_total_component_balances

Material balances are written for each component across all phases (e.g. one balance for both liquid water and steam). Most terms in the balance equations are still indexed by both phase and component however. Physical property packages may include information to indicate that certain species do not appear in all phases, and material balances will not be written in these cases (if has_holdup is True holdup terms will still appear for these species, however these will be set to 0).

Variables

Variable Name Symbol Indices Conditions
material_holdup Mt, p, j t, p, j has_holdup = True
phase_fraction ϕt, p t, p has_holdup = True
material_accumulation $\frac{\partial M_{t,p,j}}{\partial t}$ t, p, j dynamic = True
rate_reaction_generation Nkinetic, t, p, j t, p ,j has_rate_reactions = True
rate_reaction_extent Xkinetic, t, r t, r has_rate_reactions = True
equilibrium_reaction_generation Nequilibrium, t, p, j t, p ,j has_equilibrium_reactions = True
equilibrium_reaction_extent Xequilibrium, t, r t, r has_equilibrium_reactions = True
mass_transfer_term Ntransfer, t, p, j t, p ,j has_mass_transfer = True

Constraints

`material_balances(t, j)`:

$$\sum_p{\frac{\partial M_{t, p, j}}{\partial t}} = \sum_p{F_{in, t, p, j}} - \sum_p{F_{out, t, p, j}} + \sum_p{N_{kinetic, t, p, j}} + \sum_p{N_{equilibrium, t, p, j}} + \sum_p{N_{pe, t, p, j}} + \sum_p{N_{transfer, t, p, j}} + N_{custom, t, j}$$

The Ncustom, t, j term allows the user to provide custom terms (variables or expressions) in both mass and molar basis which will be added into the material balances, which will be converted as necessary to the same basis as the material balance (by multiplying or dividing by the component molecular weight). The basis of the material balance is determined by the physical property package, and if undefined (or not mass or mole basis), an Exception will be returned.

If has_holdup is True, `material_holdup_calculation(t, p, j)`:


Mt, p, j = ρt, p, j × Vt × ϕt, p

where ρt, p, j is the density of component j in phase p at time t

If dynamic is True:

Numerical discretization of the derivative terms, $\frac{\partial M_{t,p,j}}{\partial t}$, will be performed by Pyomo.DAE.

If has_rate_reactions is True,, `rate_reaction_stoichiometry_constraint(t, p, j)`:


Nkinetic, t, p, j = αr, p, j × Xkinetic, t, r

where αr, p.j is the stoichiometric coefficient of component j in phase p for reaction r (as defined in the PhysicalParameterBlock).

If has_equilibrium_reactions argument is True, `equilibrium_reaction_stoichiometry_constraint(t, p, j)`:


Nequilibrium, t, p, j = αr, p, j × Xequilibrium, t, r

where αr, p.j is the stoichiometric coefficient of component j in phase p for reaction r (as defined in the PhysicalParameterBlock).

add_total_element_balances

Material balances are written for each element in the mixture.

Variables

Variable Name Symbol Indices Conditions
element_holdup Mt, e t, e has_holdup = True
phase_fraction ϕt, p t, p has_holdup = True
element_accumulation $\frac{\partial M_{t,e}}{\partial t}$ t, e dynamic = True
elemental_mass_transfer_term Ntransfer, t, e t, e has_mass_transfer = True

Expressions

`elemental_flow_in(t, p, e)`:


Fin, t, p, e = ∑jFin, t, p, j × nj, e

`elemental_flow_out(t, p, e)`:


Fout, t, p, e = ∑jFout, t, p, j × nj, e

where nj, e is the number of moles of element e in component j.

Constraints

`element_balances(t, e)`:

$$\frac{\partial M_{t, e}}{\partial t} = \sum_p{F_{in, t, p, e}} - \sum_p{F_{out, t, p, e}} + \sum_p{N_{transfer, t, e}} + N_{custom, t, e}$$

The Ncustom, t, e term allows the user to provide custom terms (variables or expressions) which will be added into the material balances.

If has_holdup is True, `elemental_holdup_calculation(t, e)`:


Mt, e = Vt × ∑p, jϕt, p × ρt, p, j × nj, e

where ρt, p, j is the density of component j in phase p at time t

If dynamic is True:

Numerical discretization of the derivative terms, $\frac{\partial M_{t,e}}{\partial t}$, will be performed by Pyomo.DAE.

add_total_enthalpy_balances

A single enthalpy balance is written for the entire mixture.

Variables

Variable Name Symbol Indices Conditions
energy_holdup Et, p t, p has_holdup = True
phase_fraction ϕt, p t, p has_holdup = True
energy_accumulation $\frac{\partial E_{t,p}}{\partial t}$ t, p dynamic = True
heat Qt t has_heat_transfer = True
work Wt t has_work_transfer = True
enthalpy_transfer Htransfer, t t has_enthalpy_transfer = True

Expressions

`heat_of_reaction(t)`:


Qrxn, t = sumrXkinetic, t, r × ΔHrxn, r + sumrXequilibrium, t, r × ΔHrxn, r

where Qrxn, t is the total enthalpy released by both kinetic and equilibrium reactions, and ΔHrxn, r is the specific heat of reaction for reaction r.

Parameters

Parameter Name Symbol Default Value
scaling_factor_energy senergy 1E-6

Constraints

`enthalpy_balance(t)`:

$$s_{energy} \times \sum_p{\frac{\partial E_{t, p}}{\partial t}} = s_{energy} \times \sum_p{H_{in, t, p}} - s_{energy} \times \sum_p{H_{out, t, p}} + s_{energy} \times Q_t + s_{energy} \times W_t + + s_{energy} \times H_{transfer,t} +s_{energy} \times Q_{rxn, t} + s_{energy} \times E_{custom, t}$$

The Ecustom, t term allows the user to provide custom terms which will be added into the energy balance.

If has_holdup is True, `enthalpy_holdup_calculation(t, p)`:


Et, p = ut, p × Vt × ϕt, p

where ut, p is the internal energy density (specific internal energy) of phase p at time t

If dynamic is True:

Numerical discretization of the derivative terms, $\frac{\partial E_{t,p}}{\partial t}$, will be performed by Pyomo.DAE.

add_total_pressure_balances

A single pressure balance is written for the entire mixture.

Variables

Variable Name Symbol Indices Conditions
deltaP ΔPt t has_pressure_change = True

Parameters

Parameter Name Symbol Default Value
scaling_factor_pressure spressure 1E-4

Constraints

`pressure_balance(t)`:


0 = spressure × Pin, t − spressure × Pout, t + spressure × ΔPt + spressure × ΔPcustom, t

The ΔPcustom, t term allows the user to provide custom terms which will be added into the pressure balance.