diff --git a/src/finiteVolume/fields/fvPatchFields/derived/swirlFanVelocity/swirlFanVelocityFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/swirlFanVelocity/swirlFanVelocityFvPatchField.C index acd85ee22e..2f95522a5c 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 ed8cc6f52b..a9f6933258 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 { - 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; }; diff --git a/tutorials/incompressible/simpleFoam/squareBend/constant/triSurface/angledPlane.obj b/tutorials/incompressible/simpleFoam/squareBend/constant/triSurface/angledPlane.obj new file mode 100644 index 0000000000..2a92675594 --- /dev/null +++ b/tutorials/incompressible/simpleFoam/squareBend/constant/triSurface/angledPlane.obj @@ -0,0 +1,11 @@ +# An angled plane that extends beyond the geometry +o angledPlane + +v -0.03 -0.08 -0.03 +v -0.03 -0.08 0.03 +v -0.07 -0.02 0.03 +v -0.07 -0.02 -0.03 + +f 1 2 4 +f 2 3 4 +# EOF diff --git a/tutorials/incompressible/simpleFoam/squareBend/system/controlDict b/tutorials/incompressible/simpleFoam/squareBend/system/controlDict index 6d2125f4ee..8e00bf274e 100644 --- a/tutorials/incompressible/simpleFoam/squareBend/system/controlDict +++ b/tutorials/incompressible/simpleFoam/squareBend/system/controlDict @@ -52,7 +52,7 @@ runTimeModifiable true; functions { #include "sampling" - #include "samplingDebug" + // #include "samplingDebug" }