ApproxFunExamples
ApproxFunExamples copied to clipboard
Heat equation with nonconstant coefficient
Hello. Do you currently have support for the heat equation with non-constant coefficients?
\frac{\partial u}{\partial t} = \frac{\partial}{\partial x} \left( k(x) \frac{\partial u}{\partial x} \right),
or, alternatively,
\frac{\partial u}{\partial t} =\frac{\partial^2}{\partial x^2} \left( k(x) u \right),
where u(x,t) is the solution and k(x) is the variable coefficient.
Thank you for considering this question.
I believe that works fine
Great. Could you please give me some hints (to an example?), to show how this is possible? Thanks!
Pretty straight forward if you look at
https://github.com/JuliaApproximation/ApproxFunExamples/blob/master/PDEs/Rectangle%20PDEs.ipynb
Check out for example the convection example. Using an operator like Dt-Dx*(k*Dx) should work