Skip to content

Commit

Permalink
back merge from trixi-framework#584
Browse files Browse the repository at this point in the history
  • Loading branch information
svchb committed Sep 27, 2024
1 parent d14fd19 commit bb12fb8
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions examples/fluid/dam_break_oil_film_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,29 @@ fluid_particle_spacing = H / 60
smoothing_length = 3.5 * fluid_particle_spacing
sound_speed = 20 * sqrt(gravity * H)

nu = 0.02 * smoothing_length * sound_speed / 8
oil_viscosity = ViscosityMorris(nu=10 * nu)
# Physical values
nu_water = 8.9E-7
nu_oil = 6E-5
nu_ratio = nu_water / nu_oil

nu_sim_oil = max(0.01 * smoothing_length * sound_speed, nu_oil)
nu_sim_water = nu_ratio * nu_sim_oil

oil_viscosity = ViscosityMorris(nu=nu_sim_oil)

trixi_include(@__MODULE__, joinpath(examples_dir(), "fluid", "dam_break_2d.jl"),
sol=nothing, fluid_particle_spacing=fluid_particle_spacing,
viscosity=ViscosityMorris(nu=nu), smoothing_length=smoothing_length,
gravity=gravity,
density_diffusion=DensityDiffusionMolteniColagrossi(delta=0.1),
sound_speed=sound_speed)
viscosity=ViscosityMorris(nu=nu_sim_water), smoothing_length=smoothing_length,
gravity=gravity, tspan=tspan, density_diffusion=nothing,
sound_speed=sound_speed, prefix="")

# ==========================================================================================
# ==== Setup oil layer

oil_size = (W, 0.1 * H)
oil_density = 700.0
oil_eos = StateEquationCole(; sound_speed, reference_density=oil_density, exponent=1,
clip_negative_pressure=false)

oil = RectangularShape(fluid_particle_spacing,
round.(Int, oil_size ./ fluid_particle_spacing),
Expand All @@ -43,11 +51,10 @@ for i in axes(oil.coordinates, 2)
end

oil_system = WeaklyCompressibleSPHSystem(oil, fluid_density_calculator,
state_equation, smoothing_kernel,
oil_eos, smoothing_kernel,
smoothing_length, viscosity=oil_viscosity,
density_diffusion=density_diffusion,
acceleration=(0.0, -gravity),
surface_tension=SurfaceTensionAkinci(surface_tension_coefficient=0.02),
surface_tension=SurfaceTensionAkinci(surface_tension_coefficient=0.01),
correction=AkinciFreeSurfaceCorrection(oil_density),
reference_particle_spacing=fluid_particle_spacing)

Expand Down

0 comments on commit bb12fb8

Please sign in to comment.