From e35713279bf690b3230d3499ff22efaeb0e79b14 Mon Sep 17 00:00:00 2001
From: andy <a.heather@opencfd.co.uk>
Date: Fri, 19 Dec 2008 11:21:24 +0000
Subject: [PATCH] bugfix: alpha parameter was not being written

---
 .../derived/turbulentInlet/turbulentInletFvPatchField.C     | 6 +++---
 .../derived/turbulentInlet/turbulentInletFvPatchField.H     | 1 -
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentInlet/turbulentInletFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/turbulentInlet/turbulentInletFvPatchField.C
index 1846ada328e..ff96264cd48 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentInlet/turbulentInletFvPatchField.C
+++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentInlet/turbulentInletFvPatchField.C
@@ -175,9 +175,8 @@ void turbulentInletFvPatchField<Type>::updateCoeffs()
             ranGen_.randomise(randomField[facei]);
         }
 
-        // Correction-factor proposed by Yi Wang to compensate for the loss
-        // of RMS fluctuation due to the temporal correlation introduced by
-        // the alpha parameter.
+        // Correction-factor to compensate for the loss of RMS fluctuation
+        // due to the temporal correlation introduced by the alpha parameter.
         scalar rmsCorr = sqrt(12*(2*alpha_ - sqr(alpha_)))/alpha_;
 
         patchField =
@@ -206,6 +205,7 @@ void turbulentInletFvPatchField<Type>::write(Ostream& os) const
     os.writeKeyword("fluctuationScale")
         << fluctuationScale_ << token::END_STATEMENT << nl;
     referenceField_.writeEntry("referenceField", os);
+    os.writeKeyword("alpha") << alpha_ << token::END_STATEMENT << nl;
     this->writeEntry("value", os);
 }
 
diff --git a/src/finiteVolume/fields/fvPatchFields/derived/turbulentInlet/turbulentInletFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/derived/turbulentInlet/turbulentInletFvPatchField.H
index 518a0f689f7..944c7f991d5 100644
--- a/src/finiteVolume/fields/fvPatchFields/derived/turbulentInlet/turbulentInletFvPatchField.H
+++ b/src/finiteVolume/fields/fvPatchFields/derived/turbulentInlet/turbulentInletFvPatchField.H
@@ -63,7 +63,6 @@ class turbulentInletFvPatchField
 :
     public fixedValueFvPatchField<Type>
 {
-
     // Private data
 
         Random ranGen_;
-- 
GitLab