Fixed
Constrains a translational flange to a fixed position.
This component represents a mechanical anchor or a fixed reference point within a 1D translational system. It rigidly sets the position of its single translational flange (flange
) to a constant value specified by the parameter s0
. The key behavior is defined by the simple algebraic constraint:
math
Usage
Fixed(s0=0.0)
Parameters:
Name | Description | Units | Default value |
---|---|---|---|
s0 | Fixed offset position | m | 0 |
Connectors
flange
- (Flange
)
Behavior
Source
dyad
# Constrains a translational flange to a fixed position.
#
# This component represents a mechanical anchor or a fixed reference point within a 1D translational system.
# It rigidly sets the position of its single translational flange (`flange`) to a constant value specified by the parameter `s0`.
# The key behavior is defined by the simple algebraic constraint:
# ```math
# flange.s = s0
# ```math
component Fixed
# Translational flange connector
flange = Flange() [{"Dyad": {"placement": {"icon": {"x1": 400, "y1": -100, "x2": 600, "y2": 100}}}}]
# Fixed offset position
parameter s0::Dyad.Position = 0.0
relations
flange.s = s0
metadata {"Dyad": {"icons": {"default": "dyad://TranslationalComponents/Fixed.svg"}}}
end
Flattened Source
dyad
# Constrains a translational flange to a fixed position.
#
# This component represents a mechanical anchor or a fixed reference point within a 1D translational system.
# It rigidly sets the position of its single translational flange (`flange`) to a constant value specified by the parameter `s0`.
# The key behavior is defined by the simple algebraic constraint:
# ```math
# flange.s = s0
# ```math
component Fixed
# Translational flange connector
flange = Flange() [{"Dyad": {"placement": {"icon": {"x1": 400, "y1": -100, "x2": 600, "y2": 100}}}}]
# Fixed offset position
parameter s0::Dyad.Position = 0.0
relations
flange.s = s0
metadata {"Dyad": {"icons": {"default": "dyad://TranslationalComponents/Fixed.svg"}}}
end
Test Cases
This is setup code, that must be run before each test case.
julia
using TranslationalComponents
using ModelingToolkit, OrdinaryDiffEqDefault
using Plots
using CSV, DataFrames
snapshotsdir = joinpath(dirname(dirname(pathof(TranslationalComponents))), "test", "snapshots")
"/home/actions-runner-10/.julia/packages/TranslationalComponents/khJb7/test/snapshots"
Related
Examples
Experiments
Analyses
Tests