I am trying to solve the following coupled partial differential equations with a finite difference scheme: $$\partial_tf+v\partial_zf+\partial_z\frac{1}{W}\partial_zf=0$$ $$\partial_tW+v\partial_zW-\partial_zf=0,$$

where both f and W depend on t and z. In order to solve both equations simultaneously I am trying to use vector notation. However the diffusion term in the first equation is non-linear. How can I linearise this?


I have previously solved them in a semi-implicit scheme one after another, using the result of one equation in the other one. This however is explicit and requires very small timesteps, making the program to slow to be useful.

The basic idea is now to write them in a vector/matrix form and solve them simultaneously - again using finite differences. This requires the equation to be of the form: $$\begin{array}{c} f \\ W \end{array}=\vec{f}$$


where all matrices $\textbf{C}$ are independ of $\vec{f}$.

The full problem consists of an additional dimension treated in LOD and a discontinuity in $v$ and $W$. Therefore, I do not expect standard ODE solvers to work.

Is there any way (substitution, or other) to make this possible?

  • $\begingroup$ One good way to solve this problem would be to discretize the PDEs by finite difference in the spatial variable z, and then put the resulting system of ODEs into a standard ODE integrator. You don't need to linearize anything; if the equations are nonlinear then solve them the way they are. $\endgroup$ – Maxim Umansky Feb 17 at 20:13
  • $\begingroup$ Thank you for your answer! I realised it is necessary to update the question. The equations contain a discontinuity, where instead of the above equations the shock equation has to be solved. And to my knowledge ODE solvers cannot deal with this. (The treatment at the shock, namely the modification of the Thomas algorithm I know and most likely will be able to adapt if necessary) $\endgroup$ – Hanno Jacobs Feb 17 at 21:14
  • 1
    $\begingroup$ If the solution contains a shock-like discontinuity that's not too bad actually; a simple way to deal with this is to add a small diffusive term to the equation, so that the discontinuity becomes a narrow smooth boundary layer that can be resolved. $\endgroup$ – Maxim Umansky Feb 17 at 23:49
  • $\begingroup$ I need to clarify the type of discontinuity. Both $W$ and $v$ are discontinuous, this means your approach will not work, if I understand correctly. Furthermore, I want to solve this in my own finite difference scheme if somehow possible, even if it is not the best approach. Sorry I am trying to break down the problem as far as possible, which in this case was to far I guess. Appreciate your help! $\endgroup$ – Hanno Jacobs Feb 18 at 9:09
  • $\begingroup$ That has to be understood at the level of the underlying PDE, not the numerical methods. If W is discontinuous, how do we interpret the derivative $\partial_{z} W$? Do we mean there is a matching condition at the discontinuity? $\endgroup$ – Maxim Umansky Feb 18 at 16:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.