Skip to content

Commit

Permalink
add limiter to an example
Browse files Browse the repository at this point in the history
  • Loading branch information
tommbendall committed Feb 27, 2024
1 parent bdcc942 commit 3c1b2f6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions examples/compressible/unsaturated_bubble.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
VCG1 = FunctionSpace(mesh, "CG", 1)
Vu_DG1 = VectorFunctionSpace(mesh, VDG1.ufl_element())
Vu_CG1 = VectorFunctionSpace(mesh, "CG", 1)
Vt = domain.spaces("theta")

u_opts = RecoveryOptions(embedding_space=Vu_DG1,
recovered_space=Vu_CG1,
Expand All @@ -92,10 +93,12 @@
# Physics schemes
# NB: can't yet use wrapper or limiter options with physics
rainfall_method = DGUpwind(eqns, 'rain', outflow=True)
zero_limiter = MixedFSLimiter(eqns, {'water_vapour': ZeroLimiter(Vt),
'cloud_water': ZeroLimiter(Vt)})
physics_schemes = [(Fallout(eqns, 'rain', domain, rainfall_method), SSPRK3(domain)),
(Coalescence(eqns), ForwardEuler(domain)),
(EvaporationOfRain(eqns), ForwardEuler(domain)),
(SaturationAdjustment(eqns), ForwardEuler(domain))]
(SaturationAdjustment(eqns), ForwardEuler(domain, limiter=zero_limiter))]

# Time stepper
stepper = SemiImplicitQuasiNewton(eqns, io, transported_fields,
Expand All @@ -116,7 +119,6 @@

# spaces
Vu = domain.spaces("HDiv")
Vt = domain.spaces("theta")
Vr = domain.spaces("DG")
x, z = SpatialCoordinate(mesh)
quadrature_degree = (4, 4)
Expand Down

0 comments on commit 3c1b2f6

Please sign in to comment.