FCSys.Conditions.ByConnector.Boundary.Single

Conditions for a single Boundary connector

Information

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

Package Content

NameDescription
FCSys.Conditions.ByConnector.Boundary.Single.Source Source Material source for a Boundary connector
FCSys.Conditions.ByConnector.Boundary.Single.Sink Sink Material sink for a Boundary connector
FCSys.Conditions.ByConnector.Boundary.Single.Material Material Material conditions
FCSys.Conditions.ByConnector.Boundary.Single.Translational Translational Translational conditions
FCSys.Conditions.ByConnector.Boundary.Single.Thermal Thermal Conditions for thermal diffusion

FCSys.Conditions.ByConnector.Boundary.Single.Source FCSys.Conditions.ByConnector.Boundary.Single.Source

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

Information

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

Parameters

TypeNameDefaultDescription
Specification
Material
replaceable function materialSpecMaterial.currentQuantity
BooleaninternalMaterialtrueUse internal specification
RealExpressionmaterialSetredeclare Sources.RealExpres…Source of internal specification
First transverse
replaceable function afterSpecTranslational.velocityQuantity
BooleaninternalAftertrueUse internal specification
RealExpressionafterSetredeclare Sources.RealExpres…Source of internal specification
Second transverse
replaceable function beforeSpecTranslational.velocityQuantity
BooleaninternalBeforetrueUse internal specification
RealExpressionbeforeSetredeclare Sources.RealExpres…Source of internal specification
Thermal
replaceable function thermalSpecThermal.temperatureQuantity
BooleaninternalThermaltrueUse internal specification
RealExpressionthermalSetredeclare Sources.RealExpres…Source of internal specification
Measurement
replaceable function materialMeasMaterial.pressureMaterial quantity
replaceable function afterMeasTranslational.forceFirst transverse quantity
replaceable function beforeMeasTranslational.forceSecond transverse quantity
replaceable function thermalMeasThermal.heatRateThermal quantity

Connectors

TypeNameDescription
BoundaryboundaryConnector to transport material, translational momentum, and thermal energy
RealInputBusuBus of specifications
RealOutputBusyBus of measurements
Specification
Material
replaceable function materialSpecQuantity
First transverse
replaceable function afterSpecQuantity
Second transverse
replaceable function beforeSpecQuantity
Thermal
replaceable function thermalSpecQuantity
Measurement
replaceable function materialMeasMaterial quantity
replaceable function afterMeasFirst transverse quantity
replaceable function beforeMeasSecond transverse quantity
replaceable function thermalMeasThermal quantity

Modelica definition

model Source 
  "Material source for a Boundary connector"
  import Modelica.Blocks.Sources;
  extends FCSys.Icons.Conditions.SingleShort;

  // Specification
  // -------------
  // Material
  replaceable function materialSpec = Material.current constrainedby 
    Material.Partial "Quantity";
  parameter Boolean internalMaterial=true "Use internal specification";
  replaceable Sources.RealExpression materialSet if internalMaterial 
    constrainedby Modelica.Blocks.Interfaces.SO 
    "Source of internal specification";
  // 
  // 1st transverse
  replaceable function afterSpec = Translational.velocity constrainedby 
    Translational.Partial "Quantity";
  parameter Boolean internalAfter=true "Use internal specification";
  replaceable Sources.RealExpression afterSet if internalAfter constrainedby 
    Modelica.Blocks.Interfaces.SO "Source of internal specification";

  // 
  // 2nd transverse
  replaceable function beforeSpec = Translational.velocity constrainedby 
    Translational.Partial "Quantity";

  parameter Boolean internalBefore=true "Use internal specification";
  replaceable Sources.RealExpression beforeSet if internalBefore constrainedby 
    Modelica.Blocks.Interfaces.SO "Source of internal specification";

  // 
  // Thermal
  replaceable function thermalSpec = Thermal.temperature constrainedby 
    Thermal.Partial "Quantity";

  parameter Boolean internalThermal=true "Use internal specification";
  replaceable Sources.RealExpression thermalSet(y=298.15*U.K) if 
    internalThermal constrainedby Modelica.Blocks.Interfaces.SO 
    "Source of internal specification";

  // Measurement
  // -----------
  // Aliases
  Q.PressureAbsolute p "Pressure";
  Q.TemperatureAbsolute T "Temperature";
  // Material
  replaceable function materialMeas = Material.pressure constrainedby 
    Material.Partial "Material quantity";

  // 1st transverse
  replaceable function afterMeas = Translational.force constrainedby 
    Translational.Partial "First transverse quantity";

  // 2nd transverse
  replaceable function beforeMeas = Translational.force constrainedby 
    Translational.Partial "Second transverse quantity";

  // Thermal
  replaceable function thermalMeas = Thermal.heatRate constrainedby 
    Thermal.Partial "Thermal quantity";

  Connectors.Boundary boundary 
    "Connector to transport material, translational momentum, and thermal energy";
  Connectors.RealInputBus u if not (internalMaterial and internalAfter and 
    internalBefore and internalThermal) "Bus of specifications";
  Connectors.RealOutputBus y "Bus of measurements";

  // Inputs

