Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pw0908 committed Oct 30, 2024
1 parent d986268 commit f60fbe6
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/models/SAFT/COFFEE/COFFEE.jl
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ function a_nf(model ::COFFEEModel, V, T, z, _data=@f(data))

Q = ∫∫∫Odξ₁dξ₂dγ12(ρ̄,T̄,μ²,d,_Iμμ)

return 9*π/12*ρ̄*g_hs*log(4π/Q)
return 19*π/12*ρ̄*g_hs*log(4π/Q)
end

function Iμμ(ρ̄,T̄,μ)
Expand Down
22 changes: 22 additions & 0 deletions test/test_models_saft_others.jl
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,26 @@ end
GC.gc()
end
end
end

@testset "COFFEE" begin
@printline
let T = 298.15, V = 1e-4,z = Clapeyron.SA[1.0];
@testset "COFFEE" begin
system = COFFEE(["a1"]; userlocations = (;
Mw = [1.],
segment = [1.],
sigma = [3.;;],
epsilon = [300.;;],
lambda_r = [12;;],
lambda_a = [6;;],
shift = [3*0.15],
dipole = [2.0*1.0575091914494172],))
@test Clapeyron.a_ff(system, V, T, z) -2.3889723633885107 rtol = 1e-6
@test Clapeyron.a_nf(system, V, T, z) -0.7418363729609996 rtol = 1e-6

test_gibbs_duhem(system, V, T, z)
GC.gc()
end
end
end

0 comments on commit f60fbe6

Please sign in to comment.