-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sc/compressible euler multicomponent 2d fluxes (#1681)
* Added coupling converters. * Added generic converter_function for structured 2d meshes. * Added fluxes to 2d compressible multicomponent Euler. * Removed backup file. * Removed redundant project toml file. * Removed redundant Project toml file. * Removed redundant project toml file. * Removed redundant project toml files. * Removed rdundant files. * Removed p4est coupling test elixir. This is too experimental to be in any branch yet. * Removed coupling converter functions. These should be part of a different PR. * Removed further coupling converter functions. * Removed redundant swap file. * Reverted coupling semidiscretization to the main branch's by hand. This should be part of a different PR. * Added example elixir for the multicomponent Euler equations on structured meshes. * Added test for structured 2d Euler multicomponent elixir. * Reduced resolution of Euler multicomponent elixir to reduce compute time. * Applied autoformatter on multicomponent Euler. * Autoformatter on test. * Update src/equations/compressible_euler_multicomponent_2d.jl Co-authored-by: Hendrik Ranocha <[email protected]> * Added checks for type instability for the structured mesh multicomponent Euler equations. * Autoformatted structured 2d test. * Added consistency check for new multicomponent Euler fluxes. * Added rotational invariance test for CompressibleEulerMulticomponentEquations2D. * Added rotations. * Added rotated surface for fluxes with only one u-vector. * Corrected type instability in rotation. * Applied autoformatter on 2d multicomponent Euler equations. * Removed redundant speed functions from multicomponent Euler equations. * Applied autoformatter on unit test. --------- Co-authored-by: Hendrik Ranocha <[email protected]>
- Loading branch information
Showing
5 changed files
with
275 additions
and
3 deletions.
There are no files selected for viewing
55 changes: 55 additions & 0 deletions
55
examples/structured_2d_dgsem/elixir_eulermulti_convergence_ec.jl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
|
||
using OrdinaryDiffEq | ||
using Trixi | ||
|
||
############################################################################### | ||
# semidiscretization of the compressible Euler multicomponent equations | ||
equations = CompressibleEulerMulticomponentEquations2D(gammas = (1.4, 1.4), | ||
gas_constants = (0.4, 0.4)) | ||
|
||
initial_condition = initial_condition_convergence_test | ||
|
||
volume_flux = flux_ranocha | ||
solver = DGSEM(polydeg = 3, surface_flux = flux_ranocha, | ||
volume_integral = VolumeIntegralFluxDifferencing(volume_flux)) | ||
|
||
cells_per_dimension = (16, 16) | ||
coordinates_min = (-1.0, -1.0) | ||
coordinates_max = (1.0, 1.0) | ||
mesh = StructuredMesh(cells_per_dimension, coordinates_min, coordinates_max) | ||
|
||
semi = SemidiscretizationHyperbolic(mesh, equations, initial_condition, solver, | ||
source_terms = source_terms_convergence_test) | ||
|
||
############################################################################### | ||
# ODE solvers, callbacks etc. | ||
|
||
tspan = (0.0, 0.4) | ||
ode = semidiscretize(semi, tspan) | ||
|
||
summary_callback = SummaryCallback() | ||
|
||
analysis_interval = 100 | ||
analysis_callback = AnalysisCallback(semi, interval = analysis_interval) | ||
|
||
alive_callback = AliveCallback(analysis_interval = analysis_interval) | ||
|
||
save_solution = SaveSolutionCallback(interval = 100, | ||
save_initial_solution = true, | ||
save_final_solution = true, | ||
solution_variables = cons2prim) | ||
|
||
stepsize_callback = StepsizeCallback(cfl = 0.5) | ||
|
||
callbacks = CallbackSet(summary_callback, | ||
analysis_callback, alive_callback, | ||
save_solution, | ||
stepsize_callback) | ||
|
||
############################################################################### | ||
# run the simulation | ||
|
||
sol = solve(ode, CarpenterKennedy2N54(williamson_condition = false), | ||
dt = 1.0, # solve needs some value here but it will be overwritten by the stepsize_callback | ||
save_everystep = false, callback = callbacks); | ||
summary_callback() # print the timer summary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters