FCSys uses four types of declarative connectors. The chemical connectors (Chemical and Reaction) represent the diffusion of material and the advection of other quantities among configurations (i.e., species in particular phases) that react chemically within a subregion. The inert connectors (Intra, Inter, Inert, and InertNode) describe the diffusive exchange of momentum and energy among configurations within a subregion. The mixing connectors (Amagat and Dalton) describe how species are combined within a phase and how phases are combined within a subregion. The boundary connectors (Boundary and BoundaryBus) describe the transport between neighboring regions or subregions.
Figure 1 shows the hierarchy of the declarative connectors. The top row contains a bus connector (BoundaryBus), which expands to group the Boundary connectors of multiple species. The connectors in the middle row are flat; they build on the connectors of the bottom row by extension. Each icon on the bottom row represents one effort/flow pair, which may or may not be implemented as a separate connector. The Chemical connector also has stream variables to represent the advection of translational momentum and thermal energy.
Figure 1: Hierarchy of the connectors.
The Chemical connector is used for a single species in a chemical reaction or phase change process. It expresses the rate of consumption or generation of a species at a chemical potential. The Reaction connector is used for the chemical reaction as a whole. It has chemical potential as a flow and current as an effort (opposite designations of the Chemical connector). It sums the stoichiometrically weighted chemical potentials of the species participating in a reaction. Its effort variable is the rate of the reaction. Chemical and Reaction cannot be directly connected because they have opposite efforts and flows. An adapter must be used (e.g., ChemicalReaction), which applies the stoichiometry.
The Amagat connector imposes Amagat's law of partial volumes and is used to combine material phases within a subregion. The Dalton connector applies Dalton's law of partial pressures to mix species within a phase (e.g., N2 and O2 within a gas). The two cannot be directly connected because they have opposite efforts and flows. An adapter must be used (e.g., AmagatDalton).
In addition to the declarative connectors, there are connectors with inputs and outputs.
The RealInput,
RealInputInternal,
RealInputBus, and
RealInputBusInternal connectors
contain only Real input
variables.
The RealOutput,
RealOutputInternal,
RealOutputBus, and
RealOutputBusInternal connectors
contain only Real output
variables.
Relation to Thermodynamics:
In order to describe the dynamic behavior of a physical system, a model must include conservation laws or rate balances. These equations involve the storage and flow of extensive quantities within (among configurations) and into the system. In chemical/thermal systems, the extensive quantities of interest are particle number (or mass) and energy. For the sake of simplicity, momentum will be excluded from the present discussion; assume that the fluid is macroscopically stagnant. Also assume that there is only one inlet or outlet to the system. In terms of mathematics, we have introduced four variables (2 flows and 2 quantities) but only two equations (material and energy conservation).
Two additional equations involve flow rates; these are transport equations with spatial nature—separate from the temporal conservation equations. Empirical evidence indicates that the the flows are related to differences in efforts or generalized "driving forces." The efforts are usually conjugate to the quantities with respect to energy. For the chemical/thermal system, the efforts are then chemical potential and temperature. Yet these are intensive properties—distinct from the quantities, which are extensive. So far, there are two rate balances to relate extensive quantities to flows and two transport equations (4 equations in all) and six variables (2 quantities, 2 flows, and 2 efforts or intensive properties).
One extensive quantity can be divided by the other to yield an intensive property. For example, internal energy can be divided by particle number to give internal potential (the relationship is not as direct for chemical potential, but the concept is the same). The other equation involves the spatial extent of the system, for example, the extensive volume of the system divided by particle number to give specific volume. This introduces another variable (extensive volume); now there are six equations and seven variables.
In a Eulerian frame of reference, we assume that the extensive volume of the system is fixed (i.e., that the system is a "control volume").1 If there is only one species in the system, then we can assume that it fills the entire volume (e.g., no macroscopically observable regions of vacuum). If another species is included in the system, the number of variables is doubled. All of the equations may be repeated except that the specific volume of each species is its own extensive volume or "partial volume" divided by its particle number to give "partial specific volume." It is reasonable to assume that the sum of the partial volumes is equal to the total volume of the system (again, no voids). This is a generalization of the previous equation that set the volume of the single species equal to the volume of the system or control volume. However, now there are three volumes (of each configuration and of the system) instead of two (of the one configuration and of the system) but no additional equations.
In general, an additional equation may be added to exchange volume between the two species such that they reach equilibrium. This could be modeled by another transport-like equation. However, in the FCSys package, it is assumed that this equilibrium already, always exists. Since we wish to impose that the sum of the two partial volumes is equal to the total volume, it is appropriate to set the flow variable to be the quantity itself (volume) rather than the rate of the quantity. Then, there is no need for another rate balance to relate the quantity to the flow; the quantity is the flow. In this case, the most appropriate effort variable is pressure. The relationship among pressure, specific volume, and temperature is given by an equation of state. This additivity-of-volume interaction occurs in the VolumeFixed model.
If the species are mixed, it may be more appropriate to assume that the pressures of the components of a mixture sum to the total pressure of the mixture. This additivity of pressure is described by connections of the Dalton connector.
1. In a Lagrangian frame of reference, the amount of material is fixed and thermal energy is reduced to random motion since particles are tracked directly. There are only the momentum conservation equations.
Extends from Modelica.Icons.InterfacesPackage (Icon for packages containing interfaces).Name | Description |
---|---|
Chemical | Connector for a species in a reaction or phase change process |
Reaction | Connector for the combination of species in a chemical reaction |
BoundaryBus | Bus of Boundary connectors (for multiple configurations) |
Boundary | Connector to transport material, translational momentum, and thermal energy |
Amagat | Connector for additivity of volume |
Dalton | Connector for additivity of pressure |
DaltonNode | Internal node for additivity of pressure |
Intra | Connector for translational and thermal exchange among species within a phase |
Inter | Connector for translational and thermal exchange among species, regardless of phase |
Inert | Connector for translational and thermal exchange |
InertNode | Internal node for Intra and Inter |
Translational | Connector for the advection or diffusion of translational momentum |
ThermalDiffusive | Connector for the diffusion of thermal energy |
RealInput | "input Real " as a connector |
RealInputInternal | Internal "input Real " as a connector |
RealInputBus | Bus of RealInput connectors |
RealInputBusInternal | Internal bus of RealInput connectors |
RealOutput | "output Real " as a connector |
RealOutputInternal | Internal "output Real " as a connector |
RealOutputBus | Bus of RealOutput connectors |
RealOutputBusInternal | Internal bus of RealOutput connectors |
Note that the product of the translational stream
variable (velocity, φ) and the flow
variable (current, Ṅ) is only conserved among species with the same specific mass.
This connector is not directly connected among different species. It is first converted to the
Reaction connector using the
ChemicalReaction adapter,
which reconciles the different specific masses.
For more information, please see the documentation of the Connectors package.
Type | Name | Default | Description |
---|---|---|---|
Integer | n_trans | Number of components of translational momentum |
Type | Name | Description |
---|---|---|
Integer | n_trans | Number of components of translational momentum |
Potential | g | Chemical potential [L2.M/(N.T2)] |
flow Current | Ndot | Current [N/T] |
stream Velocity | phi[n_trans] | Velocity upon outflow [L/T] |
stream PotentialAbsolute | sT | Specific entropy-temperature product upon outflow [L2.M/(N.T2)] |
connector Chemical "Connector for a species in a reaction or phase change process" parameter Integer n_trans(min=1,max=3) "Number of components of translational momentum"; // Material diffusion Q.Potential g(nominal=U.V) "Chemical potential"; flow Q.Current Ndot(nominal=U.A) "Current"; // For translational advection stream Q.Velocity phi[n_trans](each nominal=U.cm/U.s,each start=0) "Velocity upon outflow"; // For thermal advection stream Q.PotentialAbsolute sT(nominal=3000*U.K) "Specific entropy-temperature product upon outflow"; end Chemical;
Please see the documentation of the Connectors package.
Extends from Translational (Connector for the advection or diffusion of translational momentum).
Type | Name | Default | Description |
---|---|---|---|
Integer | n_trans | Number of components of translational momentum | |
Initialization | |||
Velocity | phi.start[n_trans] | 0 | Velocity [L/T] |
Type | Name | Description |
---|---|---|
Current | Ndot | Rate of reaction [N/T] |
flow Potential | g | Chemical potential [L2.M/(N.T2)] |
Integer | n_trans | Number of components of translational momentum |
Velocity | phi[n_trans] | Velocity [L/T] |
flow Force | mPhidot[n_trans] | Force [L.M/T2] |
PotentialAbsolute | sT | Product of specific entropy and temperature [L2.M/(N.T2)] |
flow Power | Qdot | Rate of thermal advection [L2.M/T3] |
connector Reaction "Connector for the combination of species in a chemical reaction" // Material diffusion Q.Current Ndot(nominal=U.A,start=0) "Rate of reaction"; flow Q.Potential g(nominal=U.V) "Chemical potential"; // Translational advection extends Translational; // Thermal advection Q.PotentialAbsolute sT(nominal=3000*U.K) "Product of specific entropy and temperature"; flow Q.Power Qdot(nominal=U.W) "Rate of thermal advection"; end Reaction;
There is no minimal set of variables. Species are included by connecting instances of the Boundary connector.
For more information, please see the documentation of the Connectors package.
expandable connector BoundaryBus "Bus of Boundary connectors (for multiple configurations)" end BoundaryBus;
This connector applies to a single species in a single phase. For multiple species or phases, use the BoundaryBus connector.
For more information, please see the documentation of the Connectors package.
Extends from ThermalDiffusive (Connector for the diffusion of thermal energy).
Type | Name | Description |
---|---|---|
PressureAbsolute | p | Pressure [M/(L.T2)] |
flow Current | Ndot | Current [N/T] |
Velocity | phi[Orient] | Velocity [L/T] |
flow Force | mPhidot[Orient] | Force [L.M/T2] |
TemperatureAbsolute | T | Temperature [L2.M/(N.T2)] |
flow Power | Qdot | Rate of thermal conduction [L2.M/T3] |
connector Boundary "Connector to transport material, translational momentum, and thermal energy" // Material Q.PressureAbsolute p(nominal=U.atm) "Pressure"; flow Q.Current Ndot(nominal=U.A) "Current"; // Translational Q.Velocity phi[Orient](each nominal=U.cm/U.s,each start=0) "Velocity"; flow Q.Force mPhidot[Orient](each nominal=U.N) "Force"; // Thermal extends ThermalDiffusive; end Boundary;
The concept of "additivity of volume" is defined by Amagat's law of partial volumes, which states that the partial extensive volumes of the components of a mixture sum to the total extensive volume of the mixture [Bejan2006, p. 194]. The components are assumed to each exist at the total pressure of the mixture.
This concept loses its physical meaning once the species are mixed [Woo1995]. If the species are truly mixed, then it is impossible to distinguish their particles and thus determine their partial volumes. Therefore, additivity of volume is only used for distinct phases within the same subregion—not for species within a phase. For example, if a system contains a solid phase and a gas phase, then it is assumed that the volumes of the phases are additive. Within each phase, the pressures of the species are added according to Dalton's law (see the Dalton connector).
In order to implement Amagat's law, this connector includes volume (not rate of volume) as a flow variable. The effort variable is pressure. This implies that the effort and flow variables are conjugates of energy (not power).
See also the Dalton connector and the documentation in the Connectors package.
Type | Name | Description |
---|---|---|
PressureAbsolute | p | Pressure [M/(L.T2)] |
flow Volume | V | Volume [L3] |
connector Amagat "Connector for additivity of volume" Q.PressureAbsolute p(nominal=U.atm) "Pressure"; flow Q.Volume V(min=-Modelica.Constants.inf, nominal=U.cc) "Volume"; end Amagat;
The concept of "additivity of pressure" is defined by Dalton's law of partial pressures, which states that the partial pressures of the components of a mixture sum to the total pressure of the mixture [Bejan2006, p. 192]. The components are assumed to exist at the total volume of the mixture.
In order to implement Dalton's law, this connector includes pressure as a flow variable. The effort variable is volume. This implies that the effort and flow variables are conjugates of energy (not power).
See also the Amagat connector and the documentation of the Connectors package.
Type | Name | Description |
---|---|---|
Volume | V | Volume [L3] |
flow Pressure | p | Pressure [M/(L.T2)] |
connector Dalton "Connector for additivity of pressure" Q.Volume V(nominal=U.cc) "Volume"; flow Q.Pressure p(nominal=U.atm) "Pressure"; end Dalton;
This connector is identical to Dalton except
that it has a smaller icon and a default protected
prefix. For more information, please see that connector.
Type | Name | Description |
---|---|---|
Volume | V | Volume [L3] |
flow Pressure | p | Pressure [M/(L.T2)] |
connector DaltonNode "Internal node for additivity of pressure" Q.Volume V(nominal=U.cc) "Volume"; flow Q.Pressure p(nominal=U.atm) "Pressure"; end DaltonNode;
This connector is identical to Inter except for the icon. It should not be connected directly among species. Rather, it should be connected to an Inert or InertNode connector so that kΦ and kQ (essentially parameters) are set.
Please see Inert, InertNode, and the documentation of the Connectors package.
Extends from Translational (Connector for the advection or diffusion of translational momentum).
Type | Name | Default | Description |
---|---|---|---|
Integer | n_trans | Number of components of translational momentum | |
Initialization | |||
Velocity | phi.start[n_trans] | 0 | Velocity [L/T] |
Type | Name | Description |
---|---|---|
Integer | n_trans | Number of components of translational momentum |
Velocity | phi[n_trans] | Velocity [L/T] |
flow Force | mPhidot[n_trans] | Force [L.M/T2] |
TemperatureAbsolute | T | Temperature [L2.M/(N.T2)] |
flow Power | Qdot | Rate of thermal conduction [L2.M/T3] |
connector Intra "Connector for translational and thermal exchange among species within a phase" extends Translational; // extends ThermalDiffusive; // Note: Inheritance isn't used to prevent overlap of the labels in Dymola // 2014. Q.TemperatureAbsolute T(nominal=300*U.K) "Temperature"; flow Q.Power Qdot(nominal=U.W) "Rate of thermal conduction"; end Intra;
This connector is identical to Intra except for the icon. It should not be connected directly among species. Rather, it should be connected to an Inert or InertNode connector so that kΦ and kQ (essentially parameters) are set.
Please see Inert, InertNode, and the documentation of the Connectors package.
Extends from Translational (Connector for the advection or diffusion of translational momentum).
Type | Name | Default | Description |
---|---|---|---|
Integer | n_trans | Number of components of translational momentum | |
Initialization | |||
Velocity | phi.start[n_trans] | 0 | Velocity [L/T] |
Type | Name | Description |
---|---|---|
Integer | n_trans | Number of components of translational momentum |
Velocity | phi[n_trans] | Velocity [L/T] |
flow Force | mPhidot[n_trans] | Force [L.M/T2] |
TemperatureAbsolute | T | Temperature [L2.M/(N.T2)] |
flow Power | Qdot | Rate of thermal conduction [L2.M/T3] |
connector Inter "Connector for translational and thermal exchange among species, regardless of phase" extends Translational; // extends ThermalDiffusive; // Note: Inheritance isn't used to prevent overlap of the labels in // Dymola 2014. Q.TemperatureAbsolute T(nominal=300*U.K) "Temperature"; flow Q.Power Qdot(nominal=U.W) "Rate of thermal conduction"; end Inter;
Please see the documentation of the Connectors package.
Extends from Translational (Connector for the advection or diffusion of translational momentum).
Type | Name | Default | Description |
---|---|---|---|
Integer | n_trans | Number of components of translational momentum | |
Initialization | |||
Velocity | phi.start[n_trans] | 0 | Velocity [L/T] |
Type | Name | Description |
---|---|---|
Integer | n_trans | Number of components of translational momentum |
Velocity | phi[n_trans] | Velocity [L/T] |
flow Force | mPhidot[n_trans] | Force [L.M/T2] |
TemperatureAbsolute | T | Temperature [L2.M/(N.T2)] |
flow Power | Qdot | Rate of thermal conduction [L2.M/T3] |
connector Inert "Connector for translational and thermal exchange" extends Translational; // extends ThermalDiffusive; // Note: Inheritance isn't used to prevent overlap of the labels in // Dymola 2014. Q.TemperatureAbsolute T(nominal=300*U.K) "Temperature"; flow Q.Power Qdot(nominal=U.W) "Rate of thermal conduction"; end Inert;
This connector is used as an internal node to connect Intra or Inter connectors. It is an expandable connector with no intrinsic variables.
For more information, please see the documentation of the Connectors package.
expandable connector InertNode "Internal node for Intra and Inter" end InertNode;
Please see the documentation of the Connectors package.
Type | Name | Default | Description |
---|---|---|---|
Integer | n_trans | Number of components of translational momentum |
Type | Name | Description |
---|---|---|
Integer | n_trans | Number of components of translational momentum |
Velocity | phi[n_trans] | Velocity [L/T] |
flow Force | mPhidot[n_trans] | Force [L.M/T2] |
connector Translational "Connector for the advection or diffusion of translational momentum" parameter Integer n_trans(min=1,max=3) "Number of components of translational momentum"; Q.Velocity phi[n_trans](each nominal=U.cm/U.s,each start=0) "Velocity"; flow Q.Force mPhidot[n_trans](each nominal=U.N) "Force"; end Translational;
Please see the documentation of the Connectors package.
Type | Name | Description |
---|---|---|
TemperatureAbsolute | T | Temperature [L2.M/(N.T2)] |
flow Power | Qdot | Rate of thermal conduction [L2.M/T3] |
connector ThermalDiffusive "Connector for the diffusion of thermal energy" Q.TemperatureAbsolute T(nominal=300*U.K) "Temperature"; flow Q.Power Qdot(nominal=U.W) "Rate of thermal conduction"; end ThermalDiffusive;
input Real
" as a connector
Connector with one input signal of type Real
.
connector RealInput = input Real
""input Real
" as a connector";
input Real
" as a connector
Protected connector with one input signal of type Real
.
connector RealInputInternal = input Real
"Internal "input Real
" as a connector";
There is no minimal set of variables. Signals are included by connecting instances of the RealInput connector.
expandable connector RealInputBus "Bus of RealInput connectors" end RealInputBus;
There is no minimal set of variables. Signals are included by connecting instances of the RealInput connector.
expandable connector RealInputBusInternal "Internal bus of RealInput connectors" end RealInputBusInternal;
output Real
" as a connector
Connector with one output signal of type Real
.
connector RealOutput = output Real
""output Real
" as a connector";
output Real
" as a connector
Protected connector with one output signal of type Real
.
connector RealOutputInternal = output Real
"Internal "output Real
" as a connector";
There is no minimal set of variables. Signals are included by connecting instances of the RealOutput connector.
expandable connector RealOutputBus "Bus of RealOutput connectors" end RealOutputBus;
There is no minimal set of variables. Signals are included by connecting instances of the RealOutput connector.
expandable connector RealOutputBusInternal "Internal bus of RealOutput connectors" end RealOutputBusInternal;