From 3d83d59d84ec18d2295aec8d5440b44b2f498cf2 Mon Sep 17 00:00:00 2001 From: Zitz Stefan Date: Thu, 28 Nov 2024 13:46:51 +0100 Subject: [PATCH] Fixed the droplet 1d test, it's a circular segment area. --- test/simulate.jl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/simulate.jl b/test/simulate.jl index 2638e23..163499c 100644 --- a/test/simulate.jl +++ b/test/simulate.jl @@ -82,12 +82,12 @@ droph = maximum(h) # Compute the droplets shape after 10k time steps vnum = 1/6*π*droph*(3*droprad^2 + droph^2) - sph_r = droph/2 + length(findall(h .> thresh))^2/(8*droph) - ar = sph_r^2/2*(π/9 - sinpi(1/9)) + sph_r = droph/2 + length(findall(h .> thresh))^2/(8*droph) + ar = 2/3 * length(drop1d) * droph # sph_r * π/6 # It's one dimensional so it is the arc length .. sph_r^2/2*(π/9 - sinpi(1/9)) # Test that the droplet volume has not changed too much + @test vol ≈ vnum atol = vol/100*10 # TODO fix these two tests - # @test vol ≈ vnum atol = vol/100*10 # This breaks in 1d I have to investigate at some point in time - # @test ar ≈ sum(drop_ar) atol = ar/100*10 + @test ar ≈ sum(drop_ar) atol = ar/100*10 @test r1 ≈ droprad atol = r1/100*10 @test A[1] < A[end] sys = Swalbe.SysConst_1D(L = 200, param=Swalbe.Taumucs(Tmax=100, δ=3.0, tdump=50))