trixi-framework / Trixi.jl

Trixi.jl: Adaptive high-order numerical simulations of conservation laws in Julia
https://trixi-framework.github.io/Trixi.jl
MIT License
533 stars 106 forks source link

Rule of thumb for method choosing? #958

Open xzczd opened 2 years ago

xzczd commented 2 years ago

By method I mean method for spatial discretization and ODE solving. Currently I'm just mimicking the settings in examples folder of Trixi somewhat blindly. Does there exist any rule of thumb for method choosing, say "usually … will work on …"?

It would be great if such a section is included in the document.

gregorgassner commented 2 years ago

This question is not easy to answer, as it is quite general. So maybe you can specify your question a bit more and write the type of problems you are interested in the most?

For instance, if you are interested in linear hyperbolic problems, then you can even use standard LGL-DGSEM (weakform)

if you are interested in non-linear hyperbolic problems without shocks, then you can use one of the split-form methods either kinetic energy stable and/or entropy stable (VolumeIntegralFluxDifferencing)

if you are interested in non-linear problems with shocks, then you need the shock capturing framework (see e.g. the example "tree_2d_dgsem/elixir_euler_blast_wave.jl")

if you are interested in a super hefty non-linear problem with strong shocks, you also need the positivity preserving limiter on top of the shock capturing (see e.g. the example tree_2d_dgsem/elixir_euler_colliding_flow.jl)

These are only the differences regarding the flow physics you are interested in.

Depending on the problems you are interested in, the grid technology might play a major role. I.e. do you need unstructured grids?

Regarding time integration, Trixi.jl is currently purely explicit - hence RK methods are the name of the game here. If you need strong stability for shocks etc, a SSP RK method is recommended. I personally like the one with adaptive tiime steps as found in example "tree_2d_dgsem/elixir_euler_colliding_flow.jl" quite a lot.

As you see, there is typically not a precise clear answer to the question. Some insight into the specific problem of interest is necessary to make the correct choice.

xzczd commented 2 years ago

@gregorgassner Thanks for the reply! This is already helpful.

I agree questions with specific examples will be easier to answer. Just opened a new one: https://github.com/trixi-framework/Trixi.jl/issues/962