Skip to content

Commit

Permalink
Merge branch 'morris_surface_tension' into wetting_model
Browse files Browse the repository at this point in the history
  • Loading branch information
svchb committed Dec 13, 2024
2 parents f1660dc + cfe7626 commit 2dedd8a
Showing 1 changed file with 6 additions and 32 deletions.
38 changes: 6 additions & 32 deletions examples/fluid/sphere_surface_tension_wall_2d.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# In this example we try to approach the static shape of a water droplet on a horizontal plane.
# The shape of a static droplet can be calculated from the Young-Laplace equation.
using TrixiParticles
using OrdinaryDiffEq

Expand All @@ -21,19 +19,16 @@ sound_speed = 120.0
state_equation = StateEquationCole(; sound_speed, reference_density=fluid_density,
exponent=1)

sphere_radius = 0.04
sphere_radius = 0.05

sphere1_center = (0.25, sphere_radius)
sphere1 = SphereShape(fluid_particle_spacing, sphere_radius, sphere1_center,
fluid_density, sphere_type=VoxelSphere())

# ==========================================================================================
# ==== Fluid
# fluid_smoothing_length = 1.0 * fluid_particle_spacing - eps()
# fluid_smoothing_kernel = SchoenbergCubicSplineKernel{2}()

fluid_smoothing_length = 3.25 * fluid_particle_spacing
fluid_smoothing_kernel = WendlandC2Kernel{2}()
fluid_smoothing_length = 1.0 * fluid_particle_spacing - eps()
fluid_smoothing_kernel = SchoenbergCubicSplineKernel{2}()

# For perfect wetting
# nu = 0.0005
Expand All @@ -45,35 +40,14 @@ alpha = 8 * nu / (fluid_smoothing_length * sound_speed)
# `adhesion_coefficient = 0.001` and `surface_tension_coefficient = 2.0` for no wetting

viscosity = ArtificialViscosityMonaghan(alpha=alpha, beta=0.0)
# sphere_surface_tension = WeaklyCompressibleSPHSystem(sphere1, ContinuityDensity(),
# state_equation, fluid_smoothing_kernel,
# fluid_smoothing_length,
# viscosity=viscosity,
# acceleration=(0.0, -gravity),
# surface_tension=SurfaceTensionMorris(surface_tension_coefficient=10.0),
# reference_particle_spacing=fluid_particle_spacing,
# surface_normal_method=ColorfieldSurfaceNormal(boundary_contact_threshold=0.05,
# ideal_density_threshold=0.75))

sphere_surface_tension = WeaklyCompressibleSPHSystem(sphere1, ContinuityDensity(),
state_equation, fluid_smoothing_kernel,
fluid_smoothing_length,
viscosity=viscosity,
acceleration=(0.0, -gravity),
surface_tension=SurfaceTensionMomentumMorris(surface_tension_coefficient=1.0),
reference_particle_spacing=fluid_particle_spacing,
surface_normal_method=ColorfieldSurfaceNormal(boundary_contact_threshold=0.05,
ideal_density_threshold=0.8,
interface_threshold=0.1))

# sphere_surface_tension = WeaklyCompressibleSPHSystem(sphere1, ContinuityDensity(),
# state_equation, fluid_smoothing_kernel,
# fluid_smoothing_length,
# viscosity=viscosity,
# acceleration=(0.0, -gravity),
# surface_tension=SurfaceTensionAkinci(surface_tension_coefficient=2.0),
# correction=AkinciFreeSurfaceCorrection(fluid_density),
# reference_particle_spacing=fluid_particle_spacing)
surface_tension=SurfaceTensionAkinci(surface_tension_coefficient=2.0),
correction=AkinciFreeSurfaceCorrection(fluid_density),
reference_particle_spacing=fluid_particle_spacing)

trixi_include(@__MODULE__,
joinpath(examples_dir(), "fluid", "falling_water_spheres_2d.jl"),
Expand Down

0 comments on commit 2dedd8a

Please sign in to comment.