-
Notifications
You must be signed in to change notification settings - Fork 59
Understanding the Parameter file (.prm)
The documentation for the parameter files is currently under migration to the new Lethe documentation
This subsection's purpose is defining the boundary conditions associated to multiphysic problems.
subsection boundary conditions heat transfer
set number = 2
subsection bc 0
set type = temperature
set value = 0
end
subsection bc 1
set type = convection
set h = 10
set Tinf = -13
end
end
-
number
: This is the number of boundary conditions of the problem. -
type
: This is the type of boundary condition been imposed. At the moment, choices are-
temperature
(Dirichlet BC), to impose a given temperaturevalue
at the boundary -
convection
(Robin BC) for cooling/heating, depending on the environment temperature at the boundaryTinf
, with a given heat transfer coefficienth
-
-
NB : by default, the boundary condition type is
temperature
withvalue = 0
subsection boundary conditions tracer
set number = 1
subsection bc 0
set type = dirichlet
subsection dirichlet
set Function expression = x
end
end
end
-
number
: This is the number of boundary conditions of the problem. -
type
: This is the type of boundary condition been imposed. At the moment, only dirichlet boundary conditions can be imposed for tracer.
In these subsections, the control options of linear solvers are specified. These control options may include solution method, maximum number of iterations, tolerance, residual precision and preconditioner information.
Lethe currently supports three core solution strategy or method
:
- GMRES solver + ILU preconditioning. This is set by
method = gmres
- GMRES solver + AMG preconditioning. This is set by
method = amg
- BiCGStab solver + ILU preconditioning. This is set by
method = bicgstab
For all methods, a number of parameters to control the preconditioner can be set.
On coarse meshes, the gmres/bicgstab solver with ILU preconditioning is more efficient. As the number of mesh elements increase, the amg solver is the most efficient. Generally, at 1M elements, the amg solver always outperforms the gmres or bicgstab for 2D steady-state problems.
subsection linear solver
# amg aggregation threshold
set amg aggregation threshold = 1e-14
# amg number of cycles
set amg n cycles = 1
# amg preconditioner ilu smoother/coarsener absolute tolerance
set amg preconditioner ilu absolute tolerance = 1e-12
# amg preconditioner ilu smoother/coarsener fill
set amg preconditioner ilu fill = 1
# amg preconditioner ilu smoother/coarsener relative tolerance
set amg preconditioner ilu relative tolerance = 1.00
# amg smoother overlap
set amg smoother overlap = 1
# amg smoother sweeps
set amg smoother sweeps = 2
# amg w cycling. If this is set to true, W cycling is used. Otherwise, V
# cycling is used.
set amg w cycles = false
# Ilu preconditioner tolerance
set ilu preconditioner absolute tolerance = 1e-6
# Ilu preconditioner fill
set ilu preconditioner fill = 1
# Ilu relative tolerance
set ilu preconditioner relative tolerance = 1.00
# Maximum solver iterations
set max iters = 1000
# Maximum number of krylov vectors for GMRES solver
set max krylov vectors = 30
# The iterative solver for the linear system of equations. Choices are
# . gmres is a GMRES iterative solver with ILU
# preconditioning. bicgstab is a BICGSTAB iterative solver with ILU
# preconditioning. amg is GMRES + AMG preconditioning with an ILU coarsener
# and smoother. On coarse meshes, the gmres/bicgstab solver with ILU
# preconditioning is more efficient. As the number of mesh elements
# increase, the amg solver is the most efficient. Generally, at 1M elements,
# the amg solver always outperforms the gmres or bicgstab
set method = gmres
# Linear solver minimum residual
set minimum residual = 1e-8
# Linear solver residual
set relative residual = 1e-3
# State whether output from solver runs should be printed. Choices are
# .
set verbosity = verbose
end
This subsection includes parameters related to the interface sharpening in VOF simulations of Lethe.
subsection interface sharpening
set sharpening threshold = 0.5
set interface sharpness = 2
set sharpening frequency = 10
end
- The
sharpening threshold
parameter defines the interface sharpening threshold that represents the mass conservation level. This parameter must be larger than 1 for interface sharpening. Choosing values less than 1 leads to interface smoothing instead of sharpening. - The
interface sharpness
parameter defines the sharpness of the moving interface (parameter alpha in the interface sharpening model). - The
sharpening frequency
parameter defines the VOF interface sharpening frequency.