Skip to content

Commit

Permalink
Merge branch 'v0.6-dev' into HLL_MHD_Breaking
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielDoehring authored Nov 9, 2023
2 parents 8b7f20b + 32c787d commit 6c48c6d
Show file tree
Hide file tree
Showing 14 changed files with 33 additions and 42 deletions.
3 changes: 3 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ for human readability.
conceptually identical across equations.
Users, who have been using `flux_hll` for MHD have now to use `flux_hlle` in order to use the
Einfeldt wave speed estimate.
- Parabolic diffusion terms are now officially supported and not marked as experimental
anymore.

#### Deprecated

Expand All @@ -37,6 +39,7 @@ for human readability.
- Implementation of the polytropic Euler equations in 2D
- Subcell positivity limiting support for conservative variables in 2D for `TreeMesh`
- AMR for hyperbolic-parabolic equations on 2D/3D `TreeMesh`
- Added `GradientVariables` type parameter to `AbstractEquationsParabolic`

#### Changed

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<img width="300px" src="https://trixi-framework.github.io/assets/logo.png">
</p>

**Trixi.jl** is a numerical simulation framework for hyperbolic conservation
**Trixi.jl** is a numerical simulation framework for conservation
laws written in [Julia](https://julialang.org). A key objective for the
framework is to be useful to both scientists and students. Therefore, next to
having an extensible design with a fast implementation, Trixi.jl is
Expand Down Expand Up @@ -46,6 +46,7 @@ installation and postprocessing procedures. Its features include:
* Periodic and weakly-enforced boundary conditions
* Multiple governing equations:
* Compressible Euler equations
* Compressible Navier-Stokes equations
* Magnetohydrodynamics (MHD) equations
* Multi-component compressible Euler and MHD equations
* Linearized Euler and acoustic perturbation equations
Expand All @@ -56,6 +57,7 @@ installation and postprocessing procedures. Its features include:
* Multi-physics simulations
* [Self-gravitating gas dynamics](https://github.com/trixi-framework/paper-self-gravitating-gas-dynamics)
* Shared-memory parallelization via multithreading
* Multi-node parallelization via MPI
* Visualization and postprocessing of the results
* In-situ and a posteriori visualization with [Plots.jl](https://github.com/JuliaPlots/Plots.jl)
* Interactive visualization with [Makie.jl](https://makie.juliaplots.org/)
Expand Down
2 changes: 1 addition & 1 deletion docs/literate/src/files/DGMulti_1.jl
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ meshIO = StartUpDG.triangulate_domain(StartUpDG.RectangularDomainWithHole());

# The pre-defined Triangulate geometry in StartUpDG has integer boundary tags. With [`DGMultiMesh`](@ref)
# we assign boundary faces based on these integer boundary tags and create a mesh compatible with Trixi.jl.
mesh = DGMultiMesh(meshIO, dg, Dict(:outer_boundary=>1, :inner_boundary=>2))
mesh = DGMultiMesh(dg, meshIO, Dict(:outer_boundary=>1, :inner_boundary=>2))
#-
boundary_condition_convergence_test = BoundaryConditionDirichlet(initial_condition)
boundary_conditions = (; :outer_boundary => boundary_condition_convergence_test,
Expand Down
11 changes: 9 additions & 2 deletions docs/literate/src/files/adding_new_parabolic_terms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,15 @@ equations_hyperbolic = LinearScalarAdvectionEquation2D(advection_velocity);
# `ConstantAnisotropicDiffusion2D` has a field for `equations_hyperbolic`. It is useful to have
# information about the hyperbolic system available to the parabolic part so that we can reuse
# functions defined for hyperbolic equations (such as `varnames`).

struct ConstantAnisotropicDiffusion2D{E, T} <: Trixi.AbstractEquationsParabolic{2, 1}
#
# The abstract type `Trixi.AbstractEquationsParabolic` has three parameters: `NDIMS` (the spatial dimension,
# e.g., 1D, 2D, or 3D), `NVARS` (the number of variables), and `GradientVariable`, which we set as
# `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.

struct ConstantAnisotropicDiffusion2D{E, T} <: Trixi.AbstractEquationsParabolic{2, 1, GradientVariablesConservative}
diffusivity::T
equations_hyperbolic::E
end
Expand Down
4 changes: 3 additions & 1 deletion docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3996439.svg)](https://doi.org/10.5281/zenodo.3996439)

[**Trixi.jl**](https://github.com/trixi-framework/Trixi.jl)
is a numerical simulation framework for hyperbolic conservation
is a numerical simulation framework for conservation
laws written in [Julia](https://julialang.org). A key objective for the
framework is to be useful to both scientists and students. Therefore, next to
having an extensible design with a fast implementation, Trixi.jl is
Expand Down Expand Up @@ -40,6 +40,7 @@ installation and postprocessing procedures. Its features include:
* Periodic and weakly-enforced boundary conditions
* Multiple governing equations:
* Compressible Euler equations
* Compressible Navier-Stokes equations
* Magnetohydrodynamics (MHD) equations
* Multi-component compressible Euler and MHD equations
* Linearized Euler and acoustic perturbation equations
Expand All @@ -50,6 +51,7 @@ installation and postprocessing procedures. Its features include:
* Multi-physics simulations
* [Self-gravitating gas dynamics](https://github.com/trixi-framework/paper-self-gravitating-gas-dynamics)
* Shared-memory parallelization via multithreading
* Multi-node parallelization via MPI
* Visualization and postprocessing of the results
* In-situ and a posteriori visualization with [Plots.jl](https://github.com/JuliaPlots/Plots.jl)
* Interactive visualization with [Makie.jl](https://makie.juliaplots.org/)
Expand Down
3 changes: 1 addition & 2 deletions docs/src/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,9 @@ 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., [`CompressibleNavierStokesDiffusion2D`](@ref)

ᵃ: quad = quadrilateral, hex = hexahedron
ᵇ: Parabolic terms do not currently support adaptivity.

## Time integration methods

Expand Down
2 changes: 1 addition & 1 deletion src/Trixi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export LaplaceDiffusion1D, LaplaceDiffusion2D, LaplaceDiffusion3D,
CompressibleNavierStokesDiffusion1D, CompressibleNavierStokesDiffusion2D,
CompressibleNavierStokesDiffusion3D

export GradientVariablesPrimitive, GradientVariablesEntropy
export GradientVariablesConservative, GradientVariablesPrimitive, GradientVariablesEntropy

export flux, flux_central, flux_lax_friedrichs, flux_hll, flux_hllc, flux_hlle,
flux_godunov,
Expand Down
6 changes: 0 additions & 6 deletions src/equations/compressible_navier_stokes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ Creates a wall-type boundary conditions for the compressible Navier-Stokes equat
The fields `boundary_condition_velocity` and `boundary_condition_heat_flux` are intended
to be boundary condition types such as the `NoSlip` velocity boundary condition and the
`Adiabatic` or `Isothermal` heat boundary condition.
!!! warning "Experimental feature"
This is an experimental feature and may change in future releases.
"""
struct BoundaryConditionNavierStokesWall{V, H}
boundary_condition_velocity::V
Expand Down Expand Up @@ -52,9 +49,6 @@ struct Adiabatic{F}
end

"""
!!! warning "Experimental code"
This code is experimental and may be changed or removed in any future release.
`GradientVariablesPrimitive` and `GradientVariablesEntropy` are gradient variable type parameters
for `CompressibleNavierStokesDiffusion1D`. By default, the gradient variables are set to be
`GradientVariablesPrimitive`. Specifying `GradientVariablesEntropy` instead uses the entropy variable
Expand Down
5 changes: 1 addition & 4 deletions src/equations/compressible_navier_stokes_1d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,11 @@ where
```math
w_2 = \frac{\rho v1}{p},\, w_3 = -\frac{\rho}{p}
```
!!! warning "Experimental code"
This code is experimental and may be changed or removed in any future release.
"""
struct CompressibleNavierStokesDiffusion1D{GradientVariables, RealT <: Real,
E <: AbstractCompressibleEulerEquations{1}
} <:
AbstractCompressibleNavierStokesDiffusion{1, 3}
AbstractCompressibleNavierStokesDiffusion{1, 3, GradientVariables}
# TODO: parabolic
# 1) For now save gamma and inv(gamma-1) again, but could potentially reuse them from the Euler equations
# 2) Add NGRADS as a type parameter here and in AbstractEquationsParabolic, add `ngradients(...)` accessor function
Expand Down
5 changes: 1 addition & 4 deletions src/equations/compressible_navier_stokes_2d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,11 @@ where
```math
w_2 = \frac{\rho v_1}{p},\, w_3 = \frac{\rho v_2}{p},\, w_4 = -\frac{\rho}{p}
```
!!! warning "Experimental code"
This code is experimental and may be changed or removed in any future release.
"""
struct CompressibleNavierStokesDiffusion2D{GradientVariables, RealT <: Real,
E <: AbstractCompressibleEulerEquations{2}
} <:
AbstractCompressibleNavierStokesDiffusion{2, 4}
AbstractCompressibleNavierStokesDiffusion{2, 4, GradientVariables}
# TODO: parabolic
# 1) For now save gamma and inv(gamma-1) again, but could potentially reuse them from the Euler equations
# 2) Add NGRADS as a type parameter here and in AbstractEquationsParabolic, add `ngradients(...)` accessor function
Expand Down
5 changes: 1 addition & 4 deletions src/equations/compressible_navier_stokes_3d.jl
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,11 @@ where
```math
w_2 = \frac{\rho v_1}{p},\, w_3 = \frac{\rho v_2}{p},\, w_4 = \frac{\rho v_3}{p},\, w_5 = -\frac{\rho}{p}
```
!!! warning "Experimental code"
This code is experimental and may be changed or removed in any future release.
"""
struct CompressibleNavierStokesDiffusion3D{GradientVariables, RealT <: Real,
E <: AbstractCompressibleEulerEquations{3}
} <:
AbstractCompressibleNavierStokesDiffusion{3, 5}
AbstractCompressibleNavierStokesDiffusion{3, 5, GradientVariables}
# TODO: parabolic
# 1) For now save gamma and inv(gamma-1) again, but could potentially reuse them from the Euler equations
# 2) Add NGRADS as a type parameter here and in AbstractEquationsParabolic, add `ngradients(...)` accessor function
Expand Down
2 changes: 1 addition & 1 deletion src/equations/equations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,6 @@ abstract type AbstractLinearizedEulerEquations{NDIMS, NVARS} <:
AbstractEquations{NDIMS, NVARS} end
include("linearized_euler_2d.jl")

abstract type AbstractEquationsParabolic{NDIMS, NVARS} <:
abstract type AbstractEquationsParabolic{NDIMS, NVARS, GradientVariables} <:
AbstractEquations{NDIMS, NVARS} end
end # @muladd
11 changes: 8 additions & 3 deletions src/equations/equations_parabolic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,21 @@
# specialize this function to compute gradients e.g., of primitive variables instead of conservative
gradient_variable_transformation(::AbstractEquationsParabolic) = cons2cons

# By default, the gradients are taken with respect to the conservative variables.
# this is reflected by the type parameter `GradientVariablesConservative` in the abstract
# type `AbstractEquationsParabolic{NDIMS, NVARS, GradientVariablesConservative}`.
struct GradientVariablesConservative end

# Linear scalar diffusion for use in linear scalar advection-diffusion problems
abstract type AbstractLaplaceDiffusion{NDIMS, NVARS} <:
AbstractEquationsParabolic{NDIMS, NVARS} end
AbstractEquationsParabolic{NDIMS, NVARS, GradientVariablesConservative} end
include("laplace_diffusion_1d.jl")
include("laplace_diffusion_2d.jl")
include("laplace_diffusion_3d.jl")

# Compressible Navier-Stokes equations
abstract type AbstractCompressibleNavierStokesDiffusion{NDIMS, NVARS} <:
AbstractEquationsParabolic{NDIMS, NVARS} end
abstract type AbstractCompressibleNavierStokesDiffusion{NDIMS, NVARS, GradientVariables} <:
AbstractEquationsParabolic{NDIMS, NVARS, GradientVariables} end
include("compressible_navier_stokes.jl")
include("compressible_navier_stokes_1d.jl")
include("compressible_navier_stokes_2d.jl")
Expand Down
12 changes: 0 additions & 12 deletions src/solvers/dgmulti/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -433,15 +433,3 @@ function LinearAlgebra.mul!(b_in, A_kronecker::SimpleKronecker{3}, x_in)
return nothing
end
end # @muladd

# TODO: deprecations introduced in Trixi.jl v0.6
@deprecate DGMultiMesh(dg::DGMulti{NDIMS}; cells_per_dimension, kwargs...) where {NDIMS} DGMultiMesh(dg,
cells_per_dimension;
kwargs...)

# TODO: deprecations introduced in Trixi.jl v0.5
@deprecate DGMultiMesh(vertex_coordinates, EToV, dg::DGMulti{NDIMS};
kwargs...) where {NDIMS} DGMultiMesh(dg, vertex_coordinates, EToV;
kwargs...)
@deprecate DGMultiMesh(triangulateIO, dg::DGMulti{2, Tri}, boundary_dict::Dict{Symbol, Int};
kwargs...) DGMultiMesh(dg, triangulateIO, boundary_dict; kwargs...)

0 comments on commit 6c48c6d

Please sign in to comment.