From f13d2060dcbc9c575091d4313fb1f6792f60782b Mon Sep 17 00:00:00 2001 From: henry Date: Thu, 1 May 2008 16:45:02 +0100 Subject: [PATCH] Minor updates --- src/postProcessing/forces/forces/forces.H | 10 ++++++++++ .../specie/thermo/specieThermo/specieThermo.H | 4 ++-- .../twoPhaseMixture.C | 14 +++++++++----- .../twoPhaseMixture.H | 12 +++++++----- 4 files changed, 28 insertions(+), 12 deletions(-) diff --git a/src/postProcessing/forces/forces/forces.H b/src/postProcessing/forces/forces/forces.H index 1c08475ee5..25bbe02f99 100644 --- a/src/postProcessing/forces/forces/forces.H +++ b/src/postProcessing/forces/forces/forces.H @@ -50,6 +50,7 @@ SourceFiles #include "Tuple2.H" #include "OFstream.H" #include "Switch.H" +#include "pointFieldFwd.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -59,6 +60,7 @@ namespace Foam // Forward declaration of classes class objectRegistry; class dictionary; +class mapPolyMesh; /*---------------------------------------------------------------------------*\ Class forces Declaration @@ -204,6 +206,14 @@ public: //- Calculate and return forces and moment virtual forcesMoments calcForcesMoment() const; + + //- Update for changes of mesh + virtual void updateMesh(const mapPolyMesh&) + {} + + //- Update for changes of mesh + virtual void movePoints(const pointField&) + {} }; diff --git a/src/thermophysicalModels/specie/thermo/specieThermo/specieThermo.H b/src/thermophysicalModels/specie/thermo/specieThermo/specieThermo.H index 31730fb9e3..f715d23a55 100644 --- a/src/thermophysicalModels/specie/thermo/specieThermo/specieThermo.H +++ b/src/thermophysicalModels/specie/thermo/specieThermo/specieThermo.H @@ -207,12 +207,12 @@ public: inline scalar Kc(const scalar T) const; //- Equilibrium constant [] i.t.o. mole-fractions - // For low pressures (where the gas mixture is near perfect) + // For low pressures (where the gas mixture is near perfect) // Kx = Kp(pstd/p)^nui inline scalar Kx(const scalar T, const scalar p) const; //- Equilibrium constant [] i.t.o. number of moles - // For low pressures (where the gas mixture is near perfect) + // For low pressures (where the gas mixture is near perfect) // Kn = Kp(n*pstd/p)^nui where n = number of moles in mixture inline scalar Kn ( diff --git a/src/transportModels/incompressible/incompressibleTwoPhaseMixture/twoPhaseMixture.C b/src/transportModels/incompressible/incompressibleTwoPhaseMixture/twoPhaseMixture.C index 46f2bf65f5..11865b663d 100644 --- a/src/transportModels/incompressible/incompressibleTwoPhaseMixture/twoPhaseMixture.C +++ b/src/transportModels/incompressible/incompressibleTwoPhaseMixture/twoPhaseMixture.C @@ -119,7 +119,7 @@ tmp twoPhaseMixture::mu() const { volScalarField limitedAlpha1 = min(max(alpha1_, scalar(0)), scalar(1)); - return tmp + return tmp ( new volScalarField ( @@ -136,7 +136,7 @@ tmp twoPhaseMixture::muf() const surfaceScalarField alpha1f = min(max(fvc::interpolate(alpha1_), scalar(0)), scalar(1)); - return tmp + return tmp ( new surfaceScalarField ( @@ -150,10 +150,10 @@ tmp twoPhaseMixture::muf() const tmp twoPhaseMixture::nuf() const { - surfaceScalarField alpha1f = + surfaceScalarField alpha1f = min(max(fvc::interpolate(alpha1_), scalar(0)), scalar(1)); - return tmp + return tmp ( new surfaceScalarField ( @@ -171,7 +171,11 @@ bool twoPhaseMixture::read() { if (transportModel::read()) { - if (nuModel1_().read(*this) && nuModel2_().read(*this)) + if + ( + nuModel1_().read(subDict(phase1Name_)) + && nuModel2_().read(subDict(phase2Name_)) + ) { nuModel1_->viscosityProperties().lookup("rho") >> rho1_; nuModel2_->viscosityProperties().lookup("rho") >> rho2_; diff --git a/src/transportModels/incompressible/incompressibleTwoPhaseMixture/twoPhaseMixture.H b/src/transportModels/incompressible/incompressibleTwoPhaseMixture/twoPhaseMixture.H index a693847ad2..b6d903f5dd 100644 --- a/src/transportModels/incompressible/incompressibleTwoPhaseMixture/twoPhaseMixture.H +++ b/src/transportModels/incompressible/incompressibleTwoPhaseMixture/twoPhaseMixture.H @@ -54,7 +54,9 @@ class twoPhaseMixture : public transportModel { - // Private data +protected: + + // Protected data word phase1Name_; word phase2Name_; @@ -141,7 +143,7 @@ public: tmp muf() const; //- Return the kinematic laminar viscosity - tmp nu() const + virtual tmp nu() const { return nu_; } @@ -149,14 +151,14 @@ public: //- Return the face-interpolated dynamic laminar viscosity tmp nuf() const; - //- Correct the laminar viscosity - void correct() + //- Correct the laminar viscosity + virtual void correct() { calcNu(); } //- Read base transportProperties dictionary - bool read(); + virtual bool read(); };