---
url: /dyad/stable/stdlib/TranslationalComponents/types/Interfaces.PartialCompliantWithRelativeStates.md
description: >-
  Dyad Interfaces.PartialCompliantWithRelativeStates docs.  Base model for a 1D
  translational compliant connection using relative displacement and relative
  velocity as states.
---

# `Interfaces.PartialCompliantWithRelativeStates` {#Interfaces.PartialCompliantWithRelativeStates}

Base model for a 1D translational compliant connection using relative displacement and relative velocity as states.

This partial component provides the foundational kinematics and force propagation for a compliant connection between two translational 1D mechanical flanges, `flange_a` and `flange_b`. It defines the relative displacement (`s_rel`) and relative velocity (`v_rel`) between these flanges. The relative velocity is explicitly defined as the time derivative of the relative displacement. An internal force `f` is declared, which is intended to be defined by an extending model (e.g., based on spring stiffness or damping coefficient). This internal force is then transmitted to `flange_b` and, with an opposite sign, to `flange_a`, satisfying Newton's third law. Since this is a `partial` model, it does not define the constitutive equation for the force `f` (i.e., how `f` depends on `s_rel` and `v_rel`). The key kinematic and force equations are:

$$s\_{rel} = flange_b.s - flange_a.s$$

$$v\_{rel} = \frac{d(s\_{rel})}{dt}$$

$$flange_b.f = f$$

$$flange_a.f = -f$$

This component extends from [`TranslationalComponents.Interfaces.PartialTwoFlanges`](Interfaces.PartialTwoFlanges.md)

## Usage {#Usage}

`TranslationalComponents.Interfaces.PartialCompliantWithRelativeStates()`

## Connectors {#Connectors}

* `flange_a` - This connector represents a mechanical flange with position and force as the potential and flow variables, respectively. ([`Flange`](/stdlib/Dyad/connectors/Flange#Flange))

* `flange_b` - This connector represents a mechanical flange with position and force as the potential and flow variables, respectively. ([`Flange`](/stdlib/Dyad/connectors/Flange#Flange))

## Variables {#Variables}

|    Name |                                                                    Description | Units |
| -------:| ------------------------------------------------------------------------------:| -----:|
| `s_rel` | Relative displacement between flange_b and flange_a (flange_b.s - flange_a.s). |     m |
| `v_rel` |        Relative velocity between flange_b and flange_a, defined as der(s_rel). |   m/s |
|     `f` |           Internal force exerted by the compliant element between the flanges. |     N |

## Source {#Source}

````dyad
"""
Base model for a 1D translational compliant connection using relative displacement and relative velocity as states.

This partial component provides the foundational kinematics and force propagation for a compliant
connection between two translational 1D mechanical flanges, `flange_a` and `flange_b`. It defines
the relative displacement (`s_rel`) and relative velocity (`v_rel`) between these flanges. The
relative velocity is explicitly defined as the time derivative of the relative displacement. An
internal force `f` is declared, which is intended to be defined by an extending model (e.g., based
on spring stiffness or damping coefficient). This internal force is then transmitted to `flange_b`
and, with an opposite sign, to `flange_a`, satisfying Newton's third law. Since this is a `partial`
model, it does not define the constitutive equation for the force `f` (i.e., how `f` depends on
`s_rel` and `v_rel`). The key kinematic and force equations are:
```math
s_{rel} = flange_b.s - flange_a.s
```
```math
v_{rel} = \frac{d(s_{rel})}{dt}
```
```math
flange_b.f = f
```
```math
flange_a.f = -f
```
"""
partial component PartialCompliantWithRelativeStates
  extends TranslationalComponents.Interfaces.PartialTwoFlanges
  "Relative displacement between flange_b and flange_a (flange_b.s - flange_a.s)."
  variable s_rel::Distance(statePriority = 50)
  "Relative velocity between flange_b and flange_a, defined as der(s_rel)."
  variable v_rel::Velocity(statePriority = 50)
  "Internal force exerted by the compliant element between the flanges."
  variable f::Dyad.Force
relations
  s_rel = flange_b.s - flange_a.s
  v_rel = der(s_rel)
  flange_b.f = f
  flange_a.f = -f
end
````

````dyad
"""
Base model for a 1D translational compliant connection using relative displacement and relative velocity as states.

This partial component provides the foundational kinematics and force propagation for a compliant
connection between two translational 1D mechanical flanges, `flange_a` and `flange_b`. It defines
the relative displacement (`s_rel`) and relative velocity (`v_rel`) between these flanges. The
relative velocity is explicitly defined as the time derivative of the relative displacement. An
internal force `f` is declared, which is intended to be defined by an extending model (e.g., based
on spring stiffness or damping coefficient). This internal force is then transmitted to `flange_b`
and, with an opposite sign, to `flange_a`, satisfying Newton's third law. Since this is a `partial`
model, it does not define the constitutive equation for the force `f` (i.e., how `f` depends on
`s_rel` and `v_rel`). The key kinematic and force equations are:
```math
s_{rel} = flange_b.s - flange_a.s
```
```math
v_{rel} = \frac{d(s_{rel})}{dt}
```
```math
flange_b.f = f
```
```math
flange_a.f = -f
```
"""
partial component PartialCompliantWithRelativeStates
  "Left mechanical translational flange (connector)"
  flange_a = Flange() {"Dyad": {"placement": {"icon": {"x1": -50, "y1": 450, "x2": 50, "y2": 550}}}}
  "Right mechanical translational flange (connector)"
  flange_b = Flange() {"Dyad": {"placement": {"icon": {"x1": 950, "y1": 450, "x2": 1050, "y2": 550}}}}
  "Relative displacement between flange_b and flange_a (flange_b.s - flange_a.s)."
  variable s_rel::Distance(statePriority = 50)
  "Relative velocity between flange_b and flange_a, defined as der(s_rel)."
  variable v_rel::Velocity(statePriority = 50)
  "Internal force exerted by the compliant element between the flanges."
  variable f::Dyad.Force
relations
  s_rel = flange_b.s - flange_a.s
  v_rel = der(s_rel)
  flange_b.f = f
  flange_a.f = -f
metadata {}
end
````

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses
