Skip to content

Commit 7e01d58

Browse files
committed
Reopen PR #362
1 parent fb90653 commit 7e01d58

File tree

4 files changed

+31
-35
lines changed

4 files changed

+31
-35
lines changed

docs/src/assets/Project.toml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
[deps]
2+
ControlSystemsBase = "aaaaaaaa-a6ca-5380-bf3e-84a91bcd477e"
3+
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
4+
DataInterpolations = "82cc6244-b520-54b8-b5a6-8a565e85f1d0"
5+
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
6+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
7+
IfElse = "615f187c-cbe4-4ef1-ba3b-2fcf58d6d173"
8+
ModelingToolkit = "961ee093-0014-501f-94e3-6117800e7a78"
9+
ModelingToolkitStandardLibrary = "16a59e39-deab-5bd0-87e4-056b12336739"
10+
OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed"
11+
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
12+
13+
[compat]
14+
ControlSystemsBase = "1.1"
15+
DataFrames = "1.7"
16+
DataInterpolations = "6.4, 7"
17+
DifferentialEquations = "7.6"
18+
Documenter = "1"
19+
IfElse = "0.1"
20+
ModelingToolkit = "9"
21+
OrdinaryDiffEq = "6.31"
22+
Plots = "1.36"

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
"""
@@ -24,13 +21,10 @@ Caps a hydraulic port to prevent mass flow in or out.
2421
end
2522

2623
"""
27-
Open(; p_int, name)
24+
Open(; name)
2825
2926
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.
3027
31-
# Parameters:
32-
- `p_int`: [Pa] initial pressure (set by `p_int` argument)
33-
3428
# Connectors:
3529
- `port`: hydraulic port
3630
"""
@@ -226,12 +220,11 @@ end
226220
@deprecate Pipe Tube
227221

228222
"""
229-
FlowDivider(;p_int, n, name)
223+
FlowDivider(; n, name)
230224
231225
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.
232226
233227
# Parameters:
234-
- `p_int`: [Pa] initial pressure
235228
- `n`: divide flow from `port_a` to `port_b` by `n`
236229
237230
# Connectors:
@@ -313,14 +306,11 @@ end
313306
end
314307

315308
"""
316-
Valve(reversible = false; p_a_int, p_b_int, area_int, Cd, Cd_reverse = Cd, minimum_area = 0, name)
309+
Valve(reversible = false; Cd, Cd_reverse = Cd, minimum_area = 0, name)
317310
318311
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.
319312
320313
# Parameters:
321-
- `p_a_int`: [Pa] initial pressure for `port_a`
322-
- `p_b_int`: [Pa] initial pressure for `port_b`
323-
- `area_int`: [m^2] initial valve opening
324314
- `Cd`: discharge coefficient flowing from `a → b`
325315
- `Cd_reverse`: discharge coefficient flowing from `b → a`
326316
- `minimum_area`: when `reversible = false` applies a forced minimum area
@@ -507,7 +497,7 @@ See also [`FixedVolume`](@ref), [`DynamicVolume`](@ref)
507497
end
508498

509499
"""
510-
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)
500+
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)
511501
512502
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.
513503
@@ -680,14 +670,11 @@ dm ────► │ │ area
680670
end
681671

682672
"""
683-
SpoolValve(reversible = false; p_a_int, p_b_int, x_int, Cd, d, name)
673+
SpoolValve(reversible = false; Cd, d, name)
684674
685675
Spool valve with `x` valve opening input as mechanical flange port and `d` diameter of orifice. See `Valve` for more information.
686676
687677
# Parameters:
688-
- `p_a_int`: [Pa] initial pressure for `port_a`
689-
- `p_b_int`: [Pa] initial pressure for `port_b`
690-
- `x_int`: [m] initial valve opening
691678
- `d`: [m] orifice diameter
692679
- `Cd`: discharge coefficient flowing from `a → b`
693680
@@ -727,18 +714,13 @@ See [`Valve`](@ref) for more information.
727714
end
728715

729716
"""
730-
SpoolValve2Way(reversible = false; p_s_int, p_a_int, p_b_int, p_r_int, m, g, x_int, Cd, d, name)
717+
SpoolValve2Way(reversible = false; m, g, Cd, d, name)
731718
732719
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.
733720
734721
# Parameters:
735-
- `p_s_int`: [Pa] initial pressure for `port_s`
736-
- `p_a_int`: [Pa] initial pressure for `port_a`
737-
- `p_b_int`: [Pa] initial pressure for `port_b`
738-
- `p_r_int`: [Pa] initial pressure for `port_r`
739722
- `m`: [kg] mass of the spool
740723
- `g`: [m/s²] gravity field acting on the spool, positive value acts in the positive direction
741-
- `x_int`: [m] initial valve opening
742724
- `d`: [m] orifice diameter
743725
- `Cd`: discharge coefficient flowing from `s → a` and `b → r`
744726
@@ -788,8 +770,6 @@ end
788770

789771
"""
790772
Actuator(N, add_inertia = true, reversible = false;
791-
p_a_int,
792-
p_b_int,
793773
area_a,
794774
area_b,
795775
perimeter_a = 2 * sqrt(area_a * pi),
@@ -819,8 +799,6 @@ Actuator made of two DynamicVolumes connected in opposite direction with body ma
819799
820800
# Parameters:
821801
## volume
822-
- `p_a_int`: [Pa] initial pressure for `port_a`
823-
- `p_b_int`: [Pa] initial pressure for `port_b`
824802
- `area_a`: [m^2] moving wall area of volume `A`
825803
- `area_b`: [m^2] moving wall area of volume `B`
826804
- `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)