ENH: Code updates in lieu of cloud updates

This commit is contained in:
andy
2010-10-25 17:52:35 +01:00
parent 8c3ecd9b2c
commit 1a61449dce
34 changed files with 99 additions and 86 deletions

View File

@ -233,10 +233,13 @@ void Foam::streamLine::track()
allVectors_
);
// Set very large dt. Note: cannot use GREAT since 1/GREAT is SMALL
// which is a trigger value for the tracking...
const scalar trackTime = Foam::sqrt(GREAT);
// Track
//Pout<< "Tracking particles." << endl;
particles.move(td);
//Pout<< "Finished tracking particles." << endl;
particles.move(td, trackTime);
}

View File

@ -152,15 +152,16 @@ Foam::streamLineParticle::streamLineParticle
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
bool Foam::streamLineParticle::move(streamLineParticle::trackData& td)
bool Foam::streamLineParticle::move
(
streamLineParticle::trackData& td,
const scalar trackTime
)
{
td.switchProcessor = false;
td.keepParticle = true;
// Set very large dt. Note: cannot use GREAT since 1/GREAT is SMALL
// which is a trigger value for the tracking...
scalar deltaT = Foam::sqrt(GREAT); //cloud().pMesh().time().deltaTValue();
scalar tEnd = (1.0 - stepFraction())*deltaT;
scalar tEnd = (1.0 - stepFraction())*trackTime;
scalar dtMax = tEnd;
while
@ -189,7 +190,7 @@ bool Foam::streamLineParticle::move(streamLineParticle::trackData& td)
dt *= trackToFace(position()+dt*U, td);
tEnd -= dt;
stepFraction() = 1.0 - tEnd/deltaT;
stepFraction() = 1.0 - tEnd/trackTime;
if (tEnd <= ROOTVSMALL)
{

View File

@ -157,9 +157,9 @@ public:
streamLineParticle(const streamLineParticle& c);
//- Construct and return a clone
autoPtr<streamLineParticle> clone() const
autoPtr<Particle<streamLineParticle> > clone() const
{
return autoPtr<streamLineParticle>
return autoPtr<Particle<streamLineParticle> >
(
new streamLineParticle(*this)
);
@ -173,7 +173,7 @@ public:
// Tracking
//- Track all particles to their end point
bool move(trackData&);
bool move(trackData&, const scalar trackTime);
//- Overridable function to handle the particle hitting a patch