## FCSys.Conditions.ByConnector.Translational

Conditions for a Translational connector

### Information

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

### Package Content

Name | Description
--- | ---
Force | Condition for a Translational connector, with force specified by default
Velocity | Condition for a Translational connector, with velocity specified by default
Component | Conditions for a component of translational momentum

## FCSys.Conditions.ByConnector.Translational.Force

Condition for a Translational connector, with force specified by default

### Information

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

### Parameters

Type | Name | Default | Description
--- | --- | --- | ---
Specification
X-axis translational
replaceable function transXSpec | Component.force | Quantity
Boolean | internalTransX | true | Use internal specification
RealExpression | transXSet | redeclare Sources.RealExpres… | Source of internal specification
Y-axis translational
replaceable function transYSpec | Component.force | Quantity
Boolean | internalTransY | true | Use internal specification
RealExpression | transYSet | redeclare Sources.RealExpres… | Source of internal specification
Z-axis translational
replaceable function transZSpec | Component.force | Quantity
Boolean | internalTransZ | true | Use internal specification
RealExpression | transZSet | redeclare Sources.RealExpres… | Source of internal specification
Measurement
replaceable function transXMeas | Component.velocity | X-axis translational quantity
replaceable function transYMeas | Component.velocity | Y-axis translational quantity
replaceable function transZMeas | Component.velocity | Z-axis translational quantity
Assumptions
Included transport axes
Boolean | inclTransX | true | X
Boolean | inclTransY | true | Y
Boolean | inclTransZ | true | Z

### Connectors

Type | Name | Description
--- | --- | ---
input RealInput | u_transX | X-axis translational specification
input RealInput | u_transY | Y-axis translational specification
input RealInput | u_transZ | Z-axis translational specification
output RealOutput | y_transX | X-axis translational measurement
output RealOutput | y_transY | Y-axis translational measurement
output RealOutput | y_transZ | Z-axis translational measurement
Translational | trans | Connector for advection or diffusion of translational momentum
Specification
X-axis translational
replaceable function transXSpec | Quantity
Y-axis translational
replaceable function transYSpec | Quantity
Z-axis translational
replaceable function transZSpec | Quantity
Measurement
replaceable function transXMeas | X-axis translational quantity
replaceable function transYMeas | Y-axis translational quantity
replaceable function transZMeas | Z-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

Condition for a Translational connector, with velocity specified by default

### Information

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

### Parameters

Type | Name | Default | Description
--- | --- | --- | ---
Specification
X-axis translational
Boolean | internalTransX | true | Use internal specification
RealExpression | transXSet | redeclare Sources.RealExpres… | Source of internal specification
Y-axis translational
Boolean | internalTransY | true | Use internal specification
RealExpression | transYSet | redeclare Sources.RealExpres… | Source of internal specification
Z-axis translational
Boolean | internalTransZ | true | Use internal specification
RealExpression | transZSet | redeclare Sources.RealExpres… | Source of internal specification
Assumptions
Included transport axes
Boolean | inclTransX | true | X
Boolean | inclTransY | true | Y
Boolean | inclTransZ | true | Z

### Connectors

Type | Name | Description
--- | --- | ---
input RealInput | u_transX | X-axis translational specification
input RealInput | u_transY | Y-axis translational specification
input RealInput | u_transZ | Z-axis translational specification
output RealOutput | y_transX | X-axis translational measurement
output RealOutput | y_transY | Y-axis translational measurement
output RealOutput | y_transZ | Z-axis translational measurement
Translational | trans | Connector 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;