FCSys.Connectors

Declarative and imperative interfaces

Information

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).

Package Content

NameDescription
FCSys.Connectors.Chemical Chemical Connector for a species in a reaction or phase change process
FCSys.Connectors.Reaction Reaction Connector for the combination of species in a chemical reaction
FCSys.Connectors.BoundaryBus BoundaryBus Bus of Boundary connectors (for multiple configurations)
FCSys.Connectors.Boundary Boundary Connector to transport material, translational momentum, and thermal energy
FCSys.Connectors.Amagat Amagat Connector for additivity of volume
FCSys.Connectors.Dalton Dalton Connector for additivity of pressure
FCSys.Connectors.DaltonNode DaltonNode Internal node for additivity of pressure
FCSys.Connectors.Intra Intra Connector for translational and thermal exchange among species within a phase
FCSys.Connectors.Inter Inter Connector for translational and thermal exchange among species, regardless of phase
FCSys.Connectors.Inert Inert Connector for translational and thermal exchange
FCSys.Connectors.InertNode InertNode Internal node for Intra and Inter
FCSys.Connectors.Translational Translational Connector for the advection or diffusion of translational momentum
FCSys.Connectors.ThermalDiffusive ThermalDiffusive Connector for the diffusion of thermal energy
FCSys.Connectors.RealInput RealInput "input Real" as a connector
FCSys.Connectors.RealInputInternal RealInputInternal Internal "input Real" as a connector
FCSys.Connectors.RealInputBus RealInputBus Bus of RealInput connectors
FCSys.Connectors.RealInputBusInternal RealInputBusInternal Internal bus of RealInput connectors
FCSys.Connectors.RealOutput RealOutput "output Real" as a connector
FCSys.Connectors.RealOutputInternal RealOutputInternal Internal "output Real" as a connector
FCSys.Connectors.RealOutputBus RealOutputBus Bus of RealOutput connectors
FCSys.Connectors.RealOutputBusInternal RealOutputBusInternal Internal bus of RealOutput connectors

FCSys.Connectors.Chemical FCSys.Connectors.Chemical

Connector for a species in a reaction or phase change process FCSys.Connectors.Chemical

Information

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.

Parameters

TypeNameDefaultDescription
Integern_trans Number of components of translational momentum

Contents

TypeNameDescription
Integern_transNumber of components of translational momentum
PotentialgChemical potential [L2.M/(N.T2)]
flow CurrentNdotCurrent [N/T]
stream Velocityphi[n_trans]Velocity upon outflow [L/T]
stream PotentialAbsolutesTSpecific entropy-temperature product upon outflow [L2.M/(N.T2)]

Modelica definition

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;

FCSys.Connectors.Reaction FCSys.Connectors.Reaction

Connector for the combination of species in a chemical reaction FCSys.Connectors.Reaction

Information

Please see the documentation of the Connectors package.

Extends from Translational (Connector for the advection or diffusion of translational momentum).

Parameters

TypeNameDefaultDescription
Integern_trans Number of components of translational momentum
Initialization
Velocityphi.start[n_trans]0Velocity [L/T]

Contents

TypeNameDescription
CurrentNdotRate of reaction [N/T]
flow PotentialgChemical potential [L2.M/(N.T2)]
Integern_transNumber of components of translational momentum
Velocityphi[n_trans]Velocity [L/T]
flow ForcemPhidot[n_trans]Force [L.M/T2]
PotentialAbsolutesTProduct of specific entropy and temperature [L2.M/(N.T2)]
flow PowerQdotRate of thermal advection [L2.M/T3]

Modelica definition

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;

FCSys.Connectors.BoundaryBus FCSys.Connectors.BoundaryBus

Bus of Boundary connectors (for multiple configurations) FCSys.Connectors.BoundaryBus

Information

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.

Modelica definition

expandable connector BoundaryBus 
  "Bus of Boundary connectors (for multiple configurations)"

end BoundaryBus;

