1
$\begingroup$

In SPH (weakly compressible approach) the Cole state equation is used to compute pressure from density: $$p(\rho)=\frac{\rho_0c^2}{\gamma}\left(\left(\frac{\rho}{\rho_0}\right)^\gamma-1\right)+p_0$$

$c$ is the speed of sound, which in the weakly compressible case is about 1000 m/s. But I don't understand the following (quoted from Wikipedia but commonly present in the literature):

In practice a value of $c$ smaller than the real one is adopted to avoid time steps too small in the time integration scheme. Generally a numerical speed of sound is adopted such that density variation smaller than 1% are allowed. This is the so-called weak-compressibility assumption

And indeed, the SPH code (DualSPHysics) I am using has a speed of sound parameter.

My questions are as follows:

  1. My understanding is that reducing the speed of sound will drastically scale down the pressure and in turn the pressure forces, and acceleration. With everything else kept constant, the system will no evolve the same way. How does changing the speed of sound not change the computed pressure and therefore the results for the simulation?

  2. How is the speed of sound related to the time stepping?

$\endgroup$

1 Answer 1

0
$\begingroup$

For #1, I don't see how using, for example, $c_\text{actual}=0.995c_\text{real}$ would "drastically" reduce the pressure; it'd drop the additive part by about 1%, which looks to be what the referenced quote is stating. In effect, it probably is not much different than using a speed of sound of 990 m/s in your simulation in place of the actual speed of sound is 1000 m/s. Excepting perhaps some rather extreme cases (in which case I imagine the SPH code needs to be altered anyway), the system will evolve the same.

For #2, it is almost surely directly related to the CFL condition. Usually stated, $$\mathcal{C}=\frac{u_\text{max}\Delta t}{\Delta x}\Longrightarrow\Delta t=\frac{\mathcal{C}\Delta x}{u_\text{max}}$$ where $u_\text{max}$ is the maximum wave speed across the whole simulation, which in pure hydrodynamics is the speed of sound (in MHD, it would be the Alfvén speed). With $\mathcal{C}\leq1$, this more-or-less ensures that signals from one computational cell don't advect more than 1 cell away in time, otherwise you can get vacuum cells.1


1. My experience is with regards to a grid-based finite volume method approach, so the SPH interpretation of this might differ a little bit.

$\endgroup$
4
  • $\begingroup$ thank you. I believe you are right for #2. However, for #1 the speed of sound used is quite significantly smaller, that is for instance in my example it is something like $40m/s$. In fact, what I understand is that the speed of sound is the smallest one such that $\frac{u_{max}}{c} < 0.1$ so that the flow can be considered weakly compressible. But then I do not understand how the pressure computed with the state equation can be "trusted". $\endgroup$
    – Al Wld
    Commented Aug 4, 2023 at 10:31
  • $\begingroup$ Hmm. Reading that Wiki article (plus Becker & Teschner (2009); PDF link), I wonder if they actually mean that in the computation of the time step via the CFL condition, they use $u_\text{max}=0.99c_s$ instead of $u_\text{max}=c_s$ to ensure that the time step is valid. $\endgroup$
    – Kyle Kanos
    Commented Aug 4, 2023 at 13:58
  • $\begingroup$ Reading the example in the paper you linked, they use a numerical speed of sound of $88.5m/s$, in line with the guidelines I posted in my previous comment (I quote: $c_s$, being much greater than the maximum expected velocity, $u_{max}$, this model restricts the density variations, e.g., with $c_s > 10 u_{max}$, the Mach number, $M<0.1$, and the density variation would be limited to less than 1%). I understand the guideline, but I don't understand where it comes from? One could also use a speed of sound ten times greater, and the corresponding pressure would turn out to be much different. $\endgroup$
    – Al Wld
    Commented Aug 4, 2023 at 18:07
  • $\begingroup$ @AlWld Sorry for the delay, I was traveling this weekend. Note that $u_\text{max}$ that I am using is the maximum speed of sound in the simulation; it is not the velocity of the fluid. If you prefer, I can change these to $c_\text{max}$ instead. My reading of the paper is also not that it is used in the pressure calculation but is used in the calculation of the time step $\Delta t$. $\endgroup$
    – Kyle Kanos
    Commented Aug 7, 2023 at 13:46

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