# Implicit methods for variable coefficients based on equations of state

For example I have an equation that goes something like

$$\partial_t \rho = -\nabla\cdot (\rho u) + \nabla \cdot(D(\rho, T) \nabla \rho) + \rho_s$$

($$\rho, \rho_s, u, T$$ are coupled with a few other PDEs)

Could I use Forward Euler to approximate the future $$\rho$$ and $$T$$ to estimate the future coefficients and then plug them into an implicit scheme or is there a better way?

As equation of state I have table values for the coefficients $$D(\rho, T)$$ and am able to interpolate between the values, so I should be able to compute Jacobians of the interpolants. Can I use the Jacobian at the current time if it is not good enough with Forward Euler on PDE, so everything is implicit except for the coefficient which uses an explicit method with the Jacobian?

If that isn't good enough either I would really like some input how to proceed. How would one get the Jacobian from the future? Would I have to perform some kind of sampling for possible future values of $$\rho$$ and $$T$$?

(I want to solve the equations in scholarpedia but this toy example should be enough to get me started)

There are many ways to do this. Your "predictor-corrector" approach is one way. A better conceptual framework is to do a time discretization first and then look at what kind of problem you have. For example, if you wanted to do an implicit Euler scheme, you'd have to solve the following problem in each time step: $$\frac{\rho^n-\rho^{n-1}}{\Delta t} = -\nabla\cdot (\rho^n u) + \nabla \cdot(D(\rho^n, T) \nabla \rho^n) + \rho_s,$$ ignoring the other variables for the moment. That's a nonlinear problem to be solved in $$\rho^n$$, and all techniques for solving nonlinear problems are on the table now. For example, you can do a Newton iteration that tries to find a sequence $$\rho^{n,k}$$ ($$k$$ is the Newton iteration index in the $$n$$th time step) that you need to start with some $$\rho^{n,0}$$. A good first guess would be $$\rho^{n,0}=\rho^{n-1,\ast}$$, the Newton final iterate in the $$(n-1)$$st time step. An even better Newton iterate would be $$\rho^{n,0}=\rho^{n-1,\ast}+\Delta t \frac{\rho^{n-1,\ast}-\rho^{n-2,\ast}}{k} \approx \rho^{n-1,\ast}+\Delta t \frac{\partial \rho(t)}{\partial t}$$. Another option would be to start with $$\rho^{n,0}=\rho^{n,ee}$$ where the latter term is the explicit Euler solution of the time step.
Many schemes can be seen as variations of any of these ideas. Maybe they do exactly one Newton iteration with any of these starting guesses, or they do one fixed point ("Picard") iteration with any of these starting guesses. But ultimately, if you want to solve the problem implicitly, it helps to first write it down as a nonlinear problem for $$\rho^n$$.
• Ah, it should have been $\Delta t$. Fixed now. – Wolfgang Bangerth Sep 24 at 0:01