Skip to content

Commit b62ab3a

Browse files
committed
Make doctests more robust
1 parent 69eb333 commit b62ab3a

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

docs/src/examples/basics.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,19 +97,19 @@ round.(K, digits = 5)
9797
From the chosen overall mole fractions `z`, and the flashed `K`-values together with the vapor fraction `V` we can get the phase mole fractions in the liquid phase:
9898

9999
```jldoctest
100-
julia> liquid_mole_fraction.(z, K, V)
100+
julia> round.(liquid_mole_fraction.(z, K, V), digits = 5)
101101
2-element Vector{Float64}:
102-
0.24247146623483776
103-
0.7575285337651623
102+
0.24247
103+
0.75753
104104
```
105105

106106
As expected, the liquid phase has more of the heavy component than in the overall mole fractions (0.75 relative to 0.6). If we compute the vapor fractions,
107107

108108
```jldoctest
109-
julia> vapor_mole_fraction.(z, K, V)
109+
julia> round.(vapor_mole_fraction.(z, K, V), digits = 5)
110110
2-element Vector{Float64}:
111-
0.9996430842149211
112-
0.000356915785078925
111+
0.99964
112+
0.00036
113113
```
114114

115115
we see that the vapor phase is almost entirely made up of the lighter methane at the chosen conditions.

0 commit comments

Comments
 (0)