diff --git a/src/thermophysicalModels/basic/basicThermo/basicThermo.C b/src/thermophysicalModels/basic/basicThermo/basicThermo.C index c3a736df7e..e7264b0a1f 100644 --- a/src/thermophysicalModels/basic/basicThermo/basicThermo.C +++ b/src/thermophysicalModels/basic/basicThermo/basicThermo.C @@ -493,6 +493,12 @@ const Foam::volScalarField& Foam::basicThermo::alpha() const } +const Foam::scalarField& Foam::basicThermo::alpha(const label patchi) const +{ + return alpha_.boundaryField()[patchi]; +} + + bool Foam::basicThermo::read() { return regIOobject::read(); diff --git a/src/thermophysicalModels/basic/basicThermo/basicThermo.H b/src/thermophysicalModels/basic/basicThermo/basicThermo.H index 29ac19aa57..4b91a3adc8 100644 --- a/src/thermophysicalModels/basic/basicThermo/basicThermo.H +++ b/src/thermophysicalModels/basic/basicThermo/basicThermo.H @@ -267,6 +267,9 @@ public: //- Density [kg/m^3] virtual tmp rho() const = 0; + //- Density for patch [kg/m^3] + virtual tmp rho(const label patchi) const = 0; + //- Enthalpy/Internal energy [J/kg] // Non-const access allowed for transport equations virtual volScalarField& he() = 0; @@ -390,6 +393,12 @@ public: //- Thermal diffusivity for enthalpy of mixture [kg/m/s] virtual const volScalarField& alpha() const; + //- Thermal diffusivity for enthalpy of mixture for patch [kg/m/s] + virtual const scalarField& alpha + ( + const label patchi + ) const; + // Fields derived from transport state variables diff --git a/src/thermophysicalModels/basic/fluidThermo/fluidThermo.C b/src/thermophysicalModels/basic/fluidThermo/fluidThermo.C index f330c6ae81..9f536d842c 100644 --- a/src/thermophysicalModels/basic/fluidThermo/fluidThermo.C +++ b/src/thermophysicalModels/basic/fluidThermo/fluidThermo.C @@ -72,4 +72,18 @@ Foam::fluidThermo::~fluidThermo() {} +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp Foam::fluidThermo::nu() const +{ + return mu()/rho(); +} + + +Foam::tmp Foam::fluidThermo::nu(const label patchi) const +{ + return mu(patchi)/rho(patchi); +} + + // ************************************************************************* // diff --git a/src/thermophysicalModels/basic/fluidThermo/fluidThermo.H b/src/thermophysicalModels/basic/fluidThermo/fluidThermo.H index d8612d7db5..c507699119 100644 --- a/src/thermophysicalModels/basic/fluidThermo/fluidThermo.H +++ b/src/thermophysicalModels/basic/fluidThermo/fluidThermo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -109,6 +109,15 @@ public: //- Dynamic viscosity of mixture [kg/m/s] virtual const volScalarField& mu() const = 0; + + //- Dynamic viscosity of mixture for patch [kg/m/s] + virtual const scalarField& mu(const label patchi) const = 0; + + //- Kinematic viscosity of mixture [m^2/s] + virtual tmp nu() const; + + //- Kinematic viscosity of mixture for patch [m^2/s] + virtual tmp nu(const label patchi) const; }; diff --git a/src/thermophysicalModels/basic/heThermo/heThermo.C b/src/thermophysicalModels/basic/heThermo/heThermo.C index fae178684f..d1b26c5e88 100644 --- a/src/thermophysicalModels/basic/heThermo/heThermo.C +++ b/src/thermophysicalModels/basic/heThermo/heThermo.C @@ -788,26 +788,6 @@ Foam::heThermo::alphaEff } -template -Foam::tmp -Foam::heThermo::alpha -( - const label patchi -) const -{ - return - this->CpByCpv - ( - this->p_.boundaryField()[patchi], - this->T_.boundaryField()[patchi], - patchi - ) - *( - this->alpha_.boundaryField()[patchi] - ); -} - - template bool Foam::heThermo::read() { diff --git a/src/thermophysicalModels/basic/heThermo/heThermo.H b/src/thermophysicalModels/basic/heThermo/heThermo.H index ce5c732427..c227769b6c 100644 --- a/src/thermophysicalModels/basic/heThermo/heThermo.H +++ b/src/thermophysicalModels/basic/heThermo/heThermo.H @@ -260,7 +260,6 @@ public: virtual tmp kappa() const; //- Thermal diffusivity of mixture for patch [J/m/s/K] - virtual tmp kappa ( const label patchi @@ -290,12 +289,6 @@ public: const label patchi ) const; - //- Thermal diffusivity for enthalpy of mixture [kg/m/s] - virtual tmp alpha - ( - const label patchI - ) const; - //- Read thermophysical properties dictionary virtual bool read(); diff --git a/src/thermophysicalModels/basic/psiThermo/psiThermo.C b/src/thermophysicalModels/basic/psiThermo/psiThermo.C index dd69890313..263674d139 100644 --- a/src/thermophysicalModels/basic/psiThermo/psiThermo.C +++ b/src/thermophysicalModels/basic/psiThermo/psiThermo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -92,7 +92,13 @@ Foam::psiThermo::~psiThermo() Foam::tmp Foam::psiThermo::rho() const { - return p_*psi(); + return p_*psi_; +} + + +Foam::tmp Foam::psiThermo::rho(const label patchi) const +{ + return p_.boundaryField()[patchi]*psi_.boundaryField()[patchi]; } @@ -108,4 +114,10 @@ const Foam::volScalarField& Foam::psiThermo::mu() const } +const Foam::scalarField& Foam::psiThermo::mu(const label patchi) const +{ + return mu_.boundaryField()[patchi]; +} + + // ************************************************************************* // diff --git a/src/thermophysicalModels/basic/psiThermo/psiThermo.H b/src/thermophysicalModels/basic/psiThermo/psiThermo.H index 7ac2973a5b..f59c62247e 100644 --- a/src/thermophysicalModels/basic/psiThermo/psiThermo.H +++ b/src/thermophysicalModels/basic/psiThermo/psiThermo.H @@ -115,6 +115,9 @@ public: //- Density [kg/m^3] - uses current value of pressure virtual tmp rho() const; + //- Density for patch [kg/m^3] + virtual tmp rho(const label patchi) const; + //- Compressibility [s^2/m^2] virtual const volScalarField& psi() const; @@ -123,6 +126,9 @@ public: //- Dynamic viscosity of mixture [kg/m/s] virtual const volScalarField& mu() const; + + //- Dynamic viscosity of mixture for patch [kg/m/s] + virtual const scalarField& mu(const label patchi) const; }; diff --git a/src/thermophysicalModels/basic/rhoThermo/rhoThermo.C b/src/thermophysicalModels/basic/rhoThermo/rhoThermo.C index d34186eea9..bfd171c40f 100644 --- a/src/thermophysicalModels/basic/rhoThermo/rhoThermo.C +++ b/src/thermophysicalModels/basic/rhoThermo/rhoThermo.C @@ -161,6 +161,12 @@ Foam::tmp Foam::rhoThermo::rho() const } +Foam::tmp Foam::rhoThermo::rho(const label patchi) const +{ + return rho_.boundaryField()[patchi]; +} + + Foam::volScalarField& Foam::rhoThermo::rho() { return rho_; @@ -179,4 +185,10 @@ const Foam::volScalarField& Foam::rhoThermo::mu() const } +const Foam::scalarField& Foam::rhoThermo::mu(const label patchi) const +{ + return mu_.boundaryField()[patchi]; +} + + // ************************************************************************* // diff --git a/src/thermophysicalModels/basic/rhoThermo/rhoThermo.H b/src/thermophysicalModels/basic/rhoThermo/rhoThermo.H index 4202267e2b..3067d51992 100644 --- a/src/thermophysicalModels/basic/rhoThermo/rhoThermo.H +++ b/src/thermophysicalModels/basic/rhoThermo/rhoThermo.H @@ -127,6 +127,9 @@ public: //- Density [kg/m^3] virtual tmp rho() const; + //- Density for patch [kg/m^3] + virtual tmp rho(const label patchi) const; + //- Return non-const access to the local density field [kg/m^3] virtual volScalarField& rho(); @@ -138,6 +141,9 @@ public: //- Dynamic viscosity of mixture [kg/m/s] virtual const volScalarField& mu() const; + + //- Dynamic viscosity of mixture for patch [kg/m/s] + virtual const scalarField& mu(const label patchi) const; }; diff --git a/src/thermophysicalModels/solidThermo/solidThermo/solidThermo.C b/src/thermophysicalModels/solidThermo/solidThermo/solidThermo.C index 2e12bcf213..548dd97663 100644 --- a/src/thermophysicalModels/solidThermo/solidThermo/solidThermo.C +++ b/src/thermophysicalModels/solidThermo/solidThermo/solidThermo.C @@ -123,6 +123,12 @@ Foam::tmp Foam::solidThermo::rho() const } +Foam::tmp Foam::solidThermo::rho(const label patchi) const +{ + return rho_.boundaryField()[patchi]; +} + + Foam::volScalarField& Foam::solidThermo::rho() { return rho_; diff --git a/src/thermophysicalModels/solidThermo/solidThermo/solidThermo.H b/src/thermophysicalModels/solidThermo/solidThermo/solidThermo.H index e14fba7c82..cdae056126 100644 --- a/src/thermophysicalModels/solidThermo/solidThermo/solidThermo.H +++ b/src/thermophysicalModels/solidThermo/solidThermo/solidThermo.H @@ -138,6 +138,9 @@ public: //- Density [kg/m^3] virtual tmp rho() const; + //- Density for patch [kg/m^3] + virtual tmp rho(const label patchi) const = 0; + //- Return non-const access to the local density field [kg/m^3] virtual volScalarField& rho();