Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
trixi-framework
GitHub Repository: trixi-framework/Trixi.jl
Path: blob/main/src/solvers/solvers_parabolic.jl
2055 views
1
"""
2
ViscousFormulationBassiRebay1()
3
4
The classical BR1 flux from
5
6
- F. Bassi, S. Rebay (1997)
7
A High-Order Accurate Discontinuous Finite Element Method for
8
the Numerical Solution of the Compressible Navier-Stokes Equations
9
[DOI: 10.1006/jcph.1996.5572](https://doi.org/10.1006/jcph.1996.5572)
10
11
A more detailed study of the BR1 scheme for the DGSEM can be found in
12
- G. J. Gassner, A. R. Winters, F. J. Hindenlang, D. Kopriva (2018)
13
The BR1 Scheme is Stable for the Compressible Navier-Stokes Equations
14
[DOI: 10.1007/s10915-018-0702-1](https://doi.org/10.1007/s10915-018-0702-1)
15
16
The BR1 scheme works well for convection-dominated problems, but may cause instabilities or
17
reduced convergence for diffusion-dominated problems.
18
In the latter case, the [`ViscousFormulationLocalDG`](@ref) scheme is recommended.
19
"""
20
struct ViscousFormulationBassiRebay1 end
21
22
"""
23
flux_parabolic(u_ll, u_rr, gradient_or_divergence, mesh, equations,
24
parabolic_scheme::ViscousFormulationBassiRebay1)
25
26
This computes the classical BR1 flux. Since the interface flux for both the
27
DG gradient and DG divergence under BR1 are identical, this function does
28
not need to be specialized for `Gradient` and `Divergence`.
29
"""
30
function flux_parabolic(u_ll, u_rr, gradient_or_divergence, mesh, equations,
31
parabolic_scheme::ViscousFormulationBassiRebay1)
32
return 0.5f0 * (u_ll + u_rr)
33
end
34
35
"""
36
ViscousFormulationLocalDG(penalty_parameter)
37
38
The local DG (LDG) flux from "The Local Discontinuous Galerkin Method for Time-Dependent
39
Convection-Diffusion Systems" by Cockburn and Shu (1998).
40
41
The parabolic "upwinding" vector is currently implemented for `TreeMesh`; for all other mesh types,
42
the LDG solver is equivalent to [`ViscousFormulationBassiRebay1`](@ref) with an LDG-type penalization.
43
44
- Cockburn and Shu (1998).
45
The Local Discontinuous Galerkin Method for Time-Dependent
46
Convection-Diffusion Systems
47
[DOI: 10.1137/S0036142997316712](https://doi.org/10.1137/S0036142997316712)
48
"""
49
struct ViscousFormulationLocalDG{P}
50
penalty_parameter::P
51
end
52
53
"""
54
ViscousFormulationLocalDG()
55
56
The minimum dissipation local DG (LDG) flux from "An Analysis of the Minimal Dissipation Local
57
Discontinuous Galerkin Method for Convection–Diffusion Problems" by Cockburn and Dong (2007).
58
This scheme corresponds to an LDG parabolic "upwinding/downwinding" but no LDG penalty parameter.
59
Cockburn and Dong proved that this scheme is still stable despite the zero penalty parameter.
60
61
- Cockburn and Dong (2007)
62
An Analysis of the Minimal Dissipation Local Discontinuous
63
Galerkin Method for Convection–Diffusion Problems.
64
[DOI: 10.1007/s10915-007-9130-3](https://doi.org/10.1007/s10915-007-9130-3)
65
"""
66
ViscousFormulationLocalDG() = ViscousFormulationLocalDG(nothing)
67
68
"""
69
flux_parabolic(u_ll, u_rr, ::Gradient, mesh::TreeMesh, equations,
70
parabolic_scheme::ViscousFormulationLocalDG)
71
72
flux_parabolic(u_ll, u_rr, ::Divergence, mesh::TreeMesh, equations,
73
parabolic_scheme::ViscousFormulationLocalDG)
74
75
These fluxes computes the gradient and divergence interface fluxes for the
76
local DG method. The local DG method uses an "upwind/downwind" flux for the
77
gradient and divergence (i.e., if the gradient is upwinded, the divergence
78
must be downwinded in order to preserve symmetry and positive definiteness).
79
"""
80
function flux_parabolic(u_ll, u_rr, ::Gradient, mesh::TreeMesh, equations,
81
parabolic_scheme::ViscousFormulationLocalDG)
82
# The LDG flux is {{f}} + beta * [[f]], where beta is the LDG "switch",
83
# which we set to -1 on the left and +1 on the right in 1D. The sign of the
84
# jump term should be opposite that of the sign used in the divergence flux.
85
# This is equivalent to setting the flux equal to `u_ll` for the gradient,
86
# and `u_rr` for the divergence.
87
return u_ll # Use the upwind value for the gradient interface flux
88
end
89
90
function flux_parabolic(u_ll, u_rr, ::Divergence, mesh::TreeMesh, equations,
91
parabolic_scheme::ViscousFormulationLocalDG)
92
return u_rr # Use the downwind value for the divergence interface flux
93
end
94
95
default_parabolic_solver() = ViscousFormulationBassiRebay1()
96
97