# Theory - Time Step Size

Hello!

Reading the wikipedia I see:

Reading in Monaghan and Kos's paper from 1999 (https://www.researchgate.net/publication/245292775_Solitary_Waves_on_a_Cretan_Beach)

So this corresponds to delta*t*cv and makes sense, since CFL = 0.3 in this case. But notation wise there is something I don't understand; does "| |" mean anything in this case? I guess it is exactly the same as "( )" i.e. just parentheses? Or are we actually taking a magnitude?

Secondly can anyone explain where the Courant time step control comes? Is it just CFL * (h/c) ?

Kind regards

## Comments

I presume it is an absolute value since the dot product of two vectors can be negative. So, effectively, you gauge your viscosity criterion on the particle giving either the largest positive or the smallest negative value, that is insensitively of whether particles are moving apart or closer. Recall also that in the end the time step, the outcome of the calculation, is normally a positive quantity.

Thanks!

That makes very much sense. Think I got confused by r_ab^2 but your explanation of "||" makes very good sense.

Kind regards

Hi Asalih3d,

Thank you for your question. Let me try and answer this.

On the Δt_cv:

The symbol as given by Monaghan and Kos 1999 (and many other papers) is the absolute value, similarly with the |f_a| in the Δt_f of Eq. 35.

As in SPH we do pairwise interactions (from a->b or b->a), the absolute value of the pairwise interactions is equal, i.e. the magnitude is preserved regardless of direction - the beauty of SPH in my opinion. For mathematical completeness in Eq. 35 Δt_cv (or Eq. 37) the absolute symbol is used (which is redundant because we are looking the maximum value of the dot product of a pairwise interaction).

On the CFL criteria:

In DualSPHysics, we bound the Δt based on three conditions, the force per unit mass, the numerical speed of sound (some refer to this as the CFL condition or Courant condition) and the artificial viscous forces (or physical viscous forces in the multi-phase code).

These conditions can be derived by doing a stability analysis. Plenty of papers and examples out there.

I think your question is mostly on the numerical speed of sound which can be expressed as

C=uΔt/Δx<1,

where C is the Courant number. In SPH we tend to use h (instead of Δx) as the characteristic length we want to resolve a signal.

In DualSPHysics, we choose to use c_s (the numerical speed of sound) as the maximum velocity of the system at which a wave (or signal) can propagate across the domain.

Thus,

C=c_sΔt/h<1,

In other words, a wave or signal propagating through the domain with a velocity lower than c_s will be resolved and (vice versa). Thus, be careful how you choose your c_s and your C. By experience, you are mostly bounded by the above condition in WCSPH (i.e. for Newtonian free-surface flows, waves, etc.).

Hope this makes sense.

Cheers,

George

So, in that case does it mean increasing the speed of sound while keeping the resolution the same the might cause system to become unstable? Or does variable time step already account for that?

Also, I remember reading that increasing the speed of sound causes system to be more sensitive to pressure disturbances as pressure scales with speed of sound squared through EoS. Can someone recommend a study where I can find more information on the effect of speed of sound on stability characteristics?

Thank you.