1
$\begingroup$

I'm working on the calculation of the Euler equations with the finite volume method. Unfortunately I'm not allowed to do a division. So I'm wondering if there's a form which does not need a division.

At the moment the Euler equations look like this:

$$ \frac{\partial}{\partial t} \begin{pmatrix} \rho \\ \rho v_1 \\ \rho v_2 \\ \rho v_3 \\ \rho E \end{pmatrix} = -\mathrm{div} \begin{pmatrix} \rho v_1 & \rho v_2 & \rho v_3 \\ \rho v_1^2 + p & \rho v_1 v_2 & \rho v_1 v_3 \\ \rho v_2 v_1 & \rho v_2^2 + p & \rho v_2 v_3 \\ \rho v_3 v_1 & \rho v_3 v_2 & \rho v_3^2 + p \\ (\rho E + p) v_1 & (\rho E + p) v_2 & (\rho E + p) v_3 \end{pmatrix} $$

As you can see, I first need to calculate $\frac{\rho v_1}{\rho}$ to get $v_1$ so I can calculate e.g. $\rho v_1^2$

$\endgroup$
14
  • 2
    $\begingroup$ I'm not sure why you mean by "division costs an additional time step", could you elaborate? $\endgroup$
    – Kyle Kanos
    Commented Jul 8, 2014 at 15:59
  • 2
    $\begingroup$ Okay, I wouldn't call a clock a "timestep" when dealing with hydrodynamics, as $dt$ is your timestep. I also wouldn't worry about division taking up an extra cycle, you really can't avoid it when using the conservative form (especially if you're using a Riemann solver). $\endgroup$
    – Kyle Kanos
    Commented Jul 8, 2014 at 16:07
  • 2
    $\begingroup$ No, clock is not the same as a timestep. A clock is the inverse of the chip frequency, a timestep is the characteristic time it would take for a fluid parcel to leave the cell (denoted by the Courant-Freidrich-Levy condition). $\endgroup$
    – Kyle Kanos
    Commented Jul 8, 2014 at 16:30
  • 2
    $\begingroup$ This question appears to be off-topic because it is about numerical methods, not physics. $\endgroup$
    – Kyle Oman
    Commented Jul 8, 2014 at 16:52
  • 2
    $\begingroup$ @KyleKanos True, though I'd judge this to be very close to the line between computational physics and an implementation issue. Whether it's over the line or not is up for debate. $\endgroup$
    – Kyle Oman
    Commented Jul 8, 2014 at 17:17

1 Answer 1

1
$\begingroup$

An alternative to the conservative formalism of the Euler is the primitive form: $$ \frac{\partial\rho}{\partial t}+\nabla\cdot\rho\mathbf v=0 \\ \rho\frac{\partial\mathbf v}{\partial t}+\rho\mathbf v\cdot\nabla\mathbf v+\left(\gamma-1\right)\nabla\left(\rho e\right)=0 \\ \frac{\partial e}{\partial t}+\mathbf v\cdot\nabla e+\left(\gamma-1\right)e\nabla\cdot\mathbf v=0 $$ You shouldn't have to do any division here, as the primitive variables are what are differenced. I haven't really worked with solving a primitive systems, but I don't believe you can use the conventional Riemann solver, as that expects a conservative system.

$\endgroup$
4
  • $\begingroup$ okay, thanks. Do you know a solver for this problem? $\endgroup$
    – Thomas
    Commented Jul 8, 2014 at 16:22
  • $\begingroup$ I do not know of any particular solver, but I do not believe you will be guaranteed conservation using the primitive variables (at least to machine precision). $\endgroup$
    – Kyle Kanos
    Commented Jul 8, 2014 at 16:27
  • $\begingroup$ Why is that so? $\endgroup$
    – Thomas
    Commented Jul 8, 2014 at 16:28
  • 1
    $\begingroup$ When using the primitive form, you are not solving a conservative equation. $\endgroup$
    – Kyle Kanos
    Commented Jul 8, 2014 at 16:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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