Skip to content

Commit 4d801b2

Browse files
author
Ames
committed
Doctest & ref fixes
1 parent 2e8703c commit 4d801b2

File tree

2 files changed

+17
-18
lines changed

2 files changed

+17
-18
lines changed

docs/src/shocktube.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ using PyThermo.ShockTube
2525
driven = Species("N2", P=100u"kPa", T=300u"K")
2626

2727
# Calculate shock jump for Mach 2.0 shock
28-
shocked, velocity = shockjump(driven, 2.0)
28+
shocked, velocity = shockjump!(driven, 2.0)
2929

3030
println("Post-shock pressure: ", pressure(shocked))
3131
println("Post-shock temperature: ", temperature(shocked))
@@ -51,7 +51,7 @@ driven = Mixture(["He" => 0.95, "acetone" => 0.05], T=18u"°C", P=85u"kPa")
5151
Ms = 2.2
5252

5353
# Calculate required driver pressure
54-
driver_calc = driverpressure(driver, driven, Ms)
54+
driver_calc = driverpressure!(driver, driven, Ms)
5555
println("Required driver pressure: ", pressure(driver_calc))
5656
# Output: ~3.73 MPa
5757
```
@@ -73,7 +73,7 @@ driver = Species("He")
7373
driven = Mixture(["He" => 0.95, "acetone" => 0.05], T=18u"°C", P=85u"kPa")
7474
Ms = 2.2
7575

76-
result = shockcalc(driver, driven, Ms)
76+
result = shockcalc!(driver, driven, Ms)
7777

7878
# Access all states
7979
println("Initial driven state: ", result.driven)
@@ -168,7 +168,7 @@ This is equivalent to:
168168

169169
```julia
170170
# Manual approach
171-
shocked, u_shocked = shockjump(driven, Ms)
171+
shocked, u_shocked = shockjump!(driven, Ms)
172172
sol = riemann_interface(shocked, test_gas, u_shocked, 0.0)
173173
```
174174

@@ -277,7 +277,7 @@ driven = Mixture(["He" => 0.95, "acetone" => 0.05], T=18u"°C", P=85u"kPa")
277277
Ms = 2.2
278278

279279
# Complete calculation
280-
result = shockcalc(driver, driven, Ms)
280+
result = shockcalc!(driver, driven, Ms)
281281

282282
println("=== Shock Tube Results ===")
283283
println("Incident shock Mach: ", result.Ms)
@@ -354,13 +354,12 @@ end
354354
## API reference
355355

356356
```@docs
357-
shockjump
358357
shockjump!
359-
driverpressure
360358
driverpressure!
361-
shockcalc
362359
shockcalc!
360+
ShockCalc
363361
riemann_interface
362+
RiemannSolution
364363
```
365364

366365
## Theory background

src/ShockTube.jl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ julia> round(Int, ustrip(u"m/s", velocity))
5353
```
5454
5555
# See Also
56-
- [`shockcalc`](@ref): Comprehensive shock tube calculation
57-
- [`driverpressure`](@ref): Calculate required driver pressure
56+
- [`shockcalc!`](@ref): Comprehensive shock tube calculation
57+
- [`driverpressure!`](@ref): Calculate required driver pressure
5858
"""
5959
function shockjump!(gas, Mach)
6060
α1 = (γ(gas) + 1) / (γ(gas) - 1)
@@ -107,8 +107,8 @@ julia> round(typeof(1.0u"MPa"), pressure(driver_calc), digits=2)
107107
```
108108
109109
# See Also
110-
- [`shockjump`](@ref): Calculate shock jump conditions
111-
- [`shockcalc`](@ref): Comprehensive shock tube calculation
110+
- [`shockjump!`](@ref): Calculate shock jump conditions
111+
- [`shockcalc!`](@ref): Comprehensive shock tube calculation
112112
"""
113113
function driverpressure!(driver, driven, Ms)
114114
γ1, γ4 = γ(driven), γ(driver)
@@ -165,7 +165,7 @@ julia> round(typeof(1.0u"kPa"), pressure(result.shocked), digits=1)
165165
```
166166
167167
# See Also
168-
- [`shockcalc`](@ref): Function that creates `ShockCalc` objects
168+
- [`shockcalc!`](@ref): Function that creates `ShockCalc` objects
169169
"""
170170
struct ShockCalc{DR<:PyThermo.Chemical,DV<:PyThermo.Chemical,U<:Unitful.Velocity}
171171
driver::DR
@@ -235,7 +235,7 @@ julia> driver = Species("He")
235235
Species(He, 298.1 K, 1.013e+05 Pa)
236236
237237
julia> driven = Mixture(["He" => 0.95, "acetone" => 0.05], T = 18u"°C", P = 85u"kPa")
238-
Mixture(95.0% helium, 5.00% acetone, 291.1 K, 8.500e+04 Pa)
238+
Mixture(95% He, 5% acetone, 291.1 K, 8.500e+04 Pa)
239239
240240
julia> result = shockcalc(driver, driven, 2.2);
241241
@@ -251,8 +251,8 @@ The calculation follows standard shock tube theory:
251251
4. Returns complete state information for analysis
252252
253253
# See Also
254-
- [`shockjump`](@ref): Calculate shock jump conditions only
255-
- [`driverpressure`](@ref): Calculate required driver pressure only
254+
- [`shockjump!`](@ref): Calculate shock jump conditions only
255+
- [`driverpressure!`](@ref): Calculate required driver pressure only
256256
- [`ShockCalc`](@ref): Result container struct
257257
"""
258258
function shockcalc!(driver, driven, Ms)
@@ -302,7 +302,7 @@ julia> round(u"m/s", sol.u_star, digits=1)
302302
```
303303
304304
# See Also
305-
- [`riemann_interface`](@ref): Function that creates `RiemannSolution` objects
305+
- [`shockcalc!`](@ref): Function that creates `ShockCalc` objects
306306
"""
307307
struct RiemannSolution{P<:Unitful.Pressure, V<:Unitful.Velocity, D<:Unitful.Density, T<:Unitful.Temperature}
308308
p_star::P
@@ -409,7 +409,7 @@ julia> round(ustrip(u"m/s", sol.S_contact), digits=1)
409409
410410
# See Also
411411
- [`RiemannSolution`](@ref): Result container struct
412-
- [`shockjump`](@ref): Calculate shock jump conditions
412+
- [`shockjump!`](@ref): Calculate shock jump conditions
413413
"""
414414
function riemann_interface(left::Chemical, right::Chemical, u_left=0.0, u_right=0.0)
415415
# Extract primitive variables

0 commit comments

Comments
 (0)