Skip to content
Snippets Groups Projects
Commit 1296e867 authored by Andrew Heather's avatar Andrew Heather
Browse files

tidy-up of constrain functions for pos and U

parent 9b8cb1b2
No related branches found
No related tags found
No related merge requests found
......@@ -229,24 +229,6 @@ Foam::scalar Foam::InjectionModel<CloudType>::setNumberOfParticles
}
template<class CloudType>
void Foam::InjectionModel<CloudType>::geometryCorrection(vector& pos) const
{
meshTools::constrainToMeshCentre(owner_.mesh(), pos);
}
template<class CloudType>
void Foam::InjectionModel<CloudType>::velocityCorrection(vector& U) const
{
meshTools::constrainDirection
(
owner_.mesh(),
owner_.mesh().solutionD(),
U
);
}
template<class CloudType>
void Foam::InjectionModel<CloudType>::postInjectCheck()
{
......@@ -269,6 +251,7 @@ void Foam::InjectionModel<CloudType>::postInjectCheck()
// Reset added parcels counter
parcelsAdded_ = 0;
// Write current state to properties file
writeProps();
}
......@@ -425,8 +408,13 @@ void Foam::InjectionModel<CloudType>::inject(TrackData& td)
scalar dt = time - timeInj;
// Apply corrections for 2-D cases
geometryCorrection(pos);
velocityCorrection(U);
meshTools::constrainToMeshCentre(owner_.mesh(), pos);
meshTools::constrainDirection
(
owner_.mesh(),
owner_.mesh().solutionD(),
U
);
// Add the new parcel
td.cloud().addNewParcel(pos, cellI, d, U, nP, dt);
......
......@@ -88,12 +88,6 @@ private:
//- Write injector properties
void writeProps();
//- Geometry correction for 2-D cases
void geometryCorrection(vector& pos) const;
//- Velocity correction for 2-D cases
void velocityCorrection(vector& U) const;
protected:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment