FCSys.Conditions.ByConnector.BoundaryBus.Single

Conditions for a single BoundaryBus connector

Information

Extends from Modelica.Icons.Package (Icon for standard packages).

Package Content

NameDescription
FCSys.Conditions.ByConnector.BoundaryBus.Single.Source Source Material source for a BoundaryBus connector
FCSys.Conditions.ByConnector.BoundaryBus.Single.Sink Sink Material sink for a BoundaryBus connector
FCSys.Conditions.ByConnector.BoundaryBus.Single.Phases Phases Conditions for a BoundaryBus connector

FCSys.Conditions.ByConnector.BoundaryBus.Single.Source FCSys.Conditions.ByConnector.BoundaryBus.Single.Source

Material source for a BoundaryBus connector FCSys.Conditions.ByConnector.BoundaryBus.Single.Source

Information

Extends from FCSys.Icons.Conditions.SingleShort (Short icon for a single-connector boundary condition).

Parameters

TypeNameDefaultDescription
Phases (click to edit)
Gasgas Gas
Graphitegraphite Graphite
Ionomerionomer Ionomer
Liquidliquid Liquid

Connectors

TypeNameDescription
BoundaryBusboundaryConnector for material, momentum, and energy of multiple species
RealInputBusuBus of inputs to specify conditions
RealOutputBusyOutput bus of measurements

Modelica definition

model Source 
  "Material source for a BoundaryBus connector"

  extends FCSys.Icons.Conditions.SingleShort;

  Phases.Gas gas "Gas";

  Phases.Graphite graphite "Graphite";

  Phases.Ionomer ionomer "Ionomer";

  Phases.Liquid liquid "Liquid";

  Connectors.BoundaryBus boundary 
    "Connector for material, momentum, and energy of multiple species";
  Connectors.RealInputBus u "Bus of inputs to specify conditions";

  Connectors.RealOutputBus y "Output bus of measurements";

equation 
  // Gas
  connect(gas.boundary, boundary.gas);

  connect(u.gas, gas.u);

  connect(gas.y, y.gas);

  // Graphite
  connect(graphite.boundary, boundary.graphite);

  connect(u.graphite, graphite.u);

  connect(graphite.y, y.graphite);

  // Ionomer
  connect(ionomer.boundary, boundary.ionomer);
  connect(u.ionomer, ionomer.u);

  connect(ionomer.y, y.ionomer);

  // Liquid
  connect(liquid.boundary, boundary.liquid);
  connect(u.liquid, liquid.u);

  connect(liquid.y, y.liquid);

end Source;

FCSys.Conditions.ByConnector.BoundaryBus.Single.Sink FCSys.Conditions.ByConnector.BoundaryBus.Single.Sink

Material sink for a BoundaryBus connector FCSys.Conditions.ByConnector.BoundaryBus.Single.Sink

Information

Extends from Source (Material source for a BoundaryBus connector).

Connectors

TypeNameDescription
BoundaryBusboundaryConnector for material, momentum, and energy of multiple species
RealInputBusuBus of inputs to specify conditions
RealOutputBusyOutput bus of measurements

Modelica definition

model Sink 
  "Material sink for a BoundaryBus connector"
  extends Source(
    gas(
      H2(
        redeclare replaceable function materialSpec = Boundary.Single.Material.pressure,

        redeclare replaceable function afterSpec = Boundary.Single.Translational.force,

        redeclare replaceable function beforeSpec = Boundary.Single.Translational.force,

        redeclare replaceable function thermalSpec = Boundary.Single.Thermal.heatRate,

        redeclare replaceable function materialMeas = Boundary.Single.Material.current,

        redeclare replaceable function afterMeas = Boundary.Single.Translational.velocity,

        redeclare replaceable function beforeMeas = Boundary.Single.Translational.velocity,

        redeclare replaceable function thermalMeas = Boundary.Single.Thermal.temperature,

        redeclare Modelica.Blocks.Sources.RealExpression materialSet(y=U.atm),
        redeclare Modelica.Blocks.Sources.RealExpression thermalSet(y=0)),
      H2O(
        redeclare replaceable function materialSpec = Boundary.Single.Material.pressure,

        redeclare replaceable function afterSpec = Boundary.Single.Translational.force,

        redeclare replaceable function beforeSpec = Boundary.Single.Translational.force,

        redeclare replaceable function thermalSpec = Boundary.Single.Thermal.heatRate,

        redeclare replaceable function materialMeas = Boundary.Single.Material.current,

        redeclare replaceable function afterMeas = Boundary.Single.Translational.velocity,

        redeclare replaceable function beforeMeas = Boundary.Single.Translational.velocity,

        redeclare replaceable function thermalMeas = Boundary.Single.Thermal.temperature,

        redeclare Modelica.Blocks.Sources.RealExpression materialSet(y=U.atm),
        redeclare Modelica.Blocks.Sources.RealExpression thermalSet(y=0)),
      N2(
        redeclare replaceable function materialSpec = Boundary.Single.Material.pressure,

        redeclare replaceable function afterSpec = Boundary.Single.Translational.force,

        redeclare replaceable function beforeSpec = Boundary.Single.Translational.force,

        redeclare replaceable function thermalSpec = Boundary.Single.Thermal.heatRate,

        redeclare replaceable function materialMeas = Boundary.Single.Material.current,

        redeclare replaceable function afterMeas = Boundary.Single.Translational.velocity,

        redeclare replaceable function beforeMeas = Boundary.Single.Translational.velocity,

        redeclare replaceable function thermalMeas = Boundary.Single.Thermal.temperature,

        redeclare Modelica.Blocks.Sources.RealExpression materialSet(y=U.atm),
        redeclare Modelica.Blocks.Sources.RealExpression thermalSet(y=0)),
      O2(
        redeclare replaceable function materialSpec = Boundary.Single.Material.pressure,

        redeclare replaceable function afterSpec = Boundary.Single.Translational.force,

        redeclare replaceable function beforeSpec = Boundary.Single.Translational.force,

        redeclare replaceable function thermalSpec = Boundary.Single.Thermal.heatRate,

        redeclare replaceable function materialMeas = Boundary.Single.Material.current,

        redeclare replaceable function afterMeas = Boundary.Single.Translational.velocity,

        redeclare replaceable function beforeMeas = Boundary.Single.Translational.velocity,

        redeclare replaceable function thermalMeas = Boundary.Single.Thermal.temperature,

        redeclare Modelica.Blocks.Sources.RealExpression materialSet(y=U.atm),
        redeclare Modelica.Blocks.Sources.RealExpression thermalSet(y=0))),
    graphite(redeclare replaceable ThermalDiffusive.Single.HeatRate 'C+', 'e-'(
        redeclare replaceable function materialSpec = Boundary.Single.Material.pressure,

        redeclare replaceable function afterSpec = Boundary.Single.Translational.force,

        redeclare replaceable function beforeSpec = Boundary.Single.Translational.force,

        redeclare replaceable function thermalSpec = Boundary.Single.Thermal.heatRate,

        redeclare replaceable function materialMeas = Boundary.Single.Material.current,

        redeclare replaceable function afterMeas = Boundary.Single.Translational.velocity,

        redeclare replaceable function beforeMeas = Boundary.Single.Translational.velocity,

        redeclare replaceable function thermalMeas = Boundary.Single.Thermal.temperature,

        redeclare Modelica.Blocks.Sources.RealExpression materialSet(y=U.atm),
        redeclare Modelica.Blocks.Sources.RealExpression thermalSet(y=0))),
    ionomer(
      redeclare replaceable ThermalDiffusive.Single.HeatRate 'SO3-',
      'H+'(
        redeclare replaceable function materialSpec = Boundary.Single.Material.pressure,

        redeclare replaceable function afterSpec = Boundary.Single.Translational.force,

        redeclare replaceable function beforeSpec = Boundary.Single.Translational.force,

        redeclare replaceable function thermalSpec = Boundary.Single.Thermal.heatRate,

        redeclare replaceable function materialMeas = Boundary.Single.Material.current,

        redeclare replaceable function afterMeas = Boundary.Single.Translational.velocity,

        redeclare replaceable function beforeMeas = Boundary.Single.Translational.velocity,

        redeclare replaceable function thermalMeas = Boundary.Single.Thermal.temperature,

        redeclare Modelica.Blocks.Sources.RealExpression materialSet(y=U.atm),
        redeclare Modelica.Blocks.Sources.RealExpression thermalSet(y=0)),
      H2O(
        redeclare replaceable function materialSpec = Boundary.Single.Material.pressure,

        redeclare replaceable function afterSpec = Boundary.Single.Translational.force,

        redeclare replaceable function beforeSpec = Boundary.Single.Translational.force,

        redeclare replaceable function thermalSpec = Boundary.Single.Thermal.heatRate,

        redeclare replaceable function materialMeas = Boundary.Single.Material.current,

        redeclare replaceable function afterMeas = Boundary.Single.Translational.velocity,

        redeclare replaceable function beforeMeas = Boundary.Single.Translational.velocity,

        redeclare replaceable function thermalMeas = Boundary.Single.Thermal.temperature,

        redeclare Modelica.Blocks.Sources.RealExpression materialSet(y=U.atm),
        redeclare Modelica.Blocks.Sources.RealExpression thermalSet(y=0))),
    liquid(H2O(
        redeclare replaceable function materialSpec = Boundary.Single.Material.pressure,

        redeclare replaceable function afterSpec = Boundary.Single.Translational.force,

        redeclare replaceable function beforeSpec = Boundary.Single.Translational.force,

        redeclare replaceable function thermalSpec = Boundary.Single.Thermal.heatRate,

        redeclare replaceable function materialMeas = Boundary.Single.Material.current,

        redeclare replaceable function afterMeas = Boundary.Single.Translational.velocity,

        redeclare replaceable function beforeMeas = Boundary.Single.Translational.velocity,

        redeclare replaceable function thermalMeas = Boundary.Single.Thermal.temperature,

        redeclare Modelica.Blocks.Sources.RealExpression materialSet(y=U.atm),
        redeclare Modelica.Blocks.Sources.RealExpression thermalSet(y=0))));

  // Note:  In Dymola 2014, the paths must be explicitly given to prevent
  // the error "Cannot show the parameter dialog for redeclared class […]".

  // The materialSet and thermalSet blocks are redeclared as not replaceable
  // because y is set directly and can't be undone at instantiation.

end Sink;