MolSim
Loading...
Searching...
No Matches
Functions
VelocityCalculation.h File Reference

Strategy functions for calculating the velocity of one or more particles. More...

#include "objects/ParticleContainer.h"

Go to the source code of this file.

Functions

void calculateV (ParticleContainer &particles, double delta_t)
 Calculates the velocity \( v \) for all Particle objects in a given ParticleContainer.
 

Detailed Description

Strategy functions for calculating the velocity of one or more particles.

Date
2024-11-11

Function Documentation

◆ calculateV()

void calculateV ( ParticleContainer particles,
double  delta_t 
)

Calculates the velocity \( v \) for all Particle objects in a given ParticleContainer.

The velocity \( v_i \) of a given particle \( i \) at the next unit of time \( t_{n+1} \) is calculated using the formula

\[ v_i(t_{n+1}) = v_i(t_n) + \Delta t \frac{F_i(t_n) + F_i(t_{n+1})}{2m_i}. \]

Parameters
particlesThe ParticleContainer containing the Particle objects to iterate over.
delta_tThe timestep \( \Delta t \).