FCSys.Conditions.ByConnector.Translational

Conditions for a Translational connector

Information

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

Package Content

NameDescription
FCSys.Conditions.ByConnector.Translational.Force Force Condition for a Translational connector, with force specified by default
FCSys.Conditions.ByConnector.Translational.Velocity Velocity Condition for a Translational connector, with velocity specified by default
FCSys.Conditions.ByConnector.Translational.Component Component Conditions for a component of translational momentum

FCSys.Conditions.ByConnector.Translational.Force FCSys.Conditions.ByConnector.Translational.Force

Condition for a Translational connector, with force specified by default FCSys.Conditions.ByConnector.Translational.Force

Information

Extends from FCSys.Icons.Conditions.Single (Icon for a single-connector boundary condition).

Parameters

TypeNameDefaultDescription
Specification
X-axis translational
replaceable function transXSpecComponent.forceQuantity
BooleaninternalTransXtrueUse internal specification
RealExpressiontransXSetredeclare Sources.RealExpres…Source of internal specification
Y-axis translational
replaceable function transYSpecComponent.forceQuantity
BooleaninternalTransYtrueUse internal specification
RealExpressiontransYSetredeclare Sources.RealExpres…Source of internal specification
Z-axis translational
replaceable function transZSpecComponent.forceQuantity
BooleaninternalTransZtrueUse internal specification
RealExpressiontransZSetredeclare Sources.RealExpres…Source of internal specification
Measurement
replaceable function transXMeasComponent.velocityX-axis translational quantity
replaceable function transYMeasComponent.velocityY-axis translational quantity
replaceable function transZMeasComponent.velocityZ-axis translational quantity
Assumptions
Included transport axes
BooleaninclTransXtrueX
BooleaninclTransYtrueY
BooleaninclTransZtrueZ

Connectors

TypeNameDescription
input RealInputu_transXX-axis translational specification
input RealInputu_transYY-axis translational specification
input RealInputu_transZZ-axis translational specification
output RealOutputy_transXX-axis translational measurement
output RealOutputy_transYY-axis translational measurement
output RealOutputy_transZZ-axis translational measurement
TranslationaltransConnector for advection or diffusion of translational momentum
Specification
X-axis translational
replaceable function transXSpecQuantity
Y-axis translational
replaceable function transYSpecQuantity
Z-axis translational
replaceable function transZSpecQuantity
Measurement
replaceable function transXMeasX-axis translational quantity
replaceable function transYMeasY-axis translational quantity
replaceable function transZMeasZ-axis translational quantity

Modelica definition

model Force 
  "Condition for a Translational connector, with force specified by default"
  import Modelica.Math.BooleanVectors.countTrue;
  import Modelica.Math.BooleanVectors.enumerate;
  import Modelica.Blocks.Sources;
  extends FCSys.Icons.Conditions.Single;

  // Specification
  // -------------
  // X-axis translational
  replaceable function transXSpec = Component.force constrainedby 
    Component.Partial "Quantity";

  parameter Boolean internalTransX=true if inclTransX 
    "Use internal specification";
  replaceable Sources.RealExpression transXSet if inclTransX and internalTransX
    constrainedby Modelica.Blocks.Interfaces.SO 
    "Source of internal specification";

  // 
  // Y-axis translational
  replaceable function transYSpec = Component.force constrainedby 
    Component.Partial "Quantity";

  parameter Boolean internalTransY=true if inclTransY 
    "Use internal specification";
  replaceable Sources.RealExpression transYSet if inclTransY and internalTransY
    constrainedby Modelica.Blocks.Interfaces.SO 
    "Source of internal specification";

  // 
  // Z-axis translational
  replaceable function transZSpec = Component.force constrainedby 
    Component.Partial "Quantity";

  parameter Boolean internalTransZ=true if inclTransZ 
    "Use internal specification";
  replaceable Sources.RealExpression transZSet if inclTransZ and internalTransZ
    constrainedby Modelica.Blocks.Interfaces.SO 
    "Source of internal specification";

  // Measurement
  // -----------
  // X-axis translational
  replaceable function transXMeas = Component.velocity constrainedby 
    Component.Partial "X-axis translational quantity";

  // Y-axis translational
  replaceable function transYMeas = Component.velocity constrainedby 
    Component.Partial "Y-axis translational quantity";

  // Z-axis translational
  replaceable function transZMeas = Component.velocity constrainedby 
    Component.Partial "Z-axis translational quantity";

  // Included components of translational momentum
  parameter Boolean inclTransX=true "X";
  parameter Boolean inclTransY=true "Y";
  parameter Boolean inclTransZ=true "Z";

  // Inputs
  Connectors.RealInput u_transX if inclTransX and not internalTransX 
    "X-axis translational specification";
  Connectors.RealInput u_transY if inclTransY and not internalTransY 
    "Y-axis translational specification";
  Connectors.RealInput u_transZ if inclTransZ and not internalTransZ 
    "Z-axis translational specification";

  // Outputs
  final Connectors.RealOutput y_transX=transXMeas(
      trans.phi,
      trans.mPhidot,
      i=transCart[Axis.x]) if inclTransX "X-axis translational measurement";

  final Connectors.RealOutput y_transY=transYMeas(
      trans.phi,
      trans.mPhidot,
      i=transCart[Axis.y]) if inclTransY "Y-axis translational measurement";

  final Connectors.RealOutput y_transZ=transZMeas(
      trans.phi,
      trans.mPhidot,
      i=transCart[Axis.z]) if inclTransZ "Z-axis translational measurement";

  Connectors.Translational trans(final n_trans=n_trans) 
    "Connector for advection or diffusion of translational momentum";

