# Time stepping formulas: velocity prediction with sympleptic scheme

Referring to the Users' Guide and the subsection 3.7.2 on the sympleptic scheme (https://github.com/DualSPHysics/DualSPHysics/wiki/3.-SPH-formulation#37-time-stepping), what is the precise formula used to calculate the velocity at the time instant n+1/2?

This could be an addition to formula (33) if I am not mistaken. Corrections welcome.

Also, the text "During the predictor stage the values of **acceleration** and density" should be "During the predictor stage the values of **position** and density". Is that correct?

## Comments

"During the predictor stage the values of

accelerationand density" should be "During the predictor stage the values ofpositionand density". Is that correct?Yes, thank you

Glad to help. Please one more question: what is the expression for v(n+1/2) eventually implemented in the code?

I am also interested in that. Tried to search the code but couldn't find the correct place where the calculation was performed.

Kind regards

You can find the step calculation using Symplectic in JSphCpuSingle::ComputeStep_Sym(). This method calls JSphCpu::ComputeSymplecticPre() for predictor step and JSphCpu::ComputeSymplecticCorr() for corrector step of Symplectic. You can find similar methods in the GPU code.

Best regards

Thanks for all contributions, but I would like to bring the topic back to the original question.

What is the precise formula used to calculate the velocity at the time instant n+1/2?Or:

What is the expression for v(n+1/2) implemented in the code?A description of it lacks in the

Users' Guide, namely around formula 33, if I am not mistaken.An answer of the developers' is the most authoritative. This piece of information provides an important explanation of the behaviour of simulations. If deemed applicable, an edit of the Users' Guide would help users understand what DualSPhysics does under the hood.

Thanks again for addressing this post.

Apologies for urging a clarification once again. The same issue is present in Crespo, A.J.C., J.M. Domínguez, B.D. Rogers, M. Gómez-Gesteira, S. Longshaw, R. Canelas, R. Vacondio, A. Barreiro, and O. García-Feal. 2015. ‘DualSPHysics: Open-Source Parallel CFD Solver Based on Smoothed Particle Hydrodynamics (SPH)’.

Computer Physics Communications187 (February): 204–16. https://doi.org/10.1016/j.cpc.2014.10.004.Directions to an accurate report, and its inclusion in the Users' Guide, will be most gratefully appreciated. Thanks in advance for this.

Is it possible that the "predictor/corrector" time integration for fluid particles implemented in the code follows the algorithm below? Would someone from the Developers Team please confirm/correct?

Thanks in advance for looking into this and letting know.

This flow possibly improves the analysis one post up.

Would someone with a fresh pair of eyes and knowledge of the code please double-check whether this analysis is correct?

Thanks in advance for looking into this and letting know.