Skip to content

Commit 2e021af

Browse files
authored
Merge pull request #1 from matthew-kapp/change-readme
Hydraulic docstrings updated to match code - updated docstrings in utils.jl to remove P_int (in docstrings) - updated docstrings in sources.jl to remove P_int (in docstrings) - updated docstrings in components.jl to remove P_int, P_a_int, etc (in docstrings) - solves issue #354
2 parents f1021de + 9ab3f4b commit 2e021af

File tree

4 files changed

+10
-36
lines changed

4 files changed

+10
-36
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,4 @@ docs/site/
2121
# It records a fixed state of all packages used by the project. As such, it should not be
2222
# committed for packages, but should be committed for applications that require a static
2323
# environment.
24-
Manifest.toml
24+
Manifest.toml

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)