protected 
  final inner parameter Integer n_trans=countTrue({inclTransX,inclTransY,
      inclTransZ}) "Number of components of translational momentum";
  final inner parameter Integer transCart[Axis]=enumerate({inclTransX,
      inclTransY,inclTransZ}) 
    "Translational-momentum-component indices of the Cartesian axes";

  Connectors.RealOutputInternal _u_transX=transXSpec(
      trans.phi,
      trans.mPhidot,
      i=transCart[Axis.x]) if inclTransX 
    "Internal, working value of X-axis translational specification";

  Connectors.RealOutputInternal _u_transY=transYSpec(
      trans.phi,
      trans.mPhidot,
      i=transCart[Axis.y]) if inclTransY 
    "Internal, working value of Y-axis translational specification";

  Connectors.RealOutputInternal _u_transZ=transZSpec(
      trans.phi,
      trans.mPhidot,
      i=transCart[Axis.z]) if inclTransZ 
    "Internal, working value of Z-axis translational specification";

equation 
  // X-axis translational
  connect(u_transX, _u_transX);

  connect(transXSet.y, _u_transX);

  // Y-axis translational
  connect(u_transY, _u_transY);

  connect(transYSet.y, _u_transY);

  // Z-axis translational
  connect(u_transZ, _u_transZ);

  connect(transZSet.y, _u_transZ);

end Force;

FCSys.Conditions.ByConnector.Translational.Velocity FCSys.Conditions.ByConnector.Translational.Velocity

Condition for a Translational connector, with velocity specified by default FCSys.Conditions.ByConnector.Translational.Velocity

Information

Extends from Force (Condition for a Translational connector, with force specified by default).

Parameters

TypeNameDefaultDescription
Specification
X-axis translational
BooleaninternalTransXtrueUse internal specification
RealExpressiontransXSetredeclare Sources.RealExpres…Source of internal specification
Y-axis translational
BooleaninternalTransYtrueUse internal specification
RealExpressiontransYSetredeclare Sources.RealExpres…Source of internal specification
Z-axis translational
BooleaninternalTransZtrueUse internal specification
RealExpressiontransZSetredeclare Sources.RealExpres…Source of internal specification
Assumptions
Included transport axes
BooleaninclTransXtrueX
BooleaninclTransYtrueY
BooleaninclTransZtrueZ

Connectors

TypeNameDescription
input RealInputu_transXX-axis translational specification
input RealInputu_transYY-axis translational specification
input RealInputu_transZZ-axis translational specification
output RealOutputy_transXX-axis translational measurement
output RealOutputy_transYY-axis translational measurement
output RealOutputy_transZZ-axis translational measurement
TranslationaltransConnector for advection or diffusion of translational momentum

Modelica definition

model Velocity 
  "Condition for a Translational connector, with velocity specified by default"

  extends Force(
    redeclare replaceable Component.velocity transXSpec,
    redeclare replaceable Component.velocity transYSpec,
    redeclare replaceable Component.velocity transZSpec,
    redeclare replaceable Component.force transXMeas,
    redeclare replaceable Component.force transYMeas,
    redeclare replaceable Component.force transZMeas);

end Velocity;