SPH for the Modeling of non-newtonian Fluids with Thermal-Dependent Rheology G. Bilotta 1,2 1 Dipartimento di Matematica e Informatica, Università di Catania, Italy 2 Istituto Nazionale Geofisica e Vulcanologia, Sezione di Catania, Italy 20140701 BAW/RUB workshop on Applied SPH
Outline 1 Motivations 2 The problem 3 Non-Newtonian Rheologies 4 SPH discretization 5 Lava flow simulations 6 Conclusions
Motivations 1 Motivations 2 The problem 3 Non-Newtonian Rheologies 4 SPH discretization 5 Lava flow simulations 6 Conclusions
Motivations
Motivations
Motivations Work started as part of LAVA-V3 project (INGV / DPC). Aim: develop a new numerical model for lava flows capable of modeling all aspects of the flow, including: solidification crust/front/levee formation and rupture tunnel formation ephemeral vent opening
People Alexis Hérault modeling and GPU implementation Giuseppe Bilotta modeling and GPU implementation Eugenio Rustico multi-gpu implementation Ciro Del Negro project coordiator
The problem 1 Motivations 2 The problem 3 Non-Newtonian Rheologies 4 SPH discretization 5 Lava flow simulations 6 Conclusions
The problem Navier-Stokes equations: Dρ Dt = ρ u, eqn. of state or u = 0, ρdu Dt = P + τ + F, where ρ, u, P, F: density, velocity, pressure, external forces (gravity) τ = µ u: viscous stress
The problem Navier-Stokes and heat equations: Dρ Dt = ρ u, eqn. of state or u = 0, where ρdu Dt = P + τ + F, DT ρc p = (κ T) + τ u Dt ρ, u, P, F: density, velocity, pressure, external forces (gravity) τ = µ u: viscous stress c p, κ: specific heat capacity and thermal conductivity
Non-Newtonian Fluids with Thermal-Dependent Rheology Thermal depenency: heat equation has a viscous heating term: i,j τ ij u i / x j ; (Costa & Macedonio, 2003) µ = µ(t). Non-Newtonian fluids: τ µ u. (or rather, µ is not independent of u).
1 Motivations 2 The problem 3 Non-Newtonian Rheologies 4 SPH discretization 5 Lava flow simulations 6 Conclusions
Rheology Rheology: study of flow of deformable matter when subject to stress. Also: the law with which deformable matter flows, i.e. the relation between shear stress and rate of strain. Newtonian rheology: linear relation τ = µ u, coefficient µ (viscosity) does not depend on u. (Or conversely: u = φτ, with φ = 1/µ fluidity, independent from τ.) Most fluids are actually non-newtonian: stress/strain relation depends on the stress/strain rate, but we can always talk about the apparent viscosity (ratio of stress to strain rate).
Non-Newtonian rheologies Categories: shear-thinning or pseudo-plastic: (apparent) viscosity decreases with stress/shear rate (e.g. paint); shear-thickening or dilatant: (apparent) viscosity increases with stress/shear rate (e.g. cornstarch in water); Can be time-dependent (shear thinning: thixotropic; shear thickening: rheopectic) or time-independent: Bingham plastic, power-law rheologies, Herschel-Bulkley fluids, etc.
Beyond Newton One-dimensional formulations: Bingham plastic : τ = τ 0 + Kγ, no flow if τ < τ 0, Newton-like behavior afterwards with τ stress, γ shear rate, τ 0 limit stress, K consistency index, n power index.
Beyond Newton One-dimensional formulations: Bingham plastic : τ = τ 0 + Kγ, no flow if τ < τ 0, Newton-like behavior afterwards Power law : τ = Kγ n ; Newton for n = 1, pseudo-plastic for n > 1, dilatant for n < 1; with τ stress, γ shear rate, τ 0 limit stress, K consistency index, n power index.
Beyond Newton One-dimensional formulations: Bingham plastic : τ = τ 0 + Kγ, no flow if τ < τ 0, Newton-like behavior afterwards Power law : τ = Kγ n ; Newton for n = 1, pseudo-plastic for n > 1, dilatant for n < 1; Herschel-Bulkley : τ = τ 0 + Kγ n, general case that includes Newtonian, Bingham and power-law behavior; with τ stress, γ shear rate, τ 0 limit stress, K consistency index, n power index.
Rheology plots/i shear stress more viscous less viscous strain rate
Rheology plots/ii strain rate less viscous more viscous shear stress
Rheology plots/iii dilatant strain rate newtonian pseudoplastic Bingham plastic Herschel-Bulkley pseudoplastic shear stress
Herschel-Bulkley General formulation, with temperature dependency: { µ µ(t) = 0 (T) if ɛ ɛ 0 (T), K(T)ɛ n(t) + τ 0(T) ɛ if ɛ > ɛ 0 (T) (ɛ: second invariant of rate of strain tensor) infinite viscosity for null strain
Herschel-Bulkley General formulation, with temperature dependency, regularized (Zhu, following Papanastasiou): { µ µ(t) = 0 (T) if ɛ ɛ 0 (T), K(T)ɛ n(t) + τ 0 (T) 1 exp( αɛ) ɛ if ɛ > ɛ 0 (T) (ɛ: second invariant of rate of strain tensor) (α some large regularizing constant)
SPH discretization 1 Motivations 2 The problem 3 Non-Newtonian Rheologies 4 SPH discretization 5 Lava flow simulations 6 Conclusions
Smoothed Particle Hydrodynamics Smoothed Particle Hydrodynamics. Lagrangian meshless method with smoothed field (position, velocity, temperature) interpolation: f (x) = f (y)δ(x y)dy f (y)w(x y, h)dy Ω Ω j f (x j )W(x x j, h)v j where W is a smoothing kernel that approximates the Dirac s δ, V j is the volume of particle j, kernel with compact support (radius h) = summation extended to neighbors only.
SPH kernel properties E.g. density: ρ(x) j ρ(x j )W(x x j, h)v j = j m j W(x x j, h) where m j = V j ρ(x j ) is the mass of particle j. Kernel normalization (Shepard): W(x x i, h) = W(x x i ) j W(x x j)v j allows exact reconstruction of constant fields: normalized kernels ensure zero-order accuracy, symmetric kernels ensure first-order accuracy, positive kernels ensure isolated particles have nonnegative density.
SPH gradients/i For gradients, we use Green s formula to get f ( x) = f ( y)δ( x y)d y f ( y)w( x y, h)d y Ω Ω f ( y) y W( x y, h)d y + Ω + f ( y)w( x y, h) nds j Ω m j ρ j f j j W( x x j, h) +??? = = j m j ρ j f j i W( x x j, h) +???. If supp W i Ω, then??? = 0. Otherwise, correction terms have to be added.
SPH gradients/ii Other possible formulas: f (x i ) m j (f ρ j ± f i ) i W(x i x j, h), j j f (x i ) 1 m ρ j (f i f j ) i W(x i x j, h), i f (x i ) ρ i j j m j ( fj ρ 2 j + f i ρ 2 i ) i W(x i x j, h). Chosen for different fields for different stability properties. Common property: explicit computation, no need to invert linear systems.
SPH discretization/i Discretized continuity equations (W ij = W(x i x j, h), f ij = f i f j ): ( ) dρ = m dt j u ij i W ij or i or (summation density): ( ) dρ m j = ρ dt i u i ρ ij i W ij, j ρ i = j m j W ij. (but summation density can only be used reliably in absence of a free surface).
SPH discretization/ii Discretized momentum and thermal equations (W ij = W(x i x j, h), f ij = f i f j ): ( ) du = ( Pj m dt j i ρ 2 j + m j µ i + µ j ρ i ρ j ( ) dt c pi = 4m j dt i ρ i ρ j 2m j ρ i ρ j + P i ρ 2 i ) i W ij + r ij i W ij u ij + g, r 2 ij κ i κ j r ij i W ij T κ i + κ ij j rij 2 + µ i µ j µ i + µ j (r ij u ij ) 2 r ij i W ij r 4 ij
Weakly compressible SPH To preserve direct computation, slightly compressible flows with equation of state P = ρ (( ) 0c s ρ γ 1) γ (ρ 0 density at rest, c s (artificial) speed of sound, taken an order of magnitude larger than the maximum expected speed of the phenomenon). Speed of sound is chosen ficticious because it limits time-stepping in explicit methods. (For lava we don t really worry about that, because the viscosity is actually what limits the timestep.) ρ 0
Viscosity Non-Newtonian fuid: µ i is the apparent viscosity of the particle, computed separately before each force computation. Strain rate tensor: u i = j u ij i W ij V j Second invariant: ɛ i = 1 ( (tr u) 2 2 tr( u 2 ) ) Then compute µ i from (regularized) Herschel-Bulkley
Boundary conditions: ground/i Lava ows on complex topographies, we assume them de ned through a Digital Elevation Model (DEM): 2D grid of elevations, cell side p. Interpolate to nd z0 height at projection (x0, y0) of particle on DEM, again to nd height at (x0 + p, y0), (x0, y0 + p), nd plane by three points, interact with plane.!y P(x,y,z)!!x " z0!y P(x,y,z)!!x " z0 z2 z1
Boundary conditions: ground/ii! n h! u r! u T Friction:!! u! f = µs 1 u T f = µ T! n! " ( h2 # r 2 ) with S 1 ground particle surface. Ground particle surface can be estimated by S 1 = S g /N g or set as problem parameter.
Boundary conditions: ground/iii Conduction to ground: particle close to the DEM lose T = κs 1 c p m T T ground t r due to heat exchange with ground. Ground temperature T ground is assumed constant.
Boundary conditions: free surface/i Need to detect free surface for radiative losses. Standard approach: check for neighbors in cone pointing towards gradient of characteristic function. (a) (b) Trick: lava flows are essentially two-dimensional, check for presence of particles in upwards cone. (a is on the surface, b is not).
Boundary conditions: free surface/i Radiative losses: T = K BεS 2 c p m (T 4 T 4 ext ) T. with K B Stefan-Boltzmann constant, ε emissivity. External temperature T ext is assumed constant. Free-surface particle surface S 2 is either a problem parameter, or can be computed as S 2 = S f /N f.
Phase change q: fraction of latent heat for phase change; q = 0: liquid, q = 1: solid; T : new temperature from integration of heat equation; if T < T s and q < 1, then: T = T s increment q by c p (T s T )/L if q 1, then: T = T s L(q 1)/c p q = 1 otherwise T = T.
Implementation/I Weakly compressible SPH is embarrasingly parallel (each particle can be computed concurrently and independently from the others, by just reading their data).
Implementation/II SPH: excellent candidate for GPU implementation, > 150 faster than (serial) CPU, 50 faster than parallel CPU implementation. GPUs also give us free interpolation (in hardware), good for topography.
Implementation/III Based on GPUSPH, open source implementation of SPH on GPU using CUDA, available from http://gpusph.org implements SPH for Newtonian fluid-dynamics multiple SPH formulations variety of smoothing kernel choices variety of viscosity models variety of boundary conditions single GPU, multi-gpu, multi-node
Lava flow simulations 1 Motivations 2 The problem 3 Non-Newtonian Rheologies 4 SPH discretization 5 Lava flow simulations 6 Conclusions
Parameters parameter symbol values unit density ρ 2400 kg m 3 heat capacity C p 1150 J kg 1 K 1 latent heat L 3.3 10 5 J kg 1 conductivity κ 2.2 W m 1 K 1 emissivity ε 1 vent temperature T e 1350 K solidus temperature T s 1163 K ground temperature T ground 293 K air temperature T ext 293 K
Temperature-dependent parameters Consistency factor from Giordano & Dingwell (2003): log K(T) = 4.643 + 58122.44 427.04 [H 2O] T 499.31 + 28.74 ln([h 2 O]) with T in Kelvin and [H 2 O] is the water content in weight percentage. In our tests [H 2 O] = 0.005%. Yield strength from Miyamoto (1997): log τ 0 (T) = 0.0089(T T e ) + 1.9. Regularizing coefficient α = 1000, and for Herschel-Bulkley: n(t) = 0.1 (shear-thinning).
Apparent viscosities 200 100 50 1363 K 1263 K 100 1363 K 1263 K 20 10 10 5 1 2 0.1 0.01 100 Bingham 0.1 100 Herschel-Bulkley
Newtonian Constant viscosity Temperature-dependent viscosity
Bingham Constant viscosity Temperature-dependent viscosity
Herschel-Bulkley Constant viscosity Temperature-dependent viscosity
Conclusions we can simulate both Newtonian and non-newtonian fluids with SPH; coupled thermal/dynamic problems are possible, including phase transition and thermal dependent rheology; GPU implementation gives us good performance at low cost, and some things for free (e.g. DEM interpolation); our model can be used to explore non-newtonian fluids, and help finding what is the most correct rheology for lava.