From c4d9fcc4f1d09eb2050a7234439bf6b1fba21a7b Mon Sep 17 00:00:00 2001 From: andy Date: Wed, 23 Jun 2010 17:50:34 +0100 Subject: [PATCH] STYLE: minor code formattig changes --- ...rlFlowRateInletVelocityFvPatchVectorField.C | 3 ++- ...rlFlowRateInletVelocityFvPatchVectorField.H | 17 +++++------------ ...undaryLayerInletEpsilonFvPatchScalarField.H | 18 +++++++++--------- ...ndaryLayerInletVelocityFvPatchVectorField.H | 10 +++++----- .../fixedShearStressFvPatchVectorField.C | 18 +++++++----------- .../fixedShearStressFvPatchVectorField.H | 3 ++- 6 files changed, 30 insertions(+), 39 deletions(-) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.C index 7114dc1d26..c6a7394bd1 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.C @@ -61,7 +61,8 @@ swirlFlowRateInletVelocityFvPatchVectorField fixedValueFvPatchField(ptf, p, iF, mapper), flowRate_(ptf.flowRate_), phiName_(ptf.phiName_), - rhoName_(ptf.rhoName_) + rhoName_(ptf.rhoName_), + rpm_(ptf.rpm_) {} diff --git a/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.H index 199a995780..2edd7fdf86 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/swirlFlowRateInletVelocity/swirlFlowRateInletVelocityFvPatchVectorField.H @@ -63,7 +63,7 @@ SourceFiles namespace Foam { /*---------------------------------------------------------------------------*\ - Class swirlFlowRateInletVelocityFvPatchVectorField Declaration + Class swirlFlowRateInletVelocityFvPatchVectorField Declaration \*---------------------------------------------------------------------------*/ class swirlFlowRateInletVelocityFvPatchVectorField @@ -73,16 +73,16 @@ class swirlFlowRateInletVelocityFvPatchVectorField // Private data //- Inlet integral flow rate - scalar flowRate_; + const scalar flowRate_; //- Name of the flux transporting the field - word phiName_; + const word phiName_; //- Name of the density field used to normalize the mass flux - word rhoName_; + const word rhoName_; //- RPM - scalar rpm_; + const scalar rpm_; public: @@ -164,19 +164,12 @@ public: return flowRate_; } - //- Return reference to the flux to allow adjustment - scalar& flowRate() - { - return flowRate_; - } - //- Update the coefficients associated with the patch field virtual void updateCoeffs(); //- Write virtual void write(Ostream&) const; - }; diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.H index b129c50007..26ce0fd312 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.H +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletEpsilon/atmBoundaryLayerInletEpsilonFvPatchScalarField.H @@ -78,19 +78,19 @@ class atmBoundaryLayerInletEpsilonFvPatchScalarField // Private data //- Frictional velocity - scalar Ustar_; + const scalar Ustar_; //- Direction of the z-coordinate vector z_; - //- Surface roughness lenght - scalar z0_; + //- Surface roughness lenght + const scalar z0_; - //- Von Karman constant - scalar kappa_; + //- Von Karman constant + const scalar kappa_; - //- Minimum corrdinate value in z direction - scalar zGround_; + //- Minimum corrdinate value in z direction + const scalar zGround_; public: @@ -158,13 +158,13 @@ public: // Member functions //- Return max value - scalar& Ustar() + scalar Ustar() const { return Ustar_; } //- Return z direction - vector& z() + const vector& z() const { return z_; } diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.H index 8a967a6aa1..991ea87156 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.H +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/atmBoundaryLayerInletVelocity/atmBoundaryLayerInletVelocityFvPatchVectorField.H @@ -101,19 +101,19 @@ class atmBoundaryLayerInletVelocityFvPatchVectorField vector z_; //- Surface roughness lenght - scalar z0_; + const scalar z0_; //- Von Karman constant - scalar kappa_; + const scalar kappa_; //- Reference velocity - scalar Uref_; + const scalar Uref_; //- Reference hight - scalar Href_; + const scalar Href_; //- Minimum corrdinate value in z direction - scalar zGround_; + const scalar zGround_; public: diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C index 1fd82c9b3c..31a6509819 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.C @@ -38,8 +38,7 @@ namespace incompressible // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -fixedShearStressFvPatchVectorField:: -fixedShearStressFvPatchVectorField +fixedShearStressFvPatchVectorField::fixedShearStressFvPatchVectorField ( const fvPatch& p, const DimensionedField& iF @@ -50,8 +49,7 @@ fixedShearStressFvPatchVectorField {} -fixedShearStressFvPatchVectorField:: -fixedShearStressFvPatchVectorField +fixedShearStressFvPatchVectorField::fixedShearStressFvPatchVectorField ( const fvPatch& p, const DimensionedField& iF, @@ -65,8 +63,7 @@ fixedShearStressFvPatchVectorField } -fixedShearStressFvPatchVectorField:: -fixedShearStressFvPatchVectorField +fixedShearStressFvPatchVectorField::fixedShearStressFvPatchVectorField ( const fixedShearStressFvPatchVectorField& ptf, const fvPatch& p, @@ -79,8 +76,7 @@ fixedShearStressFvPatchVectorField {} -fixedShearStressFvPatchVectorField:: -fixedShearStressFvPatchVectorField +fixedShearStressFvPatchVectorField::fixedShearStressFvPatchVectorField ( const fixedShearStressFvPatchVectorField& ptf ) @@ -90,8 +86,7 @@ fixedShearStressFvPatchVectorField {} -fixedShearStressFvPatchVectorField:: -fixedShearStressFvPatchVectorField +fixedShearStressFvPatchVectorField::fixedShearStressFvPatchVectorField ( const fixedShearStressFvPatchVectorField& ptf, const DimensionedField& iF @@ -119,7 +114,7 @@ void fixedShearStressFvPatchVectorField::updateCoeffs() const vectorField Ui = Uw.patchInternalField(); - vector tauHat = tau0_/mag(tau0_); + vector tauHat = tau0_/(mag(tau0_) + ROOTVSMALL); const scalarField& ry = patch().deltaCoeffs(); @@ -161,4 +156,5 @@ makePatchTypeField } // End namespace incompressible } // End namespace Foam + // ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.H index 5597f01bc2..53b24b9945 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.H +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/fixedShearStress/fixedShearStressFvPatchVectorField.H @@ -56,7 +56,7 @@ class fixedShearStressFvPatchVectorField // Private data //- Constant shear stress - vector tau0_; + const vector tau0_; public: @@ -140,6 +140,7 @@ public: } // End namespace incompressible } // End namespace Foam + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #endif