Skip to content

Commit

Permalink
Fix doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
moyner committed Dec 20, 2023
1 parent b62c453 commit f91741f
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions docs/src/examples/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ V = flash_2ph(eos, conditions)
# output
0.2660973082539686
0.2660973082539688
```

## K-values and fractions
Expand Down Expand Up @@ -89,26 +89,26 @@ K
# output
2-element Vector{Float64}:
4.12272462297378
0.00047115820615355295
4.1227246229737515
0.0004711582061535555
```

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:

```jldoctest
julia> liquid_mole_fraction.(z, K, V)
2-element Vector{Float64}:
0.24247146623483776
0.7575285337651623
0.24247146623483945
0.7575285337651605
```

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,

```jldoctest
julia> vapor_mole_fraction.(z, K, V)
2-element Vector{Float64}:
0.9996430842149211
0.000356915785078925
0.9996430842149212
0.0003569157850789261
```

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

0 comments on commit f91741f

Please sign in to comment.