Adding constraint of tracking motion in reduced dimension cases. Not

altering the dsmc particle's velocity - that was the problem before,
as the tracking modifies it on patch collision.  Creating a local
velocity used only for the tracking destination.
This commit is contained in:
graham
2009-10-11 14:17:45 +01:00
parent 51ebdc5e80
commit 00fe187f77
2 changed files with 21 additions and 4 deletions

View File

@ -1,7 +1,9 @@
EXE_INC = \ EXE_INC = \
-I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/lagrangian/basic/lnInclude -I$(LIB_SRC)/lagrangian/basic/lnInclude \
-I$(LIB_SRC)/meshTools/lnInclude
LIB_LIBS = \ LIB_LIBS = \
-llagrangian \ -llagrangian \
-lfiniteVolume -lfiniteVolume \
-lmeshTools

View File

@ -25,6 +25,7 @@ License
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
#include "DsmcParcel.H" #include "DsmcParcel.H"
#include "meshTools.H"
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
@ -47,12 +48,27 @@ bool Foam::DsmcParcel<ParcelType>::move
scalar tEnd = (1.0 - p.stepFraction())*deltaT; scalar tEnd = (1.0 - p.stepFraction())*deltaT;
const scalar dtMax = tEnd; const scalar dtMax = tEnd;
// For reduced-D cases, the velocity used to track needs to be
// constrained, but the actual U_ of the parcel must not be
// altered or used, as it is altered by patch interactions an
// needs to retain its 3D value for collision purposes.
vector Utracking = U_;
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());
Utracking = U_;
// Apply correction to velocity to constrain tracking for
// reduced-D cases
meshTools::constrainDirection(mesh, mesh.solutionD(), Utracking);
// Set the Lagrangian time-step // Set the Lagrangian time-step
scalar dt = min(dtMax, tEnd); scalar dt = min(dtMax, tEnd);
dt *= p.trackToFace(p.position() + dt*U_, td); dt *= p.trackToFace(p.position() + dt*Utracking, td);
tEnd -= dt; tEnd -= dt;
@ -256,4 +272,3 @@ void Foam::DsmcParcel<ParcelType>::transformProperties
#include "DsmcParcelIO.C" #include "DsmcParcelIO.C"
// ************************************************************************* // // ************************************************************************* //