FCSys.Connectors.Boundary FCSys.Connectors.Boundary

Connector to transport material, translational momentum, and thermal energy FCSys.Connectors.Boundary

Information

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).

Contents

TypeNameDescription
PressureAbsolutepPressure [M/(L.T2)]
flow CurrentNdotCurrent [N/T]
Velocityphi[Orient]Velocity [L/T]
flow ForcemPhidot[Orient]Force [L.M/T2]
TemperatureAbsoluteTTemperature [L2.M/(N.T2)]
flow PowerQdotRate of thermal conduction [L2.M/T3]

Modelica definition

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;

FCSys.Connectors.Amagat FCSys.Connectors.Amagat

Connector for additivity of volume FCSys.Connectors.Amagat

Information

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.

Contents

TypeNameDescription
PressureAbsolutepPressure [M/(L.T2)]
flow VolumeVVolume [L3]

Modelica definition

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;

FCSys.Connectors.Dalton FCSys.Connectors.Dalton

Connector for additivity of pressure FCSys.Connectors.Dalton

Information

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.

Contents

TypeNameDescription
VolumeVVolume [L3]
flow PressurepPressure [M/(L.T2)]

Modelica definition

connector Dalton "Connector for additivity of pressure"

  Q.Volume V(nominal=U.cc) "Volume";
  flow Q.Pressure p(nominal=U.atm) "Pressure";

end Dalton;

FCSys.Connectors.DaltonNode FCSys.Connectors.DaltonNode

Internal node for additivity of pressure FCSys.Connectors.DaltonNode

Information

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.

Contents

TypeNameDescription
VolumeVVolume [L3]
flow PressurepPressure [M/(L.T2)]

Modelica definition

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;

FCSys.Connectors.Intra FCSys.Connectors.Intra

Connector for translational and thermal exchange among species within a phase FCSys.Connectors.Intra

Information

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).

Parameters

TypeNameDefaultDescription
Integern_trans Number of components of translational momentum
Initialization
Velocityphi.start[n_trans]0Velocity [L/T]

Contents

TypeNameDescription
Integern_transNumber of components of translational momentum
Velocityphi[n_trans]Velocity [L/T]
flow ForcemPhidot[n_trans]Force [L.M/T2]
TemperatureAbsoluteTTemperature [L2.M/(N.T2)]
flow PowerQdotRate of thermal conduction [L2.M/T3]

Modelica definition

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;

FCSys.Connectors.Inter FCSys.Connectors.Inter

Connector for translational and thermal exchange among species, regardless of phase FCSys.Connectors.Inter

Information

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).

Parameters

TypeNameDefaultDescription
Integern_trans Number of components of translational momentum
Initialization
Velocityphi.start[n_trans]0Velocity [L/T]

Contents

TypeNameDescription
Integern_transNumber of components of translational momentum
Velocityphi[n_trans]Velocity [L/T]
flow ForcemPhidot[n_trans]Force [L.M/T2]
TemperatureAbsoluteTTemperature [L2.M/(N.T2)]
flow PowerQdotRate of thermal conduction [L2.M/T3]

Modelica definition

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;

FCSys.Connectors.Inert FCSys.Connectors.Inert

Connector for translational and thermal exchange FCSys.Connectors.Inert

Information

Please see the documentation of the Connectors package.

Extends from Translational (Connector for the advection or diffusion of translational momentum).

Parameters

TypeNameDefaultDescription
Integern_trans Number of components of translational momentum
Initialization
Velocityphi.start[n_trans]0Velocity [L/T]

Contents

TypeNameDescription
Integern_transNumber of components of translational momentum
Velocityphi[n_trans]Velocity [L/T]
flow ForcemPhidot[n_trans]Force [L.M/T2]
TemperatureAbsoluteTTemperature [L2.M/(N.T2)]
flow PowerQdotRate of thermal conduction [L2.M/T3]

Modelica definition

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;

FCSys.Connectors.InertNode FCSys.Connectors.InertNode

