Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "Equations" in name of parabolic equations for consistency #1747

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,17 +105,17 @@ for human readability.
has been added in Trixi.jl v0.4.55. The first implementation requires a `TreeMesh` and comes
with several examples in the `examples_dir()` of Trixi.jl.
- Experimental support for 2D parabolic diffusion terms has been added.
* `LaplaceDiffusion2D` and `CompressibleNavierStokesDiffusion2D` can be used to add
diffusion to systems. `LaplaceDiffusion2D` can be used to add scalar diffusion to each
equation of a system, while `CompressibleNavierStokesDiffusion2D` can be used to add
* `LaplaceDiffusionEquations2D` and `CompressibleNavierStokesDiffusionEquations2D` can be used to add
diffusion to systems. `LaplaceDiffusionEquations2D` can be used to add scalar diffusion to each
equation of a system, while `CompressibleNavierStokesDiffusionEquations2D` can be used to add
Navier-Stokes diffusion to `CompressibleEulerEquations2D`.
* Parabolic boundary conditions can be imposed as well. For `LaplaceDiffusion2D`, both
`Dirichlet` and `Neumann` conditions are supported. For `CompressibleNavierStokesDiffusion2D`,
* Parabolic boundary conditions can be imposed as well. For `LaplaceDiffusionEquations2D`, both
`Dirichlet` and `Neumann` conditions are supported. For `CompressibleNavierStokesDiffusionEquations2D`,
viscous no-slip velocity boundary conditions are supported, along with adiabatic and isothermal
temperature boundary conditions. See the boundary condition container
`BoundaryConditionNavierStokesWall` and boundary condition types `NoSlip`, `Adiabatic`, and
`Isothermal` for more information.
* `CompressibleNavierStokesDiffusion2D` can utilize both primitive variables (which are not
* `CompressibleNavierStokesDiffusionEquations2D` can utilize both primitive variables (which are not
guaranteed to provably dissipate entropy) and entropy variables (which provably dissipate
entropy at the semi-discrete level).
* Please check the `examples` directory for further information about the supported setups.
Expand Down
4 changes: 2 additions & 2 deletions docs/literate/src/files/adding_new_parabolic_terms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ equations_hyperbolic = LinearScalarAdvectionEquation2D(advection_velocity);
# `GradientVariablesConservative`. This indicates that the gradient should be taken with respect to the
# conservative variables (e.g., the same variables used in `equations_hyperbolic`). Users can also take
# the gradient with respect to a different set of variables; see, for example, the implementation of
# [`CompressibleNavierStokesDiffusion2D`](@ref), which can utilize either "primitive" or "entropy" variables.
# [`CompressibleNavierStokesDiffusionEquations2D`](@ref), which can utilize either "primitive" or "entropy" variables.

struct ConstantAnisotropicDiffusion2D{E, T} <: Trixi.AbstractEquationsParabolic{2, 1, GradientVariablesConservative}
diffusivity::T
Expand Down Expand Up @@ -111,7 +111,7 @@ end
# ### A note on the choice of gradient variables
#
# It is often simpler to transform the solution variables (and solution gradients) to another set of
# variables prior to computing the viscous fluxes (see [`CompressibleNavierStokesDiffusion2D`](@ref)
# variables prior to computing the viscous fluxes (see [`CompressibleNavierStokesDiffusionEquations2D`](@ref)
# for an example of this). If this is done, then the boundary condition for the `Gradient` operator
# should be modified accordingly as well.
#
Expand Down
2 changes: 1 addition & 1 deletion docs/src/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ different features on different mesh types.
| Flux differencing | ✅ | ✅ | ✅ | ✅ | ✅ | [`VolumeIntegralFluxDifferencing`](@ref)
| Shock capturing | ✅ | ✅ | ✅ | ✅ | ❌ | [`VolumeIntegralShockCapturingHG`](@ref)
| Nonconservative equations | ✅ | ✅ | ✅ | ✅ | ✅ | e.g., GLM MHD or shallow water equations
| Parabolic terms | ✅ | ✅ | ❌ | ✅ | ✅ | e.g., [`CompressibleNavierStokesDiffusion2D`](@ref)
| Parabolic terms | ✅ | ✅ | ❌ | ✅ | ✅ | e.g., [`CompressibleNavierStokesDiffusionEquations2D`](@ref)

ᵃ: quad = quadrilateral, hex = hexahedron

Expand Down
2 changes: 1 addition & 1 deletion examples/dgmulti_2d/elixir_advection_diffusion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ dg = DGMulti(polydeg = 3, element_type = Tri(), approximation_type = Polynomial(
volume_integral = VolumeIntegralWeakForm())

equations = LinearScalarAdvectionEquation2D(1.5, 1.0)
equations_parabolic = LaplaceDiffusion2D(5.0e-2, equations)
equations_parabolic = LaplaceDiffusionEquations2D(5.0e-2, equations)

initial_condition_zero(x, t, equations::LinearScalarAdvectionEquation2D) = SVector(0.0)
initial_condition = initial_condition_zero
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ dg = DGMulti(polydeg = 3, element_type = Quad(), approximation_type = Polynomial
diffusivity() = 5.0e-2

equations = LinearScalarAdvectionEquation2D(1.0, 0.0)
equations_parabolic = LaplaceDiffusion2D(diffusivity(), equations)
equations_parabolic = LaplaceDiffusionEquations2D(diffusivity(), equations)

# Example setup taken from
# - Truman Ellis, Jesse Chan, and Leszek Demkowicz (2016).
Expand Down
2 changes: 1 addition & 1 deletion examples/dgmulti_2d/elixir_advection_diffusion_periodic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ dg = DGMulti(polydeg = 1, element_type = Tri(), approximation_type = Polynomial(
volume_integral = VolumeIntegralWeakForm())

equations = LinearScalarAdvectionEquation2D(0.0, 0.0)
equations_parabolic = LaplaceDiffusion2D(5.0e-1, equations)
equations_parabolic = LaplaceDiffusionEquations2D(5.0e-1, equations)

function initial_condition_sharp_gaussian(x, t, equations::LinearScalarAdvectionEquation2D)
return SVector(exp(-100 * (x[1]^2 + x[2]^2)))
Expand Down
10 changes: 5 additions & 5 deletions examples/dgmulti_2d/elixir_navierstokes_convergence.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ mu() = 0.01
equations = CompressibleEulerEquations2D(1.4)
# Note: If you change the Navier-Stokes parameters here, also change them in the initial condition
# I really do not like this structure but it should work for now
equations_parabolic = CompressibleNavierStokesDiffusion2D(equations, mu = mu(),
Prandtl = prandtl_number(),
gradient_variables = GradientVariablesPrimitive())
equations_parabolic = CompressibleNavierStokesDiffusionEquations2D(equations, mu = mu(),
Prandtl = prandtl_number(),
gradient_variables = GradientVariablesPrimitive())

# Create DG solver with polynomial degree = 3 and (local) Lax-Friedrichs/Rusanov flux as surface flux
dg = DGMulti(polydeg = 3, element_type = Tri(), approximation_type = Polynomial(),
Expand All @@ -25,8 +25,8 @@ is_on_boundary = Dict(:top_bottom => top_bottom)
cells_per_dimension = (16, 16)
mesh = DGMultiMesh(dg, cells_per_dimension; periodicity = (true, false), is_on_boundary)

# Note: the initial condition cannot be specialized to `CompressibleNavierStokesDiffusion2D`
# since it is called by both the parabolic solver (which passes in `CompressibleNavierStokesDiffusion2D`)
# Note: the initial condition cannot be specialized to `CompressibleNavierStokesDiffusionEquations2D`
# since it is called by both the parabolic solver (which passes in `CompressibleNavierStokesDiffusionEquations2D`)
# and by the initial condition (which passes in `CompressibleEulerEquations2D`).
# This convergence test setup was originally derived by Andrew Winters (@andrewwinters5000)
function initial_condition_navier_stokes_convergence_test(x, t, equations)
Expand Down
10 changes: 5 additions & 5 deletions examples/dgmulti_2d/elixir_navierstokes_convergence_curved.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ mu() = 0.01
equations = CompressibleEulerEquations2D(1.4)
# Note: If you change the Navier-Stokes parameters here, also change them in the initial condition
# I really do not like this structure but it should work for now
equations_parabolic = CompressibleNavierStokesDiffusion2D(equations, mu = mu(),
Prandtl = prandtl_number(),
gradient_variables = GradientVariablesPrimitive())
equations_parabolic = CompressibleNavierStokesDiffusionEquations2D(equations, mu = mu(),
Prandtl = prandtl_number(),
gradient_variables = GradientVariablesPrimitive())

# Create DG solver with polynomial degree = 3 and (local) Lax-Friedrichs/Rusanov flux as surface flux
dg = DGMulti(polydeg = 3, element_type = Tri(), approximation_type = Polynomial(),
Expand All @@ -33,8 +33,8 @@ mesh = DGMultiMesh(dg, cells_per_dimension, mapping; periodicity = (true, false)

# This initial condition is taken from `examples/dgmulti_2d/elixir_navierstokes_convergence.jl`

# Note: the initial condition cannot be specialized to `CompressibleNavierStokesDiffusion2D`
# since it is called by both the parabolic solver (which passes in `CompressibleNavierStokesDiffusion2D`)
# Note: the initial condition cannot be specialized to `CompressibleNavierStokesDiffusionEquations2D`
# since it is called by both the parabolic solver (which passes in `CompressibleNavierStokesDiffusionEquations2D`)
# and by the initial condition (which passes in `CompressibleEulerEquations2D`).
# This convergence test setup was originally derived by Andrew Winters (@andrewwinters5000)
function initial_condition_navier_stokes_convergence_test(x, t, equations)
Expand Down
4 changes: 2 additions & 2 deletions examples/dgmulti_2d/elixir_navierstokes_lid_driven_cavity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ prandtl_number() = 0.72
mu() = 0.001

equations = CompressibleEulerEquations2D(1.4)
equations_parabolic = CompressibleNavierStokesDiffusion2D(equations, mu = mu(),
Prandtl = prandtl_number())
equations_parabolic = CompressibleNavierStokesDiffusionEquations2D(equations, mu = mu(),
Prandtl = prandtl_number())

# Create DG solver with polynomial degree = 3 and (local) Lax-Friedrichs/Rusanov flux as surface flux
dg = DGMulti(polydeg = 3, element_type = Quad(), approximation_type = GaussSBP(),
Expand Down
10 changes: 5 additions & 5 deletions examples/dgmulti_3d/elixir_navierstokes_convergence.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ prandtl_number() = 0.72
mu() = 0.01

equations = CompressibleEulerEquations3D(1.4)
equations_parabolic = CompressibleNavierStokesDiffusion3D(equations, mu = mu(),
Prandtl = prandtl_number(),
gradient_variables = GradientVariablesPrimitive())
equations_parabolic = CompressibleNavierStokesDiffusionEquations3D(equations, mu = mu(),
Prandtl = prandtl_number(),
gradient_variables = GradientVariablesPrimitive())

# Create DG solver with polynomial degree = 3 and (local) Lax-Friedrichs/Rusanov flux as surface flux
dg = DGMulti(polydeg = 3, element_type = Hex(), approximation_type = Polynomial(),
Expand All @@ -24,8 +24,8 @@ cells_per_dimension = (8, 8, 8)
mesh = DGMultiMesh(dg, cells_per_dimension; periodicity = (true, false, true),
is_on_boundary)

# Note: the initial condition cannot be specialized to `CompressibleNavierStokesDiffusion3D`
# since it is called by both the parabolic solver (which passes in `CompressibleNavierStokesDiffusion3D`)
# Note: the initial condition cannot be specialized to `CompressibleNavierStokesDiffusionEquations3D`
# since it is called by both the parabolic solver (which passes in `CompressibleNavierStokesDiffusionEquations3D`)
# and by the initial condition (which passes in `CompressibleEulerEquations3D`).
# This convergence test setup was originally derived by Andrew Winters (@andrewwinters5000)
function initial_condition_navier_stokes_convergence_test(x, t, equations)
Expand Down
10 changes: 5 additions & 5 deletions examples/dgmulti_3d/elixir_navierstokes_convergence_curved.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ prandtl_number() = 0.72
mu() = 0.01

equations = CompressibleEulerEquations3D(1.4)
equations_parabolic = CompressibleNavierStokesDiffusion3D(equations, mu = mu(),
Prandtl = prandtl_number(),
gradient_variables = GradientVariablesPrimitive())
equations_parabolic = CompressibleNavierStokesDiffusionEquations3D(equations, mu = mu(),
Prandtl = prandtl_number(),
gradient_variables = GradientVariablesPrimitive())

# Create DG solver with polynomial degree = 3 and (local) Lax-Friedrichs/Rusanov flux as surface flux
dg = DGMulti(polydeg = 3, element_type = Hex(), approximation_type = Polynomial(),
Expand All @@ -32,8 +32,8 @@ mesh = DGMultiMesh(dg, cells_per_dimension, mapping; periodicity = (true, false,

# This initial condition is taken from `examples/dgmulti_3d/elixir_navierstokes_convergence.jl`

# Note: the initial condition cannot be specialized to `CompressibleNavierStokesDiffusion3D`
# since it is called by both the parabolic solver (which passes in `CompressibleNavierStokesDiffusion3D`)
# Note: the initial condition cannot be specialized to `CompressibleNavierStokesDiffusionEquations3D`
# since it is called by both the parabolic solver (which passes in `CompressibleNavierStokesDiffusionEquations3D`)
# and by the initial condition (which passes in `CompressibleEulerEquations3D`).
# This convergence test setup was originally derived by Andrew Winters (@andrewwinters5000)
function initial_condition_navier_stokes_convergence_test(x, t, equations)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ prandtl_number() = 0.72
mu() = 6.25e-4 # equivalent to Re = 1600

equations = CompressibleEulerEquations3D(1.4)
equations_parabolic = CompressibleNavierStokesDiffusion3D(equations, mu = mu(),
Prandtl = prandtl_number())
equations_parabolic = CompressibleNavierStokesDiffusionEquations3D(equations, mu = mu(),
Prandtl = prandtl_number())

"""
initial_condition_taylor_green_vortex(x, t, equations::CompressibleEulerEquations3D)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ using Trixi
diffusivity() = 5.0e-2
advection_velocity = (1.0, 0.0)
equations = LinearScalarAdvectionEquation2D(advection_velocity)
equations_parabolic = LaplaceDiffusion2D(diffusivity(), equations)
equations_parabolic = LaplaceDiffusionEquations2D(diffusivity(), equations)

# Create DG solver with polynomial degree = 3 and (local) Lax-Friedrichs/Rusanov flux as surface flux
solver = DGSEM(polydeg = 3, surface_flux = flux_lax_friedrichs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ using Trixi
diffusivity() = 5.0e-2
advection_velocity = (1.0, 0.0)
equations = LinearScalarAdvectionEquation2D(advection_velocity)
equations_parabolic = LaplaceDiffusion2D(diffusivity(), equations)
equations_parabolic = LaplaceDiffusionEquations2D(diffusivity(), equations)

# Example setup taken from
# - Truman Ellis, Jesse Chan, and Leszek Demkowicz (2016).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ using Trixi
diffusivity() = 5.0e-2
advection_velocity = (1.0, 0.0)
equations = LinearScalarAdvectionEquation2D(advection_velocity)
equations_parabolic = LaplaceDiffusion2D(diffusivity(), equations)
equations_parabolic = LaplaceDiffusionEquations2D(diffusivity(), equations)

function x_trans_periodic(x, domain_length = SVector(2 * pi), center = SVector(0.0))
x_normalized = x .- center
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ using Trixi
advection_velocity = (1.5, 1.0)
equations = LinearScalarAdvectionEquation2D(advection_velocity)
diffusivity() = 5.0e-2
equations_parabolic = LaplaceDiffusion2D(diffusivity(), equations)
equations_parabolic = LaplaceDiffusionEquations2D(diffusivity(), equations)

# Create DG solver with polynomial degree = 3 and (local) Lax-Friedrichs/Rusanov flux as surface flux
solver = DGSEM(polydeg = 3, surface_flux = flux_lax_friedrichs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ using Trixi
diffusivity() = 5.0e-2
advection_velocity = (1.0, 0.0)
equations = LinearScalarAdvectionEquation2D(advection_velocity)
equations_parabolic = LaplaceDiffusion2D(diffusivity(), equations)
equations_parabolic = LaplaceDiffusionEquations2D(diffusivity(), equations)

function x_trans_periodic(x, domain_length = SVector(2 * pi), center = SVector(0.0))
x_normalized = x .- center
Expand Down
10 changes: 5 additions & 5 deletions examples/p4est_2d_dgsem/elixir_navierstokes_convergence.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ prandtl_number() = 0.72
mu() = 0.01

equations = CompressibleEulerEquations2D(1.4)
equations_parabolic = CompressibleNavierStokesDiffusion2D(equations, mu = mu(),
Prandtl = prandtl_number(),
gradient_variables = GradientVariablesPrimitive())
equations_parabolic = CompressibleNavierStokesDiffusionEquations2D(equations, mu = mu(),
Prandtl = prandtl_number(),
gradient_variables = GradientVariablesPrimitive())

# Create DG solver with polynomial degree = 3 and (local) Lax-Friedrichs/Rusanov flux as surface flux
solver = DGSEM(polydeg = 3, surface_flux = flux_lax_friedrichs,
Expand All @@ -25,8 +25,8 @@ mesh = P4estMesh(trees_per_dimension,
coordinates_min = coordinates_min, coordinates_max = coordinates_max,
periodicity = (true, false))

# Note: the initial condition cannot be specialized to `CompressibleNavierStokesDiffusion2D`
# since it is called by both the parabolic solver (which passes in `CompressibleNavierStokesDiffusion2D`)
# Note: the initial condition cannot be specialized to `CompressibleNavierStokesDiffusionEquations2D`
# since it is called by both the parabolic solver (which passes in `CompressibleNavierStokesDiffusionEquations2D`)
# and by the initial condition (which passes in `CompressibleEulerEquations2D`).
# This convergence test setup was originally derived by Andrew Winters (@andrewwinters5000)
function initial_condition_navier_stokes_convergence_test(x, t, equations)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ prandtl_number() = 0.72
mu() = 0.01

equations = CompressibleEulerEquations2D(1.4)
equations_parabolic = CompressibleNavierStokesDiffusion2D(equations, mu = mu(),
Prandtl = prandtl_number(),
gradient_variables = GradientVariablesPrimitive())
equations_parabolic = CompressibleNavierStokesDiffusionEquations2D(equations, mu = mu(),
Prandtl = prandtl_number(),
gradient_variables = GradientVariablesPrimitive())

# Create DG solver with polynomial degree = 3 and (local) Lax-Friedrichs/Rusanov flux as surface flux
solver = DGSEM(polydeg = 3, surface_flux = flux_lax_friedrichs,
Expand All @@ -25,8 +25,8 @@ mesh = P4estMesh(trees_per_dimension,
coordinates_min = coordinates_min, coordinates_max = coordinates_max,
periodicity = (false, false))

# Note: the initial condition cannot be specialized to `CompressibleNavierStokesDiffusion2D`
# since it is called by both the parabolic solver (which passes in `CompressibleNavierStokesDiffusion2D`)
# Note: the initial condition cannot be specialized to `CompressibleNavierStokesDiffusionEquations2D`
# since it is called by both the parabolic solver (which passes in `CompressibleNavierStokesDiffusionEquations2D`)
# and by the initial condition (which passes in `CompressibleEulerEquations2D`).
# This convergence test setup was originally derived by Andrew Winters (@andrewwinters5000)
function initial_condition_navier_stokes_convergence_test(x, t, equations)
Expand Down
Loading
Loading