mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Hacking in a sympletic, leapfrog integrator for interparticle forces.
Conserves kinetic energy correctly.
This commit is contained in:
@ -254,10 +254,24 @@ void Foam::InteractingKinematicCloud<ParcelType>::evolve()
|
||||
resetSourceTerms();
|
||||
}
|
||||
|
||||
this->collision().collide();
|
||||
const scalar deltaT = mesh_.time().deltaT().value();
|
||||
|
||||
forAllIter(typename InteractingKinematicCloud<ParcelType>, *this, iter)
|
||||
{
|
||||
ParcelType& p = iter();
|
||||
p.U() += 0.5*deltaT*p.f()/p.mass();
|
||||
}
|
||||
|
||||
Cloud<ParcelType>::move(td);
|
||||
|
||||
this->collision().collide();
|
||||
|
||||
forAllIter(typename InteractingKinematicCloud<ParcelType>, *this, iter)
|
||||
{
|
||||
ParcelType& p = iter();
|
||||
p.U() += 0.5*deltaT*p.f()/p.mass();
|
||||
}
|
||||
|
||||
postEvolve();
|
||||
}
|
||||
|
||||
|
||||
@ -167,14 +167,13 @@ const Foam::vector Foam::InteractingKinematicParcel<ParcelType>::calcVelocity
|
||||
mass*td.cloud().forces().calcCoupled(cellI, dt, rhoc_, rho, Uc_, U);
|
||||
const vector FNonCoupled =
|
||||
mass*td.cloud().forces().calcNonCoupled(cellI, dt, rhoc_, rho, Uc_, U);
|
||||
const vector& FCollision = f();
|
||||
|
||||
// New particle velocity
|
||||
//~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
// Update velocity - treat as 3-D
|
||||
const scalar As = this->areaS(d);
|
||||
const vector ap = Uc_ + (FCoupled + FNonCoupled + FCollision + Su)/(utc*As);
|
||||
const vector ap = Uc_ + (FCoupled + FNonCoupled + Su)/(utc*As);
|
||||
const scalar bp = 6.0*utc/(rho*d);
|
||||
|
||||
IntegrationScheme<vector>::integrationResult Ures =
|
||||
|
||||
Reference in New Issue
Block a user