Path: blob/main/src/solvers/solvers_parabolic.jl
2055 views
"""1ViscousFormulationBassiRebay1()23The classical BR1 flux from45- F. Bassi, S. Rebay (1997)6A High-Order Accurate Discontinuous Finite Element Method for7the Numerical Solution of the Compressible Navier-Stokes Equations8[DOI: 10.1006/jcph.1996.5572](https://doi.org/10.1006/jcph.1996.5572)910A more detailed study of the BR1 scheme for the DGSEM can be found in11- G. J. Gassner, A. R. Winters, F. J. Hindenlang, D. Kopriva (2018)12The BR1 Scheme is Stable for the Compressible Navier-Stokes Equations13[DOI: 10.1007/s10915-018-0702-1](https://doi.org/10.1007/s10915-018-0702-1)1415The BR1 scheme works well for convection-dominated problems, but may cause instabilities or16reduced convergence for diffusion-dominated problems.17In the latter case, the [`ViscousFormulationLocalDG`](@ref) scheme is recommended.18"""19struct ViscousFormulationBassiRebay1 end2021"""22flux_parabolic(u_ll, u_rr, gradient_or_divergence, mesh, equations,23parabolic_scheme::ViscousFormulationBassiRebay1)2425This computes the classical BR1 flux. Since the interface flux for both the26DG gradient and DG divergence under BR1 are identical, this function does27not need to be specialized for `Gradient` and `Divergence`.28"""29function flux_parabolic(u_ll, u_rr, gradient_or_divergence, mesh, equations,30parabolic_scheme::ViscousFormulationBassiRebay1)31return 0.5f0 * (u_ll + u_rr)32end3334"""35ViscousFormulationLocalDG(penalty_parameter)3637The local DG (LDG) flux from "The Local Discontinuous Galerkin Method for Time-Dependent38Convection-Diffusion Systems" by Cockburn and Shu (1998).3940The parabolic "upwinding" vector is currently implemented for `TreeMesh`; for all other mesh types,41the LDG solver is equivalent to [`ViscousFormulationBassiRebay1`](@ref) with an LDG-type penalization.4243- Cockburn and Shu (1998).44The Local Discontinuous Galerkin Method for Time-Dependent45Convection-Diffusion Systems46[DOI: 10.1137/S0036142997316712](https://doi.org/10.1137/S0036142997316712)47"""48struct ViscousFormulationLocalDG{P}49penalty_parameter::P50end5152"""53ViscousFormulationLocalDG()5455The minimum dissipation local DG (LDG) flux from "An Analysis of the Minimal Dissipation Local56Discontinuous Galerkin Method for Convection–Diffusion Problems" by Cockburn and Dong (2007).57This scheme corresponds to an LDG parabolic "upwinding/downwinding" but no LDG penalty parameter.58Cockburn and Dong proved that this scheme is still stable despite the zero penalty parameter.5960- Cockburn and Dong (2007)61An Analysis of the Minimal Dissipation Local Discontinuous62Galerkin Method for Convection–Diffusion Problems.63[DOI: 10.1007/s10915-007-9130-3](https://doi.org/10.1007/s10915-007-9130-3)64"""65ViscousFormulationLocalDG() = ViscousFormulationLocalDG(nothing)6667"""68flux_parabolic(u_ll, u_rr, ::Gradient, mesh::TreeMesh, equations,69parabolic_scheme::ViscousFormulationLocalDG)7071flux_parabolic(u_ll, u_rr, ::Divergence, mesh::TreeMesh, equations,72parabolic_scheme::ViscousFormulationLocalDG)7374These fluxes computes the gradient and divergence interface fluxes for the75local DG method. The local DG method uses an "upwind/downwind" flux for the76gradient and divergence (i.e., if the gradient is upwinded, the divergence77must be downwinded in order to preserve symmetry and positive definiteness).78"""79function flux_parabolic(u_ll, u_rr, ::Gradient, mesh::TreeMesh, equations,80parabolic_scheme::ViscousFormulationLocalDG)81# The LDG flux is {{f}} + beta * [[f]], where beta is the LDG "switch",82# which we set to -1 on the left and +1 on the right in 1D. The sign of the83# jump term should be opposite that of the sign used in the divergence flux.84# This is equivalent to setting the flux equal to `u_ll` for the gradient,85# and `u_rr` for the divergence.86return u_ll # Use the upwind value for the gradient interface flux87end8889function flux_parabolic(u_ll, u_rr, ::Divergence, mesh::TreeMesh, equations,90parabolic_scheme::ViscousFormulationLocalDG)91return u_rr # Use the downwind value for the divergence interface flux92end9394default_parabolic_solver() = ViscousFormulationBassiRebay1()959697