diff --git a/src/finiteVolume/fields/fvPatchFields/derived/swirlFanVelocity/swirlFanVelocityFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/swirlFanVelocity/swirlFanVelocityFvPatchField.C index acd85ee22e63f55e19cd76c0c9a7d80feef412bd..2f95522a5cbe136a92705ad74c51ae27b18c8558 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/swirlFanVelocity/swirlFanVelocityFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/swirlFanVelocity/swirlFanVelocityFvPatchField.C @@ -70,14 +70,17 @@ void Foam::swirlFanVelocityFvPatchField::calcFanJump() if (useRealRadius_) { - const scalarField rMag(mag(patch().Cf() - origin_)); - forAll (rMag, i) + const vectorField& pCf = patch().Cf(); + + forAll(pCf, i) { - if (rMag[i] > rInner_ && rMag[i] < rOuter_) + const scalar rMag = mag(pCf[i] - origin_); + + if (rMag > rInner_ && rMag < rOuter_) { - magTangU = - deltaP - /rMag[i] + magTangU[i] = + deltaP[i] + /rMag /fanEff_ /(rpm_*constant::mathematical::pi/30.0); } @@ -95,6 +98,7 @@ void Foam::swirlFanVelocityFvPatchField::calcFanJump() magTangU = deltaP/rEff_/fanEff_/(rpm_*constant::mathematical::pi/30.0); } + // Calculate the tangential velocity const vectorField tangentialVelocity(magTangU*tanDir); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/swirlFanVelocity/swirlFanVelocityFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/swirlFanVelocity/swirlFanVelocityFvPatchField.H index ed8cc6f52b582eadc45840a26a42cd098f5e9b95..a9f6933258d9c0b12fae0ba2a1559e5782688f6e 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/swirlFanVelocity/swirlFanVelocityFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/swirlFanVelocity/swirlFanVelocityFvPatchField.H @@ -32,36 +32,39 @@ Description cyclic pressure jump condition and applies a transformation to U. The U-jump is specified with a swirl component as follows: - + \verbatim Utan = deltaP/rEff/fanEff/(rpm*pi/30.0); - where: + where deltaP : pressure drop across the cyclic. rEff : effective radius fanEff : fan efficiency coefficient - rmp : RPM of the fan + rpm : RPM of the fan + \endverbatim Alternatively an inner and outer radii can be used instead of rEff. The Utan is as follow for r > rInner and r < rOuter - + \verbatim Utan = deltaP/r/fanEff/(rpm/pi/30.0); - where: + where r : p - origin, p is the face center + \endverbatim Outside rInner and rOuter, Utan = 0. The input for this mode is: - + \verbatim useRealRadius true; rInner 0.005; rOuter 0.01; + \endverbatim The radial velocity is zero in the present model. Usage \table - Property | Description | Required | Default value + Property | Description | Required | Default patchType | underlying patch type should be \c cyclic| yes | phi | flux field name | no | phi rho | density field name | no | rho @@ -79,7 +82,7 @@ Usage \verbatim <patchName> { - cyclicFaces_master + cyclicFaces_master { type swirlFanVelocity; patchType cyclic; @@ -91,7 +94,6 @@ Usage } \endverbatim - SourceFiles swirlFanVelocityFvPatchField.C @@ -117,7 +119,6 @@ class swirlFanVelocityFvPatchField { // Private data - //- Name of the flux field const word phiName_; @@ -178,7 +179,8 @@ public: const dictionary& ); - //- Construct by mapping given swirlFanVelocityFvPatchField onto a new patch + //- Construct by mapping given swirlFanVelocityFvPatchField + //- onto a new patch swirlFanVelocityFvPatchField ( const swirlFanVelocityFvPatchField&, @@ -228,7 +230,7 @@ public: virtual void updateCoeffs(); //- Write - virtual void write(Ostream&) const; + virtual void write(Ostream& os) const; };