@@ -47,18 +47,29 @@ smoothing_length = 1.75 * fluid_particle_spacing
4747smoothing_kernel = WendlandC2Kernel {2} ()
4848
4949fluid_density_calculator = ContinuityDensity ()
50- viscosity = ArtificialViscosityMonaghan (alpha= 0.02 , beta= 0.0 )
51- # nu = 0.02 * smoothing_length * sound_speed/8
52- # viscosity = ViscosityMorris(nu=nu)
53- # viscosity = ViscosityAdami(nu=nu)
50+ alpha = 0.02
51+ viscosity_fluid = ArtificialViscosityMonaghan (alpha= alpha, beta= 0.0 )
52+ # A typical formula to convert Artificial viscosity to a
53+ # kinematic viscosity is provided by Monaghan as
54+ # nu = alpha * smoothing_length * sound_speed/8
55+
56+ # Alternatively a kinematic viscosity for water can be set
57+ # nu = 1.0e-6
58+
59+ # This allows the use of a physical viscosity model like:
60+ # viscosity_fluid = ViscosityAdami(nu=nu)
61+ # or with additional dissipation through a Smagorinsky model
62+ # viscosity_fluid = ViscosityAdamiSGS(nu=nu)
63+ # For more details see the documentation "Viscosity model overview".
64+
5465# Alternatively the density diffusion model by Molteni & Colagrossi can be used,
5566# which will run faster.
5667# density_diffusion = DensityDiffusionMolteniColagrossi(delta=0.1)
5768density_diffusion = DensityDiffusionAntuono (tank. fluid, delta= 0.1 )
5869
5970fluid_system = WeaklyCompressibleSPHSystem (tank. fluid, fluid_density_calculator,
6071 state_equation, smoothing_kernel,
61- smoothing_length, viscosity= viscosity ,
72+ smoothing_length, viscosity= viscosity_fluid ,
6273 density_diffusion= density_diffusion,
6374 acceleration= (0.0 , - gravity), correction= nothing ,
6475 surface_tension= nothing ,
@@ -67,12 +78,17 @@ fluid_system = WeaklyCompressibleSPHSystem(tank.fluid, fluid_density_calculator,
6778# ==========================================================================================
6879# ==== Boundary
6980boundary_density_calculator = AdamiPressureExtrapolation ()
81+ viscosity_wall = nothing
82+ # For a no-slip condition the corresponding wall viscosity without SGS can be set
83+ # viscosity_wall = ViscosityAdami(nu=nu)
84+ # viscosity_wall = ViscosityMorris(nu=nu)
7085boundary_model = BoundaryModelDummyParticles (tank. boundary. density, tank. boundary. mass,
7186 state_equation= state_equation,
7287 boundary_density_calculator,
7388 smoothing_kernel, smoothing_length,
7489 correction= nothing ,
75- reference_particle_spacing= 0 )
90+ reference_particle_spacing= 0 ,
91+ viscosity= viscosity_wall)
7692
7793boundary_system = BoundarySPHSystem (tank. boundary, boundary_model, adhesion_coefficient= 0.0 )
7894
0 commit comments