---
url: /dyad/dev/stdlib/FluidComponents/types/Interfaces.PartialTwoPort.md
description: >-
  Dyad Interfaces.PartialTwoPort docs.  Partial interface for fluid components
  with two ports.
---

# `Interfaces.PartialTwoPort` {#Interfaces.PartialTwoPort}

Partial interface for fluid components with two ports.

The positive design-flow direction is from port_a to port_b. Extending components provide the equations that transport or store fluid.

## Usage {#Usage}

`FluidComponents.Interfaces.PartialTwoPort(showDesignFlowDirection=true)`

## Parameters: {#Parameters:}

|                      Name | Description | Units | Default value |
| -------------------------:| -----------:| -----:| -------------:|
|             `medium_data` |             |     – |               |
|       `allowFlowReversal` |             |     – |               |
|     `port_a_exposesState` |             |     – |         false |
|     `port_b_exposesState` |             |     – |         false |
| `showDesignFlowDirection` |             |     – |          true |

## Connectors {#Connectors}

* `port_a` - Generic fluid connector at the design inlet. ([`FluidPort_a`](@ref))

* `port_b` - Generic fluid connector at the design outlet. ([`FluidPort_b`](@ref))

## Source {#Source}

```dyad
"""
Partial interface for fluid components with two ports.

The positive design-flow direction is from port_a to port_b. Extending
components provide the equations that transport or store fluid.
"""
partial component PartialTwoPort
  # Immutable medium definition selected at model construction [-]
  structural parameter medium_data::MediaComponents.Interfaces.AbstractPartialMediumData
  # Whether flow may reverse from the positive design direction [-]
  structural parameter allowFlowReversal::Boolean
  # Fluid connector at the design inlet [-]
  port_a = FluidComponents.Interfaces.FluidPort_a(medium_data = medium_data) {
    "Dyad": {
      "placement": {
        "icon": {"iconName": "default", "x1": -50, "y1": 450, "x2": 50, "y2": 550, "rot": 0}
      }
    }
  }
  # Fluid connector at the design outlet [-]
  port_b = FluidComponents.Interfaces.FluidPort_b(medium_data = medium_data) {
    "Dyad": {
      "placement": {
        "icon": {"iconName": "default", "x1": 950, "y1": 450, "x2": 1050, "y2": 550, "rot": 0}
      }
    }
  }
  # Whether port_a exposes the state of an internal fluid volume [-]
  structural parameter port_a_exposesState::Boolean = false
  # Whether port_b exposes the state of an internal fluid volume [-]
  structural parameter port_b_exposesState::Boolean = false
  # Whether to show the positive design-flow direction [-]
  parameter showDesignFlowDirection::Boolean = true
relations
end
```

```dyad
"""
Partial interface for fluid components with two ports.

The positive design-flow direction is from port_a to port_b. Extending
components provide the equations that transport or store fluid.
"""
partial component PartialTwoPort
  # Immutable medium definition selected at model construction [-]
  structural parameter medium_data::MediaComponents.Interfaces.AbstractPartialMediumData
  # Whether flow may reverse from the positive design direction [-]
  structural parameter allowFlowReversal::Boolean
  # Fluid connector at the design inlet [-]
  port_a = FluidComponents.Interfaces.FluidPort_a(medium_data = medium_data) {
    "Dyad": {
      "placement": {
        "icon": {"iconName": "default", "x1": -50, "y1": 450, "x2": 50, "y2": 550, "rot": 0}
      }
    }
  }
  # Fluid connector at the design outlet [-]
  port_b = FluidComponents.Interfaces.FluidPort_b(medium_data = medium_data) {
    "Dyad": {
      "placement": {
        "icon": {"iconName": "default", "x1": 950, "y1": 450, "x2": 1050, "y2": 550, "rot": 0}
      }
    }
  }
  # Whether port_a exposes the state of an internal fluid volume [-]
  structural parameter port_a_exposesState::Boolean = false
  # Whether port_b exposes the state of an internal fluid volume [-]
  structural parameter port_b_exposesState::Boolean = false
  # Whether to show the positive design-flow direction [-]
  parameter showDesignFlowDirection::Boolean = true
relations
metadata {}
end
```

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses
