constraints for reduced -D cases

This commit is contained in:
andy 2009-05-08 11:55:50 +01:00
parent 02cc2455ed
commit 321e4af9e8

View File

@ -106,9 +106,6 @@ void Foam::KinematicParcel<ParcelType>::calc
vector U1 = vector U1 =
calcVelocity(td, dt, cellI, d0, U0, rho0, mass0, Fx, Cud, dUTrans); calcVelocity(td, dt, cellI, d0, U0, rho0, mass0, Fx, Cud, dUTrans);
// Constrain the new velocity for reduced -D cases
meshTools::constrainDirection(mesh, mesh.solutionD(), U1);
// Accumulate carrier phase source terms // Accumulate carrier phase source terms
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -144,6 +141,8 @@ const Foam::vector Foam::KinematicParcel<ParcelType>::calcVelocity
vector& dUTrans vector& dUTrans
) const ) const
{ {
const polyMesh& mesh = this->cloud().pMesh();
// Return linearised term from drag model // Return linearised term from drag model
Cud = td.cloud().drag().Cu(U - Uc_, d, rhoc_, rho, muc_); Cud = td.cloud().drag().Cu(U - Uc_, d, rhoc_, rho, muc_);
@ -160,6 +159,9 @@ const Foam::vector Foam::KinematicParcel<ParcelType>::calcVelocity
vector Unew = td.cloud().UIntegrator().integrate(U, dt, ap, bp).value(); vector Unew = td.cloud().UIntegrator().integrate(U, dt, ap, bp).value();
// Apply correction to velocity for reduced-D cases
meshTools::constrainDirection(mesh, mesh.solutionD(), Unew);
// Calculate the momentum transfer to the continuous phase // Calculate the momentum transfer to the continuous phase
// - do not include gravity impulse // - do not include gravity impulse
dUTrans = -mass*(Unew - U - dt*td.g()); dUTrans = -mass*(Unew - U - dt*td.g());
@ -188,6 +190,9 @@ bool Foam::KinematicParcel<ParcelType>::move(TrackData& td)
while (td.keepParticle && !td.switchProcessor && tEnd > ROOTVSMALL) while (td.keepParticle && !td.switchProcessor && tEnd > ROOTVSMALL)
{ {
// Apply correction to position for reduced-D cases
meshTools::constrainToMeshCentre(mesh, p.position());
// Set the Lagrangian time-step // Set the Lagrangian time-step
scalar dt = min(dtMax, tEnd); scalar dt = min(dtMax, tEnd);