Internal node for Intra and Inter FCSys.Connectors.InertNode

Information

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.

Modelica definition

expandable connector InertNode 
  "Internal node for Intra and Inter"

end InertNode;

FCSys.Connectors.Translational FCSys.Connectors.Translational

Connector for the advection or diffusion of translational momentum FCSys.Connectors.Translational

Information

Please see the documentation of the Connectors package.

Parameters

TypeNameDefaultDescription
Integern_trans Number of components of translational momentum

Contents

TypeNameDescription
Integern_transNumber of components of translational momentum
Velocityphi[n_trans]Velocity [L/T]
flow ForcemPhidot[n_trans]Force [L.M/T2]

Modelica definition

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;

FCSys.Connectors.ThermalDiffusive FCSys.Connectors.ThermalDiffusive

Connector for the diffusion of thermal energy FCSys.Connectors.ThermalDiffusive

Information

Please see the documentation of the Connectors package.

Contents

TypeNameDescription
TemperatureAbsoluteTTemperature [L2.M/(N.T2)]
flow PowerQdotRate of thermal conduction [L2.M/T3]

Modelica definition

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;

FCSys.Connectors.RealInput FCSys.Connectors.RealInput

"input Real" as a connector FCSys.Connectors.RealInput

Information

Connector with one input signal of type Real.

Extends from Real.

Modelica definition

connector RealInput = input Real 
  ""input Real" as a connector";

FCSys.Connectors.RealInputInternal FCSys.Connectors.RealInputInternal

Internal "input Real" as a connector FCSys.Connectors.RealInputInternal

Information

Protected connector with one input signal of type Real.

Extends from Real.

Modelica definition

connector RealInputInternal = input Real 
  "Internal "input Real" as a connector";

FCSys.Connectors.RealInputBus FCSys.Connectors.RealInputBus

Bus of RealInput connectors FCSys.Connectors.RealInputBus

Information

There is no minimal set of variables. Signals are included by connecting instances of the RealInput connector.

Modelica definition

expandable connector RealInputBus 
  "Bus of RealInput connectors"

end RealInputBus;

FCSys.Connectors.RealInputBusInternal FCSys.Connectors.RealInputBusInternal

Internal bus of RealInput connectors FCSys.Connectors.RealInputBusInternal

Information

There is no minimal set of variables. Signals are included by connecting instances of the RealInput connector.

Modelica definition

expandable connector RealInputBusInternal 
  "Internal bus of RealInput connectors"

end RealInputBusInternal;

FCSys.Connectors.RealOutput FCSys.Connectors.RealOutput

"output Real" as a connector FCSys.Connectors.RealOutput

Information

Connector with one output signal of type Real.

Extends from Real.

Modelica definition

connector RealOutput = output Real 
  ""output Real" as a connector";

FCSys.Connectors.RealOutputInternal FCSys.Connectors.RealOutputInternal

Internal "output Real" as a connector FCSys.Connectors.RealOutputInternal

Information

Protected connector with one output signal of type Real.

Extends from Real.

Modelica definition

connector RealOutputInternal = output Real 
  "Internal "output Real" as a connector";

FCSys.Connectors.RealOutputBus FCSys.Connectors.RealOutputBus

Bus of RealOutput connectors FCSys.Connectors.RealOutputBus

Information

There is no minimal set of variables. Signals are included by connecting instances of the RealOutput connector.

Modelica definition

expandable connector RealOutputBus 
  "Bus of RealOutput connectors"

end RealOutputBus;

FCSys.Connectors.RealOutputBusInternal FCSys.Connectors.RealOutputBusInternal

Internal bus of RealOutput connectors FCSys.Connectors.RealOutputBusInternal

Information

There is no minimal set of variables. Signals are included by connecting instances of the RealOutput connector.

Modelica definition

expandable connector RealOutputBusInternal 
  "Internal bus of RealOutput connectors"

end RealOutputBusInternal;