FCSys.Conditions.ByConnector.Boundary.Pair

Conditions for a pair of Boundary connectors

Information

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

Package Content

NameDescription
FCSys.Conditions.ByConnector.Boundary.Pair.Temperature Temperature Impose a temperature difference across and a current between a pair of Boundary connectors
FCSys.Conditions.ByConnector.Boundary.Pair.Pressure Pressure Impose a pressure difference across and a heat flow rate between a pair of Boundary connectors
FCSys.Conditions.ByConnector.Boundary.Pair.Material Material Material conditions
FCSys.Conditions.ByConnector.Boundary.Pair.Translational Translational Translational conditions
FCSys.Conditions.ByConnector.Boundary.Pair.Thermal Thermal Conditions for thermal diffusion

FCSys.Conditions.ByConnector.Boundary.Pair.Temperature FCSys.Conditions.ByConnector.Boundary.Pair.Temperature

Impose a temperature difference across and a current between a pair of Boundary connectors FCSys.Conditions.ByConnector.Boundary.Pair.Temperature

Information

Extends from FCSys.Icons.Conditions.PairShort (Short icon for a two-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
BoundarynegativeNegative boundary
BoundarypositivePositive boundary
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 Temperature 
  "Impose a temperature difference across and a current between a pair of Boundary connectors"
  import Modelica.Blocks.Sources;
  extends FCSys.Icons.Conditions.PairShort;

  // 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 if internalThermal 
    constrainedby Modelica.Blocks.Interfaces.SO 
    "Source of internal specification";

  // Measurement
  // -----------
  // 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";

  // Aliases
  Q.Pressure Deltap "Difference in pressure";
  Q.Velocity Deltaphi[Orient] "Difference in velocity";
  Q.Temperature DeltaT "Difference in temperature";

  Connectors.Boundary negative "Negative boundary";
  Connectors.Boundary positive "Positive boundary";
  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";

  // Outputs
  Connectors.RealOutputInternal _u_material=materialSpec(
      Deltap,
      negative.Ndot,
      Deltaphi,
      negative.mPhidot,
      DeltaT,
      negative.Qdot) "Internal, working value of material specification";
  Connectors.RealOutputInternal _u_after=afterSpec(
      Deltap,
      negative.Ndot,
      Deltaphi,
      negative.mPhidot,
      DeltaT,
      negative.Qdot,
      orient=Orient.after) 
    "Internal, working value of first transverse specification";
  Connectors.RealOutputInternal _u_before=beforeSpec(
      Deltap,
      negative.Ndot,
      Deltaphi,
      negative.mPhidot,
      DeltaT,
      negative.Qdot,
      orient=Orient.before) 
    "Internal, working value of second transverse specification";
  Connectors.RealOutputInternal _u_thermal=thermalSpec(
      Deltap,
      negative.Ndot,
      Deltaphi,
      negative.mPhidot,
      DeltaT,
      negative.Qdot) "Internal, working value of thermal specification";

  Sources.RealExpression materialOut(y=materialMeas(
        Deltap,
        negative.Ndot,
        Deltaphi,
        negative.mPhidot,
        DeltaT,
        negative.Qdot)) "Generate the material output";
  Sources.RealExpression beforeOut(y=beforeMeas(
        Deltap,
        negative.Ndot,
        Deltaphi,
        negative.mPhidot,
        DeltaT,
        negative.Qdot,
        orient=Orient.before)) "Generate the 2nd transverse output";
  Sources.RealExpression afterOut(y=afterMeas(
        Deltap,
        negative.Ndot,
        Deltaphi,
        negative.mPhidot,
        DeltaT,
        negative.Qdot,
        orient=Orient.after)) "Generate the 1st transverse output";
  Sources.RealExpression thermalOut(y=thermalMeas(
        Deltap,
        negative.Ndot,
        Deltaphi,
        negative.mPhidot,
        DeltaT,
        negative.Qdot)) "Generate the thermal output";

equation 
  // Differences in efforts
  Deltap = positive.p - negative.p;
  Deltaphi = positive.phi - negative.phi;
  DeltaT = positive.T - negative.T;

  // Conservation (without storage)
  0 = positive.Ndot + negative.Ndot "Material";
  {0,0} = positive.mPhidot + negative.mPhidot "Translational momentum";
  DeltaT = positive.Qdot + negative.Qdot "Energy";

  // Material
  connect(u_material, _u_material);

  connect(materialSet.y, _u_material);

  // First transverse
  connect(u_after, _u_after);

  connect(afterSet.y, _u_after);

  // Second transverse
  connect(u_before, _u_before);

  connect(beforeSet.y, _u_before);

  // Thermal
  connect(u_thermal, _u_thermal);

  connect(thermalSet.y, _u_thermal);
  connect(materialOut.y, y.material);

  connect(afterOut.y, y.after);

  connect(beforeOut.y, y.before);

  connect(u_material, u.material);
  connect(u_after, u.after);

  connect(u_before, u.before);

  connect(u_thermal, u.thermal);

  connect(thermalOut.y, y.thermal);

end Temperature;

FCSys.Conditions.ByConnector.Boundary.Pair.Pressure FCSys.Conditions.ByConnector.Boundary.Pair.Pressure

Impose a pressure difference across and a heat flow rate between a pair of Boundary connectors FCSys.Conditions.ByConnector.Boundary.Pair.Pressure

Information

Extends from Temperature (Impose a temperature difference across and a current between a pair of Boundary connectors).

Parameters

TypeNameDefaultDescription
Specification
Material
replaceable function materialSpecMaterial.pressureQuantity
BooleaninternalMaterialtrueUse internal specification
RealExpressionmaterialSetredeclare Sources.RealExpres…Source of 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
RealExpressionthermalSetredeclare Sources.RealExpres…Source of 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
BoundarynegativeNegative boundary
BoundarypositivePositive boundary
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 Pressure 
  "Impose a pressure difference across and a heat flow rate between a pair of Boundary connectors"
  extends Temperature(
    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);

  // See note in Reaction.Efforts.

end Pressure;