5
$\begingroup$

I wish to solve an equation of the form,

$$ \frac{\partial}{\partial t} \left( \frac{\partial \phi}{\partial x} \right) = -\frac{\partial}{\partial x}(\mathcal{F}) $$

for the variable $\phi$ (e.g. mass).

On the right-hand side is the flux $\mathcal{F}$ of quantity $\phi$.

This equation "looks like" an advection-diffusion equation, but with the rate of change of the spatial derivative of $\phi$ appearing on the left-hand side.

Applying the finite volume approach we integrate the equation over the cell $\Omega$,

$$ \frac{\partial}{\partial t}\int_{\Omega}\left( \frac{\partial \phi}{\partial x} \right)dx = - \int_{\Omega}\frac{\partial\mathcal{F}}{\partial x} dx $$

$$ \frac{\partial}{\partial t}\left( \frac{\phi_{j+1/2}}{h_j} - \frac{\phi_{j-1/2}}{h_j}\right) = -\left( \frac{\mathcal{F}_{j+1/2}}{h_j} - \frac{\mathcal{F}_{j-1/2}}{h_j}\right) $$

where $h_j$ width of the cell.

Is this basic approach correct? I have never needed to solve an equation which is the time-derivative of a spatial derivative before, this is the approach I have taken, does anyone have any advice or direction? I have not yet tried to implement this numerically.

$\endgroup$
  • $\begingroup$ The operator on your left hand side is second order, as is the one on the right. Therefore, it is not an advection-diffusion problem. I recommend finding out whether the result is an elliptic, hyperbolic or parabolic equation. $\endgroup$ – Guido Kanschat Jul 28 '13 at 17:03
  • $\begingroup$ @GuidoKanschat I'm not too sure how to go about doing that. How can I use that information to help with writing the equation with FVM? $\endgroup$ – boyfarrell Jul 28 '13 at 17:13
  • $\begingroup$ The FVM might simply not be the best approach for this equation. As for the character of the equation, one can typically guess this if one knows what kind of physical process this equation describes. $\endgroup$ – Wolfgang Bangerth Jul 28 '13 at 21:58
4
$\begingroup$

What I describe below is a version of the method of characteristics. Its applications are limited, but if it works in your case, it would be a fairly simple, fast, and accurate process. If you want to discretize on a mesh, it might not be that helpful.

Assuming your solutions $\phi$ are smooth, you can reduce this to a family of ODE problems. Exchange the order of derivatives on the left first, obtaining \begin{gather} \frac{\partial}{\partial x}\frac{\partial}{\partial t} \phi = -\frac{\partial}{\partial x}\frac{\partial}{\partial x} \phi. \end{gather}

Now you define $\psi = \partial_x \phi$ and solve \begin{gather} \frac{\partial}{\partial t} \psi = -\frac{\partial}{\partial x} \psi, \qquad\text{or}\qquad (\partial_t+\partial_x)\psi=0, \end{gather} which is a first order hyperbolic conservation law and linear. Thus, \begin{gather} \psi(t,x) = \psi(0,x-t), \end{gather} that is, $\psi$ is already determined by its initial values.

Finally, observing that by construction $\psi = \partial_x \phi$, you compute (boundary conditions permitting): \begin{gather} \phi = \int \psi(t,x) \,dx. \end{gather}

$\endgroup$
  • $\begingroup$ This answer is saying that by making a substitution the equation can be be written in the form the conservation equation. This was my observation above, what I would like to know is how to numerically solve this equation as-is. $\endgroup$ – boyfarrell Jul 28 '13 at 20:55
  • $\begingroup$ I added the line that computes the function $\psi$ from an initial value $\endgroup$ – Guido Kanschat Jul 29 '13 at 6:13
  • 1
    $\begingroup$ This solution does not depend on the function F? How did this happen? Is this a typo or what? $\endgroup$ – Maxim Umansky Jul 29 '13 at 13:46
  • $\begingroup$ According to the question, the function $\mathcal F$ is equal to $\partial_x \phi$. At least that's how I understood the flux of $\phi$ $\endgroup$ – Guido Kanschat Jul 29 '13 at 15:30
  • $\begingroup$ The flux for the advection diffusion equation is $\mathcal{F}=a\phi-d\phi_x$ $\endgroup$ – boyfarrell Jul 29 '13 at 21:48
3
$\begingroup$

The equation is $\partial_{t} \psi = \partial_{x} F(\phi)$ where $\psi = \partial_x \phi$

The time-integration can be done, e.g., by explicit time-stepping:

$\psi^{j+1}_i = \psi^j_i + \frac{\tau}{2 dx} (F^j_{i+1}-F^j_{i-1})$,

which requires that $F$ is known at each grid node $i$ at the "old" time slice $j$.

This can be achieved by adding a numerical "inversion" operator $\phi(x_i)=\int_{x_0}^{x_i} \psi(x)$ used each time before evaluating the function $F$. If $\psi$ is known at each grid point $i$ at the old time-slice $j$ then the integral can be evaluated (e.g., by Gaussian quadrature) so $\phi$ can be found at each grid point $i$; therefore $F$ can be found at each grid point as well. Then the time-step can be carried out and $\psi^{j+1}$ is found. This method would work for implicit time-stepping as well.

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.