Skip to content

Commit 5394538

Browse files
committed
Merge branch 'main' into hydraulic-macros
Docstring updates merged
2 parents 82c6951 + a47c080 commit 5394538

File tree

3 files changed

+9
-35
lines changed

3 files changed

+9
-35
lines changed

src/Hydraulic/IsothermalCompressible/components.jl

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11

22
"""
3-
Cap(; p_int, name)
3+
Cap(; name)
44
55
Caps a hydraulic port to prevent mass flow in or out.
66
7-
# Parameters:
8-
- `p_int`: [Pa] initial pressure (set by `p_int` argument)
9-
107
# Connectors:
118
- `port`: hydraulic port
129
"""
@@ -31,13 +28,10 @@ Caps a hydraulic port to prevent mass flow in or out.
3128
end
3229

3330
"""
34-
Open(; p_int, name)
31+
Open(; name)
3532
3633
Provides an "open" boundary condition for a hydraulic port such that mass flow `dm` is non-zero. This is opposite from an un-connected hydraulic port or the `Cap` boundary component which sets the mass flow `dm` to zero.
3734
38-
# Parameters:
39-
- `p_int`: [Pa] initial pressure (set by `p_int` argument)
40-
4135
# Connectors:
4236
- `port`: hydraulic port
4337
"""
@@ -236,12 +230,11 @@ end
236230
@deprecate Pipe Tube
237231

238232
"""
239-
FlowDivider(;p_int, n, name)
233+
FlowDivider(; n, name)
240234
241235
Reduces the flow from `port_a` to `port_b` by `n`. Useful for modeling parallel tubes efficiently by placing a `FlowDivider` on each end of a tube.
242236
243237
# Parameters:
244-
- `p_int`: [Pa] initial pressure
245238
- `n`: divide flow from `port_a` to `port_b` by `n`
246239
247240
# Connectors:
@@ -323,14 +316,11 @@ end
323316
end
324317

325318
"""
326-
Valve(reversible = false; p_a_int, p_b_int, area_int, Cd, Cd_reverse = Cd, minimum_area = 0, name)
319+
Valve(reversible = false; Cd, Cd_reverse = Cd, minimum_area = 0, name)
327320
328321
Valve with `area` input and discharge coefficient `Cd` defined by https://en.wikipedia.org/wiki/Discharge_coefficient. The `Cd_reverse` parameter allows for directional flow restriction, making it possible to define a check valve.
329322
330323
# Parameters:
331-
- `p_a_int`: [Pa] initial pressure for `port_a`
332-
- `p_b_int`: [Pa] initial pressure for `port_b`
333-
- `area_int`: [m^2] initial valve opening
334324
- `Cd`: discharge coefficient flowing from `a → b`
335325
- `Cd_reverse`: discharge coefficient flowing from `b → a`
336326
- `minimum_area`: when `reversible = false` applies a forced minimum area
@@ -517,7 +507,7 @@ See also [`FixedVolume`](@ref), [`DynamicVolume`](@ref)
517507
end
518508

519509
"""
520-
DynamicVolume(N, add_inertia=true; p_int, area, x_int = 0, x_max, x_min = 0, x_damp = x_min, direction = +1, perimeter = 2 * sqrt(area * pi), shape_factor = 64, head_factor = 1, Cd = 1e2, Cd_reverse = Cd, name)
510+
DynamicVolume(N, add_inertia=true; area, x_int = 0, x_max, x_min = 0, x_damp = x_min, direction = +1, perimeter = 2 * sqrt(area * pi), shape_factor = 64, head_factor = 1, Cd = 1e2, Cd_reverse = Cd, name)
521511
522512
Volume with moving wall with `flange` connector for converting hydraulic energy to 1D mechanical. The `direction` argument aligns the mechanical port with the hydraulic port, useful when connecting two dynamic volumes together in oppsing directions to create an actuator.
523513
@@ -690,14 +680,11 @@ dm ────► │ │ area
690680
end
691681

692682
"""
693-
SpoolValve(reversible = false; p_a_int, p_b_int, x_int, Cd, d, name)
683+
SpoolValve(reversible = false; Cd, d, name)
694684
695685
Spool valve with `x` valve opening input as mechanical flange port and `d` diameter of orifice. See `Valve` for more information.
696686
697687
# Parameters:
698-
- `p_a_int`: [Pa] initial pressure for `port_a`
699-
- `p_b_int`: [Pa] initial pressure for `port_b`
700-
- `x_int`: [m] initial valve opening
701688
- `d`: [m] orifice diameter
702689
- `Cd`: discharge coefficient flowing from `a → b`
703690
@@ -737,18 +724,13 @@ See [`Valve`](@ref) for more information.
737724
end
738725

739726
"""
740-
SpoolValve2Way(reversible = false; p_s_int, p_a_int, p_b_int, p_r_int, m, g, x_int, Cd, d, name)
727+
SpoolValve2Way(reversible = false; m, g, Cd, d, name)
741728
742729
2-ways spool valve with 4 ports and spool mass. Fluid flow direction S → A and B → R when `x` is positive and S → B and A → R when `x` is negative.
743730
744731
# Parameters:
745-
- `p_s_int`: [Pa] initial pressure for `port_s`
746-
- `p_a_int`: [Pa] initial pressure for `port_a`
747-
- `p_b_int`: [Pa] initial pressure for `port_b`
748-
- `p_r_int`: [Pa] initial pressure for `port_r`
749732
- `m`: [kg] mass of the spool
750733
- `g`: [m/s²] gravity field acting on the spool, positive value acts in the positive direction
751-
- `x_int`: [m] initial valve opening
752734
- `d`: [m] orifice diameter
753735
- `Cd`: discharge coefficient flowing from `s → a` and `b → r`
754736
@@ -798,8 +780,6 @@ end
798780

799781
"""
800782
Actuator(N, add_inertia = true, reversible = false;
801-
p_a_int,
802-
p_b_int,
803783
area_a,
804784
area_b,
805785
perimeter_a = 2 * sqrt(area_a * pi),
@@ -829,8 +809,6 @@ Actuator made of two DynamicVolumes connected in opposite direction with body ma
829809
830810
# Parameters:
831811
## volume
832-
- `p_a_int`: [Pa] initial pressure for `port_a`
833-
- `p_b_int`: [Pa] initial pressure for `port_b`
834812
- `area_a`: [m^2] moving wall area of volume `A`
835813
- `area_b`: [m^2] moving wall area of volume `B`
836814
- `length_a_int`: [m] initial wall position for `A`

src/Hydraulic/IsothermalCompressible/sources.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
MassFlow(; name, p_int)
2+
MassFlow(; name)
33
44
Hydraulic mass flow input source
55

src/Hydraulic/IsothermalCompressible/utils.jl

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,10 @@ regPow(x, a, delta = 0.01) = x * (x * x + delta * delta)^((a - 1) / 2);
44
regRoot(x, delta = 0.01) = regPow(x, 0.5, delta)
55

66
"""
7-
HydraulicPort(;p_int, name)
7+
HydraulicPort(; name)
88
99
Connector port for hydraulic components.
1010
11-
# Arguments:
12-
13-
- `p_int`: [Pa] initial gauge pressure
14-
1511
# States:
1612
- `p`: [Pa] gauge total pressure
1713
- `dm`: [kg/s] mass flow

0 commit comments

Comments
 (0)