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

ENH: ConeNozzleInjection - added option to include an angular velocity (rad/s)

Specified using the optional 'omega' entry (Function1 type), e.g. for a constant
value:

      omega           12.56;

Note that the swirl contribution is applied in addition to the velocity set by
the 'flowType' option. For example, for the 'constantVelocity' option, parcels
are initially set the velocity according to the UMag and direction/cone angle;
the swirl velocity is then added.
parent e90092ad
No related branches found
No related tags found
No related merge requests found
...@@ -186,6 +186,7 @@ Foam::ConeNozzleInjection<CloudType>::ConeNozzleInjection ...@@ -186,6 +186,7 @@ Foam::ConeNozzleInjection<CloudType>::ConeNozzleInjection
tetPti_(-1), tetPti_(-1),
directionVsTime_(nullptr), directionVsTime_(nullptr),
direction_(Zero), direction_(Zero),
omegaPtr_(nullptr),
parcelsPerSecond_(this->coeffDict().getScalar("parcelsPerSecond")), parcelsPerSecond_(this->coeffDict().getScalar("parcelsPerSecond")),
flowRateProfile_ flowRateProfile_
( (
...@@ -246,6 +247,19 @@ Foam::ConeNozzleInjection<CloudType>::ConeNozzleInjection ...@@ -246,6 +247,19 @@ Foam::ConeNozzleInjection<CloudType>::ConeNozzleInjection
thetaInner_->userTimeToTime(time); thetaInner_->userTimeToTime(time);
thetaOuter_->userTimeToTime(time); thetaOuter_->userTimeToTime(time);
if (this->coeffDict().found("omega"))
{
omegaPtr_ =
Function1<scalar>::New
(
"omega",
this->coeffDict(),
&owner.mesh()
);
omegaPtr_->userTimeToTime(time);
}
setInjectionGeometry(); setInjectionGeometry();
setFlowType(); setFlowType();
...@@ -277,6 +291,7 @@ Foam::ConeNozzleInjection<CloudType>::ConeNozzleInjection ...@@ -277,6 +291,7 @@ Foam::ConeNozzleInjection<CloudType>::ConeNozzleInjection
tetPti_(im.tetPti_), tetPti_(im.tetPti_),
directionVsTime_(im.directionVsTime_.clone()), directionVsTime_(im.directionVsTime_.clone()),
direction_(im.direction_), direction_(im.direction_),
omegaPtr_(im.omegaPtr_.clone()),
parcelsPerSecond_(im.parcelsPerSecond_), parcelsPerSecond_(im.parcelsPerSecond_),
flowRateProfile_(im.flowRateProfile_.clone()), flowRateProfile_(im.flowRateProfile_.clone()),
thetaInner_(im.thetaInner_.clone()), thetaInner_(im.thetaInner_.clone()),
...@@ -505,6 +520,19 @@ void Foam::ConeNozzleInjection<CloudType>::setProperties ...@@ -505,6 +520,19 @@ void Foam::ConeNozzleInjection<CloudType>::setProperties
} }
} }
if (omegaPtr_)
{
const scalar omega = omegaPtr_->value(t);
const vector p0(parcel.position() - positionVsTime_->value(t));
const vector r(p0 - (p0 & direction_)*direction_);
const scalar rMag = mag(r);
const vector d = normalised(normal_ ^ dirVec);
parcel.U() += omega*rMag*d;
}
// Set particle diameter // Set particle diameter
parcel.d() = sizeDistribution_->sample(); parcel.d() = sizeDistribution_->sample();
} }
......
...@@ -153,6 +153,9 @@ private: ...@@ -153,6 +153,9 @@ private:
//- Cached direction vector //- Cached direction vector
vector direction_; vector direction_;
//- Swirl velocity (optional)
autoPtr<Function1<scalar>> omegaPtr_;
//- Number of parcels to introduce per second [] //- Number of parcels to introduce per second []
const label parcelsPerSecond_; const label parcelsPerSecond_;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment