FCSys.Conditions.Adapters.MSL.Domains

Adapters for physical domains

Information

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

Package Content

NameDescription
FCSys.Conditions.Adapters.MSL.Domains.Electrical Electrical Adapter between Modelica.Electrical.Analog and FCSys
FCSys.Conditions.Adapters.MSL.Domains.Fluid Fluid Adapter to connect a single fluid species between FCSys and Modelica
FCSys.Conditions.Adapters.MSL.Domains.FluidNeutral FluidNeutral Adapter to connect a single neutral fluid species between FCSys and Modelica
FCSys.Conditions.Adapters.MSL.Domains.Thermal Thermal Adapter between Modelica.Thermal.HeatTransfer and FCSys

FCSys.Conditions.Adapters.MSL.Domains.Electrical FCSys.Conditions.Adapters.MSL.Domains.Electrical

Adapter between Modelica.Electrical.Analog and FCSys FCSys.Conditions.Adapters.MSL.Domains.Electrical

Information

Assumptions:

  1. There is no shear force across the interface.
  2. There is no thermal conduction across the interface.

Note that the same assumptions are applied in Species.'e-'.Graphite.Fixed.

Extends from FCSys.Icons.Names.Top1.

Parameters

TypeNameDefaultDescription
Material properties
replaceable package DataCharacteristics.'e-'.GraphiteCharacteristic data (for FCSys)

Connectors

TypeNameDescription
BoundaryboundaryInterface to electrical species
NegativePinpinModelica electrical pin
Material properties
replaceable package DataCharacteristic data (for FCSys)

Modelica definition

model Electrical 
  "Adapter between Modelica.Electrical.Analog and FCSys"
  import assert = FCSys.Utilities.assertEval;
  extends FCSys.Icons.Names.Top1;

  replaceable package Data = Characteristics.'e-'.Graphite constrainedby 
    Characteristics.BaseClasses.Characteristic 
    "Characteristic data (for FCSys)";

  Connectors.Boundary boundary "Interface to electrical species";
  Modelica.Electrical.Analog.Interfaces.NegativePin pin 
    "Modelica electrical pin";

initial equation 
  assert(Data.z <> 0, "The species must have charge.");

equation 
  // Assumptions
  boundary.mPhidot = {0,0} "No shear force (assumption #1)";
  boundary.Qdot = 0 "No thermal conduction (assumption #2)";

  Data.g(boundary.T, boundary.p) = Data.z*pin.v*U.V 
    "Equal potentials (also conservation of energy)";
  0 = boundary.Ndot + pin.i*U.A/Data.z 
    "Conservation of material (also charge), without storage";
end Electrical;

FCSys.Conditions.Adapters.MSL.Domains.Fluid FCSys.Conditions.Adapters.MSL.Domains.Fluid

Adapter to connect a single fluid species between FCSys and Modelica FCSys.Conditions.Adapters.MSL.Domains.Fluid

Information

Assumptions:

  1. The transverse velocity is zero.
Extends from FCSys.Icons.Names.Top3.

Parameters

TypeNameDefaultDescription
Material properties
replaceable package DataCharacteristics.BaseClasses….Characteristic data (for FCSys)
replaceable package MediumModelica.Media.IdealGases.Si…Medium model (for Modelica)

Connectors

TypeNameDescription
BoundaryboundaryConnector for material, momentum, and energy of a single species
FluidPort_bfluidPortModelica fluid port
HeatPort_bheatPortModelica heat port
NegativePinpinModelica electrical pin
Material properties
replaceable package DataCharacteristic data (for FCSys)
replaceable package MediumMedium model (for Modelica)

Modelica definition

model Fluid 
  "Adapter to connect a single fluid species between FCSys and Modelica"
  extends FCSys.Icons.Names.Top3;

  replaceable package Data = Characteristics.BaseClasses.Characteristic 
    "Characteristic data (for FCSys)";
  replaceable package Medium = Modelica.Media.IdealGases.SingleGases.H2O 
    constrainedby Modelica.Media.Interfaces.PartialPureSubstance 
    "Medium model (for Modelica)";

  Connectors.Boundary boundary 
    "Connector for material, momentum, and energy of a single species";
  Modelica.Fluid.Interfaces.FluidPort_b fluidPort(redeclare final package
      Medium = Medium) "Modelica fluid port";
  Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_b heatPort 
    "Modelica heat port";
  Modelica.Electrical.Analog.Interfaces.NegativePin pin 
    "Modelica electrical pin";

