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
508 stars 98 forks source link

Is it possible to develop variable coeffcient solver based on Trixi.jl framework? #1623

Open mathboylinlin opened 10 months ago

mathboylinlin commented 10 months ago

Hello everyone. Could someone tell me is it possible to develop a solver for solving equations with solution dependent coefficinets or coordinate dependent coefficients? For example, in the heat transfer problem, the thermal conductivity is not always a constant but dependent on temperature which is an independent variable in the heat transfer equations. I would like to know whether Trixi.jl can deal with this problem. Thanks in advance.

ranocha commented 10 months ago

Coefficients that depend on the solution itself mean that you have to deal with a nonlinear problem. This is the focus of Trixi.jl, so it is widely supported. See for example https://trixi-framework.github.io/Trixi.jl/stable/tutorials/adding_new_scalar_equations/ for a simple tutorial describing a nonlinear scalar conservation law. Coefficients depending on the space coordinates are less supported. Right now, we typically introduce the space coordinates as additional degrees of freedom as described in https://trixi-framework.github.io/Trixi.jl/stable/tutorials/adding_nonconservative_equation/ to handle this. This is suboptimal and should be changed at some point, but we did not have the resources to do so so far. See https://github.com/trixi-framework/Trixi.jl/issues/358