Skip to content

Commit 5a2dd3b

Browse files
committed
Merge branch 'master' of https://github.com/ClapeyronThermo/Clapeyron.jl into 500-eta-crit
2 parents 3675ba4 + 9a659cf commit 5a2dd3b

File tree

8 files changed

+33
-5
lines changed

8 files changed

+33
-5
lines changed

docs/src/api/parameters.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ Clapeyron.xlogx
9797
Clapeyron.export_model
9898
Clapeyron.FluidCorrelation
9999
Clapeyron.GammaPhi
100-
Clapeyron.ExtendedCorrespondingStates
101100
Clapeyron.ECS
102101
```
103102

docs/src/eos/correlations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Most Liquid volume correlations are only defined by a volume equation, but some
5151
RackettLiquid
5252
YamadaGunnLiquid
5353
COSTALD
54-
GrenkeElliotWater
54+
GrenkeElliottWater
5555
HoltenWater
5656
```
5757

docs/src/properties/multi.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,11 @@ Clapeyron.FugBubblePressure
6767
Clapeyron.ActivityBubblePressure
6868
Clapeyron.ChemPotBubbleTemperature
6969
Clapeyron.FugBubbleTemperature
70-
Clapeyron.ActivityBubbleTemperature
7170
Clapeyron.ChemPotDewPressure
7271
Clapeyron.FugDewPressure
7372
Clapeyron.ActivityDewPressure
7473
Clapeyron.ChemPotDewTemperature
7574
Clapeyron.FugDewTemperature
76-
Clapeyron.ActivityDewTemperature
7775
```
7876

7977
## Consistency and Stability

src/database/combiningrules/implace.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ SingleOrPair_values(x) = x
33
SingleOrPair_values(x::SingleOrPair) = x.values
44

55
### kij_mix
6+
7+
"""
8+
kij_mix!(f,out)
9+
10+
Inplace version of [`kij_mix`](@ref)
11+
"""
612
function kij_mix!(f::F,out) where F
713
return kij_mix!(f,out,nothing)
814
end
@@ -73,7 +79,11 @@ function kij_mix!(f::F,p::AbstractMatrix,K::AbstractMatrix,B::AbstractMatrix) wh
7379
end
7480

7581
## pair_mix!
82+
"""
83+
pair_mix!(f,out,Q)
7684
85+
Inplace version of [`pair_mix`](@ref)
86+
"""
7787
function pair_mix!(f::F,out,Q) where F
7888
_out = SingleOrPair_values(out)
7989
q = SingleOrPair_values(Q)

src/methods/pT.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -847,6 +847,18 @@ function compressibility_factor(model::EoSModel, p, T, z=SA[1.]; phase=:unknown,
847847
return p*V/(sum(z)*Rgas(model)*T)
848848
end
849849

850+
"""
851+
inversion_temperature(model::EoSModel, p, z=SA[1.0]; phase=:unknown, threaded=true, vol0=nothing)
852+
853+
Calculates the inversion temperature `T_inv`, defined as the temperature where the Joule-Thomson coefficient becomes zero, i.e.
854+
855+
```julia
856+
μⱼₜ(T) = 0
857+
```
858+
The keywords `phase`, `threaded` and `vol0` are passed to the [`Clapeyron.volume`](@ref) solver.
859+
860+
See also [`joule_thomson_coefficient`](@ref).
861+
"""
850862
function inversion_temperature(model::EoSModel, p, z=SA[1.0]; phase=:unknown, threaded=true, vol0=nothing)
851863
T0 = 6.75*T_scale(model,z)
852864
μⱼₜ(T) = joule_thomson_coefficient(model, p, T, z; phase, threaded, vol0)

src/methods/property_solvers/singlecomponent/crit_pure.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Returns a tuple, containing:
88
- Critical pressure `[Pa]`
99
- Critical molar volume `[m³·mol⁻¹]`
1010
"""
11+
crit_pure
1112

1213
function crit_pure(model::EoSModel)
1314
satmodel = saturation_model(model)

src/methods/property_solvers/stability/stability.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,11 @@ function VT_chemical_stability(model::EoSModel,V,T,z,check_vol = true)
151151
return chemical_stability(model,p,T,z)
152152
end
153153

154+
"""
155+
chemical_stability(model,V,T,z)::Bool
156+
157+
Performs a chemical stability check using the tangent plane distance criterion, using the [tpd](@ref) function.
158+
"""
154159
function chemical_stability(model,p,T,z)
155160
length(model) == 1 && return true #there aren't other combinations of composition.
156161
comps,wi,_,_ = tpd(model,p,T,z,break_first = true)

src/models/ECS/ECS.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ f,h = shape_factors(model::ECS,shape_ref::EoSModel,V,T,z)
4141
4242
.1 Mollerup, J. (1998). Unification of the two-parameter equation of state and the principle of corresponding states. Fluid Phase Equilibria, 148(1–2), 1–19. [doi:10.1016/s0378-3812(98)00230-1](https://doi.org/10.1016/s0378-3812(98)00230-1)
4343
"""
44+
ECS
45+
4446
const ECS = ExtendedCorrespondingStates
4547

4648
Base.length(model::ECS) = length(model.shape_model)
@@ -110,7 +112,8 @@ fh = a(T)/a₀(T₀)
110112
1. Mollerup, J. (1998). Unification of the two-parameter equation of state and the principle of corresponding states. Fluid Phase Equilibria, 148(1–2), 1–19. [doi:10.1016/s0378-3812(98)00230-1](https://doi.org/10.1016/s0378-3812(98)00230-1)
111113
112114
"""
113-
function shape_factors end
115+
shape_factors
116+
114117
shape_factors(model::ECS,V,T,z=SA[1.0]) = shape_factors(model,model.shape_ref,V,T,z)
115118

116119
function shape_factors(model::ECS,shape_ref::DeltaCubicModel,V,T,z=SA[1.0])

0 commit comments

Comments
 (0)