equation 
  // Assumptions
  boundary.phi = {0,0} "Zero transverse velocity (assumption #1)";

  // Equal properties
  boundary.p = fluidPort.p*U.Pa "Pressure";
  boundary.T = heatPort.T*U.K "Temperature";
  Medium.specificEnthalpy_pT(fluidPort.p, heatPort.T) = fluidPort.h_outflow;

  // Conservation (without storage)
  0 = Data.z*boundary.Ndot + pin.i*U.A "Charge";
  0 = boundary.Ndot + (fluidPort.m_flow/Data.m)*U.kg/U.s "Material";
  0 = boundary.Qdot + heatPort.Q_flow*U.W "Energy";
  // Note:  All of the advective terms (for all the balance equations)
  // cancel across the interface.
end Fluid;

FCSys.Conditions.Adapters.MSL.Domains.FluidNeutral FCSys.Conditions.Adapters.MSL.Domains.FluidNeutral

Adapter to connect a single neutral fluid species between FCSys and Modelica FCSys.Conditions.Adapters.MSL.Domains.FluidNeutral

Information

Assumptions:

  1. The transverse velocity is zero.
Extends from FCSys.Icons.Names.Top2.

Parameters

TypeNameDefaultDescription
Material properties
replaceable package DataCharacteristics.BaseClasses….Characteristic data (for FCSys)
replaceable package MediumModelica.Media.IdealGases.Si…Medium model (for Modelica)

Connectors

TypeNameDescription
BoundaryboundaryConnector for material, momentum, and energy of a single species
FluidPort_bfluidPortModelica fluid port
HeatPort_bheatPortModelica heat port
Material properties
replaceable package DataCharacteristic data (for FCSys)
replaceable package MediumMedium model (for Modelica)

Modelica definition

model FluidNeutral 
  "Adapter to connect a single neutral fluid species between FCSys and Modelica"
  import assert = FCSys.Utilities.assertEval;
  extends FCSys.Icons.Names.Top2;

  replaceable package Data = Characteristics.BaseClasses.Characteristic 
    "Characteristic data (for FCSys)";
  replaceable package Medium = Modelica.Media.IdealGases.SingleGases.H2O 
    constrainedby Modelica.Media.Interfaces.PartialPureSubstance 
    "Medium model (for Modelica)";

  Connectors.Boundary boundary 
    "Connector for material, momentum, and energy of a single species";
  Modelica.Fluid.Interfaces.FluidPort_b fluidPort(redeclare final package
      Medium = Medium) "Modelica fluid port";
  Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_b heatPort 
    "Modelica heat port";

initial equation 
  assert(Data.z == 0, "The species must be neutral, but its chemical formula is "
     + Data.formula);

equation 
  // Assumptions
  boundary.phi = {0,0} "Zero transverse velocity (assumption #1)";

  // Equal properties
  boundary.p = fluidPort.p*U.Pa "Pressure";
  boundary.T = heatPort.T*U.K "Temperature";
  Medium.specificEnthalpy_pT(fluidPort.p, heatPort.T) = fluidPort.h_outflow;

  // Conservation (without storage)
  0 = boundary.Ndot + (fluidPort.m_flow/Data.m)*U.kg/U.s "Material";
  0 = boundary.Qdot + heatPort.Q_flow*U.W "Energy";
  // Note:  All of the advective terms (for all the balance equations)
  // cancel across the interface.

end FluidNeutral;

FCSys.Conditions.Adapters.MSL.Domains.Thermal FCSys.Conditions.Adapters.MSL.Domains.Thermal

Adapter between Modelica.Thermal.HeatTransfer and FCSys FCSys.Conditions.Adapters.MSL.Domains.Thermal

Information

Extends from FCSys.Icons.Names.Top1.

Connectors

TypeNameDescription
ThermalDiffusiveboundaryConnector for thermal diffusion
HeatPort_bheatPortModelica heat port

Modelica definition

model Thermal 
  "Adapter between Modelica.Thermal.HeatTransfer and FCSys"
  extends FCSys.Icons.Names.Top1;

  Connectors.ThermalDiffusive boundary "Connector for thermal diffusion";

  Modelica.Thermal.HeatTransfer.Interfaces.HeatPort_b heatPort 
    "Modelica heat port";

equation 
  boundary.T = heatPort.T*U.K "Equal temperatures";
  0 = boundary.Qdot + heatPort.Q_flow*U.W 
    "Conservation of energy, without storage";

end Thermal;