protected 
  Connectors.RealInputInternal u_material if not internalMaterial 
    "Material specification";
  Connectors.RealInputInternal u_after if not internalAfter 
    "First transverse specification";
  Connectors.RealInputInternal u_before if not internalBefore 
    "Second transverse specification";
  Connectors.RealInputInternal u_thermal if not internalThermal 
    "Thermal specification";

  Connectors.RealOutputInternal _u_material 
    "Internal, working value of material specification";
  Connectors.RealOutputInternal _u_after=afterSpec(
      boundary.p,
      boundary.Ndot,
      boundary.phi,
      boundary.mPhidot,
      boundary.T,
      boundary.Qdot,
      orient=Orient.after) 
    "Internal, working value of first transverse specification";
  Connectors.RealOutputInternal _u_before=beforeSpec(
      boundary.p,
      boundary.Ndot,
      boundary.phi,
      boundary.mPhidot,
      boundary.T,
      boundary.Qdot,
      orient=Orient.before) 
    "Internal, working value of second transverse specification";
  Connectors.RealOutputInternal _u_thermal 
    "Internal, working value of thermal specification";

public 
  Sources.RealExpression materialOut(y=materialMeas(
        boundary.p,
        boundary.Ndot,
        boundary.phi,
        boundary.mPhidot,
        boundary.T,
        boundary.Qdot)) "Generate the material output";
  Sources.RealExpression beforeOut(y=beforeMeas(
        boundary.p,
        boundary.Ndot,
        boundary.phi,
        boundary.mPhidot,
        boundary.T,
        boundary.Qdot,
        orient=Orient.before)) "Generate the 2nd transverse output";
  Sources.RealExpression afterOut(y=afterMeas(
        boundary.p,
        boundary.Ndot,
        boundary.phi,
        boundary.mPhidot,
        boundary.T,
        boundary.Qdot,
        orient=Orient.after)) "Generate the 1st transverse output";
  Sources.RealExpression thermalOut(y=thermalMeas(
        boundary.p,
        boundary.Ndot,
        boundary.phi,
        boundary.mPhidot,
        boundary.T,
        boundary.Qdot)) "Generate the thermal output";

equation 
  // Aliases
  p = boundary.p;
  T = boundary.T;

  _u_material = materialSpec(
    boundary.p,
    boundary.Ndot,
    boundary.phi,
    boundary.mPhidot,
    boundary.T,
    boundary.Qdot);
  _u_thermal = thermalSpec(
    boundary.p,
    boundary.Ndot,
    boundary.phi,
    boundary.mPhidot,
    boundary.T,
    boundary.Qdot);

  // Material
  connect(u_material, _u_material);

  connect(materialSet.y, _u_material);
  connect(u_material, u.material);

  connect(materialOut.y, y.material);

  // First transverse
  connect(u_after, _u_after);

  connect(afterSet.y, _u_after);
  connect(u_after, u.after);

  connect(afterOut.y, y.after);

  // Second transverse
  connect(u_before, _u_before);

  connect(beforeSet.y, _u_before);
  connect(u_before, u.before);

  connect(beforeOut.y, y.before);

  // Thermal
  connect(thermalSet.y, _u_thermal);
  connect(u_thermal, u.thermal);

  connect(u_thermal, _u_thermal);
  connect(thermalOut.y, y.thermal);
end Source;

FCSys.Conditions.ByConnector.Boundary.Single.Sink FCSys.Conditions.ByConnector.Boundary.Single.Sink

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

Information

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

Parameters

TypeNameDefaultDescription
Specification
Material
replaceable function materialSpecMaterial.pressureQuantity
BooleaninternalMaterialtrueUse internal specification
First transverse
replaceable function afterSpecTranslational.forceQuantity
BooleaninternalAftertrueUse internal specification
RealExpressionafterSetredeclare Sources.RealExpres…Source of internal specification
Second transverse
replaceable function beforeSpecTranslational.forceQuantity
BooleaninternalBeforetrueUse internal specification
RealExpressionbeforeSetredeclare Sources.RealExpres…Source of internal specification
Thermal
replaceable function thermalSpecThermal.heatRateQuantity
BooleaninternalThermaltrueUse internal specification
Measurement
replaceable function materialMeasMaterial.currentMaterial quantity
replaceable function afterMeasTranslational.velocityFirst transverse quantity
replaceable function beforeMeasTranslational.velocitySecond transverse quantity
replaceable function thermalMeasThermal.temperatureThermal quantity

Connectors

TypeNameDescription
BoundaryboundaryConnector to transport material, translational momentum, and thermal energy
RealInputBusuBus of specifications
RealOutputBusyBus of measurements
Specification
Material
replaceable function materialSpecQuantity
First transverse
replaceable function afterSpecQuantity
Second transverse
replaceable function beforeSpecQuantity
Thermal
replaceable function thermalSpecQuantity
Measurement
replaceable function materialMeasMaterial quantity
replaceable function afterMeasFirst transverse quantity
replaceable function beforeMeasSecond transverse quantity
replaceable function thermalMeasThermal quantity

Modelica definition

model Sink 
  "Material sink for a Boundary connector"
  extends Source(
    redeclare replaceable function materialSpec = Material.pressure,
    redeclare replaceable function afterSpec = Translational.force,
    redeclare replaceable function beforeSpec = Translational.force,
    redeclare replaceable function thermalSpec = Thermal.heatRate,
    redeclare replaceable function materialMeas = Material.current,
    redeclare replaceable function afterMeas = Translational.velocity,
    redeclare replaceable function beforeMeas = Translational.velocity,
    redeclare replaceable function thermalMeas = 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;