This repository contains a Julia package and scripts that can be used to reproduce results presented in the publication: A face-centred finite volume method for high-contrast Stokes interface problems by R. Sevilla and T. Duretz published in International Journal for Numerical Methods in Engineering.
- Clone/Download the repository
- Run Julia from within the folder
- In Julia's REPL switch to package mode: type
]
- Activate the environement: type
activate .
- Install all necessary dependencies: type
instantiate
The example code can be used to simulate incompressible Stokes flow with a discontinuous viscosity field. The model configuration (ViscousInclusion.jl) accounts for a viscous inclusion in a viscous matrix under general shear conditions, for which a full flow-field analytical solution exists (Schmid & Podladchikov, 2003).
The boundary conditions include 1 Neumann boundary and 3 Dirichlet boundaries:
BC = [2; 1; 1; 1] # South/East/North/West --- 1: Dirichlet / 2: Neumann
The inclusion has a viscosity hundred times smaller than the matrix:
η = [1.0 1e-2] # Viscosity matrix/inclusion
- An example of pressure field computed with a gradient formulation and a mesh generated with advancing front technique (in house mesher):
# Numerics
Mesher = :AdvancingFront # :Delaunay / :AdvancingFront (load external mesh)
mesh_res = :MedRes # :LowRes / MedRes / HighRes
solver = :PowellHestenesLU # :CoupledBackslash / :=PowellHestenesCholesky / :=PowellHestenesLU
Formulation = :Gradient # :Gradient / :SymmetricGradient
τr = 2 # Stabilisation
γ = 1e5 # Penalty factor for Powell-Hestenes solvers
ϵ = 1e-8 # Tolerance of Powell-Hestenes solvers
- An example of pressure field computed with a gradient formulation and a Delaunay mesh (Triangle, Shewchuk):
# Numerics
Mesher = :Delaunay # :Delaunay / :AdvancingFront (load external mesh)
solver = :PowellHestenesLU # :CoupledBackslash / :=PowellHestenesCholesky / :=PowellHestenesLU
Formulation = :Gradient # :Gradient / :SymmetricGradient
τr = 2 # Stabilisation
γ = 1e5 # Penalty factor for Powell-Hestenes solvers
ϵ = 1e-8 # Tolerance of Powell-Hestenes solvers
- An example of pressure field computed with a symmetric gradient formulation and a mesh generated with advancing front technique (in house mesher):
# Numerics
Mesher = :AdvancingFront # :Delaunay / :AdvancingFront (load external mesh)
mesh_res = :MedRes # :LowRes / MedRes / HighRes
solver = :PowellHestenesCholesky # :CoupledBackslash / :=PowellHestenesCholesky / :=PowellHestenesLU
Formulation = :SymmetricGradient # :Gradient / :SymmetricGradient
τr = 2 # Stabilisation
γ = 1e5 # Penalty factor for Powell-Hestenes solvers
ϵ = 1e-8 # Tolerance of Powell-Hestenes solvers
- An example of pressure field computed with a symmetric gradient formulation and a Delaunay mesh (Triangle, Shewchuk):
# Numerics
Mesher = :Delaunay # :Delaunay / :AdvancingFront (load external mesh)
solver = :PowellHestenesCholesky # :CoupledBackslash / :=PowellHestenesCholesky / :=PowellHestenesLU
Formulation = :SymmetricGradient # :Gradient / :SymmetricGradient
τr = 2 # Stabilisation
γ = 1e5 # Penalty factor for Powell-Hestenes solvers
ϵ = 1e-8 # Tolerance of Powell-Hestenes solvers
The example code can be used to simulate incompressible Stokes flow with a smooth and large viscosity variation. The model configuration (SolKzFCFV.jl) accounts for buoyancy driven flow in presence of a large vertical variation of viscosity (Zhong, 1996).
The numerical solution for a pressure using mesh generated with the advancing front method:
The numerical solution for a pressure using mesh generated with the Delaunay triangulation at various resolutions: