From 08f2d3a123044f331c5149c3d8eb5c75d7185397 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Mon, 25 May 2009 10:00:40 +0200 Subject: [PATCH 01/21] buildParaViewFunctions - warn/ignore QMAKE_PATH if it points somewhere silly --- bin/tools/buildParaViewFunctions | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/bin/tools/buildParaViewFunctions b/bin/tools/buildParaViewFunctions index 5b3ae1fec9..f0873998af 100644 --- a/bin/tools/buildParaViewFunctions +++ b/bin/tools/buildParaViewFunctions @@ -173,7 +173,16 @@ addQtSupport() if [ -n "$QMAKE_PATH" ] then - addCMakeVariable QT_QMAKE_EXECUTABLE:FILEPATH=$QMAKE_PATH + if [ -x "$QMAKE_PATH" ] + then + addCMakeVariable QT_QMAKE_EXECUTABLE:FILEPATH=$QMAKE_PATH + else + echo + echo "specified QMAKE_PATH does not exist on this machine" + echo " QMAKE_PATH=$QMAKE_PATH" + echo "leaving unspecified" + echo + fi fi } From 9cc8fae278a1dd6c91bd1153d81818f4d84463ec Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Wed, 3 Jun 2009 13:59:40 +0200 Subject: [PATCH 02/21] upgrade to paraview-3.7-cvs --- etc/apps/paraview3/bashrc | 4 ++-- etc/apps/paraview3/cshrc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/etc/apps/paraview3/bashrc b/etc/apps/paraview3/bashrc index f49288b36e..48e9919734 100644 --- a/etc/apps/paraview3/bashrc +++ b/etc/apps/paraview3/bashrc @@ -46,8 +46,8 @@ do fi done -paraviewMajor=paraview-3.5 -export ParaView_VERSION=3.5-cvs +paraviewMajor=paraview-3.7 +export ParaView_VERSION=3.7-cvs export ParaView_INST_DIR=$WM_THIRD_PARTY_DIR/paraview-$ParaView_VERSION export ParaView_DIR=$ParaView_INST_DIR/platforms/$WM_ARCH$WM_COMPILER diff --git a/etc/apps/paraview3/cshrc b/etc/apps/paraview3/cshrc index 1c500f4962..d9ccffd81c 100644 --- a/etc/apps/paraview3/cshrc +++ b/etc/apps/paraview3/cshrc @@ -44,8 +44,8 @@ foreach cmake ( cmake-2.6.4 cmake-2.6.2 cmake-2.4.6 ) endif end -set paraviewMajor=paraview-3.5 -setenv ParaView_VERSION 3.5-cvs +set paraviewMajor=paraview-3.7 +setenv ParaView_VERSION 3.7-cvs setenv ParaView_INST_DIR $WM_THIRD_PARTY_DIR/paraview-$ParaView_VERSION setenv ParaView_DIR $ParaView_INST_DIR/platforms/$WM_ARCH$WM_COMPILER From 7534cd17ef773adca9c9060f5cfb6bf6556992de Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Thu, 2 Jul 2009 14:54:37 +0200 Subject: [PATCH 03/21] improved backwardsCompatibility for compressible RASModel - read type "turbulentMixingLengthDissipationRateInlet" and write as "compressible::turbulentMixingLengthDissipationRateInlet" - read type "turbulentMixingLengthFrequencyInlet" and write as "compressible::turbulentMixingLengthFrequencyInlet" --- .../compressible/RAS/Make/files | 4 +- ...urbulentMixingLengthDissipationRateInlet.C | 156 +++++++++++++++++ ...urbulentMixingLengthDissipationRateInlet.H | 158 +++++++++++++++++ ...ilityTurbulentMixingLengthFrequencyInlet.C | 163 ++++++++++++++++++ ...ilityTurbulentMixingLengthFrequencyInlet.H | 162 +++++++++++++++++ .../backwardsCompatibilityWallFunctions.C | 0 .../backwardsCompatibilityWallFunctions.H | 0 ...wardsCompatibilityWallFunctionsTemplates.C | 0 ...entHeatFluxTemperatureFvPatchScalarField.C | 4 +- ...thDissipationRateInletFvPatchScalarField.H | 2 +- ...ngLengthFrequencyInletFvPatchScalarField.C | 2 +- ...ngLengthFrequencyInletFvPatchScalarField.H | 2 +- 12 files changed, 647 insertions(+), 6 deletions(-) create mode 100644 src/turbulenceModels/compressible/RAS/backwardsCompatibility/derivedFvPatchFields/backwardsCompatibilityTurbulentMixingLengthDissipationRateInlet.C create mode 100644 src/turbulenceModels/compressible/RAS/backwardsCompatibility/derivedFvPatchFields/backwardsCompatibilityTurbulentMixingLengthDissipationRateInlet.H create mode 100644 src/turbulenceModels/compressible/RAS/backwardsCompatibility/derivedFvPatchFields/backwardsCompatibilityTurbulentMixingLengthFrequencyInlet.C create mode 100644 src/turbulenceModels/compressible/RAS/backwardsCompatibility/derivedFvPatchFields/backwardsCompatibilityTurbulentMixingLengthFrequencyInlet.H rename src/turbulenceModels/compressible/RAS/{backwardsCompatibilityWallFunctions => backwardsCompatibility/wallFunctions}/backwardsCompatibilityWallFunctions.C (100%) rename src/turbulenceModels/compressible/RAS/{backwardsCompatibilityWallFunctions => backwardsCompatibility/wallFunctions}/backwardsCompatibilityWallFunctions.H (100%) rename src/turbulenceModels/compressible/RAS/{backwardsCompatibilityWallFunctions => backwardsCompatibility/wallFunctions}/backwardsCompatibilityWallFunctionsTemplates.C (100%) diff --git a/src/turbulenceModels/compressible/RAS/Make/files b/src/turbulenceModels/compressible/RAS/Make/files index 4d00100ad6..56644ea6d3 100644 --- a/src/turbulenceModels/compressible/RAS/Make/files +++ b/src/turbulenceModels/compressible/RAS/Make/files @@ -37,6 +37,8 @@ derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFv derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.C derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C -backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctions.C +backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C +backwardsCompatibility/derivedFvPatchFields/backwardsCompatibilityTurbulentMixingLengthDissipationRateInlet.C +backwardsCompatibility/derivedFvPatchFields/backwardsCompatibilityTurbulentMixingLengthFrequencyInlet.C LIB = $(FOAM_LIBBIN)/libcompressibleRASModels diff --git a/src/turbulenceModels/compressible/RAS/backwardsCompatibility/derivedFvPatchFields/backwardsCompatibilityTurbulentMixingLengthDissipationRateInlet.C b/src/turbulenceModels/compressible/RAS/backwardsCompatibility/derivedFvPatchFields/backwardsCompatibilityTurbulentMixingLengthDissipationRateInlet.C new file mode 100644 index 0000000000..83902514a0 --- /dev/null +++ b/src/turbulenceModels/compressible/RAS/backwardsCompatibility/derivedFvPatchFields/backwardsCompatibilityTurbulentMixingLengthDissipationRateInlet.C @@ -0,0 +1,156 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2006-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +\*---------------------------------------------------------------------------*/ + +#include "backwardsCompatibilityTurbulentMixingLengthDissipationRateInlet.H" +#include "addToRunTimeSelectionTable.H" +#include "fvPatchFieldMapper.H" +#include "surfaceFields.H" +#include "volFields.H" +#include "RASModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace compressible +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField:: +backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF +) +: + fixedValueFvPatchField(p, iF), + mixingLength_(0.001) +{} + +backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField:: +backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField +( + const backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField& ptf, + const fvPatch& p, + const DimensionedField& iF, + const fvPatchFieldMapper& mapper +) +: + fixedValueFvPatchField(ptf, p, iF, mapper), + mixingLength_(ptf.mixingLength_) +{} + +backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField:: +backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF, + const dictionary& dict +) +: + fixedValueFvPatchField(p, iF, dict), + mixingLength_(readScalar(dict.lookup("mixingLength"))) +{} + +backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField:: +backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField +( + const backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField& ptf +) +: + fixedValueFvPatchField(ptf), + mixingLength_(ptf.mixingLength_) +{} + +backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField:: +backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField +( + const backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField& ptf, + const DimensionedField& iF +) +: + fixedValueFvPatchField(ptf, iF), + mixingLength_(ptf.mixingLength_) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField::updateCoeffs() +{ + if (updated()) + { + return; + } + + // Lookup Cmu corresponding to the turbulence model selected + const RASModel& rasModel = db().lookupObject("RASProperties"); + + const scalar Cmu = readScalar(rasModel.coeffDict().lookup("Cmu")); + const scalar Cmu75 = pow(Cmu, 0.75); + + const fvPatchField& kp = + patch().lookupPatchField("k"); + + operator==(Cmu75*kp*sqrt(kp)/mixingLength_); + + fixedValueFvPatchField::updateCoeffs(); +} + + +void backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField::write +( + Ostream& os +) const +{ + // write with prefix for forwards compatibility + // mimic - fvPatchField::write(os); + + os.writeKeyword("type") + << "compressible::" << type() << token::END_STATEMENT << nl; + + os.writeKeyword("mixingLength") + << mixingLength_ << token::END_STATEMENT << nl; + writeEntry("value", os); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makePatchTypeField +( + fvPatchScalarField, + backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField +); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace compressible +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/backwardsCompatibility/derivedFvPatchFields/backwardsCompatibilityTurbulentMixingLengthDissipationRateInlet.H b/src/turbulenceModels/compressible/RAS/backwardsCompatibility/derivedFvPatchFields/backwardsCompatibilityTurbulentMixingLengthDissipationRateInlet.H new file mode 100644 index 0000000000..fec530e1fc --- /dev/null +++ b/src/turbulenceModels/compressible/RAS/backwardsCompatibility/derivedFvPatchFields/backwardsCompatibilityTurbulentMixingLengthDissipationRateInlet.H @@ -0,0 +1,158 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2006-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Class + Foam::compressible:: + backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField + +Description + Compatibility for the new namespace qualifier + Foam::compressible::turbulentMixingLengthDissipationRateInletFvPatchScalarField + +SourceFiles + backwardsCompatibilityTurbulentMixingLengthDissipationRateInlet.C + +\*---------------------------------------------------------------------------*/ + +#ifndef backwardsCompatibilityTurbulentMixingLengthDissipationRateInlet_H +#define backwardsCompatibilityTurbulentMixingLengthDissipationRateInlet_H + +#include "fixedValueFvPatchFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace compressible +{ + +/*---------------------------------------------------------------------------*\ + Class backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField Declaration +\*---------------------------------------------------------------------------*/ + +class backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField +: + public fixedValueFvPatchScalarField +{ + // Private data + + //- turbulent length scale + scalar mixingLength_; + +public: + + //- Runtime type information + TypeName("turbulentMixingLengthDissipationRateInlet"); + + + // Constructors + + //- Construct from patch and internal field + backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField + ( + const fvPatch&, + const DimensionedField& + ); + + //- Construct from patch, internal field and dictionary + backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField + ( + const fvPatch&, + const DimensionedField&, + const dictionary& + ); + + //- Construct by mapping given + // backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField + // onto a new patch + backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField + ( + const backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField&, + const fvPatch&, + const DimensionedField&, + const fvPatchFieldMapper& + ); + + //- Construct as copy + backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField + ( + const backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField& + ); + + //- Construct and return a clone + virtual tmp clone() const + { + return tmp + ( + new backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField + ( + *this + ) + ); + } + + //- Construct as copy setting internal field reference + backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField + ( + const backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField&, + const DimensionedField& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp clone + ( + const DimensionedField& iF + ) const + { + return tmp + ( + new backwardsCompatibilityTurbulentMixingLengthDissipationRateInletFvPatchScalarField + ( + *this, + iF + ) + ); + } + + + // Member functions + + //- Update the coefficients associated with the patch field + virtual void updateCoeffs(); + + //- Write + virtual void write(Ostream&) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace compressible +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/backwardsCompatibility/derivedFvPatchFields/backwardsCompatibilityTurbulentMixingLengthFrequencyInlet.C b/src/turbulenceModels/compressible/RAS/backwardsCompatibility/derivedFvPatchFields/backwardsCompatibilityTurbulentMixingLengthFrequencyInlet.C new file mode 100644 index 0000000000..e9e1cd11b4 --- /dev/null +++ b/src/turbulenceModels/compressible/RAS/backwardsCompatibility/derivedFvPatchFields/backwardsCompatibilityTurbulentMixingLengthFrequencyInlet.C @@ -0,0 +1,163 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2006-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +\*---------------------------------------------------------------------------*/ + +#include "backwardsCompatibilityTurbulentMixingLengthFrequencyInlet.H" +#include "addToRunTimeSelectionTable.H" +#include "fvPatchFieldMapper.H" +#include "surfaceFields.H" +#include "volFields.H" +#include "RASModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace compressible +{ + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField:: +backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF +) +: + fixedValueFvPatchField(p, iF), + mixingLength_(0.0), + kName_("k") +{} + +backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField:: +backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField +( + const backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField& ptf, + const fvPatch& p, + const DimensionedField& iF, + const fvPatchFieldMapper& mapper +) +: + fixedValueFvPatchField(ptf, p, iF, mapper), + mixingLength_(ptf.mixingLength_), + kName_(ptf.kName_) +{} + +backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField:: +backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF, + const dictionary& dict +) +: + fixedValueFvPatchField(p, iF, dict), + mixingLength_(readScalar(dict.lookup("mixingLength"))), + kName_(dict.lookupOrDefault("k", "k")) +{} + +backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField:: +backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField +( + const backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField& ptf +) +: + fixedValueFvPatchField(ptf), + mixingLength_(ptf.mixingLength_), + kName_(ptf.kName_) +{} + +backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField:: +backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField +( + const backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField& ptf, + const DimensionedField& iF +) +: + fixedValueFvPatchField(ptf, iF), + mixingLength_(ptf.mixingLength_), + kName_(ptf.kName_) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField::updateCoeffs() +{ + if (updated()) + { + return; + } + + // Lookup Cmu corresponding to the turbulence model selected + const RASModel& rasModel = db().lookupObject("RASProperties"); + + const scalar Cmu = readScalar(rasModel.coeffDict().lookup("Cmu")); + const scalar Cmu25 = pow(Cmu, 0.25); + + const fvPatchField& kp = + patch().lookupPatchField(kName_); + + operator==(sqrt(kp)/(Cmu25*mixingLength_)); + + fixedValueFvPatchField::updateCoeffs(); +} + + +void backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField::write +( + Ostream& os +) const +{ + // write with prefix for forwards compatibility + // mimic - fvPatchField::write(os); + + os.writeKeyword("type") + << "compressible::" << type() << token::END_STATEMENT << nl; + + os.writeKeyword("mixingLength") + << mixingLength_ << token::END_STATEMENT << nl; + + os.writeKeyword("k") << kName_ << token::END_STATEMENT << nl; + writeEntry("value", os); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makePatchTypeField +( + fvPatchScalarField, + backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField +); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace compressible +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/backwardsCompatibility/derivedFvPatchFields/backwardsCompatibilityTurbulentMixingLengthFrequencyInlet.H b/src/turbulenceModels/compressible/RAS/backwardsCompatibility/derivedFvPatchFields/backwardsCompatibilityTurbulentMixingLengthFrequencyInlet.H new file mode 100644 index 0000000000..ebe6e5445e --- /dev/null +++ b/src/turbulenceModels/compressible/RAS/backwardsCompatibility/derivedFvPatchFields/backwardsCompatibilityTurbulentMixingLengthFrequencyInlet.H @@ -0,0 +1,162 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2006-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Class + Foam::compressible:: + backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField + +Description + Compatibility for the new namespace qualifier + Foam::compressible::turbulentMixingLengthFrequencyInletFvPatchScalarField + +SourceFiles + backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef compressiblebackwardsCompatibilityTurbulentMixingLengthFrequencyInlet_H +#define compressiblebackwardsCompatibilityTurbulentMixingLengthFrequencyInlet_H + +#include "fixedValueFvPatchFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace compressible +{ + +/*---------------------------------------------------------------------------*\ + Class backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField Declaration +\*---------------------------------------------------------------------------*/ + +class backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField +: + public fixedValueFvPatchScalarField +{ + // Private data + + //- Turbulent length scale + scalar mixingLength_; + + //- Name of the turbulent kinetic energy field + word kName_; + + +public: + + //- Runtime type information + TypeName("turbulentMixingLengthFrequencyInlet"); + + + // Constructors + + //- Construct from patch and internal field + backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField + ( + const fvPatch&, + const DimensionedField& + ); + + //- Construct from patch, internal field and dictionary + backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField + ( + const fvPatch&, + const DimensionedField&, + const dictionary& + ); + + //- Construct by mapping given + // backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField + // onto a new patch + backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField + ( + const backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField&, + const fvPatch&, + const DimensionedField&, + const fvPatchFieldMapper& + ); + + //- Construct as copy + backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField + ( + const backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField& + ); + + //- Construct and return a clone + virtual tmp clone() const + { + return tmp + ( + new backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField + ( + *this + ) + ); + } + + //- Construct as copy setting internal field reference + backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField + ( + const backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField&, + const DimensionedField& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp clone + ( + const DimensionedField& iF + ) const + { + return tmp + ( + new backwardsCompatibilityTurbulentMixingLengthFrequencyInletFvPatchScalarField + ( + *this, + iF + ) + ); + } + + + // Member functions + + //- Update the coefficients associated with the patch field + virtual void updateCoeffs(); + + //- Write + virtual void write(Ostream&) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace compressible +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/RAS/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctions.C b/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C similarity index 100% rename from src/turbulenceModels/compressible/RAS/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctions.C rename to src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C diff --git a/src/turbulenceModels/compressible/RAS/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctions.H b/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.H similarity index 100% rename from src/turbulenceModels/compressible/RAS/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctions.H rename to src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.H diff --git a/src/turbulenceModels/compressible/RAS/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctionsTemplates.C b/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctionsTemplates.C similarity index 100% rename from src/turbulenceModels/compressible/RAS/backwardsCompatibilityWallFunctions/backwardsCompatibilityWallFunctionsTemplates.C rename to src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctionsTemplates.C diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C index bb43576ac8..2f54baf7c2 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentHeatFluxTemperature/turbulentHeatFluxTemperatureFvPatchScalarField.C @@ -48,7 +48,7 @@ turbulentHeatFluxTemperatureFvPatchScalarField : fixedGradientFvPatchScalarField(p, iF), q_(p.size(), 0.0), - rhoName_("undefinedRho") + rhoName_("rho") {} @@ -77,7 +77,7 @@ turbulentHeatFluxTemperatureFvPatchScalarField : fixedGradientFvPatchScalarField(p, iF), q_("q", dict, p.size()), - rhoName_(dict.lookup("rho")) + rhoName_(dict.lookupOrDefault("rho", "rho")) { fvPatchField::operator=(patchInternalField()); gradient() = 0.0; diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H index 1eb669f06b..ac669c1bba 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthDissipationRateInlet/turbulentMixingLengthDissipationRateInletFvPatchScalarField.H @@ -33,7 +33,7 @@ Description @verbatim inlet { - type turbulentMixingLengthDissipationRateInlet; + type compressible::turbulentMixingLengthDissipationRateInlet; mixingLength 0.005; // 5 mm value uniform 200; // placeholder } diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C index 4032af3586..60a8e9c9e3 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.C @@ -49,7 +49,7 @@ turbulentMixingLengthFrequencyInletFvPatchScalarField : fixedValueFvPatchField(p, iF), mixingLength_(0.0), - kName_("undefined-k") + kName_("k") {} turbulentMixingLengthFrequencyInletFvPatchScalarField:: diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H index 45d8d2663c..ea49be141b 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentMixingLengthFrequencyInlet/turbulentMixingLengthFrequencyInletFvPatchScalarField.H @@ -32,7 +32,7 @@ Description @verbatim inlet { - type turbulentMixingLengthFrequencyInlet; + type compressible::turbulentMixingLengthFrequencyInlet; mixingLength 0.005; // 5 mm k k; // turbulent k field value uniform 5; // initial value From 44e5615e05e933fef8469c3027d5f21fd9c58a87 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 3 Jul 2009 09:54:20 +0200 Subject: [PATCH 04/21] removed erroneous .directory file (dolphin), minor adjustment to .gitignore - in .gitignore, added other common build targets to be ignored. Finalized the move of wmkdep etc to wmake/utilbin/ --- .gitignore | 19 ++++++++++--------- .../basic/rhoThermo/.directory | 5 ----- 2 files changed, 10 insertions(+), 14 deletions(-) delete mode 100644 src/thermophysicalModels/basic/rhoThermo/.directory diff --git a/.gitignore b/.gitignore index b030d74e09..b124c8d887 100644 --- a/.gitignore +++ b/.gitignore @@ -27,18 +27,19 @@ core # dependency files - anywhere *.dep -# lnInclude folders - anywhere +# lnInclude (symlink) folders - anywhere lnInclude -# linux build folder(s) - anywhere -linux*Gcc* +# build folder(s) - anywhere +linux*Gcc*/ +linux*Icc*/ +linuxming*/ +SiCortex*Gcc*/ +solaris*Gcc*/ +SunOS*Gcc*/ -# reinstate wmake/rules that look like build folders -!wmake/rules/linux* - -# but do continue to ignore the derived wmake files -wmake/rules/*/dirToString -wmake/rules/*/wmkdep +# reinstate wmake/rules that might look like build folders +!wmake/rules/*/ # doxygen generated documentation doc/[Dd]oxygen/html diff --git a/src/thermophysicalModels/basic/rhoThermo/.directory b/src/thermophysicalModels/basic/rhoThermo/.directory deleted file mode 100644 index 72608b79a0..0000000000 --- a/src/thermophysicalModels/basic/rhoThermo/.directory +++ /dev/null @@ -1,5 +0,0 @@ -[Dolphin] -AdditionalInfo=3 -SortOrder=0 -Timestamp=2009,6,10,15,58,20 -ViewMode=1 From fd191e771f31fe34d9f187b9911d1cf9f45a36eb Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Thu, 9 Jul 2009 08:48:59 +0200 Subject: [PATCH 05/21] revert to paraview-3.6 (in name at least) --- etc/apps/paraview3/bashrc | 4 ++-- etc/apps/paraview3/cshrc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/etc/apps/paraview3/bashrc b/etc/apps/paraview3/bashrc index 48e9919734..6536eb32ce 100644 --- a/etc/apps/paraview3/bashrc +++ b/etc/apps/paraview3/bashrc @@ -46,8 +46,8 @@ do fi done -paraviewMajor=paraview-3.7 -export ParaView_VERSION=3.7-cvs +paraviewMajor=paraview-3.6 +export ParaView_VERSION=3.6 export ParaView_INST_DIR=$WM_THIRD_PARTY_DIR/paraview-$ParaView_VERSION export ParaView_DIR=$ParaView_INST_DIR/platforms/$WM_ARCH$WM_COMPILER diff --git a/etc/apps/paraview3/cshrc b/etc/apps/paraview3/cshrc index d9ccffd81c..66c7e1a54f 100644 --- a/etc/apps/paraview3/cshrc +++ b/etc/apps/paraview3/cshrc @@ -44,8 +44,8 @@ foreach cmake ( cmake-2.6.4 cmake-2.6.2 cmake-2.4.6 ) endif end -set paraviewMajor=paraview-3.7 -setenv ParaView_VERSION 3.7-cvs +set paraviewMajor=paraview-3.6 +setenv ParaView_VERSION 3.6 setenv ParaView_INST_DIR $WM_THIRD_PARTY_DIR/paraview-$ParaView_VERSION setenv ParaView_DIR $ParaView_INST_DIR/platforms/$WM_ARCH$WM_COMPILER From d4d31594b1c385b2caf8aa67da9f2916bf9c10ff Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Thu, 9 Jul 2009 08:57:59 +0200 Subject: [PATCH 06/21] fixed inverted directory-test logic in IOobject.C --- src/OpenFOAM/db/IOobject/IOobject.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/OpenFOAM/db/IOobject/IOobject.C b/src/OpenFOAM/db/IOobject/IOobject.C index 0368b02e2e..1de0811573 100644 --- a/src/OpenFOAM/db/IOobject/IOobject.C +++ b/src/OpenFOAM/db/IOobject/IOobject.C @@ -36,7 +36,7 @@ defineTypeNameAndDebug(Foam::IOobject, 0); // Return components following the IOobject requirements // -// behaviour +// behaviour // input IOobject(instance, local, name) // ----- ------ // "foo" ("", "", "foo") @@ -58,7 +58,7 @@ bool Foam::IOobject::IOobject::fileNameComponents name.clear(); // called with directory - if (!isDir(path)) + if (isDir(path)) { WarningIn("IOobject::fileNameComponents(const fileName&, ...)") << " called with directory: " << path << "\n"; From 7cbcc02d099aa24b4a509a1aa35016d428a6484e Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 10 Jul 2009 21:47:58 +0200 Subject: [PATCH 07/21] turbulence models get thermal dissipation source term(s) - thermalDissipation() corresponds to the energy lost due to viscous efffects and what exits the energy cascade via dissipation. - thermalDissipationEff() corresponds to the energy lost due to effective viscous efffects. Everything that is lost from momentum. Thus essentially assumes turbulent equilibrium, but is what STAR-CD and Fluent seem to be using. Thus even if it's wrong, provide it anyhow. - minor consistency update in comments --- .../compressible/LES/LESModel/LESModel.C | 50 +++++++++++++++ .../compressible/LES/LESModel/LESModel.H | 22 +++++-- .../compressible/RAS/RASModel/RASModel.C | 49 ++++++++++++++ .../compressible/RAS/RASModel/RASModel.H | 9 +++ .../compressible/RAS/laminar/laminar.C | 44 +++++++++++++ .../compressible/RAS/laminar/laminar.H | 30 +++++---- .../turbulenceModel/laminar/laminar.C | 64 ++++++++++++++----- .../turbulenceModel/laminar/laminar.H | 28 ++++++-- .../turbulenceModel/turbulenceModel.C | 6 -- .../turbulenceModel/turbulenceModel.H | 14 +++- .../incompressible/LES/LESModel/LESModel.C | 59 ++++++++++++++--- .../incompressible/LES/LESModel/LESModel.H | 24 +++++-- .../LES/dynOneEqEddy/dynOneEqEddy.C | 6 -- .../LES/dynOneEqEddy/dynOneEqEddy.H | 3 +- .../LES/dynSmagorinsky/dynSmagorinsky.C | 6 -- .../LES/dynSmagorinsky/dynSmagorinsky.H | 3 +- .../LES/locDynOneEqEddy/locDynOneEqEddy.C | 6 -- .../LES/locDynOneEqEddy/locDynOneEqEddy.H | 3 +- .../LES/scaleSimilarity/scaleSimilarity.C | 6 -- .../LES/scaleSimilarity/scaleSimilarity.H | 3 +- .../incompressible/RAS/RASModel/RASModel.C | 55 ++++++++++++++-- .../incompressible/RAS/RASModel/RASModel.H | 18 ++++-- .../incompressible/RAS/laminar/laminar.C | 50 +++++++++++++-- .../incompressible/RAS/laminar/laminar.H | 16 ++++- .../turbulenceModel/laminar/laminar.C | 44 +++++++++++++ .../turbulenceModel/laminar/laminar.H | 11 +++- .../turbulenceModel/turbulenceModel.C | 6 -- .../turbulenceModel/turbulenceModel.H | 12 +++- .../les/pitzDaily/constant/LESProperties | 2 + .../les/pitzDaily3D/constant/LESProperties | 2 + .../les/pitzDaily/constant/LESProperties | 2 + 31 files changed, 537 insertions(+), 116 deletions(-) diff --git a/src/turbulenceModels/compressible/LES/LESModel/LESModel.C b/src/turbulenceModels/compressible/LES/LESModel/LESModel.C index 7301318b16..1bf5cc2b52 100644 --- a/src/turbulenceModels/compressible/LES/LESModel/LESModel.C +++ b/src/turbulenceModels/compressible/LES/LESModel/LESModel.C @@ -76,6 +76,7 @@ LESModel::LESModel ) ), + turbulence_(true), // TODO: turbulence_(lookup("turbulence")), printCoeffs_(lookupOrDefault("printCoeffs", false)), coeffDict_(subDictPtr(type + "Coeffs")), @@ -180,6 +181,55 @@ autoPtr LESModel::New // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +tmp LESModel::thermalDissipation() const +{ + tmp tgradU = fvc::grad(this->U()); + + return tmp + ( + new volScalarField + ( + IOobject + ( + "thermalDissipation", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + ( + ( this->mu()*dev(twoSymm(tgradU())) ) && tgradU() + ) + this->rho() * this->epsilon() + ) + ); +} + + +tmp LESModel::thermalDissipationEff() const +{ + tmp tgradU = fvc::grad(this->U()); + + return tmp + ( + new volScalarField + ( + IOobject + ( + "thermalDissipationEff", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + ( + this->muEff()*dev(twoSymm(tgradU())) + - ((2.0/3.0)*I) * this->rho() * this->k() + ) && tgradU() + ) + ); +} + + void LESModel::correct(const tmp&) { delta_().correct(); diff --git a/src/turbulenceModels/compressible/LES/LESModel/LESModel.H b/src/turbulenceModels/compressible/LES/LESModel/LESModel.H index ca87dd64ed..7a87a71315 100644 --- a/src/turbulenceModels/compressible/LES/LESModel/LESModel.H +++ b/src/turbulenceModels/compressible/LES/LESModel/LESModel.H @@ -33,13 +33,13 @@ Class Foam::compressible::LESModel Description - Class for all compressible flow LES SGS models. + Base class for all compressible flow LES SGS models. - This class defines the basic interface for a compressible flow SGS model, - and encapsulates data of value to all possible models. In particular - this includes references to all the dependent fields (rho, U, phi), - the physical viscosity mu, and the LESProperties dictionary, - which contains the model selection and model coefficients. + This class defines the basic interface for a compressible flow SGS + model, and encapsulates data of value to all possible models. + In particular this includes references to all the dependent fields + (rho, U, phi), the physical viscosity mu, and the LESProperties + dictionary, which contains the model selection and model coefficients. SourceFiles LESModel.C @@ -80,6 +80,7 @@ protected: // Protected data + Switch turbulence_; Switch printCoeffs_; dictionary coeffDict_; @@ -292,6 +293,15 @@ public: } + //- The source for the enthalpy equation resulting from + // viscous and turbulent dissipation + virtual tmp thermalDissipation() const; + + //- The source for the enthalpy equation resulting from + // the effective viscous dissipation + // (ie, when turbulent production and dissipation are in equilibrium) + virtual tmp thermalDissipationEff() const; + //- Correct Eddy-Viscosity and related properties. // This calls correct(const tmp& gradU) by supplying // gradU calculated locally. diff --git a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C index 5d46b78788..849f25f01a 100644 --- a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C +++ b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C @@ -191,6 +191,55 @@ autoPtr RASModel::New // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +tmp RASModel::thermalDissipation() const +{ + tmp tgradU = fvc::grad(this->U()); + + return tmp + ( + new volScalarField + ( + IOobject + ( + "thermalDissipation", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + ( + ( this->mu()*dev(twoSymm(tgradU())) ) && tgradU() + ) + this->rho() * this->epsilon() + ) + ); +} + + +tmp RASModel::thermalDissipationEff() const +{ + tmp tgradU = fvc::grad(this->U()); + + return tmp + ( + new volScalarField + ( + IOobject + ( + "thermalDissipationEff", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + ( + this->muEff()*dev(twoSymm(tgradU())) + - ((2.0/3.0)*I) * this->rho() * this->k() + ) && tgradU() + ) + ); +} + + scalar RASModel::yPlusLam(const scalar kappa, const scalar E) const { scalar ypl = 11.0; diff --git a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H index 7c787d8ceb..22295848d4 100644 --- a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H +++ b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H @@ -345,6 +345,15 @@ public: //- Return the source term for the momentum equation virtual tmp divDevRhoReff(volVectorField& U) const = 0; + //- The source for the enthalpy equation resulting from + // viscous and turbulent dissipation + virtual tmp thermalDissipation() const; + + //- The source for the enthalpy equation resulting from + // the effective viscous dissipation + // (ie, when turbulent production and dissipation are in equilibrium) + virtual tmp thermalDissipationEff() const; + //- Return yPlus for the given patch virtual tmp yPlus(const label patchI) const; diff --git a/src/turbulenceModels/compressible/RAS/laminar/laminar.C b/src/turbulenceModels/compressible/RAS/laminar/laminar.C index 415dedee72..2f55ecdee5 100644 --- a/src/turbulenceModels/compressible/RAS/laminar/laminar.C +++ b/src/turbulenceModels/compressible/RAS/laminar/laminar.C @@ -177,6 +177,50 @@ tmp laminar::divDevRhoReff(volVectorField& U) const } +tmp laminar::thermalDissipation() const +{ + tmp tgradU = fvc::grad(this->U()); + + return tmp + ( + new volScalarField + ( + IOobject + ( + "thermalDissipation", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + ( this->mu()*dev(twoSymm(tgradU())) ) && tgradU() + ) + ); +} + + +tmp laminar::thermalDissipationEff() const +{ + tmp tgradU = fvc::grad(this->U()); + + return tmp + ( + new volScalarField + ( + IOobject + ( + "thermalDissipationEff", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + ( this->mu()*dev(twoSymm(tgradU())) ) && tgradU() + ) + ); +} + + bool laminar::read() { return RASModel::read(); diff --git a/src/turbulenceModels/compressible/RAS/laminar/laminar.H b/src/turbulenceModels/compressible/RAS/laminar/laminar.H index cfd5e57352..1e26261da7 100644 --- a/src/turbulenceModels/compressible/RAS/laminar/laminar.H +++ b/src/turbulenceModels/compressible/RAS/laminar/laminar.H @@ -30,7 +30,6 @@ Description SourceFiles laminar.C - laminarCorrect.C \*---------------------------------------------------------------------------*/ @@ -82,42 +81,51 @@ public: // Member Functions //- Return the turbulence viscosity, i.e. 0 for laminar flow - tmp mut() const; + virtual tmp mut() const; //- Return the effective viscosity, i.e. the laminar viscosity - tmp muEff() const + virtual tmp muEff() const { return tmp(new volScalarField("muEff", mu())); } //- Return the effective turbulent thermal diffusivity, // i.e. the laminar thermal diffusivity - tmp alphaEff() const + virtual tmp alphaEff() const { return tmp(new volScalarField("alphaEff", alpha())); } //- Return the turbulence kinetic energy, i.e. 0 for laminar flow - tmp k() const; + virtual tmp k() const; //- Return the turbulence kinetic energy dissipation rate, // i.e. 0 for laminar flow - tmp epsilon() const; + virtual tmp epsilon() const; //- Return the Reynolds stress tensor, i.e. 0 for laminar flow - tmp R() const; + virtual tmp R() const; //- Return the effective stress tensor, i.e. the laminar stress - tmp devRhoReff() const; + virtual tmp devRhoReff() const; //- Return the source term for the momentum equation - tmp divDevRhoReff(volVectorField& U) const; + virtual tmp divDevRhoReff(volVectorField& U) const; + + //- The source for the enthalpy equation resulting from + // viscous and turbulent dissipation + virtual tmp thermalDissipation() const; + + //- The source for the enthalpy equation resulting from + // the effective viscous dissipation + // (ie, when turbulent production and dissipation are in equilibrium) + virtual tmp thermalDissipationEff() const; //- Correct the laminar viscosity - void correct(); + virtual void correct(); //- Read RASProperties dictionary - bool read(); + virtual bool read(); }; diff --git a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.C b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.C index c4213fdd8a..be8e2f1da6 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.C +++ b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.C @@ -52,10 +52,10 @@ laminar::laminar const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, - const basicThermo& thermoPhysicalModel + const basicThermo& thermophysicalModel ) : - turbulenceModel(rho, U, phi, thermoPhysicalModel) + turbulenceModel(rho, U, phi, thermophysicalModel) {} @@ -66,10 +66,10 @@ autoPtr laminar::New const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, - const basicThermo& thermoPhysicalModel + const basicThermo& thermophysicalModel ) { - return autoPtr(new laminar(rho, U, phi, thermoPhysicalModel)); + return autoPtr(new laminar(rho, U, phi, thermophysicalModel)); } @@ -96,18 +96,6 @@ tmp laminar::mut() const } -tmp laminar::muEff() const -{ - return tmp(new volScalarField("muEff", mu())); -} - - -tmp laminar::alphaEff() const -{ - return tmp(new volScalarField("alphaEff", alpha())); -} - - tmp laminar::k() const { return tmp @@ -207,6 +195,50 @@ tmp laminar::divDevRhoReff(volVectorField& U) const } +tmp laminar::thermalDissipation() const +{ + tmp tgradU = fvc::grad(this->U()); + + return tmp + ( + new volScalarField + ( + IOobject + ( + "thermalDissipation", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + ( this->mu()*dev(twoSymm(tgradU())) ) && tgradU() + ) + ); +} + + +tmp laminar::thermalDissipationEff() const +{ + tmp tgradU = fvc::grad(this->U()); + + return tmp + ( + new volScalarField + ( + IOobject + ( + "thermalDissipationEff", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + ( this->mu()*dev(twoSymm(tgradU())) ) && tgradU() + ) + ); +} + + bool laminar::read() { return true; diff --git a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H index 7931e45bee..3b9b4d8fbd 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H +++ b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H @@ -67,7 +67,7 @@ public: const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, - const basicThermo& thermoPhysicalModel + const basicThermo& thermophysicalModel ); @@ -79,7 +79,7 @@ public: const volScalarField& rho, const volVectorField& U, const surfaceScalarField& phi, - const basicThermo& thermoPhysicalModel + const basicThermo& thermophysicalModel ); @@ -94,10 +94,17 @@ public: virtual tmp mut() const; //- Return the effective viscosity, i.e. the laminar viscosity - virtual tmp muEff() const; + virtual tmp muEff() const + { + return tmp(new volScalarField("muEff", mu())); + } - //- Return the effective turbulent thermal diffusivity - virtual tmp alphaEff() const; + //- Return the effective turbulent thermal diffusivity, + // i.e. the laminar thermal diffusivity + virtual tmp alphaEff() const + { + return tmp(new volScalarField("alphaEff", alpha())); + } //- Return the turbulence kinetic energy, i.e. 0 for laminar flow virtual tmp k() const; @@ -109,12 +116,21 @@ public: //- Return the Reynolds stress tensor, i.e. 0 for laminar flow virtual tmp R() const; - //- Return the effective stress tensor including the laminar stress + //- Return the effective stress tensor, i.e. the laminar stress virtual tmp devRhoReff() const; //- Return the source term for the momentum equation virtual tmp divDevRhoReff(volVectorField& U) const; + //- The source for the enthalpy equation resulting from + // viscous and turbulent dissipation + virtual tmp thermalDissipation() const; + + //- The source for the enthalpy equation resulting from + // the effective viscous dissipation + // (ie, when turbulent production and dissipation are in equilibrium) + virtual tmp thermalDissipationEff() const; + //- Correct the laminar viscosity virtual void correct(); diff --git a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C index 18f61ea286..15cce81cc1 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C +++ b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C @@ -117,12 +117,6 @@ autoPtr turbulenceModel::New } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -turbulenceModel::~turbulenceModel() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // void turbulenceModel::correct() diff --git a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H index a3cce25b51..3e4ff24e43 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H +++ b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H @@ -65,7 +65,7 @@ namespace compressible { /*---------------------------------------------------------------------------*\ - Class turbulenceModel Declaration + Class turbulenceModel Declaration \*---------------------------------------------------------------------------*/ class turbulenceModel @@ -144,7 +144,8 @@ public: //- Destructor - virtual ~turbulenceModel(); + virtual ~turbulenceModel() + {} // Member Functions @@ -209,6 +210,15 @@ public: //- Return the source term for the momentum equation virtual tmp divDevRhoReff(volVectorField& U) const = 0; + //- The source for the enthalpy equation resulting from + // viscous and turbulent dissipation + virtual tmp thermalDissipation() const = 0; + + //- The source for the enthalpy equation resulting from + // the effective viscous dissipation + // (ie, when turbulent production and dissipation are in equilibrium) + virtual tmp thermalDissipationEff() const = 0; + //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct() = 0; diff --git a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C index 3ee9619340..62f18f3981 100644 --- a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C +++ b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C @@ -125,8 +125,8 @@ autoPtr LESModel::New { FatalErrorIn ( - "LESModel::select(const volVectorField&, const " - "surfaceScalarField&, transportModel&)" + "LESModel::New(const volVectorField& U, const " + "surfaceScalarField& phi, transportModel&)" ) << "Unknown LESModel type " << modelName << endl << endl << "Valid LESModel types are :" << endl @@ -138,14 +138,57 @@ autoPtr LESModel::New } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -LESModel::~LESModel() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +tmp LESModel::thermalDissipation() const +{ + tmp tgradU = fvc::grad(this->U()); + + return tmp + ( + new volScalarField + ( + IOobject + ( + "thermalDissipation", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + ( + ( this->nu()*dev(twoSymm(tgradU())) ) && tgradU() + ) + this->epsilon() + ) + ); +} + + +tmp LESModel::thermalDissipationEff() const +{ + tmp tgradU = fvc::grad(this->U()); + + return tmp + ( + new volScalarField + ( + IOobject + ( + "thermalDissipationEff", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + ( + this->nuEff()*dev(twoSymm(tgradU())) + - ((2.0/3.0)*I) * this->k() + ) && tgradU() + ) + ); +} + + void LESModel::correct(const tmp&) { turbulenceModel::correct(); diff --git a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H index 766cc63fc0..5c0c615eb6 100644 --- a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H +++ b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H @@ -35,10 +35,10 @@ Description Base class for all incompressible flow LES SGS models. This class defines the basic interface for an incompressible flow SGS - model, and encapsulates data of value to all possible models. In - particular this includes references to all the dependent fields (U, - phi), the physical viscosity nu, and the LESProperties - dictionary which contains the model selection and model coefficients. + model, and encapsulates data of value to all possible models. + In particular this includes references to all the dependent fields + (U, phi), the physical viscosity nu, and the LESProperties + dictionary, which contains the model selection and model coefficients. SourceFiles LESModel.C @@ -152,7 +152,8 @@ public: //- Destructor - virtual ~LESModel(); + virtual ~LESModel() + {} // Member Functions @@ -241,14 +242,23 @@ public: } - //- Correct Eddy-Viscosity and related properties - virtual void correct(const tmp& gradU); + //- The source for the enthalpy equation resulting from + // viscous and turbulent dissipation + virtual tmp thermalDissipation() const; + + //- The source for the enthalpy equation resulting from + // the effective viscous dissipation + // (ie, when turbulent production and dissipation are in equilibrium) + virtual tmp thermalDissipationEff() const; //- Correct Eddy-Viscosity and related properties. // This calls correct(const tmp& gradU) by supplying // gradU calculated locally. void correct(); + //- Correct Eddy-Viscosity and related properties + virtual void correct(const tmp& gradU); + //- Read LESProperties dictionary virtual bool read() = 0; }; diff --git a/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.C b/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.C index 4342712d80..4aadf02bf2 100644 --- a/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.C +++ b/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.C @@ -133,12 +133,6 @@ dynOneEqEddy::dynOneEqEddy } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -dynOneEqEddy::~dynOneEqEddy() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // void dynOneEqEddy::correct(const tmp& gradU) diff --git a/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.H b/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.H index 15f0ac56d1..9b1a4064d6 100644 --- a/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.H +++ b/src/turbulenceModels/incompressible/LES/dynOneEqEddy/dynOneEqEddy.H @@ -116,7 +116,8 @@ public: //- Destructor - virtual ~dynOneEqEddy(); + virtual ~dynOneEqEddy() + {} // Member Functions diff --git a/src/turbulenceModels/incompressible/LES/dynSmagorinsky/dynSmagorinsky.C b/src/turbulenceModels/incompressible/LES/dynSmagorinsky/dynSmagorinsky.C index e260a6d16d..fedd18ee7d 100644 --- a/src/turbulenceModels/incompressible/LES/dynSmagorinsky/dynSmagorinsky.C +++ b/src/turbulenceModels/incompressible/LES/dynSmagorinsky/dynSmagorinsky.C @@ -124,12 +124,6 @@ dynSmagorinsky::dynSmagorinsky } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -dynSmagorinsky::~dynSmagorinsky() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // void dynSmagorinsky::correct(const tmp& gradU) diff --git a/src/turbulenceModels/incompressible/LES/dynSmagorinsky/dynSmagorinsky.H b/src/turbulenceModels/incompressible/LES/dynSmagorinsky/dynSmagorinsky.H index 93e85a808b..b0bd7868f0 100644 --- a/src/turbulenceModels/incompressible/LES/dynSmagorinsky/dynSmagorinsky.H +++ b/src/turbulenceModels/incompressible/LES/dynSmagorinsky/dynSmagorinsky.H @@ -125,7 +125,8 @@ public: //- Destructor - virtual ~dynSmagorinsky(); + virtual ~dynSmagorinsky() + {} // Member Functions diff --git a/src/turbulenceModels/incompressible/LES/locDynOneEqEddy/locDynOneEqEddy.C b/src/turbulenceModels/incompressible/LES/locDynOneEqEddy/locDynOneEqEddy.C index 7d34bbb981..f463e3f208 100644 --- a/src/turbulenceModels/incompressible/LES/locDynOneEqEddy/locDynOneEqEddy.C +++ b/src/turbulenceModels/incompressible/LES/locDynOneEqEddy/locDynOneEqEddy.C @@ -126,12 +126,6 @@ locDynOneEqEddy::locDynOneEqEddy } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -locDynOneEqEddy::~locDynOneEqEddy() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // void locDynOneEqEddy::correct(const tmp& gradU) diff --git a/src/turbulenceModels/incompressible/LES/locDynOneEqEddy/locDynOneEqEddy.H b/src/turbulenceModels/incompressible/LES/locDynOneEqEddy/locDynOneEqEddy.H index 1ff8fc07dd..ef6a9edcff 100644 --- a/src/turbulenceModels/incompressible/LES/locDynOneEqEddy/locDynOneEqEddy.H +++ b/src/turbulenceModels/incompressible/LES/locDynOneEqEddy/locDynOneEqEddy.H @@ -138,7 +138,8 @@ public: //- Destructor - virtual ~locDynOneEqEddy(); + virtual ~locDynOneEqEddy() + {} // Member Functions diff --git a/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.C b/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.C index 0499ffca68..226054bf14 100644 --- a/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.C +++ b/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.C @@ -56,12 +56,6 @@ scaleSimilarity::scaleSimilarity } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -scaleSimilarity::~scaleSimilarity() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // tmp scaleSimilarity::k() const diff --git a/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.H b/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.H index 3f4f55535f..69d06a892c 100644 --- a/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.H +++ b/src/turbulenceModels/incompressible/LES/scaleSimilarity/scaleSimilarity.H @@ -90,7 +90,8 @@ public: //- Destructor - virtual ~scaleSimilarity(); + virtual ~scaleSimilarity() + {} // Member Functions diff --git a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C index 272d0f60fe..4cc9fd07b9 100644 --- a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C +++ b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C @@ -174,14 +174,57 @@ autoPtr RASModel::New } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -RASModel::~RASModel() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +tmp RASModel::thermalDissipation() const +{ + tmp tgradU = fvc::grad(this->U()); + + return tmp + ( + new volScalarField + ( + IOobject + ( + "thermalDissipation", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + ( + ( this->nu()*dev(twoSymm(tgradU())) ) && tgradU() + ) + this->epsilon() + ) + ); +} + + +tmp RASModel::thermalDissipationEff() const +{ + tmp tgradU = fvc::grad(this->U()); + + return tmp + ( + new volScalarField + ( + IOobject + ( + "thermalDissipationEff", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + ( + this->nuEff()*dev(twoSymm(tgradU())) + - ((2.0/3.0)*I) * this->k() + ) && tgradU() + ) + ); +} + + scalar RASModel::yPlusLam(const scalar kappa, const scalar E) const { scalar ypl = 11.0; diff --git a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.H b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.H index c934488bb3..3a2f0aa7e9 100644 --- a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.H +++ b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.H @@ -182,7 +182,8 @@ public: //- Destructor - virtual ~RASModel(); + virtual ~RASModel() + {} // Member Functions @@ -310,9 +311,6 @@ public: ); } - //- Return yPlus for the given patch - virtual tmp yPlus(const label patchI) const; - //- Return the turbulence kinetic energy virtual tmp k() const = 0; @@ -328,6 +326,18 @@ public: //- Return the source term for the momentum equation virtual tmp divDevReff(volVectorField& U) const = 0; + //- The source for the enthalpy equation resulting from + // viscous and turbulent dissipation + virtual tmp thermalDissipation() const; + + //- The source for the enthalpy equation resulting from + // the effective viscous dissipation + // (ie, when turbulent production and dissipation are in equilibrium) + virtual tmp thermalDissipationEff() const; + + //- Return yPlus for the given patch + virtual tmp yPlus(const label patchI) const; + //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct() = 0; diff --git a/src/turbulenceModels/incompressible/RAS/laminar/laminar.C b/src/turbulenceModels/incompressible/RAS/laminar/laminar.C index a88b319268..83e8913525 100644 --- a/src/turbulenceModels/incompressible/RAS/laminar/laminar.C +++ b/src/turbulenceModels/incompressible/RAS/laminar/laminar.C @@ -77,12 +77,6 @@ tmp laminar::nut() const } -tmp laminar::nuEff() const -{ - return tmp(new volScalarField("nuEff", nu())); -} - - tmp laminar::k() const { return tmp @@ -182,6 +176,50 @@ tmp laminar::divDevReff(volVectorField& U) const } +tmp laminar::thermalDissipation() const +{ + tmp tgradU = fvc::grad(this->U()); + + return tmp + ( + new volScalarField + ( + IOobject + ( + "thermalDissipation", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + ( this->nu()*dev(twoSymm(tgradU())) ) && tgradU() + ) + ); +} + + +tmp laminar::thermalDissipationEff() const +{ + tmp tgradU = fvc::grad(this->U()); + + return tmp + ( + new volScalarField + ( + IOobject + ( + "thermalDissipationEff", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + ( this->nu()*dev(twoSymm(tgradU())) ) && tgradU() + ) + ); +} + + bool laminar::read() { return RASModel::read(); diff --git a/src/turbulenceModels/incompressible/RAS/laminar/laminar.H b/src/turbulenceModels/incompressible/RAS/laminar/laminar.H index b139f0fad3..1617d60064 100644 --- a/src/turbulenceModels/incompressible/RAS/laminar/laminar.H +++ b/src/turbulenceModels/incompressible/RAS/laminar/laminar.H @@ -83,7 +83,10 @@ public: virtual tmp nut() const; //- Return the effective viscosity, i.e. the laminar viscosity - virtual tmp nuEff() const; + virtual tmp nuEff() const + { + return tmp(new volScalarField("nuEff", nu())); + } //- Return the turbulence kinetic energy, i.e. 0 for laminar flow virtual tmp k() const; @@ -95,12 +98,21 @@ public: //- Return the Reynolds stress tensor, i.e. 0 for laminar flow virtual tmp R() const; - //- Return the effective stress tensor including the laminar stress + //- Return the effective stress tensor, i.e. the laminar stress virtual tmp devReff() const; //- Return the source term for the momentum equation virtual tmp divDevReff(volVectorField& U) const; + //- The source for the enthalpy equation resulting from + // viscous and turbulent dissipation + virtual tmp thermalDissipation() const; + + //- The source for the enthalpy equation resulting from + // the effective viscous dissipation + // (ie, when turbulent production and dissipation are in equilibrium) + virtual tmp thermalDissipationEff() const; + //- Correct the laminar viscosity virtual void correct(); diff --git a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C index f1dca5b4ad..e3a9c30fd7 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C +++ b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C @@ -199,6 +199,50 @@ tmp laminar::divDevReff(volVectorField& U) const } +tmp laminar::thermalDissipation() const +{ + tmp tgradU = fvc::grad(this->U()); + + return tmp + ( + new volScalarField + ( + IOobject + ( + "thermalDissipation", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + ( this->nu()*dev(twoSymm(tgradU())) ) && tgradU() + ) + ); +} + + +tmp laminar::thermalDissipationEff() const +{ + tmp tgradU = fvc::grad(this->U()); + + return tmp + ( + new volScalarField + ( + IOobject + ( + "thermalDissipationEff", + runTime_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + ( this->nu()*dev(twoSymm(tgradU())) ) && tgradU() + ) + ); +} + + bool laminar::read() { return true; diff --git a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.H b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.H index a64884da91..aa83346820 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.H +++ b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.H @@ -104,12 +104,21 @@ public: //- Return the Reynolds stress tensor, i.e. 0 for laminar flow virtual tmp R() const; - //- Return the effective stress tensor including the laminar stress + //- Return the effective stress tensor, i.e. the laminar stress virtual tmp devReff() const; //- Return the source term for the momentum equation virtual tmp divDevReff(volVectorField& U) const; + //- The source for the enthalpy equation resulting from + // viscous and turbulent dissipation + virtual tmp thermalDissipation() const; + + //- The source for the enthalpy equation resulting from + // the effective viscous dissipation + // (ie, when turbulent production and dissipation are in equilibrium) + virtual tmp thermalDissipationEff() const; + //- Correct the laminar viscosity virtual void correct(); diff --git a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C index da4c39dcaa..cdbb61fa70 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C +++ b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C @@ -110,12 +110,6 @@ autoPtr turbulenceModel::New } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -turbulenceModel::~turbulenceModel() -{} - - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // void turbulenceModel::correct() diff --git a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H index 4399e85120..a9d1465e77 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H +++ b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H @@ -139,7 +139,8 @@ public: //- Destructor - virtual ~turbulenceModel(); + virtual ~turbulenceModel() + {} // Member Functions @@ -189,6 +190,15 @@ public: //- Return the source term for the momentum equation virtual tmp divDevReff(volVectorField& U) const = 0; + //- The source for the enthalpy equation resulting from + // viscous and turbulent dissipation + virtual tmp thermalDissipation() const = 0; + + //- The source for the enthalpy equation resulting from + // the effective viscous dissipation + // (ie, when turbulent production and dissipation are in equilibrium) + virtual tmp thermalDissipationEff() const = 0; + //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct() = 0; diff --git a/tutorials/combustion/XiFoam/les/pitzDaily/constant/LESProperties b/tutorials/combustion/XiFoam/les/pitzDaily/constant/LESProperties index 56c915c924..5e1ce2213a 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily/constant/LESProperties +++ b/tutorials/combustion/XiFoam/les/pitzDaily/constant/LESProperties @@ -19,6 +19,8 @@ LESModel oneEqEddy; delta cubeRootVol; +turbulence on; + printCoeffs on; laminarCoeffs diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/LESProperties b/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/LESProperties index 95bb1c14f8..a051384982 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/LESProperties +++ b/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/LESProperties @@ -19,6 +19,8 @@ LESModel oneEqEddy; delta cubeRootVol; +turbulence on; + printCoeffs on; laminarCoeffs diff --git a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/constant/LESProperties b/tutorials/compressible/rhoPisoFoam/les/pitzDaily/constant/LESProperties index 25be4174a3..251fe1ae80 100644 --- a/tutorials/compressible/rhoPisoFoam/les/pitzDaily/constant/LESProperties +++ b/tutorials/compressible/rhoPisoFoam/les/pitzDaily/constant/LESProperties @@ -17,6 +17,8 @@ FoamFile LESModel oneEqEddy; +turbulence on; + printCoeffs on; delta cubeRootVol; From 043098fb7c1b3a35192bed54486b800e49fc85fa Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 10 Jul 2009 22:29:42 +0200 Subject: [PATCH 08/21] added dissipationSelector - first stab at a simple runtime selection for extra turbulence-related features - the code duplication seems to indicate that a common ancestor for compressible and incompressible turbulence models could be good --- .../compressible/turbulenceModel/Make/files | 1 + .../compressible/turbulenceModel/Make/options | 1 + .../dissipationSelector/dissipationSelector.C | 111 ++++++++++++ .../dissipationSelector/dissipationSelector.H | 158 ++++++++++++++++++ .../incompressible/turbulenceModel/Make/files | 1 + .../turbulenceModel/Make/options | 1 + .../dissipationSelector/dissipationSelector.C | 111 ++++++++++++ .../dissipationSelector/dissipationSelector.H | 158 ++++++++++++++++++ 8 files changed, 542 insertions(+) create mode 100644 src/turbulenceModels/compressible/turbulenceModel/dissipationSelector/dissipationSelector.C create mode 100644 src/turbulenceModels/compressible/turbulenceModel/dissipationSelector/dissipationSelector.H create mode 100644 src/turbulenceModels/incompressible/turbulenceModel/dissipationSelector/dissipationSelector.C create mode 100644 src/turbulenceModels/incompressible/turbulenceModel/dissipationSelector/dissipationSelector.H diff --git a/src/turbulenceModels/compressible/turbulenceModel/Make/files b/src/turbulenceModels/compressible/turbulenceModel/Make/files index 3f01b20354..d105907440 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/Make/files +++ b/src/turbulenceModels/compressible/turbulenceModel/Make/files @@ -1,4 +1,5 @@ turbulenceModel.C laminar/laminar.C +dissipationSelector/dissipationSelector.C LIB = $(FOAM_LIBBIN)/libcompressibleTurbulenceModel diff --git a/src/turbulenceModels/compressible/turbulenceModel/Make/options b/src/turbulenceModels/compressible/turbulenceModel/Make/options index 65d3ed1e01..075a03796e 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/Make/options +++ b/src/turbulenceModels/compressible/turbulenceModel/Make/options @@ -1,5 +1,6 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude LIB_LIBS = \ diff --git a/src/turbulenceModels/compressible/turbulenceModel/dissipationSelector/dissipationSelector.C b/src/turbulenceModels/compressible/turbulenceModel/dissipationSelector/dissipationSelector.C new file mode 100644 index 0000000000..aa630ee977 --- /dev/null +++ b/src/turbulenceModels/compressible/turbulenceModel/dissipationSelector/dissipationSelector.C @@ -0,0 +1,111 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +\*---------------------------------------------------------------------------*/ + +#include "dissipationSelector.H" +#include "dictionary.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace compressible +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +template<> +const char* NamedEnum::names[] = +{ + "none", + "cascade", + "equilibrium" +}; + +const NamedEnum + dissipationSelector::typeNames; + + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + + +dissipationSelector::dissipationSelector +( + const turbulenceModel& turbModel, + const treatment treatmentType +) +: + turbModel_(turbModel), + treatment_(treatmentType) +{} + + +dissipationSelector::dissipationSelector +( + const turbulenceModel& turbModel, + const dictionary& dict +) +: + turbModel_(turbModel), + treatment_(none) +{ + + word modelType; + + if (dict.readIfPresent("dissipation", modelType)) + { + treatment_ = typeNames[modelType]; + } +} + + +tmp +dissipationSelector::dissipation() const +{ + if (treatment_ == cascade) + { + return turbModel_.thermalDissipation(); + } + else if (treatment_ == equilibrium) + { + return turbModel_.thermalDissipationEff(); + } + else + { + // a bit wasteful, but we'll avoid it with 'enabled' query anyhow + tmp tField = turbModel_.thermalDissipation(); + tField() = 0.0; + + return tField; + } +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace compressible +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/turbulenceModel/dissipationSelector/dissipationSelector.H b/src/turbulenceModels/compressible/turbulenceModel/dissipationSelector/dissipationSelector.H new file mode 100644 index 0000000000..c1b440e4b6 --- /dev/null +++ b/src/turbulenceModels/compressible/turbulenceModel/dissipationSelector/dissipationSelector.H @@ -0,0 +1,158 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Class + Foam::compressible::dissipationSelector + +Description + Simplistic runtime selectable handling of thermal dissipation + + Example use: + @code + dissipationSelector thermalDissipation(turbulence, dictionary); + + fvScalarMatrix hEqn ( ... ); + + if (thermalDissipation.enabled()) + { + hEqn += thermalDissipation.dissipation(); + } + @endcode + +SourceFiles + dissipationSelector.C + +\*---------------------------------------------------------------------------*/ + +#ifndef compressibledissipationSelector_H +#define compressibledissipationSelector_H + +#include "NamedEnum.H" +#include "dictionary.H" +#include "compressible/turbulenceModel/turbulenceModel.H" +#include "volFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +namespace compressible +{ + +/*---------------------------------------------------------------------------*\ + Class dissipationSelector Declaration +\*---------------------------------------------------------------------------*/ + +class dissipationSelector +{ + +public: + + //- Type of treatment + enum treatment + { + none, + cascade, + equilibrium + }; + + static const NamedEnum typeNames; + +protected: + + // Protected data + + const turbulenceModel& turbModel_; + + //- Type of treatment + treatment treatment_; + +public: + + // Declare name of the class and its debug switch + ClassName("dissipationSelector"); + + + // Constructors + + //- Construct given treatment type + dissipationSelector + ( + const turbulenceModel&, + const treatment = none + ); + + //- Construct given treatment type + dissipationSelector + ( + const turbulenceModel&, + const dictionary& + ); + + + // Member functions + + //- Get the treatment type + treatment treatmentType() const + { + return treatment_; + } + + //- Set the treatment type, return old value + treatment treatmentType(const treatment val) + { + treatment old = treatment_; + treatment_ = val; + return old; + } + + + //- Set the treatment type, return old value + const char* name() const + { + return typeNames[treatment_]; + } + + //- Set the treatment type, return old value + bool enabled() const + { + return treatment_ != none; + } + + tmp dissipation() const; + +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace compressible +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/turbulenceModel/Make/files b/src/turbulenceModels/incompressible/turbulenceModel/Make/files index a77efed2ab..1133b2aaab 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/Make/files +++ b/src/turbulenceModels/incompressible/turbulenceModel/Make/files @@ -1,4 +1,5 @@ turbulenceModel.C laminar/laminar.C +dissipationSelector/dissipationSelector.C LIB = $(FOAM_LIBBIN)/libincompressibleTurbulenceModel diff --git a/src/turbulenceModels/incompressible/turbulenceModel/Make/options b/src/turbulenceModels/incompressible/turbulenceModel/Make/options index 6ade117347..2af4fa4baf 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/Make/options +++ b/src/turbulenceModels/incompressible/turbulenceModel/Make/options @@ -1,5 +1,6 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/transportModels LIB_LIBS = \ diff --git a/src/turbulenceModels/incompressible/turbulenceModel/dissipationSelector/dissipationSelector.C b/src/turbulenceModels/incompressible/turbulenceModel/dissipationSelector/dissipationSelector.C new file mode 100644 index 0000000000..07ca14c373 --- /dev/null +++ b/src/turbulenceModels/incompressible/turbulenceModel/dissipationSelector/dissipationSelector.C @@ -0,0 +1,111 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +\*---------------------------------------------------------------------------*/ + +#include "dissipationSelector.H" +#include "dictionary.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace incompressible +{ + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +template<> +const char* NamedEnum::names[] = +{ + "none", + "cascade", + "equilibrium" +}; + +const NamedEnum + dissipationSelector::typeNames; + + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + + +dissipationSelector::dissipationSelector +( + const turbulenceModel& turbModel, + const treatment treatmentType +) +: + turbModel_(turbModel), + treatment_(treatmentType) +{} + + +dissipationSelector::dissipationSelector +( + const turbulenceModel& turbModel, + const dictionary& dict +) +: + turbModel_(turbModel), + treatment_(none) +{ + + word modelType; + + if (dict.readIfPresent("dissipation", modelType)) + { + treatment_ = typeNames[modelType]; + } +} + + +tmp +dissipationSelector::dissipation() const +{ + if (treatment_ == cascade) + { + return turbModel_.thermalDissipation(); + } + else if (treatment_ == equilibrium) + { + return turbModel_.thermalDissipationEff(); + } + else + { + // a bit wasteful, but we'll avoid it with 'enabled' query anyhow + tmp tField = turbModel_.thermalDissipation(); + tField() = 0.0; + + return tField; + } +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace incompressible +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/turbulenceModel/dissipationSelector/dissipationSelector.H b/src/turbulenceModels/incompressible/turbulenceModel/dissipationSelector/dissipationSelector.H new file mode 100644 index 0000000000..9f2426c518 --- /dev/null +++ b/src/turbulenceModels/incompressible/turbulenceModel/dissipationSelector/dissipationSelector.H @@ -0,0 +1,158 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Class + Foam::incompressible::dissipationSelector + +Description + Simplistic runtime selectable handling of thermal dissipation + + Example use: + @code + dissipationSelector thermalDissipation(turbulence, dictionary); + + fvScalarMatrix hEqn ( ... ); + + if (thermalDissipation.enabled()) + { + hEqn += thermalDissipation.dissipation(); + } + @endcode + +SourceFiles + dissipationSelector.C + +\*---------------------------------------------------------------------------*/ + +#ifndef dissipationSelector_H +#define dissipationSelector_H + +#include "NamedEnum.H" +#include "dictionary.H" +#include "incompressible/turbulenceModel/turbulenceModel.H" +#include "volFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +namespace incompressible +{ + +/*---------------------------------------------------------------------------*\ + Class dissipationSelector Declaration +\*---------------------------------------------------------------------------*/ + +class dissipationSelector +{ + +public: + + //- Type of treatment + enum treatment + { + none, + cascade, + equilibrium + }; + + static const NamedEnum typeNames; + +protected: + + // Protected data + + const turbulenceModel& turbModel_; + + //- Type of treatment + treatment treatment_; + +public: + + // Declare name of the class and its debug switch + ClassName("dissipationSelector"); + + + // Constructors + + //- Construct given treatment type + dissipationSelector + ( + const turbulenceModel&, + const treatment = none + ); + + //- Construct given treatment type + dissipationSelector + ( + const turbulenceModel&, + const dictionary& + ); + + + // Member functions + + //- Get the treatment type + treatment treatmentType() const + { + return treatment_; + } + + //- Set the treatment type, return old value + treatment treatmentType(const treatment val) + { + treatment old = treatment_; + treatment_ = val; + return old; + } + + + //- Set the treatment type, return old value + const char* name() const + { + return typeNames[treatment_]; + } + + //- Set the treatment type, return old value + bool enabled() const + { + return treatment_ != none; + } + + tmp dissipation() const; + +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace incompressible +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // From d01f653d3291b15c927cb7f05a013b9c37e6dc26 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Mon, 13 Jul 2009 09:27:38 +0200 Subject: [PATCH 09/21] porousZone - output 'note' entry (if it exists) too --- src/finiteVolume/cfdTools/general/porousMedia/porousZone.C | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/finiteVolume/cfdTools/general/porousMedia/porousZone.C b/src/finiteVolume/cfdTools/general/porousMedia/porousZone.C index f13e344375..34e85c2e27 100644 --- a/src/finiteVolume/cfdTools/general/porousMedia/porousZone.C +++ b/src/finiteVolume/cfdTools/general/porousMedia/porousZone.C @@ -370,6 +370,12 @@ void Foam::porousZone::writeDict(Ostream& os, bool subDict) const << indent << token::BEGIN_BLOCK << incrIndent << nl; } + if (dict_.found("note")) + { + os.writeKeyword("note") << string(dict_.lookup("note")) + << token::END_STATEMENT << nl; + } + coordSys_.writeDict(os, true); if (dict_.found("porosity")) From 5b09b44b1670dbee082b327564d58bbdefe55101 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Mon, 13 Jul 2009 16:08:58 +0200 Subject: [PATCH 10/21] sign change on thermalDissipation source (consistency with momentum source) - rename thermalDissipationEff() -> thermalDissipationEquilibrium() --- .../compressible/LES/LESModel/LESModel.C | 11 ++++++----- .../compressible/LES/LESModel/LESModel.H | 2 +- .../compressible/RAS/RASModel/RASModel.C | 11 ++++++----- .../compressible/RAS/RASModel/RASModel.H | 2 +- .../compressible/RAS/laminar/laminar.C | 8 ++++---- .../compressible/RAS/laminar/laminar.H | 2 +- .../dissipationSelector/dissipationSelector.C | 2 +- .../compressible/turbulenceModel/laminar/laminar.C | 8 ++++---- .../compressible/turbulenceModel/laminar/laminar.H | 2 +- .../compressible/turbulenceModel/turbulenceModel.H | 2 +- .../incompressible/LES/LESModel/LESModel.C | 11 ++++++----- .../incompressible/LES/LESModel/LESModel.H | 2 +- .../incompressible/RAS/RASModel/RASModel.C | 11 ++++++----- .../incompressible/RAS/RASModel/RASModel.H | 2 +- .../incompressible/RAS/laminar/laminar.C | 8 ++++---- .../incompressible/RAS/laminar/laminar.H | 2 +- .../dissipationSelector/dissipationSelector.C | 2 +- .../incompressible/turbulenceModel/laminar/laminar.C | 8 ++++---- .../incompressible/turbulenceModel/laminar/laminar.H | 2 +- .../incompressible/turbulenceModel/turbulenceModel.H | 2 +- 20 files changed, 52 insertions(+), 48 deletions(-) diff --git a/src/turbulenceModels/compressible/LES/LESModel/LESModel.C b/src/turbulenceModels/compressible/LES/LESModel/LESModel.C index 1bf5cc2b52..2f35a8bfd2 100644 --- a/src/turbulenceModels/compressible/LES/LESModel/LESModel.C +++ b/src/turbulenceModels/compressible/LES/LESModel/LESModel.C @@ -197,15 +197,16 @@ tmp LESModel::thermalDissipation() const IOobject::NO_READ, IOobject::NO_WRITE ), - ( + - ( ( this->mu()*dev(twoSymm(tgradU())) ) && tgradU() - ) + this->rho() * this->epsilon() + ) + - this->rho() * this->epsilon() ) ); } -tmp LESModel::thermalDissipationEff() const +tmp LESModel::thermalDissipationEquilibrium() const { tmp tgradU = fvc::grad(this->U()); @@ -215,13 +216,13 @@ tmp LESModel::thermalDissipationEff() const ( IOobject ( - "thermalDissipationEff", + "thermalDissipationEquilibrium", runTime_.timeName(), mesh_, IOobject::NO_READ, IOobject::NO_WRITE ), - ( + - ( this->muEff()*dev(twoSymm(tgradU())) - ((2.0/3.0)*I) * this->rho() * this->k() ) && tgradU() diff --git a/src/turbulenceModels/compressible/LES/LESModel/LESModel.H b/src/turbulenceModels/compressible/LES/LESModel/LESModel.H index 7a87a71315..8808c1e41a 100644 --- a/src/turbulenceModels/compressible/LES/LESModel/LESModel.H +++ b/src/turbulenceModels/compressible/LES/LESModel/LESModel.H @@ -300,7 +300,7 @@ public: //- The source for the enthalpy equation resulting from // the effective viscous dissipation // (ie, when turbulent production and dissipation are in equilibrium) - virtual tmp thermalDissipationEff() const; + virtual tmp thermalDissipationEquilibrium() const; //- Correct Eddy-Viscosity and related properties. // This calls correct(const tmp& gradU) by supplying diff --git a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C index 849f25f01a..9ce1db5ef9 100644 --- a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C +++ b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C @@ -207,15 +207,16 @@ tmp RASModel::thermalDissipation() const IOobject::NO_READ, IOobject::NO_WRITE ), - ( + - ( ( this->mu()*dev(twoSymm(tgradU())) ) && tgradU() - ) + this->rho() * this->epsilon() + ) + - this->rho() * this->epsilon() ) ); } -tmp RASModel::thermalDissipationEff() const +tmp RASModel::thermalDissipationEquilibrium() const { tmp tgradU = fvc::grad(this->U()); @@ -225,13 +226,13 @@ tmp RASModel::thermalDissipationEff() const ( IOobject ( - "thermalDissipationEff", + "thermalDissipationEquilibrium", runTime_.timeName(), mesh_, IOobject::NO_READ, IOobject::NO_WRITE ), - ( + - ( this->muEff()*dev(twoSymm(tgradU())) - ((2.0/3.0)*I) * this->rho() * this->k() ) && tgradU() diff --git a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H index 22295848d4..0e27f72924 100644 --- a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H +++ b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H @@ -352,7 +352,7 @@ public: //- The source for the enthalpy equation resulting from // the effective viscous dissipation // (ie, when turbulent production and dissipation are in equilibrium) - virtual tmp thermalDissipationEff() const; + virtual tmp thermalDissipationEquilibrium() const; //- Return yPlus for the given patch virtual tmp yPlus(const label patchI) const; diff --git a/src/turbulenceModels/compressible/RAS/laminar/laminar.C b/src/turbulenceModels/compressible/RAS/laminar/laminar.C index 2f55ecdee5..a2ec1a7f3b 100644 --- a/src/turbulenceModels/compressible/RAS/laminar/laminar.C +++ b/src/turbulenceModels/compressible/RAS/laminar/laminar.C @@ -193,13 +193,13 @@ tmp laminar::thermalDissipation() const IOobject::NO_READ, IOobject::NO_WRITE ), - ( this->mu()*dev(twoSymm(tgradU())) ) && tgradU() + - ( this->mu()*dev(twoSymm(tgradU())) ) && tgradU() ) ); } -tmp laminar::thermalDissipationEff() const +tmp laminar::thermalDissipationEquilibrium() const { tmp tgradU = fvc::grad(this->U()); @@ -209,13 +209,13 @@ tmp laminar::thermalDissipationEff() const ( IOobject ( - "thermalDissipationEff", + "thermalDissipationEquilibrium", runTime_.timeName(), mesh_, IOobject::NO_READ, IOobject::NO_WRITE ), - ( this->mu()*dev(twoSymm(tgradU())) ) && tgradU() + - ( this->mu()*dev(twoSymm(tgradU())) ) && tgradU() ) ); } diff --git a/src/turbulenceModels/compressible/RAS/laminar/laminar.H b/src/turbulenceModels/compressible/RAS/laminar/laminar.H index 1e26261da7..f58db6c9e4 100644 --- a/src/turbulenceModels/compressible/RAS/laminar/laminar.H +++ b/src/turbulenceModels/compressible/RAS/laminar/laminar.H @@ -119,7 +119,7 @@ public: //- The source for the enthalpy equation resulting from // the effective viscous dissipation // (ie, when turbulent production and dissipation are in equilibrium) - virtual tmp thermalDissipationEff() const; + virtual tmp thermalDissipationEquilibrium() const; //- Correct the laminar viscosity virtual void correct(); diff --git a/src/turbulenceModels/compressible/turbulenceModel/dissipationSelector/dissipationSelector.C b/src/turbulenceModels/compressible/turbulenceModel/dissipationSelector/dissipationSelector.C index aa630ee977..c15dc89b15 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/dissipationSelector/dissipationSelector.C +++ b/src/turbulenceModels/compressible/turbulenceModel/dissipationSelector/dissipationSelector.C @@ -90,7 +90,7 @@ dissipationSelector::dissipation() const } else if (treatment_ == equilibrium) { - return turbModel_.thermalDissipationEff(); + return turbModel_.thermalDissipationEquilibrium(); } else { diff --git a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.C b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.C index be8e2f1da6..74b6b5fb06 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.C +++ b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.C @@ -211,13 +211,13 @@ tmp laminar::thermalDissipation() const IOobject::NO_READ, IOobject::NO_WRITE ), - ( this->mu()*dev(twoSymm(tgradU())) ) && tgradU() + - ( this->mu()*dev(twoSymm(tgradU())) ) && tgradU() ) ); } -tmp laminar::thermalDissipationEff() const +tmp laminar::thermalDissipationEquilibrium() const { tmp tgradU = fvc::grad(this->U()); @@ -227,13 +227,13 @@ tmp laminar::thermalDissipationEff() const ( IOobject ( - "thermalDissipationEff", + "thermalDissipationEquilibrium", runTime_.timeName(), mesh_, IOobject::NO_READ, IOobject::NO_WRITE ), - ( this->mu()*dev(twoSymm(tgradU())) ) && tgradU() + - ( this->mu()*dev(twoSymm(tgradU())) ) && tgradU() ) ); } diff --git a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H index 3b9b4d8fbd..6bd3c5bdfa 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H +++ b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H @@ -129,7 +129,7 @@ public: //- The source for the enthalpy equation resulting from // the effective viscous dissipation // (ie, when turbulent production and dissipation are in equilibrium) - virtual tmp thermalDissipationEff() const; + virtual tmp thermalDissipationEquilibrium() const; //- Correct the laminar viscosity virtual void correct(); diff --git a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H index 3e4ff24e43..8c80b4ab57 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H +++ b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H @@ -217,7 +217,7 @@ public: //- The source for the enthalpy equation resulting from // the effective viscous dissipation // (ie, when turbulent production and dissipation are in equilibrium) - virtual tmp thermalDissipationEff() const = 0; + virtual tmp thermalDissipationEquilibrium() const = 0; //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct() = 0; diff --git a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C index 62f18f3981..87d9f4fb41 100644 --- a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C +++ b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C @@ -156,15 +156,16 @@ tmp LESModel::thermalDissipation() const IOobject::NO_READ, IOobject::NO_WRITE ), - ( + - ( ( this->nu()*dev(twoSymm(tgradU())) ) && tgradU() - ) + this->epsilon() + ) + - this->epsilon() ) ); } -tmp LESModel::thermalDissipationEff() const +tmp LESModel::thermalDissipationEquilibrium() const { tmp tgradU = fvc::grad(this->U()); @@ -174,13 +175,13 @@ tmp LESModel::thermalDissipationEff() const ( IOobject ( - "thermalDissipationEff", + "thermalDissipationEquilibrium", runTime_.timeName(), mesh_, IOobject::NO_READ, IOobject::NO_WRITE ), - ( + - ( this->nuEff()*dev(twoSymm(tgradU())) - ((2.0/3.0)*I) * this->k() ) && tgradU() diff --git a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H index 5c0c615eb6..e5bd2545b8 100644 --- a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H +++ b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H @@ -249,7 +249,7 @@ public: //- The source for the enthalpy equation resulting from // the effective viscous dissipation // (ie, when turbulent production and dissipation are in equilibrium) - virtual tmp thermalDissipationEff() const; + virtual tmp thermalDissipationEquilibrium() const; //- Correct Eddy-Viscosity and related properties. // This calls correct(const tmp& gradU) by supplying diff --git a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C index 4cc9fd07b9..4d1d58db70 100644 --- a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C +++ b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C @@ -192,15 +192,16 @@ tmp RASModel::thermalDissipation() const IOobject::NO_READ, IOobject::NO_WRITE ), - ( + - ( ( this->nu()*dev(twoSymm(tgradU())) ) && tgradU() - ) + this->epsilon() + ) + - this->epsilon() ) ); } -tmp RASModel::thermalDissipationEff() const +tmp RASModel::thermalDissipationEquilibrium() const { tmp tgradU = fvc::grad(this->U()); @@ -210,13 +211,13 @@ tmp RASModel::thermalDissipationEff() const ( IOobject ( - "thermalDissipationEff", + "thermalDissipationEquilibrium", runTime_.timeName(), mesh_, IOobject::NO_READ, IOobject::NO_WRITE ), - ( + - ( this->nuEff()*dev(twoSymm(tgradU())) - ((2.0/3.0)*I) * this->k() ) && tgradU() diff --git a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.H b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.H index 3a2f0aa7e9..4d895ea53f 100644 --- a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.H +++ b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.H @@ -333,7 +333,7 @@ public: //- The source for the enthalpy equation resulting from // the effective viscous dissipation // (ie, when turbulent production and dissipation are in equilibrium) - virtual tmp thermalDissipationEff() const; + virtual tmp thermalDissipationEquilibrium() const; //- Return yPlus for the given patch virtual tmp yPlus(const label patchI) const; diff --git a/src/turbulenceModels/incompressible/RAS/laminar/laminar.C b/src/turbulenceModels/incompressible/RAS/laminar/laminar.C index 83e8913525..a58d944196 100644 --- a/src/turbulenceModels/incompressible/RAS/laminar/laminar.C +++ b/src/turbulenceModels/incompressible/RAS/laminar/laminar.C @@ -192,13 +192,13 @@ tmp laminar::thermalDissipation() const IOobject::NO_READ, IOobject::NO_WRITE ), - ( this->nu()*dev(twoSymm(tgradU())) ) && tgradU() + - ( this->nu()*dev(twoSymm(tgradU())) ) && tgradU() ) ); } -tmp laminar::thermalDissipationEff() const +tmp laminar::thermalDissipationEquilibrium() const { tmp tgradU = fvc::grad(this->U()); @@ -208,13 +208,13 @@ tmp laminar::thermalDissipationEff() const ( IOobject ( - "thermalDissipationEff", + "thermalDissipationEquilibrium", runTime_.timeName(), mesh_, IOobject::NO_READ, IOobject::NO_WRITE ), - ( this->nu()*dev(twoSymm(tgradU())) ) && tgradU() + - ( this->nu()*dev(twoSymm(tgradU())) ) && tgradU() ) ); } diff --git a/src/turbulenceModels/incompressible/RAS/laminar/laminar.H b/src/turbulenceModels/incompressible/RAS/laminar/laminar.H index 1617d60064..7bb4ba1b7b 100644 --- a/src/turbulenceModels/incompressible/RAS/laminar/laminar.H +++ b/src/turbulenceModels/incompressible/RAS/laminar/laminar.H @@ -111,7 +111,7 @@ public: //- The source for the enthalpy equation resulting from // the effective viscous dissipation // (ie, when turbulent production and dissipation are in equilibrium) - virtual tmp thermalDissipationEff() const; + virtual tmp thermalDissipationEquilibrium() const; //- Correct the laminar viscosity virtual void correct(); diff --git a/src/turbulenceModels/incompressible/turbulenceModel/dissipationSelector/dissipationSelector.C b/src/turbulenceModels/incompressible/turbulenceModel/dissipationSelector/dissipationSelector.C index 07ca14c373..d9318d2a82 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/dissipationSelector/dissipationSelector.C +++ b/src/turbulenceModels/incompressible/turbulenceModel/dissipationSelector/dissipationSelector.C @@ -90,7 +90,7 @@ dissipationSelector::dissipation() const } else if (treatment_ == equilibrium) { - return turbModel_.thermalDissipationEff(); + return turbModel_.thermalDissipationEquilibrium(); } else { diff --git a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C index e3a9c30fd7..93fdbc813d 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C +++ b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C @@ -215,13 +215,13 @@ tmp laminar::thermalDissipation() const IOobject::NO_READ, IOobject::NO_WRITE ), - ( this->nu()*dev(twoSymm(tgradU())) ) && tgradU() + - ( this->nu()*dev(twoSymm(tgradU())) ) && tgradU() ) ); } -tmp laminar::thermalDissipationEff() const +tmp laminar::thermalDissipationEquilibrium() const { tmp tgradU = fvc::grad(this->U()); @@ -231,13 +231,13 @@ tmp laminar::thermalDissipationEff() const ( IOobject ( - "thermalDissipationEff", + "thermalDissipationEquilibrium", runTime_.timeName(), mesh_, IOobject::NO_READ, IOobject::NO_WRITE ), - ( this->nu()*dev(twoSymm(tgradU())) ) && tgradU() + - ( this->nu()*dev(twoSymm(tgradU())) ) && tgradU() ) ); } diff --git a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.H b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.H index aa83346820..ba0c59201c 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.H +++ b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.H @@ -117,7 +117,7 @@ public: //- The source for the enthalpy equation resulting from // the effective viscous dissipation // (ie, when turbulent production and dissipation are in equilibrium) - virtual tmp thermalDissipationEff() const; + virtual tmp thermalDissipationEquilibrium() const; //- Correct the laminar viscosity virtual void correct(); diff --git a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H index a9d1465e77..d6fa7f2ca2 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H +++ b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H @@ -197,7 +197,7 @@ public: //- The source for the enthalpy equation resulting from // the effective viscous dissipation // (ie, when turbulent production and dissipation are in equilibrium) - virtual tmp thermalDissipationEff() const = 0; + virtual tmp thermalDissipationEquilibrium() const = 0; //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct() = 0; From ccee5806a3c48709d68a26d9f22cec420150645b Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Tue, 14 Jul 2009 15:56:19 +0200 Subject: [PATCH 11/21] added first draft of ReleaseNotes-1.6 - IMO we should retain ReleaseNotes-1.5 and distribute it with OpenFOAM-1.6 as well. --- ReleaseNotes-1.6 | 213 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 213 insertions(+) create mode 100644 ReleaseNotes-1.6 diff --git a/ReleaseNotes-1.6 b/ReleaseNotes-1.6 new file mode 100644 index 0000000000..3abe7072e2 --- /dev/null +++ b/ReleaseNotes-1.6 @@ -0,0 +1,213 @@ +# -*- mode: org; -*- +# +#+TITLE: OpenFOAM release notes for version 1.6 +#+AUTHOR: OpenCFD Ltd. +#+DATE: 29 August 2009 +#+LINK: http://www.opencfd.co.uk +#+OPTIONS: author:nil ^:{} + + +* Regular Expressions + + new regExp class: support for accessing POSIX extended regular + expresssions from within OpenFOAM. + + + new wordRe class: can contain a word or a regExp. + The match() method matches appropriately (as word or regExp). + + + new stringListOps: search string lists based on regular expressions, wordRe + or wordReList. + + + Istream and Ostream now retain backslashes when reading/writing strings. + The backslash continues to be used as an escape character for double-quote + and newline, but otherwise get passed through "as-is" without any other + special meaning (ie, they are *not* C-style strings). This especially + helps with input/output of regular expressions. + + +* Dictionary improvements/changes + + dictionaries can use words (unquoted) or regular expressions (quoted) + for their keywords. When searching, an exact match has priority + over a regular expression match. + + + The default inputMode is now 'merge', which corresponds to the most + general usage. The inputMode 'warn' corresponds to the previous default + behaviour. + + + The new inputMode 'protect' can be used to conditionally merge default + values into existing dictionaries. + + + new digest() method to calculate and return the SHA1 message digest + + +* Improved List containers + + It is now possible to append a UList to an existing List or DynamicList. + + + DynamicList is now much more flexible. It can be used with the append() + method, or with the setSize() method and operator[], as per List. + DynamicList also has more methods for adjusting the space allocated. + + + SortableList now uses stable sort and allows reverseSort as well. + SortableList is also more versatile - the indices mostly remain + unallocated until they are required in the sort() method. + The sort indices can be deallocated with the shrink() method. + Works as expected with transfer() and assignment from other Lists. + + + specialization for UList::operator[](..) const to return false for + out-of-range elements. This allows lazy evaluation with no noticeable + change in performance. + + + PackedList has much better performance, lazy evaluation and auto-vivify + of elements on assignment. Any auto-vivified elements will also + flood-fill the gaps with zero. The append() method can be used like in + DynamicList to append a single element. The set() method can be used + like in labelHashSet. + + + new UIndirectList for an indirect list without storing the addressing. + + +* New hashing algorithms + + Bob Jenkins' hash routine for performance improvement (5-10% faster for + string hashing than the previous algorithm) and fewer collisions. + + + SHA1 hashing and SHA1 message digests (NIST specification FIPS-180-1) + added. The SHA1 digest provides a compact (20 bytes) means of + determining if the contents of an object have changed. The OSHA1stream + can be used to calculate SHA1 digests for anything that can write to an + output stream. + + +* HashTable/HashSet improvements + + Performance improvements for querying on empty tables + + + The erase() method can take a list of keys or the keys from any + another HashTable/HashSet. + + + HashSet has an operator[]() const that allows the same syntax + to be used for boolList, PackedBoolList and labelHashSet. + + + HashSet has additional operators '+=', '-=', '&=' to add, remove or + intersect keys, respectively. + + +* Improved bool/Switch + + Switch: reduced the storage to be on par with bool. + It is now more flexible and behaves much more like a bool. + + + bool: IO uses Switch internally so the end-user doesn't need to know if + a particular class used bool or Switch internally. + + +* Miscellaneous container class improvments + + boost-style StaticAssert added. + Useful to catch invalid template sizes, for example. + + + various containers now have C++0x-style cbegin(), cend() iterator methods. + + + various containers now have STL-style empty() method, which may be more + readable than !size() or !valid(). + + + various containers now have an xfer() method for yielding their contents + to a corresponding Xfer class. + + +* New surfMesh library + Provides a more efficient storage mechanism than possible with triSurface + without restrictions on the shape of the face (templated parameter). + It will however take quite some time before it can fully replace triSurface. + + + MeshedSurface class: with zero or more contiguous surfZones. + + + UnsortedMeshedSurface class: unordered surface zones (as per triSurface) + + + surfMesh class: for reading/writing in native OpenFOAM format + + +* New Xfer class + Provides finer grained control over copying or transferring objects with + very little overhead. It can be used for any object that has a transfer() + method and a operator=() copy method. + Since it is decided upon construction of the Xfer object whether the + parameter is to be copied or transferred, the contents of the resulting + Xfer object can be transferred unconditionally. This greatly simplifies + defining constructors or methods in other classes with mixed + transfer/copy semantics without requiring 2^N different versions. + + + xferCopy(), xferMove() and xferCopyTo(), xferMoveTo() functions + to ease the use of the Xfer class. + + +* Improvements for functionObjects and time-looping + + The functionObjectList retains the order of the functionObject order, + which allows a chaining of operations. It is thus internally more + efficient when system/controlDict uses functions {..} instead of + functions (..), but the both forms are supported. + + + The functionObjects now have an additional end() method that gets called + when Time::loop() or Time::run() determines that the time-loop exits. + Accordingly, one of these two idioms should be used in solver code: + 1. while (runTime.loop() { ... } + 2. while (runTime.run()) { runTime++; ... } + + + functionObjectList now tracks the SHA1 message digest of the + sub-directories. This avoids reloading a functionObject when something + unrelated in system/controlDict changed. + + +* Solver control improvments + Use dictionary entries instead of an Istream for the solver controls. + + allows dictionary substitutions and regular expressions in + system/fvSolution + + + old solver control syntax is still supported (warning emitted), but the + foamUpgradeFvSolution application can be used to convert + system/fvSolution to the new format. + + +* Convenience changes + + IOobject: new constructor for creating an IOobject from a + single-path specification (eg, see blockMesh -dict option). + + + argList: convenience methods for accessing options more directly. + option(), optionFound(), optionLookup(), optionRead(), + optionReadIfPresent(). + + + readList(Istream&) can read a bracket-delimited list or handle a single + value as a list of size 1. This can be a useful convenience when + processing command-line options. + + +* Misc. improvements + + improved consistency and interoperability between face and triFace classes. + + + face::triangles() can split and append to a DynamicList + + + coordinateSystems can access global systems (similar to MeshObject) + + +* Improvements to utilities + + blockMesh: -dict option for specifying an alternative dictionary for the + block mesh description. The 'convertToMeters' entry is now optional, and + the alternative 'scale' entry can be used for less typing. + + + foamToEnsight: the -noPatches option suppresses generation of patches + + + foamToEnsightParts: the -noMesh option and the -index option can + be used when post-processing incrementally. + + + timeSelector: can combine -time ranges and -latestTime options. More + reliable behaviour for cases missing constant/ or 0/ directories. When + the -noZero option is available, -latestTime will not select the 0/ + directory unless the -zeroTime option is also given. This helps avoid + ill effects caused by accidentally using the 0/ directory for certain + utilities (eg, reconstructPar). + + +* Improvements to Paraview reader module + + PV3FoamReader: added mesh region handling. The region name is parsed + from the filename. Eg, case{region}.OpenFOAM + + + paraFoam: new -region option for specifying an alternative region. A new + -touch option to generate the .OpenFOAM file only. Only creates (and + removes) .OpenFOAM files if they didn't already exist, which is useful + in connection with the -touch option. + From c0057f33c1cf7a45671f27b42ef514bdf5a48dba Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Wed, 15 Jul 2009 09:35:45 +0200 Subject: [PATCH 12/21] merge in Mark's text into ReleaseNotes --- ReleaseNotes-1.6 | 439 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 331 insertions(+), 108 deletions(-) diff --git a/ReleaseNotes-1.6 b/ReleaseNotes-1.6 index 0fe2691f91..b9330fac0a 100644 --- a/ReleaseNotes-1.6 +++ b/ReleaseNotes-1.6 @@ -1,143 +1,307 @@ # -*- mode: org; -*- # -#+TITLE: *OpenFOAM release notes for version 1.6* +#+TITLE: OpenFOAM release notes for version 1.6 #+AUTHOR: OpenCFD Ltd. #+DATE: July 2009 #+LINK: http://www.opencfd.co.uk #+OPTIONS: author:nil ^:{} * Overview - OpenFOAM-1.6 is is a significant upgrade to version 1.5 in ways which are - outlined below. This release passes all our standard tests and the tutorials - have been broadly checked. If there are any bugs, please report them using - the instructions set out in: http://www.OpenFOAM.org/bugs.html. + OpenFOAM-1.6 is a significant upgrade to version 1.5 in ways that are + outlined below. This release passes all our standard tests and the + tutorials have been broadly checked. If there are any bugs, please report + them using the instructions set out here: + http://www.OpenFOAM.org/bugs.html * GNU/Linux version - The 32bit and 64bit binary packs of the OpenFOAM release were compiled on a - machine running SuSE GNU/Linux version 11.1 and also tested on Ubuntu 9. We - recommend that users run OpenFOAM on one of these or a similar recent version - of GNU/Linux. This release has also been successfully compiled and tested on - older GNU/Linux releases but this requires the installation of Qt 4.3.? (the - sources for which are supplied with OpenFOAM-1.6, see README) for ParaView-3 - to run. + The 32bit and 64bit binary packs of the OpenFOAM release were compiled on + a machine running openSUSE GNU/Linux version 11.1 and also tested on + Ubuntu 9. We recommend that users run OpenFOAM on one of these, or on a + similarly recent version of GNU/Linux. This release has also been + successfully compiled and tested on older GNU/Linux releases, but this + requires the installation of Qt 4.3.? (the sources for which are supplied + with OpenFOAM-1.6, see README) for ParaView-3 to run. * C++ Compiler version + Release compiled with GCC 4.3.3. - + Built in support for the Intel C++ 10.? compiler (untested). + + Built-in support for the Intel C++ 10.? compiler (untested). + The choice of the compiler is controlled by the setting of the ~$WM_COMPILER~ and ~$WM_COMPILER_ARCH~ environment variables in the /OpenFOAM-1.6/etc/bashrc/ (or /cshrc/) file. - + The location of the installation of the compiler is controlled by the + + The location of the compiler installation is controlled by the ~$compilerInstall~ environment variable in the /OpenFOAM-1.6/etc/settings.sh/ (or /settings.csh/) file. * Library developments -*** Turbulence modelling - + Major development of turbulence model libraries to give extra flexibility - at the solver level. For solvers that can support either RAS/LES - computations, the selection is made in the - /constant/turbulenceProperties/, - by setting the =simulationType= keyword to: - - =laminar= - - =RASModel= - - =LESModel= - + Depending on the selection, the model is the instantiated from /constant// - - /RASProperties/ - - /LESProperties/ +** Core library -***** RAS wall functions - Wall functions are now run-time selectable per patch for RAS. +*** Regular Expressions + The addition of regular expressions marks a major improvement in usability. -******* Velocity: - + Apply to turbulent viscosities =nut= or =mut= - + Apply to =k=, =Q=, =R= - + Apply to =epsilon=, =omega= + + *New* =regExp= class provides support for accessing POSIX extended regular + expresssions from within OpenFOAM. + See the manpages on your system (/man 7 regex/) for more information + about the extended regular expresssion syntax. Since entire strings are + matched, the =^= and =$= anchors are not required. -******* Temperature: - + Apply to turbulent thermal diffusivity, =alphat= (compressible only) + + *New* =wordRe= class can contain a =word= or a =regExp= . + The match() method matches appropriately (as a =word= or as a =regExp=). -******* To apply wall functions: - + To recapture the functionality of previous OpenFOAM versions (v1.5 and - earlier) assign: - - for velocity: - - =nut=: =nutWallFunction= - - =mut=: =muWallFunction= - - =epsilon=: =epsilonWallFunction= - - =omega=: =omegaWallFunction= - - =k=, =Q=, =R=: =kQRWallFunction= - - for temperature: - - =alphat=: =alphatWallFunction= - + New =alphaSgsJayatillekeWallFunction= thermal wall function for - compressible LES + + *New* =stringListOps= to search string lists based on regular expressions, + =wordRe= or =wordReList= . -***** *New* LES turbulence models - + Spalart-Allmaras DDES - + Spalart-Allmaras IDDES + + =Istream= and =Ostream= now retain backslashes when reading/writing strings. + The backslash continues to be used as an escape character for double-quote + and newline, but otherwise get passed through "as-is" without any other + special meaning (ie, they are /not/ C-style strings). This especially + helps with input/output of regular expressions. -***** Upgrading: - + *New* utility - =applyWallFunctionBoundaryConditions= - + Solvers will automatically update existing cases - - New fields created based on the presence of the =nut/mut= field - - Boundary conditions include scoping, i.e compressibility:: for - compressible solvers - - Modified fields will be backed-up to /.old/ - + NOTE: - - Fields are only updated for those fields associated with the current - turbulence model selection, i.e. if fields exist for use with other - models, they will not be updated - - New specification is not backwards compatible -*** Thermo-physical Models - + Old compressibility based thermo package renamed - =basicThermo= \rightarrow =basicPsiThermo= - + *New* =basicRhoThermo= thermo package - - Additional density field stored - - General form - can be used for other types of media, e.g. liquids - - Additional polynomial-based thermodynamics - - Equation of state: =icoPolynomial= - - Transport: =polynomialTransport= - - Thermo: =hPolynomialThermo= - + Removed earlier hard-coding of gas thermophysics for chemistry modelling: - - =reactingMixture= now templated on thermo package - - =chemistryModel= now templated on thermo package - - =chemistrySolver= now templated on thermo package - + *New* =fvDOM= radition model - - finite volume, discrete ordinates method - + *New* (reinstated) =eThermo= thermodynamics package - - internal energy based thermodynamics +*** Dictionary improvements/changes + + Dictionaries can use words (unquoted) or regular expressions (quoted) + for their keywords. When searching, an exact match has priority + over a regular expression match. -*** Lagrangian + + The default =#inputMode= is now '=merge=', which corresponds to the most + general usage. The =#inputMode warn= corresponds to the previous + default behaviour. -***** Intermediate - - Overhaul of the underlying framework - - Reacting now split into reacting and reacting multiphase - - New structure for variable composition - - Many new sub-models, including: - - Injection - - =PatchInjection= - injection local to patch face cells - - =FieldActivatedInjection= - injection based on satisfying external - criterion - - LookupTableInjection - explicity define injection locations and all - parcel properties - - Post-processing - - patch post-processing - collect data for parcels impacting user - defined patches - - Patch interaction - - generalised behaviour for parcel interaction with patch - - Phase change - - liquid evaporation + + The *new* =#inputMode protect= can be used to conditionally merge default + values into existing dictionaries. -***** Coal combustion - - *New* library - extension of reacting-multiphase functionality - - Surface reaction/combustion models + + *New* =digest()= method to calculate and return the SHA1 message digest -*** Discrete methods + +*** Improved list containers + + It is now possible to append a =UList= to an existing =List= or + =DynamicList= . + + + =DynamicList= is now much more flexible. It can be used with the + =append()= method, or with the =setSize()= method and =operator[]=, as + per =List= . =DynamicList= also has more methods for adjusting the + space allocated. + + + =SortableList= now uses stable sort and allows =reverseSort()= as well. + =SortableList= is also more versatile - the indices mostly remain + unallocated until they are required in the =sort()= method. + The sort indices can be deallocated with the =shrink()= method. + Works as expected with =transfer()= and assignment from other lists. + + + Specialization for =UList::operator[](..) const= to return =false= + for out-of-range elements. This allows lazy evaluation with no noticeable + change in performance. + + + =PackedList= has much better performance, *new* lazy evaluation and + *new* auto-vivify of elements on assignment. Any auto-vivified + elements will also flood-fill the gaps with zero. The =append()= method + can be used like in =DynamicList= to append a single element. The =set()= + method can be used like in =labelHashSet= . + A =PackedBoolList= can thus replace =labelHashSet= in many places. + + + *New* =UIndirectList= for an indirect list without storing the addressing. + + +*** New hashing algorithms + + Bob Jenkins' hash routine for performance improvement (5-10% faster for + string hashing than the previous algorithm) and fewer collisions. + + + SHA1 hashing and SHA1 message digests (NIST specification FIPS-180-1) + added. The SHA1 digest provides a compact (20 bytes) means of + determining if the contents of an object have changed. The *new* + =OSHA1stream= class can be used to calculate SHA1 digests for anything + that can write to an output stream. + + +*** HashTable/HashSet improvements + + Performance improvements for querying on empty tables + + + The =erase()= method can take a list of keys or the keys from any + another =HashTable=/=HashSet= . + + + =HashSet= has an =operator[]() const= that allows the same syntax + to be used for =boolList=, =PackedBoolList= and =labelHashSet= . + + + =HashSet has additional operators '+=', '-=', '&=' to add, remove or + intersect keys, respectively. + + +*** Improved bool/Switch + + The =Switch= class has reduced the storage to be on par with =bool= . + It is now more flexible and behaves much more like a =bool= . + + + The IO for =bool= uses =Switch= internally for reading, so the end-user + doesn't need to know if a particular class used =bool= or =Switch= . + + +*** Miscellaneous container class improvments + + *New* Boost-style =StaticAssert= added. + Which is useful to catch invalid template sizes, for example. + + + Various containers now have C++0x-style =cbegin()=, =cend()= iterator methods. + + + Various containers now have STL-style =empty()= method, which may be more + readable and universal than =!size()= or =!valid()= conditions. + + + various containers now have an =xfer()= method for yielding their contents + to a corresponding =Xfer= class. + + +*** *New* Xfer class + Provides finer grained control over copying or transferring objects with + very little overhead. It can be used for any object that has a =transfer()= + method and a =operator=()= copy method. + Since it is decided upon construction of the =Xfer= object whether the + parameter is to be copied or transferred, the contents of the resulting + Xfer object can be transferred unconditionally. This greatly simplifies + defining constructors or methods in other classes with mixed + transfer/copy semantics without requiring 2^N different versions. + + + =xferCopy()=, =xferMove()= and =xferCopyTo()=, =xferMoveTo()= functions + to ease the use of the =Xfer= class. + +*** Convenience changes + + =IOobject= has a *new* constructor for creating an =IOobject= from a + single-path specification (eg, see =blockMesh -dict= option). + + + =argList= has *new* convenience methods for accessing options more directly: + =option()=, =optionFound()=, =optionLookup()=, =optionRead()=, + =optionReadIfPresent()= . + + + The *new* =readList(Istream&)= can read a bracket-delimited list or + handle a single value as a list of size 1. This can be a useful + convenience when processing command-line options. + + +*** Misc. improvements + + Improved consistency and interoperability between =face= and =triFace= classes. + + + =face::triangles()= can split and append to a =DynamicList= + + + =coordinateSystems= can access global systems (similar to =MeshObject=) + + + +** Turbulence modelling + + Major development of turbulence model libraries to give extra flexibility + at the solver level. For solvers that can support either RAS/LES + computations, the selection is made in the + /constant/turbulenceProperties/, + by setting the =simulationType= keyword to: + - =laminar= + - =RASModel= + - =LESModel= + + Depending on the selection, the model is the instantiated from /constant// + - /RASProperties/ + - /LESProperties/ + +**** RAS wall functions + Wall functions are now run-time selectable per patch for RAS. + +****** Velocity: + + Apply to turbulent viscosities =nut= or =mut= + + Apply to =k=, =Q=, =R= + + Apply to =epsilon=, =omega= + +****** Temperature: + + Apply to turbulent thermal diffusivity, =alphat= (compressible only) + +****** To apply wall functions: + + To recapture the functionality of previous OpenFOAM versions (v1.5 and + earlier) assign: + - for velocity: + - =nut=: =nutWallFunction= + - =mut=: =muWallFunction= + - =epsilon=: =epsilonWallFunction= + - =omega=: =omegaWallFunction= + - =k=, =Q=, =R=: =kQRWallFunction= + - for temperature: + - =alphat=: =alphatWallFunction= + + New =alphaSgsJayatillekeWallFunction= thermal wall function for + compressible LES + +**** *New* LES turbulence models + + Spalart-Allmaras DDES + + Spalart-Allmaras IDDES + +**** Upgrading: + + *New* utility - =applyWallFunctionBoundaryConditions= + + Solvers will automatically update existing cases + - New fields created based on the presence of the =nut/mut= field + - Boundary conditions include scoping, i.e compressibility:: for + compressible solvers + - Modified fields will be backed-up to /.old/ + + NOTE: + - Fields are only updated for those fields associated with the current + turbulence model selection, i.e. if fields exist for use with other + models, they will not be updated + - The new specification is not backwards compatible + +** Thermo-physical Models + + Old compressibility-based thermo package renamed + =basicThermo= \rightarrow =basicPsiThermo= + + *New* =basicRhoThermo= thermo package + - Additional density field stored + - General form - can be used for other types of media, e.g. liquids + - Additional polynomial-based thermodynamics + - Equation of state: =icoPolynomial= + - Transport: =polynomialTransport= + - Thermo: =hPolynomialThermo= + + Removed earlier hard-coding of gas thermophysics for chemistry modelling: + - =reactingMixture= now templated on thermo package + - =chemistryModel= now templated on thermo package + - =chemistrySolver= now templated on thermo package + + *New* =fvDOM= radition model + - finite volume, discrete ordinates method + + *New* (reinstated) =eThermo= thermodynamics package + - internal energy-based thermodynamics + +** Lagrangian + +**** Intermediate + - Overhaul of the underlying framework + - Reacting now split into reacting and reacting multiphase + - New structure for variable composition + - Many new sub-models, including: + - Injection + - =PatchInjection= - injection local to patch face cells + - =FieldActivatedInjection= - injection based on satisfying external + criterion + - LookupTableInjection - explicity define injection locations and all + parcel properties + - Post-processing + - patch post-processing - collect data for parcels impacting user + defined patches + - Patch interaction + - generalised behaviour for parcel interaction with patch + - Phase change + - liquid evaporation + +**** Coal combustion + - *New* library - extension of reacting-multiphase functionality + - Surface reaction/combustion models + +** Discrete methods - *New* library offering DSMC simulation functionality - see =dsmcFoam= below - *New* libraries offering molecular dynamics simulation functionality - see =mdFoam= and =mdEquilibrationFoam=: below. + +** *New* surfMesh library + Provides a more efficient storage mechanism than possible with =triSurface= + without restrictions on the shape of the face (templated parameter). + It will however take quite some time before it can fully replace + =triSurface= . + + + =MeshedSurface= class - with zero or more contiguous =surfZones= . + + + =UnsortedMeshedSurface= class - unordered surface zones + (as per =triSurface=) + + + =surfMesh= class - for reading/writing in native OpenFOAM format + + * Solver restructuring The upgrade to the turbulence models means that the simulation type, i.e. laminar, RAS or LES can be selected at run time. This has allowed a reduction @@ -148,7 +312,7 @@ - =rhoTurbFoam=, =coodles= \rightarrow =rhoPisoFoam= - =xoodles= \rightarrow absorbed into =XiFoam= - =buoyantFoam=, =lesBuoyantFoam= \rightarrow =buoyantPisoFoam= - - =interFoam=, rasInterFoam, =lesInterFoam= \rightarrow =interFoam= + - =interFoam=, =rasInterFoam=, =lesInterFoam= \rightarrow =interFoam= - =lesCavitatingFoam=, =rasCavitatingFoam= \rightarrow =cavitatingFoam= + Solvers which support LES only: - =channelOodles= \rightarrow =channelFoam= (LES) @@ -157,11 +321,22 @@ - pd to p ------------------------------------------------------------ [HENRY] - gravity ------------------------------------------------------------ [HENRY] +** Solver control improvments + Use dictionary entries instead of an =Istream= for the solver controls. + + This Allows dictionary substitutions and regular expressions in + /system/fvSolution/ + + + The old solver control syntax is still supported (warning emitted), but + the *new* =foamUpgradeFvSolution= utility can be used to convert + /system/fvSolution/ to the new format. + + * Tutorial restructuring to reflect solver application structure * Post-processing ---------------------------------------------------- [MATTIJS] - SAMPLING - improved plane, iso-surface handling + - Output to any surface geometry format supported by the =surfMesh= library. * *New* Solvers + =buoyantBoussinesqSimpleFoam= @@ -187,7 +362,7 @@ + =dsmcFoam= DSMC (Direct Simulation Monte-Carlo) solver for rarefied gas dynamics - simultions, able to simulate mixtures of an arbitrary number of gas species. + simulations, able to simulate mixtures of an arbitrary number of gas species. The variable hard sphere collision model with Larsen-Borgnakke internal energy redistribution (see "Molecular Gas Dynamics and the Direct Simulation of Gas Flows" G.A. Bird, 1994) is available; other run-time selectable @@ -210,21 +385,51 @@ * Function objects -*** *New* function objects: +** Improvements for function objects and time-looping + + The =functionObjectList= retains the order of the =functionObject= order, + which allows a chaining of operations. It is thus internally more + efficient when /system/controlDict/ uses =functions {..}= instead of + =functions (..)=, but both forms are supported. + + + The =functionObject= now has an additional =end()= method that is called + when =Time::loop()= or =Time::run()= determine that the time-loop exits. + Accordingly, one of these two idioms should be used in solver code: + 1. =while (runTime.loop() { ... }= + 2. =while (runTime.run()) { runTime++; ... }= + + + *New* - =functionObjectList= now tracks the SHA1 message digest of the + sub-directories. This avoids reloading a =functionObject= when + something unrelated in /system/controlDict/ changed. + +** *New* function objects: - =systemCall= - executes a list of system instructions - =fieldMinMax= - computes the min/max of a - =staticPressure= - converts kinematic pressure to static pressure - =dsmcFields= - calculates intensive fields (velocity and temperature) from averaged extensive fields (i.e. momentum and energy) -*** Usage +** Usage - Improved output control: =timeStep= or =outputTime= * Boundary conditions - Improved set of direct mapped boundary conditions - Buoyancy boundary condition ---------------------------------------- [HENRY] -* *New* utilities +* Utilities + +** Improvements + + =blockMesh= has a *new* =-dict= option for specifying an alternative + dictionary for the block mesh description. The '=convertToMeters=' entry + is now optional, and the alternative '=scale=' entry can be used for + less typing. + + + =foamToEnsight= has a *new* =-noPatches= option to suppress generation + of patches. + + + =foamToEnsightParts= has *new* =-noMesh= and =-index= options that can + be useful when post-processing results incrementally. + +** *New* utilities - =particleTracks= - generate particle tracks for lagrangian calculations - =dsmcInitialise= - preprocessing utility to create initial configurations of DSMC particles in a geometry @@ -233,3 +438,21 @@ - =interpolate= - performs fvc::interpolate() - =randomise= - randomises a by a given perturbation - =addSubtract= - simple add/subtract field functionality + +** Usage + + =timeSelector= can now combine =-time ranges= and =-latestTime= options. + More reliable behaviour for cases missing /constant// or /0// + directories. When the =-noZero= option is enabled, =-latestTime= will not + select the =0/= directory unless the =-zeroTime= option is given. + This helps avoid ill effects caused by accidentally using the + /0// directory in certain utilities (eg, =reconstructPar=). + +** Improvements to Paraview reader module + + =PV3FoamReader= added mesh region handling. The region name is parsed + from the filename. Eg, /case{region}.OpenFOAM/ + + + =paraFoam= with a *new* =-region= option for specifying an alternative + region. A *new* =-touch= option to generate the /.OpenFOAM/ file only. + Only creates (and removes) /.OpenFOAM/ files if they didn't already + exist, which is useful in connection with the =-touch= option. + From 0e5e84f4edebcb92b0448808b4e0a8444838329d Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Wed, 15 Jul 2009 12:26:12 +0200 Subject: [PATCH 13/21] removed last remnants of LAM support --- bin/foamJob | 18 --------------- bin/mpirunDebug | 6 ----- etc/bashrc | 4 ++-- etc/cshrc | 4 ++-- etc/settings.csh | 15 +------------ etc/settings.sh | 35 ++++++++++-------------------- wmake/rules/linux64Gcc/mplibLAM | 3 --- wmake/rules/linux64Gcc42/mplibLAM | 3 --- wmake/rules/linux64Gcc43/mplibLAM | 3 --- wmake/rules/linux64Icc/mplibLAM | 3 --- wmake/rules/linuxGcc/mplibLAM | 3 --- wmake/rules/linuxGcc42/mplibLAM | 3 --- wmake/rules/linuxGcc43/mplibLAM | 3 --- wmake/rules/linuxIA64Gcc/mplibLAM | 3 --- wmake/rules/linuxIA64Icc/mplibLAM | 3 --- wmake/rules/linuxIcc/mplibLAM | 3 --- wmake/rules/linuxPPC64Gcc/mplibLAM | 3 --- wmake/rules/linuxmingw32/mplibLAM | 3 --- wmake/rules/solarisGcc/mplibLAM | 3 --- 19 files changed, 16 insertions(+), 105 deletions(-) delete mode 100644 wmake/rules/linux64Gcc/mplibLAM delete mode 100644 wmake/rules/linux64Gcc42/mplibLAM delete mode 100644 wmake/rules/linux64Gcc43/mplibLAM delete mode 100644 wmake/rules/linux64Icc/mplibLAM delete mode 100644 wmake/rules/linuxGcc/mplibLAM delete mode 100644 wmake/rules/linuxGcc42/mplibLAM delete mode 100644 wmake/rules/linuxGcc43/mplibLAM delete mode 100644 wmake/rules/linuxIA64Gcc/mplibLAM delete mode 100644 wmake/rules/linuxIA64Icc/mplibLAM delete mode 100644 wmake/rules/linuxIcc/mplibLAM delete mode 100644 wmake/rules/linuxPPC64Gcc/mplibLAM delete mode 100644 wmake/rules/linuxmingw32/mplibLAM delete mode 100644 wmake/rules/solarisGcc/mplibLAM diff --git a/bin/foamJob b/bin/foamJob index 0f679d7275..289d430d83 100755 --- a/bin/foamJob +++ b/bin/foamJob @@ -204,24 +204,6 @@ else # echo "Parallel processing using $WM_MPLIB with $NPROCS processors" case "$WM_MPLIB" in - LAM) - lamPid=`getPID lamd` - if [ ! "$lamPid" ] ; then - echo "No LAM daemon running." - if [ -r system/machines ] ; then - echo "system/machines file exists" - echo "Try starting the LAM multicomputer with \"lamboot -v system/machines\"" - exit 1 - else - echo "Cannot find a 'machines' file for LAM in system/" - echo "required to start a LAM multicomputer" - consultGuide - exit 1 - fi - else - echo "LAM daemon running (PID $lamPid). Proceeding with MPI run." - fi - ;; OPENMPI) # add hostfile info for hostfile in \ diff --git a/bin/mpirunDebug b/bin/mpirunDebug index 66bc86e42b..57df760873 100755 --- a/bin/mpirunDebug +++ b/bin/mpirunDebug @@ -162,10 +162,6 @@ do if [ .$WM_MPLIB = .OPENMPI ]; then node="-np 1 " - elif [ .$WM_MPLIB = .LAM ]; then - if [ "$spawn" -eq 2 ]; then - node="c${proc} " - fi fi echo "#!/bin/sh" > $procCmdFile @@ -210,8 +206,6 @@ done cmd="" if [ .$WM_MPLIB = .OPENMPI ]; then cmd="mpirun -app $PWD/mpirun.schema Date: Wed, 15 Jul 2009 13:28:24 +0200 Subject: [PATCH 14/21] dropped pvm --- src/Pstream/Allwmake | 2 +- src/Pstream/pvm/IPread.C | 114 ---------- src/Pstream/pvm/Make/files | 5 - src/Pstream/pvm/Make/options | 4 - src/Pstream/pvm/OPwrite.C | 68 ------ src/Pstream/pvm/Pstream.C | 393 ----------------------------------- 6 files changed, 1 insertion(+), 585 deletions(-) delete mode 100644 src/Pstream/pvm/IPread.C delete mode 100644 src/Pstream/pvm/Make/files delete mode 100644 src/Pstream/pvm/Make/options delete mode 100644 src/Pstream/pvm/OPwrite.C delete mode 100644 src/Pstream/pvm/Pstream.C diff --git a/src/Pstream/Allwmake b/src/Pstream/Allwmake index a24dd16a5d..a01538cc38 100755 --- a/src/Pstream/Allwmake +++ b/src/Pstream/Allwmake @@ -5,7 +5,7 @@ set -x wmake libso dummy case "$WM_MPLIB" in -LAM | *MPI* ) +*MPI*) set +x echo echo "Note: ignore spurious warnings about missing mpicxx.h headers" diff --git a/src/Pstream/pvm/IPread.C b/src/Pstream/pvm/IPread.C deleted file mode 100644 index 5a035bf388..0000000000 --- a/src/Pstream/pvm/IPread.C +++ /dev/null @@ -1,114 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2 of the License, or (at your - option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Description - Read token and binary block from IPstream using pvm. - -\*---------------------------------------------------------------------------*/ - -#include "error.H" - -#include "IPstream.H" - -#include - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * * * * Constructor * * * * * * * * * * * * * * * // - -IPstream::IPstream -( - const int fromProcNo, - const label bufSize, - streamFormat format, - versionNumber version -) -: - Pstream(bufSize), - Istream(format, version), - fromProcNo_(fromProcNo), - messageSize_(0) -{ - setOpened(); - setGood(); - - int bufid, tag, tid; - - // If the buffer size is not specified then probe the incomming message - - if (!bufSize) - { - // Probe read buffer until message arrives. - while (!(bufid = pvm_probe(procID(fromProcNo_), msgType()))); - - // When the message arrives find its size - pvm_bufinfo(bufid, &messageSize_, &tag, &tid); - - // Resize buffer to message size - buf_.setSize(messageSize_); - } - - - // Read message into buffer - - if - ( - pvm_precv - ( - procID(fromProcNo_), - msgType(), - buf_.begin(), - buf_.size(), - PVM_BYTE, - &tid, &tag, &messageSize_ - ) != PvmOk - ) - { - FatalErrorIn("IPstream::IPstream(const int fromProcNo)") - << "pvm_precv cannot receive incomming message" - << ::abort; - } - - - // Check size of message read - - if (messageSize_ > buf_.size()) - { - FatalErrorIn("IPstream::IPstream(const int fromProcNo)") - << "buffer (" << buf_.size() - << ") not large enough for incomming message (" - << messageSize_ << ')' - << ::abort; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/Pstream/pvm/Make/files b/src/Pstream/pvm/Make/files deleted file mode 100644 index 8a94fb2f05..0000000000 --- a/src/Pstream/pvm/Make/files +++ /dev/null @@ -1,5 +0,0 @@ -OPwrite.C -IPread.C -Pstream.C - -LIB = $(FOAM_LIBBIN)/pvm-$(LAM_VERSION)/libPstream diff --git a/src/Pstream/pvm/Make/options b/src/Pstream/pvm/Make/options deleted file mode 100644 index 90632e801e..0000000000 --- a/src/Pstream/pvm/Make/options +++ /dev/null @@ -1,4 +0,0 @@ -include $(RULES)/mplib$(WM_MPLIB) - -EXE_INC = $(PFLAGS) $(PINC) -LIB_LIBS = $(PLIBS) diff --git a/src/Pstream/pvm/OPwrite.C b/src/Pstream/pvm/OPwrite.C deleted file mode 100644 index 454f6d1eb8..0000000000 --- a/src/Pstream/pvm/OPwrite.C +++ /dev/null @@ -1,68 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2 of the License, or (at your - option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Description - Write primitive and binary block from OPstream using pvm. - -\*---------------------------------------------------------------------------*/ - -#include "error.H" - -#include "OPstream.H" - -#include - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -OPstream::~OPstream() -{ - if - ( - pvm_psend - ( - procID(toProcNo_), - msgType(), - buf_.begin(), - bufPosition_, - PVM_BYTE - ) != PvmOk - ) - { - FatalErrorIn("OPstream::~OPstream()") - << "pvm_psend cannot send outgoing message" - << ::abort; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/Pstream/pvm/Pstream.C b/src/Pstream/pvm/Pstream.C deleted file mode 100644 index c76e2df115..0000000000 --- a/src/Pstream/pvm/Pstream.C +++ /dev/null @@ -1,393 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2 of the License, or (at your - option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "Pstream.H" -#include "PstreamReduceOps.H" - -#include -#include -#include - -#include - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -void Pstream::addValidParOptions(HashTable& validParOptions) -{ - validParOptions.insert("np", ""); - validParOptions.insert("p4pg", "PI file"); - validParOptions.insert("p4wd", "directory"); - validParOptions.insert("p4amslave", ""); - validParOptions.insert("p4yourname", "hostname"); -} - - -bool Pstream::init(int& argc, char**& argv) -{ - // Set the comunications options - pvm_setopt(PvmRoute, PvmRouteDirect); - - // Get the ID of this processor - int mytid = pvm_mytid(); - -#ifdef USECRAYSHMEM - - // Get the size of the NULL group - procIDs_.setSize(pvm_gsize(NULL)); - - // For each processor of the NULL group get its ID - for (int proci=0; proci& bop) -{ - if (Pstream::parRun()) - { -# ifdef PVM_REDUCE - if - ( - pvm_reduce - ( - PvmSum, - &Value, - 1, - PVM_DOUBLE, - Pstream::msgType(), - "foam", - 0 - ) != PvmOk - ) - { - FatalErrorIn - ( - "reduce(scalar& Value, const sumOp& sumOp)" - ) << "pvm_reduce failed" - << abort(FatalError); - } -# endif - - if (Pstream::master()) - { - for - ( - int slave=Pstream::firstSlave(); - slave<=Pstream::lastSlave(); - slave++ - ) - { - scalar value; - int atid, atag, alen; - - if - ( - pvm_precv - ( - Pstream::procID(slave), - Pstream::msgType(), - &value, - 1, - PVM_DOUBLE, - &atid, &atag, &alen - ) != PvmOk - ) - { - FatalErrorIn - ( - "reduce(scalar& Value, const sumOp& sumOp)" - ) << "pvm_precv failed" - << abort(FatalError); - } - - Value = bop(Value, value); - } - } - else - { - if - ( - pvm_psend - ( - Pstream::procID(Pstream::masterNo()), - Pstream::msgType(), - &Value, - 1, - PVM_DOUBLE - ) != PvmOk - ) - { - FatalErrorIn - ( - "reduce(scalar& Value, const sumOp& sumOp)" - ) << "pvm_psend failed" - << abort(FatalError); - } - } - - - if (Pstream::master()) - { - pvm_initsend(PvmDataDefault); - pvm_pkdouble(&Value, 1, 1); - - if - ( - pvm_mcast - ( - (int*)Pstream::procIDs().begin(), - Pstream::nProcs(), - Pstream::msgType() - ) != PvmOk - ) - { - FatalErrorIn - ( - "reduce(scalar& Value, const sumOp& sumOp)" - ) << "pvm_mcast failed" - << abort(FatalError); - } - } - else - { - if - ( - pvm_recv - ( - Pstream::procID(Pstream::masterNo()), - Pstream::msgType() - ) <= 0 - ) - { - FatalErrorIn - ( - "reduce(scalar& Value, const sumOp& sumOp)" - ) << "pvm_psend failed" - << abort(FatalError); - } - - pvm_upkdouble(&Value, 1, 1); - } - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - -// ************************************************************************* // From 75080ab867acbe8c8357409fd623823846e43c87 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Wed, 15 Jul 2009 13:34:51 +0200 Subject: [PATCH 15/21] dropped pvm --- wmake/rules/solarisGcc/mplibPVM | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 wmake/rules/solarisGcc/mplibPVM diff --git a/wmake/rules/solarisGcc/mplibPVM b/wmake/rules/solarisGcc/mplibPVM deleted file mode 100644 index 9652e427d8..0000000000 --- a/wmake/rules/solarisGcc/mplibPVM +++ /dev/null @@ -1,3 +0,0 @@ -PFLAGS = -PINC = -I$(PVM_ROOT)/include -PLIBS = -L$(PVM_ROOT)/lib/$(PVM_ARCH) -lgpvm3 -lpvm3s From d89d2eadd5dcf93ba397cd350e62fa8d1e6d1fbb Mon Sep 17 00:00:00 2001 From: henry Date: Wed, 15 Jul 2009 23:12:06 +0100 Subject: [PATCH 16/21] Reinstate editing the paths in the .cmake files as the default behaviour. --- bin/buildParaView | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/buildParaView b/bin/buildParaView index cceee96487..e7c6c6f9b0 100755 --- a/bin/buildParaView +++ b/bin/buildParaView @@ -114,7 +114,7 @@ runCONFIG=true runMAKE=true runMAKEDOC=true runINSTALL=true -runENVPATH=false +runENVPATH=true # parse options @@ -153,6 +153,7 @@ do shift ;; -envpath) # optional: change cmake files to use env variables + # This is now the default behaviour runCONFIG=false runMAKE=false runMAKEDOC=false From 7ae5e62f3984dd8c21f43049b8cf0b6ccefe9625 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Thu, 16 Jul 2009 08:27:40 +0200 Subject: [PATCH 17/21] drop thermalDissipation (effective, equilibrium or otherwise) from turbulenceModels - keeps sources in sync for the 1.6 release and it'll get fiddled with for the 1.7 release anyhow --- .../compressible/LES/LESModel/LESModel.C | 51 ------ .../compressible/LES/LESModel/LESModel.H | 10 -- .../compressible/RAS/RASModel/RASModel.C | 50 ------ .../compressible/RAS/RASModel/RASModel.H | 9 - .../compressible/RAS/laminar/laminar.C | 44 ----- .../compressible/RAS/laminar/laminar.H | 9 - .../compressible/turbulenceModel/Make/files | 1 - .../dissipationSelector/dissipationSelector.C | 111 ------------ .../dissipationSelector/dissipationSelector.H | 158 ------------------ .../turbulenceModel/laminar/laminar.C | 44 ----- .../turbulenceModel/laminar/laminar.H | 9 - .../turbulenceModel/turbulenceModel.H | 9 - .../incompressible/LES/LESModel/LESModel.C | 50 ------ .../incompressible/LES/LESModel/LESModel.H | 9 - .../incompressible/RAS/RASModel/RASModel.C | 49 ------ .../incompressible/RAS/RASModel/RASModel.H | 9 - .../incompressible/RAS/laminar/laminar.C | 44 ----- .../incompressible/RAS/laminar/laminar.H | 9 - .../incompressible/turbulenceModel/Make/files | 1 - .../dissipationSelector/dissipationSelector.C | 111 ------------ .../dissipationSelector/dissipationSelector.H | 158 ------------------ .../turbulenceModel/laminar/laminar.C | 44 ----- .../turbulenceModel/laminar/laminar.H | 9 - .../turbulenceModel/turbulenceModel.H | 9 - 24 files changed, 1007 deletions(-) delete mode 100644 src/turbulenceModels/compressible/turbulenceModel/dissipationSelector/dissipationSelector.C delete mode 100644 src/turbulenceModels/compressible/turbulenceModel/dissipationSelector/dissipationSelector.H delete mode 100644 src/turbulenceModels/incompressible/turbulenceModel/dissipationSelector/dissipationSelector.C delete mode 100644 src/turbulenceModels/incompressible/turbulenceModel/dissipationSelector/dissipationSelector.H diff --git a/src/turbulenceModels/compressible/LES/LESModel/LESModel.C b/src/turbulenceModels/compressible/LES/LESModel/LESModel.C index 2f35a8bfd2..7301318b16 100644 --- a/src/turbulenceModels/compressible/LES/LESModel/LESModel.C +++ b/src/turbulenceModels/compressible/LES/LESModel/LESModel.C @@ -76,7 +76,6 @@ LESModel::LESModel ) ), - turbulence_(true), // TODO: turbulence_(lookup("turbulence")), printCoeffs_(lookupOrDefault("printCoeffs", false)), coeffDict_(subDictPtr(type + "Coeffs")), @@ -181,56 +180,6 @@ autoPtr LESModel::New // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp LESModel::thermalDissipation() const -{ - tmp tgradU = fvc::grad(this->U()); - - return tmp - ( - new volScalarField - ( - IOobject - ( - "thermalDissipation", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - - ( - ( this->mu()*dev(twoSymm(tgradU())) ) && tgradU() - ) - - this->rho() * this->epsilon() - ) - ); -} - - -tmp LESModel::thermalDissipationEquilibrium() const -{ - tmp tgradU = fvc::grad(this->U()); - - return tmp - ( - new volScalarField - ( - IOobject - ( - "thermalDissipationEquilibrium", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - - ( - this->muEff()*dev(twoSymm(tgradU())) - - ((2.0/3.0)*I) * this->rho() * this->k() - ) && tgradU() - ) - ); -} - - void LESModel::correct(const tmp&) { delta_().correct(); diff --git a/src/turbulenceModels/compressible/LES/LESModel/LESModel.H b/src/turbulenceModels/compressible/LES/LESModel/LESModel.H index 8808c1e41a..3012b4124a 100644 --- a/src/turbulenceModels/compressible/LES/LESModel/LESModel.H +++ b/src/turbulenceModels/compressible/LES/LESModel/LESModel.H @@ -80,7 +80,6 @@ protected: // Protected data - Switch turbulence_; Switch printCoeffs_; dictionary coeffDict_; @@ -293,15 +292,6 @@ public: } - //- The source for the enthalpy equation resulting from - // viscous and turbulent dissipation - virtual tmp thermalDissipation() const; - - //- The source for the enthalpy equation resulting from - // the effective viscous dissipation - // (ie, when turbulent production and dissipation are in equilibrium) - virtual tmp thermalDissipationEquilibrium() const; - //- Correct Eddy-Viscosity and related properties. // This calls correct(const tmp& gradU) by supplying // gradU calculated locally. diff --git a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C index 9ce1db5ef9..5d46b78788 100644 --- a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C +++ b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C @@ -191,56 +191,6 @@ autoPtr RASModel::New // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp RASModel::thermalDissipation() const -{ - tmp tgradU = fvc::grad(this->U()); - - return tmp - ( - new volScalarField - ( - IOobject - ( - "thermalDissipation", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - - ( - ( this->mu()*dev(twoSymm(tgradU())) ) && tgradU() - ) - - this->rho() * this->epsilon() - ) - ); -} - - -tmp RASModel::thermalDissipationEquilibrium() const -{ - tmp tgradU = fvc::grad(this->U()); - - return tmp - ( - new volScalarField - ( - IOobject - ( - "thermalDissipationEquilibrium", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - - ( - this->muEff()*dev(twoSymm(tgradU())) - - ((2.0/3.0)*I) * this->rho() * this->k() - ) && tgradU() - ) - ); -} - - scalar RASModel::yPlusLam(const scalar kappa, const scalar E) const { scalar ypl = 11.0; diff --git a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H index 0e27f72924..7c787d8ceb 100644 --- a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H +++ b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.H @@ -345,15 +345,6 @@ public: //- Return the source term for the momentum equation virtual tmp divDevRhoReff(volVectorField& U) const = 0; - //- The source for the enthalpy equation resulting from - // viscous and turbulent dissipation - virtual tmp thermalDissipation() const; - - //- The source for the enthalpy equation resulting from - // the effective viscous dissipation - // (ie, when turbulent production and dissipation are in equilibrium) - virtual tmp thermalDissipationEquilibrium() const; - //- Return yPlus for the given patch virtual tmp yPlus(const label patchI) const; diff --git a/src/turbulenceModels/compressible/RAS/laminar/laminar.C b/src/turbulenceModels/compressible/RAS/laminar/laminar.C index a2ec1a7f3b..415dedee72 100644 --- a/src/turbulenceModels/compressible/RAS/laminar/laminar.C +++ b/src/turbulenceModels/compressible/RAS/laminar/laminar.C @@ -177,50 +177,6 @@ tmp laminar::divDevRhoReff(volVectorField& U) const } -tmp laminar::thermalDissipation() const -{ - tmp tgradU = fvc::grad(this->U()); - - return tmp - ( - new volScalarField - ( - IOobject - ( - "thermalDissipation", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - - ( this->mu()*dev(twoSymm(tgradU())) ) && tgradU() - ) - ); -} - - -tmp laminar::thermalDissipationEquilibrium() const -{ - tmp tgradU = fvc::grad(this->U()); - - return tmp - ( - new volScalarField - ( - IOobject - ( - "thermalDissipationEquilibrium", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - - ( this->mu()*dev(twoSymm(tgradU())) ) && tgradU() - ) - ); -} - - bool laminar::read() { return RASModel::read(); diff --git a/src/turbulenceModels/compressible/RAS/laminar/laminar.H b/src/turbulenceModels/compressible/RAS/laminar/laminar.H index f58db6c9e4..227bddf11a 100644 --- a/src/turbulenceModels/compressible/RAS/laminar/laminar.H +++ b/src/turbulenceModels/compressible/RAS/laminar/laminar.H @@ -112,15 +112,6 @@ public: //- Return the source term for the momentum equation virtual tmp divDevRhoReff(volVectorField& U) const; - //- The source for the enthalpy equation resulting from - // viscous and turbulent dissipation - virtual tmp thermalDissipation() const; - - //- The source for the enthalpy equation resulting from - // the effective viscous dissipation - // (ie, when turbulent production and dissipation are in equilibrium) - virtual tmp thermalDissipationEquilibrium() const; - //- Correct the laminar viscosity virtual void correct(); diff --git a/src/turbulenceModels/compressible/turbulenceModel/Make/files b/src/turbulenceModels/compressible/turbulenceModel/Make/files index d105907440..3f01b20354 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/Make/files +++ b/src/turbulenceModels/compressible/turbulenceModel/Make/files @@ -1,5 +1,4 @@ turbulenceModel.C laminar/laminar.C -dissipationSelector/dissipationSelector.C LIB = $(FOAM_LIBBIN)/libcompressibleTurbulenceModel diff --git a/src/turbulenceModels/compressible/turbulenceModel/dissipationSelector/dissipationSelector.C b/src/turbulenceModels/compressible/turbulenceModel/dissipationSelector/dissipationSelector.C deleted file mode 100644 index c15dc89b15..0000000000 --- a/src/turbulenceModels/compressible/turbulenceModel/dissipationSelector/dissipationSelector.C +++ /dev/null @@ -1,111 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2 of the License, or (at your - option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "dissipationSelector.H" -#include "dictionary.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace compressible -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -template<> -const char* NamedEnum::names[] = -{ - "none", - "cascade", - "equilibrium" -}; - -const NamedEnum - dissipationSelector::typeNames; - - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - - -dissipationSelector::dissipationSelector -( - const turbulenceModel& turbModel, - const treatment treatmentType -) -: - turbModel_(turbModel), - treatment_(treatmentType) -{} - - -dissipationSelector::dissipationSelector -( - const turbulenceModel& turbModel, - const dictionary& dict -) -: - turbModel_(turbModel), - treatment_(none) -{ - - word modelType; - - if (dict.readIfPresent("dissipation", modelType)) - { - treatment_ = typeNames[modelType]; - } -} - - -tmp -dissipationSelector::dissipation() const -{ - if (treatment_ == cascade) - { - return turbModel_.thermalDissipation(); - } - else if (treatment_ == equilibrium) - { - return turbModel_.thermalDissipationEquilibrium(); - } - else - { - // a bit wasteful, but we'll avoid it with 'enabled' query anyhow - tmp tField = turbModel_.thermalDissipation(); - tField() = 0.0; - - return tField; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/turbulenceModel/dissipationSelector/dissipationSelector.H b/src/turbulenceModels/compressible/turbulenceModel/dissipationSelector/dissipationSelector.H deleted file mode 100644 index c1b440e4b6..0000000000 --- a/src/turbulenceModels/compressible/turbulenceModel/dissipationSelector/dissipationSelector.H +++ /dev/null @@ -1,158 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2 of the License, or (at your - option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - Foam::compressible::dissipationSelector - -Description - Simplistic runtime selectable handling of thermal dissipation - - Example use: - @code - dissipationSelector thermalDissipation(turbulence, dictionary); - - fvScalarMatrix hEqn ( ... ); - - if (thermalDissipation.enabled()) - { - hEqn += thermalDissipation.dissipation(); - } - @endcode - -SourceFiles - dissipationSelector.C - -\*---------------------------------------------------------------------------*/ - -#ifndef compressibledissipationSelector_H -#define compressibledissipationSelector_H - -#include "NamedEnum.H" -#include "dictionary.H" -#include "compressible/turbulenceModel/turbulenceModel.H" -#include "volFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -namespace compressible -{ - -/*---------------------------------------------------------------------------*\ - Class dissipationSelector Declaration -\*---------------------------------------------------------------------------*/ - -class dissipationSelector -{ - -public: - - //- Type of treatment - enum treatment - { - none, - cascade, - equilibrium - }; - - static const NamedEnum typeNames; - -protected: - - // Protected data - - const turbulenceModel& turbModel_; - - //- Type of treatment - treatment treatment_; - -public: - - // Declare name of the class and its debug switch - ClassName("dissipationSelector"); - - - // Constructors - - //- Construct given treatment type - dissipationSelector - ( - const turbulenceModel&, - const treatment = none - ); - - //- Construct given treatment type - dissipationSelector - ( - const turbulenceModel&, - const dictionary& - ); - - - // Member functions - - //- Get the treatment type - treatment treatmentType() const - { - return treatment_; - } - - //- Set the treatment type, return old value - treatment treatmentType(const treatment val) - { - treatment old = treatment_; - treatment_ = val; - return old; - } - - - //- Set the treatment type, return old value - const char* name() const - { - return typeNames[treatment_]; - } - - //- Set the treatment type, return old value - bool enabled() const - { - return treatment_ != none; - } - - tmp dissipation() const; - -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace compressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.C b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.C index 74b6b5fb06..4a391c3db5 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.C +++ b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.C @@ -195,50 +195,6 @@ tmp laminar::divDevRhoReff(volVectorField& U) const } -tmp laminar::thermalDissipation() const -{ - tmp tgradU = fvc::grad(this->U()); - - return tmp - ( - new volScalarField - ( - IOobject - ( - "thermalDissipation", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - - ( this->mu()*dev(twoSymm(tgradU())) ) && tgradU() - ) - ); -} - - -tmp laminar::thermalDissipationEquilibrium() const -{ - tmp tgradU = fvc::grad(this->U()); - - return tmp - ( - new volScalarField - ( - IOobject - ( - "thermalDissipationEquilibrium", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - - ( this->mu()*dev(twoSymm(tgradU())) ) && tgradU() - ) - ); -} - - bool laminar::read() { return true; diff --git a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H index 6bd3c5bdfa..5bdfa3dac7 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H +++ b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H @@ -122,15 +122,6 @@ public: //- Return the source term for the momentum equation virtual tmp divDevRhoReff(volVectorField& U) const; - //- The source for the enthalpy equation resulting from - // viscous and turbulent dissipation - virtual tmp thermalDissipation() const; - - //- The source for the enthalpy equation resulting from - // the effective viscous dissipation - // (ie, when turbulent production and dissipation are in equilibrium) - virtual tmp thermalDissipationEquilibrium() const; - //- Correct the laminar viscosity virtual void correct(); diff --git a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H index 8c80b4ab57..97638e5e49 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H +++ b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H @@ -210,15 +210,6 @@ public: //- Return the source term for the momentum equation virtual tmp divDevRhoReff(volVectorField& U) const = 0; - //- The source for the enthalpy equation resulting from - // viscous and turbulent dissipation - virtual tmp thermalDissipation() const = 0; - - //- The source for the enthalpy equation resulting from - // the effective viscous dissipation - // (ie, when turbulent production and dissipation are in equilibrium) - virtual tmp thermalDissipationEquilibrium() const = 0; - //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct() = 0; diff --git a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C index fd755e8ea0..3e3c952ffc 100644 --- a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C +++ b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C @@ -139,56 +139,6 @@ autoPtr LESModel::New // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp LESModel::thermalDissipation() const -{ - tmp tgradU = fvc::grad(this->U()); - - return tmp - ( - new volScalarField - ( - IOobject - ( - "thermalDissipation", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - - ( - ( this->nu()*dev(twoSymm(tgradU())) ) && tgradU() - ) - - this->epsilon() - ) - ); -} - - -tmp LESModel::thermalDissipationEquilibrium() const -{ - tmp tgradU = fvc::grad(this->U()); - - return tmp - ( - new volScalarField - ( - IOobject - ( - "thermalDissipationEquilibrium", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - - ( - this->nuEff()*dev(twoSymm(tgradU())) - - ((2.0/3.0)*I) * this->k() - ) && tgradU() - ) - ); -} - - void LESModel::correct(const tmp&) { turbulenceModel::correct(); diff --git a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H index 620d4f0f55..49fe52c454 100644 --- a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H +++ b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.H @@ -241,15 +241,6 @@ public: } - //- The source for the enthalpy equation resulting from - // viscous and turbulent dissipation - virtual tmp thermalDissipation() const; - - //- The source for the enthalpy equation resulting from - // the effective viscous dissipation - // (ie, when turbulent production and dissipation are in equilibrium) - virtual tmp thermalDissipationEquilibrium() const; - //- Correct Eddy-Viscosity and related properties. // This calls correct(const tmp& gradU) by supplying // gradU calculated locally. diff --git a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C index 4d1d58db70..620a3fe2af 100644 --- a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C +++ b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C @@ -176,55 +176,6 @@ autoPtr RASModel::New // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -tmp RASModel::thermalDissipation() const -{ - tmp tgradU = fvc::grad(this->U()); - - return tmp - ( - new volScalarField - ( - IOobject - ( - "thermalDissipation", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - - ( - ( this->nu()*dev(twoSymm(tgradU())) ) && tgradU() - ) - - this->epsilon() - ) - ); -} - - -tmp RASModel::thermalDissipationEquilibrium() const -{ - tmp tgradU = fvc::grad(this->U()); - - return tmp - ( - new volScalarField - ( - IOobject - ( - "thermalDissipationEquilibrium", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - - ( - this->nuEff()*dev(twoSymm(tgradU())) - - ((2.0/3.0)*I) * this->k() - ) && tgradU() - ) - ); -} - scalar RASModel::yPlusLam(const scalar kappa, const scalar E) const { diff --git a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.H b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.H index 4d895ea53f..fdc2b2e3b7 100644 --- a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.H +++ b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.H @@ -326,15 +326,6 @@ public: //- Return the source term for the momentum equation virtual tmp divDevReff(volVectorField& U) const = 0; - //- The source for the enthalpy equation resulting from - // viscous and turbulent dissipation - virtual tmp thermalDissipation() const; - - //- The source for the enthalpy equation resulting from - // the effective viscous dissipation - // (ie, when turbulent production and dissipation are in equilibrium) - virtual tmp thermalDissipationEquilibrium() const; - //- Return yPlus for the given patch virtual tmp yPlus(const label patchI) const; diff --git a/src/turbulenceModels/incompressible/RAS/laminar/laminar.C b/src/turbulenceModels/incompressible/RAS/laminar/laminar.C index a58d944196..6f400a1c9a 100644 --- a/src/turbulenceModels/incompressible/RAS/laminar/laminar.C +++ b/src/turbulenceModels/incompressible/RAS/laminar/laminar.C @@ -176,50 +176,6 @@ tmp laminar::divDevReff(volVectorField& U) const } -tmp laminar::thermalDissipation() const -{ - tmp tgradU = fvc::grad(this->U()); - - return tmp - ( - new volScalarField - ( - IOobject - ( - "thermalDissipation", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - - ( this->nu()*dev(twoSymm(tgradU())) ) && tgradU() - ) - ); -} - - -tmp laminar::thermalDissipationEquilibrium() const -{ - tmp tgradU = fvc::grad(this->U()); - - return tmp - ( - new volScalarField - ( - IOobject - ( - "thermalDissipationEquilibrium", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - - ( this->nu()*dev(twoSymm(tgradU())) ) && tgradU() - ) - ); -} - - bool laminar::read() { return RASModel::read(); diff --git a/src/turbulenceModels/incompressible/RAS/laminar/laminar.H b/src/turbulenceModels/incompressible/RAS/laminar/laminar.H index 7bb4ba1b7b..0169127eeb 100644 --- a/src/turbulenceModels/incompressible/RAS/laminar/laminar.H +++ b/src/turbulenceModels/incompressible/RAS/laminar/laminar.H @@ -104,15 +104,6 @@ public: //- Return the source term for the momentum equation virtual tmp divDevReff(volVectorField& U) const; - //- The source for the enthalpy equation resulting from - // viscous and turbulent dissipation - virtual tmp thermalDissipation() const; - - //- The source for the enthalpy equation resulting from - // the effective viscous dissipation - // (ie, when turbulent production and dissipation are in equilibrium) - virtual tmp thermalDissipationEquilibrium() const; - //- Correct the laminar viscosity virtual void correct(); diff --git a/src/turbulenceModels/incompressible/turbulenceModel/Make/files b/src/turbulenceModels/incompressible/turbulenceModel/Make/files index 1133b2aaab..a77efed2ab 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/Make/files +++ b/src/turbulenceModels/incompressible/turbulenceModel/Make/files @@ -1,5 +1,4 @@ turbulenceModel.C laminar/laminar.C -dissipationSelector/dissipationSelector.C LIB = $(FOAM_LIBBIN)/libincompressibleTurbulenceModel diff --git a/src/turbulenceModels/incompressible/turbulenceModel/dissipationSelector/dissipationSelector.C b/src/turbulenceModels/incompressible/turbulenceModel/dissipationSelector/dissipationSelector.C deleted file mode 100644 index d9318d2a82..0000000000 --- a/src/turbulenceModels/incompressible/turbulenceModel/dissipationSelector/dissipationSelector.C +++ /dev/null @@ -1,111 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2 of the License, or (at your - option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -\*---------------------------------------------------------------------------*/ - -#include "dissipationSelector.H" -#include "dictionary.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace incompressible -{ - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -template<> -const char* NamedEnum::names[] = -{ - "none", - "cascade", - "equilibrium" -}; - -const NamedEnum - dissipationSelector::typeNames; - - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - - -dissipationSelector::dissipationSelector -( - const turbulenceModel& turbModel, - const treatment treatmentType -) -: - turbModel_(turbModel), - treatment_(treatmentType) -{} - - -dissipationSelector::dissipationSelector -( - const turbulenceModel& turbModel, - const dictionary& dict -) -: - turbModel_(turbModel), - treatment_(none) -{ - - word modelType; - - if (dict.readIfPresent("dissipation", modelType)) - { - treatment_ = typeNames[modelType]; - } -} - - -tmp -dissipationSelector::dissipation() const -{ - if (treatment_ == cascade) - { - return turbModel_.thermalDissipation(); - } - else if (treatment_ == equilibrium) - { - return turbModel_.thermalDissipationEquilibrium(); - } - else - { - // a bit wasteful, but we'll avoid it with 'enabled' query anyhow - tmp tField = turbModel_.thermalDissipation(); - tField() = 0.0; - - return tField; - } -} - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/turbulenceModel/dissipationSelector/dissipationSelector.H b/src/turbulenceModels/incompressible/turbulenceModel/dissipationSelector/dissipationSelector.H deleted file mode 100644 index 9f2426c518..0000000000 --- a/src/turbulenceModels/incompressible/turbulenceModel/dissipationSelector/dissipationSelector.H +++ /dev/null @@ -1,158 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. - \\/ M anipulation | -------------------------------------------------------------------------------- -License - This file is part of OpenFOAM. - - OpenFOAM is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2 of the License, or (at your - option) any later version. - - OpenFOAM is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - for more details. - - You should have received a copy of the GNU General Public License - along with OpenFOAM; if not, write to the Free Software Foundation, - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -Class - Foam::incompressible::dissipationSelector - -Description - Simplistic runtime selectable handling of thermal dissipation - - Example use: - @code - dissipationSelector thermalDissipation(turbulence, dictionary); - - fvScalarMatrix hEqn ( ... ); - - if (thermalDissipation.enabled()) - { - hEqn += thermalDissipation.dissipation(); - } - @endcode - -SourceFiles - dissipationSelector.C - -\*---------------------------------------------------------------------------*/ - -#ifndef dissipationSelector_H -#define dissipationSelector_H - -#include "NamedEnum.H" -#include "dictionary.H" -#include "incompressible/turbulenceModel/turbulenceModel.H" -#include "volFields.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - -namespace incompressible -{ - -/*---------------------------------------------------------------------------*\ - Class dissipationSelector Declaration -\*---------------------------------------------------------------------------*/ - -class dissipationSelector -{ - -public: - - //- Type of treatment - enum treatment - { - none, - cascade, - equilibrium - }; - - static const NamedEnum typeNames; - -protected: - - // Protected data - - const turbulenceModel& turbModel_; - - //- Type of treatment - treatment treatment_; - -public: - - // Declare name of the class and its debug switch - ClassName("dissipationSelector"); - - - // Constructors - - //- Construct given treatment type - dissipationSelector - ( - const turbulenceModel&, - const treatment = none - ); - - //- Construct given treatment type - dissipationSelector - ( - const turbulenceModel&, - const dictionary& - ); - - - // Member functions - - //- Get the treatment type - treatment treatmentType() const - { - return treatment_; - } - - //- Set the treatment type, return old value - treatment treatmentType(const treatment val) - { - treatment old = treatment_; - treatment_ = val; - return old; - } - - - //- Set the treatment type, return old value - const char* name() const - { - return typeNames[treatment_]; - } - - //- Set the treatment type, return old value - bool enabled() const - { - return treatment_ != none; - } - - tmp dissipation() const; - -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace incompressible -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // diff --git a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C index 93fdbc813d..f1dca5b4ad 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C +++ b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.C @@ -199,50 +199,6 @@ tmp laminar::divDevReff(volVectorField& U) const } -tmp laminar::thermalDissipation() const -{ - tmp tgradU = fvc::grad(this->U()); - - return tmp - ( - new volScalarField - ( - IOobject - ( - "thermalDissipation", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - - ( this->nu()*dev(twoSymm(tgradU())) ) && tgradU() - ) - ); -} - - -tmp laminar::thermalDissipationEquilibrium() const -{ - tmp tgradU = fvc::grad(this->U()); - - return tmp - ( - new volScalarField - ( - IOobject - ( - "thermalDissipationEquilibrium", - runTime_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - - ( this->nu()*dev(twoSymm(tgradU())) ) && tgradU() - ) - ); -} - - bool laminar::read() { return true; diff --git a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.H b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.H index ba0c59201c..51eef7c436 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.H +++ b/src/turbulenceModels/incompressible/turbulenceModel/laminar/laminar.H @@ -110,15 +110,6 @@ public: //- Return the source term for the momentum equation virtual tmp divDevReff(volVectorField& U) const; - //- The source for the enthalpy equation resulting from - // viscous and turbulent dissipation - virtual tmp thermalDissipation() const; - - //- The source for the enthalpy equation resulting from - // the effective viscous dissipation - // (ie, when turbulent production and dissipation are in equilibrium) - virtual tmp thermalDissipationEquilibrium() const; - //- Correct the laminar viscosity virtual void correct(); diff --git a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H index d6fa7f2ca2..1474e5dfa3 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H +++ b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.H @@ -190,15 +190,6 @@ public: //- Return the source term for the momentum equation virtual tmp divDevReff(volVectorField& U) const = 0; - //- The source for the enthalpy equation resulting from - // viscous and turbulent dissipation - virtual tmp thermalDissipation() const = 0; - - //- The source for the enthalpy equation resulting from - // the effective viscous dissipation - // (ie, when turbulent production and dissipation are in equilibrium) - virtual tmp thermalDissipationEquilibrium() const = 0; - //- Solve the turbulence equations and correct the turbulence viscosity virtual void correct() = 0; From 19d09fd3b569c5fec78d082afdb978128d51decf Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Thu, 16 Jul 2009 08:35:35 +0200 Subject: [PATCH 18/21] laminar models: consistency update in #ifndef/#define naming --- .../kQRWallFunction/kQRWallFunctionFvPatchField.C | 4 ++-- src/turbulenceModels/compressible/RAS/laminar/laminar.H | 4 ++-- .../compressible/turbulenceModel/laminar/laminar.H | 4 ++-- src/turbulenceModels/incompressible/LES/laminar/laminar.H | 4 ++-- src/turbulenceModels/incompressible/RAS/laminar/laminar.H | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchField.C index d0d1d1ef35..8286c1b149 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kQRWallFunctions/kQRWallFunction/kQRWallFunctionFvPatchField.C @@ -51,8 +51,8 @@ void kQRWallFunctionFvPatchField::checkType() << "Invalid wall function specification" << nl << " Patch type for patch " << this->patch().name() << " must be wall" << nl - << " Current patch type is " << this->patch().type() - << nl << endl << abort(FatalError); + << " Current patch type is " << this->patch().type() << nl << endl + << abort(FatalError); } } diff --git a/src/turbulenceModels/compressible/RAS/laminar/laminar.H b/src/turbulenceModels/compressible/RAS/laminar/laminar.H index 227bddf11a..af1f5e2bb2 100644 --- a/src/turbulenceModels/compressible/RAS/laminar/laminar.H +++ b/src/turbulenceModels/compressible/RAS/laminar/laminar.H @@ -33,8 +33,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef compressibleLaminar_H -#define compressibleLaminar_H +#ifndef compressibleRasLaminar_H +#define compressibleRasLaminar_H #include "RASModel.H" diff --git a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H index 5bdfa3dac7..d4379bfb2e 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H +++ b/src/turbulenceModels/compressible/turbulenceModel/laminar/laminar.H @@ -33,8 +33,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef laminar_H -#define laminar_H +#ifndef compressibleLaminar_H +#define compressibleLaminar_H #include "turbulenceModel.H" diff --git a/src/turbulenceModels/incompressible/LES/laminar/laminar.H b/src/turbulenceModels/incompressible/LES/laminar/laminar.H index 45500d6172..b428f102ab 100644 --- a/src/turbulenceModels/incompressible/LES/laminar/laminar.H +++ b/src/turbulenceModels/incompressible/LES/laminar/laminar.H @@ -34,8 +34,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef laminar_H -#define laminar_H +#ifndef lesLaminar_H +#define lesLaminar_H #include "LESModel.H" #include "volFields.H" diff --git a/src/turbulenceModels/incompressible/RAS/laminar/laminar.H b/src/turbulenceModels/incompressible/RAS/laminar/laminar.H index 0169127eeb..8b328addf0 100644 --- a/src/turbulenceModels/incompressible/RAS/laminar/laminar.H +++ b/src/turbulenceModels/incompressible/RAS/laminar/laminar.H @@ -33,8 +33,8 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef laminar_H -#define laminar_H +#ifndef rasLaminar_H +#define rasLaminar_H #include "RASModel.H" From 375e968bd1411477b9f0bcd78a6be5c0bd76aa53 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Thu, 16 Jul 2009 09:56:54 +0200 Subject: [PATCH 19/21] fixup foamPack* scripts - handle ThirdParty-VERSION properly - handle wmake/utilbin/ location - should the wmake/rules/* really be packed with a binary distribution? I think this is just left over from before. --- .gitignore | 4 --- bin/foamPack | 7 +++-- bin/foamPackBin | 56 +++++++++++++++++++---------------- bin/foamPackBinAll | 6 ++-- bin/foamPackDoxygen | 20 ++++++------- bin/foamPackGeneral | 12 ++++---- bin/foamPackSource | 39 +++++++++++++----------- bin/foamPackThirdPartyBin | 37 +++++++++++++---------- bin/foamPackThirdPartyGeneral | 15 +++++----- 9 files changed, 105 insertions(+), 91 deletions(-) diff --git a/.gitignore b/.gitignore index a95cd603ba..b124c8d887 100644 --- a/.gitignore +++ b/.gitignore @@ -41,10 +41,6 @@ SunOS*Gcc*/ # reinstate wmake/rules that might look like build folders !wmake/rules/*/ -# but do continue to ignore the derived wmake files -wmake/rules/*/dirToString -wmake/rules/*/wmkdep - # doxygen generated documentation doc/[Dd]oxygen/html doc/[Dd]oxygen/latex diff --git a/bin/foamPack b/bin/foamPack index 5f42ebbb2b..3f35f5b57d 100755 --- a/bin/foamPack +++ b/bin/foamPack @@ -86,9 +86,10 @@ find -H $packDir \ -a ! -name "log[0-9]*" \ -a ! -name "so_locations" \ | sed \ - -e "\@$packDir/.git/@d" \ -e "\@$packDir/lib/@d" \ - -e '\@applications/bin/@d' \ + -e '\@/\.git/@d' \ + -e '\@applications/bin/@d' \ + -e '\@wmake/utilbin/@d' \ -e '\@/t/@d' \ -e '\@Make[.A-Za-z]*/[^/]*/@d' \ -e '\@doc/[Dd]oxygen/html@d' \ @@ -100,7 +101,7 @@ find -H $packDir \ tar czpf $packFile --files-from $tmpFile -if [ $? = 0 ] +if [ $? -eq 0 ] then echo "Finished packing and compressing $packDir into file $packFile" else diff --git a/bin/foamPackBin b/bin/foamPackBin index 00ef0c5af3..5a60b405a9 100755 --- a/bin/foamPackBin +++ b/bin/foamPackBin @@ -33,14 +33,17 @@ if [ $# -eq 0 ] then - echo "Error: architecture type expected, exiting" - echo - echo "Usage : ${0##*/} [outputDir]" - echo - exit 1 + echo "Error: architecture type expected, exiting" + echo + echo "Usage : ${0##*/} [outputDir]" + echo + exit 1 fi arch=$1 +# base arch (w/o precision, optimization, etc) +baseArch=$(echo "$arch" | sed -e 's@[DS]P.*$@@') + timeStamp=$(date +%Y-%m-%d) packDir=$WM_PROJECT-$WM_PROJECT_VERSION packFile=${packDir}.${arch}_${timeStamp}.gtgz @@ -48,49 +51,50 @@ packFile=${packDir}.${arch}_${timeStamp}.gtgz # add optional output directory if [ -d "$2" ] then - packFile="$2/$packFile" + packFile="$2/$packFile" fi if [ -f $packFile ] then - echo "Error: $packFile already exists" - exit 1 + echo "Error: $packFile already exists" + exit 1 fi # check for essential directories for dir in $packDir $packDir/lib/$arch $packDir/applications/bin/$arch do - if [ ! -d $dir ] - then - echo "Error: directory $dir does not exist" - exit 1 - fi + if [ ! -d $dir ] + then + echo "Error: directory $dir does not exist" + exit 1 + fi done # get list of directories dirList=$( - for dir in \ - $packDir/lib/$arch \ - $packDir/applications/bin/$arch \ - $packDir/wmake/rules \ - ; - do - [ -d $dir ] && echo $dir - done + for dir in \ + $packDir/lib/$arch \ + $packDir/applications/bin/$arch \ + $packDir/wmake/rules \ + $packDir/wmake/utilbin/$baseArch \ + ; + do + [ -d $dir ] && echo $dir + done ) echo -echo "Packing $arch port of $packDir into $packFile" +echo "Packing $arch ($baseArch) port of $packDir into $packFile" echo tar czpf $packFile $dirList -if [ $? = 0 ] +if [ $? -eq 0 ] then - echo "Finished packing and compressing file $packFile" + echo "Finished packing and compressing file $packFile" else - echo "Error: failure packing $packFile" - rm -f $packFile 2>/dev/null + echo "Error: failure packing $packFile" + rm -f $packFile 2>/dev/null fi #------------------------------------------------------------------------------ diff --git a/bin/foamPackBinAll b/bin/foamPackBinAll index 01555787cb..57673e9803 100755 --- a/bin/foamPackBinAll +++ b/bin/foamPackBinAll @@ -34,14 +34,14 @@ packDir=$WM_PROJECT-$WM_PROJECT_VERSION if [ ! -d $packDir ] then - echo "Error: directory $packDir does not exist" - exit 1 + echo "Error: directory $packDir does not exist" + exit 1 fi # obtain arch types from lib/ for bin in $packDir/lib/* do - foamPackBin ${bin##*/} $@ + foamPackBin ${bin##*/} $@ done #------------------------------------------------------------------------------ diff --git a/bin/foamPackDoxygen b/bin/foamPackDoxygen index efdcdacc09..4503470846 100755 --- a/bin/foamPackDoxygen +++ b/bin/foamPackDoxygen @@ -41,7 +41,7 @@ Usage: ${0##*/} [-prefix DIR] [-o outputDir] Packs and compresses the OpenFOAM doxygen html for release USAGE - exit 1 + exit 1 } unset prefix outputDir @@ -87,16 +87,16 @@ fi # if [ -d "$outputDir" ] then - packFile="$outputDir/$packDir$packTag" + packFile="$outputDir/$packDir$packTag" else - packFile="$packDir$packTag" + packFile="$packDir$packTag" fi if [ -f $packFile ] then - echo "Error: $packFile already exists" - exit 1 + echo "Error: $packFile already exists" + exit 1 fi # Pack and compress the packFile using GNU tar @@ -107,16 +107,16 @@ echo if [ -n "$prefix" ] then - tar czpf $packFile --transform="s@^@$prefix/@" doc/Doxygen/html + tar czpf $packFile --transform="s@^@$prefix/@" doc/Doxygen/html else - tar czpf $packFile $packDir/doc/Doxygen/html + tar czpf $packFile $packDir/doc/Doxygen/html fi -if [ $? = 0 ] +if [ $? -eq 0 ] then - echo "Finished packing doxygen html into file $packFile" + echo "Finished packing doxygen html into file $packFile" else - echo "Error: failure packing doxygen html file $packFile" + echo "Error: failure packing doxygen html file $packFile" fi #------------------------------------------------------------------------------ diff --git a/bin/foamPackGeneral b/bin/foamPackGeneral index 3da4197226..e55d834bce 100755 --- a/bin/foamPackGeneral +++ b/bin/foamPackGeneral @@ -37,20 +37,20 @@ packFile=${packDir}.General_${timeStamp}.gtgz if [ ! -d $packDir ] then - echo "Error: directory $packDir does not exist" - exit 1 + echo "Error: directory $packDir does not exist" + exit 1 fi # add optional output directory if [ -d "$1" ] then - packFile="$1/$packFile" + packFile="$1/$packFile" fi if [ -f $packFile ] then - echo "Error: $packFile already exists" - exit 1 + echo "Error: $packFile already exists" + exit 1 fi # Create time stamp file @@ -62,7 +62,7 @@ echo $timeStamp 2>/dev/null > $packDir/.timeStamp # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo -echo "Packing $packDir into $packFile" +echo "Packing $packDir source files into $packFile" echo foamPackSource $packDir $packFile diff --git a/bin/foamPackSource b/bin/foamPackSource index c4d0fc7eb4..b5e34c8a04 100755 --- a/bin/foamPackSource +++ b/bin/foamPackSource @@ -35,12 +35,12 @@ tmpFile=${TMPDIR:-/tmp}/foamPackFiles.$$ if [ $# -ne 2 ] then - echo "Usage : ${0##*/} directory tarFile" - echo "" - echo "Packs all .C and .H files and Make/options and Make/files into" - echo "" - echo "" - exit 1 + echo "Usage : ${0##*/} directory tarFile" + echo "" + echo "Packs all .C and .H files and Make/options and Make/files into" + echo "" + echo "" + exit 1 fi # canonical form (no double and no trailing dashes) @@ -49,14 +49,14 @@ packFile=$2 if [ ! -d $packDir ] then - echo "Error: directory $packDir does not exist" - exit 1 + echo "Error: directory $packDir does not exist" + exit 1 fi if [ -f $packFile ] then - echo "Error: $packFile already exists" - exit 1 + echo "Error: $packFile already exists" + exit 1 fi # Clean up on termination and on Ctrl-C @@ -78,24 +78,29 @@ find -H $packDir \ -a ! -name "log[0-9]*" \ -a ! -name "libccmio*" \ | sed \ - -e "\@$packDir/.git/@d" \ - -e "\@/.tags/@d" \ -e "\@$packDir/lib/@d" \ - -e "\@libccmio.*/@d" \ + -e '\@/\.git/@d' \ + -e '\@/\.tags/@d' \ -e '\@applications/bin/@d' \ + -e '\@wmake/utilbin/@d' \ -e '\@/t/@d' \ -e '\@/Make[.A-Za-z]*/[^/]*/@d'\ -e '\@/platforms/@d' \ + -e '\@libccmio.*/@d' \ > $tmpFile + +# provide some feedback +wc $tmpFile | awk '{print "Packing",$1,"files - this could take some time ..."}' + tar czpf $packFile --files-from $tmpFile -if [ $? = 0 ] +if [ $? -eq 0 ] then - echo "Finished packing and compressing $packDir into file $packFile" + echo "Finished packing and compressing $packDir into file $packFile" else - echo "Error: failure packing $packDir into file $packFile" - rm -f $packFile 2>/dev/null + echo "Error: failure packing $packDir into file $packFile" + rm -f $packFile 2>/dev/null fi #------------------------------------------------------------------------------ diff --git a/bin/foamPackThirdPartyBin b/bin/foamPackThirdPartyBin index 1e128db1da..b9363f6874 100755 --- a/bin/foamPackThirdPartyBin +++ b/bin/foamPackThirdPartyBin @@ -31,36 +31,43 @@ # #------------------------------------------------------------------------------ -if [ $# = 0 ] +if [ $# -eq 0 ] then - echo "Error: archOptions type expected, exiting" - echo - echo "Usage : ${0##*/} [outputDir]" - echo - exit 1 + echo "Error: archOptions type expected, exiting" + echo + echo "Usage : ${0##*/} [outputDir]" + echo + exit 1 fi archOptions=$1 arch=${archOptions%%G*} # TODO: works for Gcc only -arch3264=$(echo "$arch" | sed 's@64@-64@') +arch3264=$(echo "$arch" | sed -e 's@64@-64@') echo "archOptions=$archOptions" echo "arch=$arch" echo "arch3264=$arch3264" timeStamp=$(date +%Y-%m-%d) -packDir=ThirdParty +packDir=${WM_THIRD_PARTY_DIR:-ThirdParty} +packDir=${packDir##*/} packFile=${packDir}.${archOptions}_${timeStamp}.gtgz +if [ ! -d $packDir ] +then + echo "Error: directory $packDir does not exist" + exit 1 +fi + # add optional output directory if [ -d "$2" ] then - packFile="$2/$packFile" + packFile="$2/$packFile" fi if [ -f $packFile ] then - echo "Error: $packFile already exists" - exit 1 + echo "Error: $packFile already exists" + exit 1 fi # get list of directories @@ -71,12 +78,12 @@ echo tar czpf $packFile $dirList -if [ $? = 0 ] +if [ $? -eq 0 ] then - echo "Finished packing and compressing file $packFile" + echo "Finished packing and compressing file $packFile" else - echo "Error: failure packing $packFile" - rm -f $packFile 2>/dev/null + echo "Error: failure packing $packFile" + rm -f $packFile 2>/dev/null fi #------------------------------------------------------------------------------ diff --git a/bin/foamPackThirdPartyGeneral b/bin/foamPackThirdPartyGeneral index 845b2bfa47..a690f7f448 100755 --- a/bin/foamPackThirdPartyGeneral +++ b/bin/foamPackThirdPartyGeneral @@ -32,25 +32,26 @@ #------------------------------------------------------------------------------ timeStamp=$(date +%Y-%m-%d) -packDir=ThirdParty +packDir=${WM_THIRD_PARTY_DIR:-ThirdParty} +packDir=${packDir##*/} packFile=${packDir}.General_${timeStamp}.gtgz if [ ! -d $packDir ] then - echo "Error: directory $packDir does not exist" - exit 1 + echo "Error: directory $packDir does not exist" + exit 1 fi # add optional output directory if [ -d "$1" ] then - packFile="$1/$packFile" + packFile="$1/$packFile" fi if [ -f $packFile ] then - echo "Error: $packFile already exists" - exit 1 + echo "Error: $packFile already exists" + exit 1 fi # Create time stamp file @@ -62,7 +63,7 @@ echo $timeStamp 2>/dev/null > $packDir/.timeStamp # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo -echo "Packing $packDir into $packFile" +echo "Packing $packDir source files into $packFile" echo foamPackSource $packDir $packFile From 589a342e89a8abf77afa6cc28400725baebdb58a Mon Sep 17 00:00:00 2001 From: henry Date: Thu, 16 Jul 2009 12:30:54 +0100 Subject: [PATCH 20/21] Added -qmake option to specify the location of qmake which defaults to the system one. The Qt version is now checked for >= 4.3. --- bin/buildParaView | 7 +++++-- bin/tools/buildParaViewFunctions | 25 +++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 2 deletions(-) diff --git a/bin/buildParaView b/bin/buildParaView index e7c6c6f9b0..622169e012 100755 --- a/bin/buildParaView +++ b/bin/buildParaView @@ -58,8 +58,6 @@ withQTSUPPORT=true # Set the path to the Qt-4.3.? qmake if the system Qt is other than this version QMAKE_PATH="" -#QMAKE_PATH=/usr/local/Trolltech/Qt-4.3.5/bin/qmake -#QMAKE_PATH=$WM_THIRD_PARTY_DIR/qt-x11-opensource-src-4.3.5/platforms/linux64GccDPOpt/bin/qmake # # No further editing below this line @@ -184,6 +182,11 @@ do withQTSUPPORT=true shift ;; + -qmake) + [ "$#" -ge 2 ] || usage "'$1' option requires an argument" + export QMAKE_PATH=$2 + shift 2 + ;; -verbose) withVERBOSE=true shift diff --git a/bin/tools/buildParaViewFunctions b/bin/tools/buildParaViewFunctions index f0873998af..ff37e259b5 100644 --- a/bin/tools/buildParaViewFunctions +++ b/bin/tools/buildParaViewFunctions @@ -171,10 +171,13 @@ addQtSupport() addCMakeVariable "PARAVIEW_BUILD_QT_GUI=ON" + qmakeExe=qmake + if [ -n "$QMAKE_PATH" ] then if [ -x "$QMAKE_PATH" ] then + qmakeExe=$QMAKE_PATH addCMakeVariable QT_QMAKE_EXECUTABLE:FILEPATH=$QMAKE_PATH else echo @@ -184,6 +187,28 @@ addQtSupport() echo fi fi + + # Check qmake can be found + if [ `which $qmakeExe` ] + then + # Check the Qt version selected + QtVersion=`$qmakeExe -v | grep Using | sed "s/.* version \(.\..\).*/\1/"` + QtMajor=`echo $QtVersion | sed "s/\(.\)\../\1/"` + QtMinor=`echo $QtVersion | sed "s/.\.\(.\)/\1/"` + + if [ $QtMajor -lt 4 -o $QtMinor -lt 3 ] + then + echo "*** Error: Qt version provided < 4.3" + echo "*** Please use the -qmake option to specify the location of a version of Qt >= 4.3 " + echo "*** e.g." + echo "*** -qmake /usr/local/Trolltech/Qt-4.3.5/bin/qmake" + echo "*** -qmake $WM_THIRD_PARTY_DIR/qt-x11-opensource-src-4.3.5/platforms/$WM_OPTIONS/bin/qmake" + exit 1 + fi + else + echo "*** Error: cannot find qmake either at \$QMAKE_PATH or in current \$PATH" + exit 1 + fi } From 4363dac73fc5e0d937b2e7ec514330b2a8be35f3 Mon Sep 17 00:00:00 2001 From: henry Date: Thu, 16 Jul 2009 12:42:34 +0100 Subject: [PATCH 21/21] Further updates of the XiFoam tutorials. --- tutorials/combustion/XiFoam/les/pitzDaily/0/T | 2 +- .../combustion/XiFoam/les/pitzDaily/0/Tu | 2 +- .../XiFoam/les/pitzDaily/0/alphaSgs | 6 +- .../combustion/XiFoam/les/pitzDaily/0/muSgs | 6 +- tutorials/combustion/XiFoam/les/pitzDaily/0/p | 13 ++- .../les/pitzDaily/constant/LESProperties | 1 + .../pitzDaily/constant/combustionProperties | 8 +- .../pitzDaily/constant/polyMesh/blockMeshDict | 106 +++++++++--------- .../constant/thermophysicalProperties | 39 +++++-- .../XiFoam/les/pitzDaily/system/controlDict | 2 +- .../XiFoam/les/pitzDaily/system/fvSchemes | 25 ++--- .../XiFoam/les/pitzDaily/system/fvSolution | 4 +- .../combustion/XiFoam/les/pitzDaily3D/0/B | 50 --------- .../combustion/XiFoam/les/pitzDaily3D/0/Su | 10 +- .../combustion/XiFoam/les/pitzDaily3D/0/T | 12 +- .../combustion/XiFoam/les/pitzDaily3D/0/Tu | 12 +- .../combustion/XiFoam/les/pitzDaily3D/0/U | 10 +- .../combustion/XiFoam/les/pitzDaily3D/0/Xi | 10 +- .../XiFoam/les/pitzDaily3D/0/alphaSgs | 16 +-- .../combustion/XiFoam/les/pitzDaily3D/0/b | 10 +- .../combustion/XiFoam/les/pitzDaily3D/0/ft | 52 --------- .../combustion/XiFoam/les/pitzDaily3D/0/k | 8 +- .../combustion/XiFoam/les/pitzDaily3D/0/muSgs | 16 +-- .../combustion/XiFoam/les/pitzDaily3D/0/p | 23 ++-- .../les/pitzDaily3D/constant/LESProperties | 3 +- .../pitzDaily3D/constant/combustionProperties | 8 +- .../XiFoam/les/pitzDaily3D/constant/g | 2 +- .../constant/thermophysicalProperties | 41 +++++-- .../XiFoam/les/pitzDaily3D/system/controlDict | 4 +- .../XiFoam/les/pitzDaily3D/system/fvSchemes | 30 ++--- .../XiFoam/les/pitzDaily3D/system/fvSolution | 5 +- 31 files changed, 249 insertions(+), 287 deletions(-) delete mode 100644 tutorials/combustion/XiFoam/les/pitzDaily3D/0/B delete mode 100644 tutorials/combustion/XiFoam/les/pitzDaily3D/0/ft diff --git a/tutorials/combustion/XiFoam/les/pitzDaily/0/T b/tutorials/combustion/XiFoam/les/pitzDaily/0/T index c4bae6fa13..d48433513d 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily/0/T +++ b/tutorials/combustion/XiFoam/les/pitzDaily/0/T @@ -42,7 +42,7 @@ boundaryField lowerWall { type fixedValue; - value uniform 293; + value uniform 570; } frontAndBack diff --git a/tutorials/combustion/XiFoam/les/pitzDaily/0/Tu b/tutorials/combustion/XiFoam/les/pitzDaily/0/Tu index 3e1d003deb..55c99ebb45 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily/0/Tu +++ b/tutorials/combustion/XiFoam/les/pitzDaily/0/Tu @@ -42,7 +42,7 @@ boundaryField lowerWall { type fixedValue; - value uniform 293; + value uniform 570; } frontAndBack diff --git a/tutorials/combustion/XiFoam/les/pitzDaily/0/alphaSgs b/tutorials/combustion/XiFoam/les/pitzDaily/0/alphaSgs index 24c919196b..c66c8a1534 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily/0/alphaSgs +++ b/tutorials/combustion/XiFoam/les/pitzDaily/0/alphaSgs @@ -32,15 +32,13 @@ boundaryField upperWall { - type zeroGradient; - //type compressible::alphaSgsWallFunction; + type compressible::alphaSgsJayatillekeWallFunction; value uniform 0; } lowerWall { - type zeroGradient; - //type compressible::alphaSgsWallFunction; + type compressible::alphaSgsJayatillekeWallFunction; value uniform 0; } diff --git a/tutorials/combustion/XiFoam/les/pitzDaily/0/muSgs b/tutorials/combustion/XiFoam/les/pitzDaily/0/muSgs index a16e89fad9..5c85d09493 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily/0/muSgs +++ b/tutorials/combustion/XiFoam/les/pitzDaily/0/muSgs @@ -32,15 +32,13 @@ boundaryField upperWall { - type zeroGradient; - //type compressible::muSgsWallFunction; + type compressible::muSgsWallFunction; value uniform 0; } lowerWall { - type zeroGradient; - //type compressible::muSgsWallFunction; + type compressible::muSgsWallFunction; value uniform 0; } diff --git a/tutorials/combustion/XiFoam/les/pitzDaily/0/p b/tutorials/combustion/XiFoam/les/pitzDaily/0/p index 3700ec72b5..b8afbd8d1a 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily/0/p +++ b/tutorials/combustion/XiFoam/les/pitzDaily/0/p @@ -16,7 +16,7 @@ FoamFile dimensions [1 -1 -2 0 0 0 0]; -internalField uniform 100000; +internalField uniform 1e5; boundaryField { @@ -27,8 +27,15 @@ boundaryField outlet { - type fixedValue; - value uniform 100000; + type waveTransmissive; + field p; + phi phi; + rho rho; + psi psi; + gamma 1.3; + fieldInf 1e5; + lInf 0.3; + value uniform 1e5; } upperWall diff --git a/tutorials/combustion/XiFoam/les/pitzDaily/constant/LESProperties b/tutorials/combustion/XiFoam/les/pitzDaily/constant/LESProperties index 56c915c924..faa025c8e2 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily/constant/LESProperties +++ b/tutorials/combustion/XiFoam/les/pitzDaily/constant/LESProperties @@ -123,6 +123,7 @@ kappa 0.4187; wallFunctionCoeffs { E 9; + Prt 0.85; } diff --git a/tutorials/combustion/XiFoam/les/pitzDaily/constant/combustionProperties b/tutorials/combustion/XiFoam/les/pitzDaily/constant/combustionProperties index 86fcfc889a..a20d6ae7ec 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily/constant/combustionProperties +++ b/tutorials/combustion/XiFoam/les/pitzDaily/constant/combustionProperties @@ -21,7 +21,7 @@ fuel Propane; Su Su [0 1 -1 0 0 0 0] 0.135; -SuModel unstrained; +SuModel transport; equivalenceRatio equivalenceRatio [0 0 0 0 0 0 0] 0.6; @@ -68,7 +68,7 @@ GuldersCoeffs } } -ignite yes; +ignite yes; ignitionSites ( @@ -76,8 +76,8 @@ ignitionSites location (0.005 -0.02 0); diameter 0.003; start 0; - duration 0.1; - strength 40; + duration 0.05; + strength 20; } ); diff --git a/tutorials/combustion/XiFoam/les/pitzDaily/constant/polyMesh/blockMeshDict b/tutorials/combustion/XiFoam/les/pitzDaily/constant/polyMesh/blockMeshDict index 1030983582..4a24aa9a9d 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily/constant/polyMesh/blockMeshDict +++ b/tutorials/combustion/XiFoam/les/pitzDaily/constant/polyMesh/blockMeshDict @@ -16,55 +16,55 @@ FoamFile convertToMeters 0.001; -vertices +vertices ( - (-20.6 0 -0.5) - (-20.6 3 -0.5) - (-20.6 12.7 -0.5) - (-20.6 25.4 -0.5) - (0 -25.4 -0.5) - (0 -5 -0.5) - (0 0 -0.5) - (0 3 -0.5) - (0 12.7 -0.5) - (0 25.4 -0.5) - (206 -25.4 -0.5) - (206 -8.5 -0.5) - (206 0 -0.5) - (206 6.5 -0.5) - (206 17 -0.5) - (206 25.4 -0.5) - (290 -16.6 -0.5) - (290 -6.3 -0.5) - (290 0 -0.5) - (290 4.5 -0.5) - (290 11 -0.5) - (290 16.6 -0.5) - (-20.6 0 0.5) - (-20.6 3 0.5) - (-20.6 12.7 0.5) - (-20.6 25.4 0.5) - (0 -25.4 0.5) - (0 -5 0.5) - (0 0 0.5) - (0 3 0.5) - (0 12.7 0.5) - (0 25.4 0.5) - (206 -25.4 0.5) - (206 -8.5 0.5) - (206 0 0.5) - (206 6.5 0.5) - (206 17 0.5) - (206 25.4 0.5) - (290 -16.6 0.5) - (290 -6.3 0.5) - (290 0 0.5) - (290 4.5 0.5) - (290 11 0.5) - (290 16.6 0.5) + (-20.6 0 0) + (-20.6 3 0) + (-20.6 12.7 0) + (-20.6 25.4 0) + (0 -25.4 0) + (0 -5 0) + (0 0 0) + (0 3 0) + (0 12.7 0) + (0 25.4 0) + (206 -25.4 0) + (206 -8.5 0) + (206 0 0) + (206 6.5 0) + (206 17 0) + (206 25.4 0) + (290 -16.6 0) + (290 -6.3 0) + (290 0 0) + (290 4.5 0) + (290 11 0) + (290 16.6 0) + (-20.6 0 38.1) + (-20.6 3 38.1) + (-20.6 12.7 38.1) + (-20.6 25.4 38.1) + (0 -25.4 38.1) + (0 -5 38.1) + (0 0 38.1) + (0 3 38.1) + (0 12.7 38.1) + (0 25.4 38.1) + (206 -25.4 38.1) + (206 -8.5 38.1) + (206 0 38.1) + (206 6.5 38.1) + (206 17 38.1) + (206 25.4 38.1) + (290 -16.6 38.1) + (290 -6.3 38.1) + (290 0 38.1) + (290 4.5 38.1) + (290 11 38.1) + (290 16.6 38.1) ); -blocks +blocks ( hex (0 6 7 1 22 28 29 23) (18 7 1) simpleGrading (0.5 1.8 1) hex (1 7 8 2 23 29 30 24) (18 10 1) simpleGrading (0.5 4 1) @@ -81,19 +81,19 @@ blocks hex (14 20 21 15 36 42 43 37) (25 13 1) simpleGrading (2.5 0.25 1) ); -edges +edges ( ); -patches +patches ( - patch inlet + patch inlet ( (0 22 23 1) (1 23 24 2) (2 24 25 3) ) - patch outlet + patch outlet ( (16 17 39 38) (17 18 40 39) @@ -101,13 +101,13 @@ patches (19 20 42 41) (20 21 43 42) ) - wall upperWall + wall upperWall ( (3 25 31 9) (9 31 37 15) (15 37 43 21) ) - wall lowerWall + wall lowerWall ( (0 6 28 22) (6 5 27 28) @@ -115,7 +115,7 @@ patches (4 10 32 26) (10 16 38 32) ) - empty frontAndBack + empty frontAndBack ( (22 28 29 23) (23 29 30 24) diff --git a/tutorials/combustion/XiFoam/les/pitzDaily/constant/thermophysicalProperties b/tutorials/combustion/XiFoam/les/pitzDaily/constant/thermophysicalProperties index 8e705f32e5..dc9f1dae0f 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily/constant/thermophysicalProperties +++ b/tutorials/combustion/XiFoam/les/pitzDaily/constant/thermophysicalProperties @@ -15,19 +15,44 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hhuMixtureThermo>>>>; +thermoType + hhuMixtureThermo>>>>; -stoichiometricAirFuelMassRatio stoichiometricAirFuelMassRatio [ 0 0 0 0 0 0 0 ] 15.675; +stoichiometricAirFuelMassRatio + stoichiometricAirFuelMassRatio [0 0 0 0 0 0 0] 15.675; -fuel fuel 1 44.0962 200 5000 1000 7.53414 0.0188722 -6.27185e-06 9.14756e-10 -4.78381e-14 -16467.5 -17.8923 0.933554 0.0264246 6.10597e-06 -2.19775e-08 9.51493e-12 -13958.5 19.2017 1.67212e-06 170.672; +// phi = 0.57 +// ft = 0.0352993 +// Tad = 1650.1 -oxidant oxidant 1 28.8504 200 6000 1000 3.10205 0.00123963 -4.17512e-07 6.60292e-11 -3.87448e-15 -985.517 5.35187 3.58378 -0.0007269 1.66985e-06 -1.08452e-10 -4.31951e-13 -1050.53 3.11223 1.67212e-06 170.672; +fuel fuel 1 44.0962 + 100 5000 1000 + 7.53414 0.0188722 -6.27185e-06 9.14756e-10 -4.78381e-14 -16467.5 -17.8923 + 0.933554 0.0264246 6.10597e-06 -2.19775e-08 9.51493e-12 -13958.5 19.2017 + 1.67212e-06 170.672; -reactants reactants 24.8095 29.4649 200 5000 1000 3.28069 0.00195035 -6.53483e-07 1.00239e-10 -5.64653e-15 -1609.55 4.41496 3.47696 0.000367499 1.84866e-06 -9.8993e-10 -3.10214e-14 -1570.81 3.76075 1.67212e-06 170.672; +oxidant oxidant 1 28.8504 + 100 6000 1000 + 3.10131 0.00124137 -4.18816e-07 6.64158e-11 -3.91274e-15 -985.266 5.35597 + 3.58378 -0.000727005 1.67057e-06 -1.09203e-10 -4.31765e-13 -1050.53 3.11239 + 1.67212e-06 170.672; -products products 1 28.3233 200 5000 1000 3.106 0.00179682 -5.94382e-07 9.04998e-11 -5.08033e-15 -11003.7 5.11872 3.49612 0.000650364 -2.08029e-07 1.2291e-09 -7.73697e-13 -11080.3 3.18978 1.67212e-06 170.672; +reactants reactants 1 29.2068 + 100 5000 1000 + 3.20495 0.00165359 -5.55661e-07 8.62503e-11 -4.93973e-15 -1347.25 4.81241 + 3.52181 -9.21936e-05 1.77427e-06 -6.2049e-10 -1.99209e-13 -1352.32 3.48856 + 1.67212e-06 170.672; -burntProducts burntProducts 25.8095 28.3233 200 6000 1000 3.106 0.00179682 -5.94382e-07 9.04998e-11 -5.08033e-15 -11003.7 5.11872 3.49612 0.000650364 -2.08029e-07 1.2291e-09 -7.73697e-13 -11080.3 3.18978 1.67212e-06 170.672; +burntProducts burntProducts 1 28.3233 + 100 6000 1000 + 3.10558 0.00179747 -5.94696e-07 9.05605e-11 -5.08443e-15 -11003.6 5.12104 + 3.49796 0.000638555 -1.83881e-07 1.20989e-09 -7.68691e-13 -11080.5 3.18188 + 1.67212e-06 170.672; +products products 1 28.5396 + 100 5000 1000 + 3.10383 0.00156927 -5.22523e-07 8.06527e-11 -4.60363e-15 -6892.54 5.21744 + 3.53318 7.81943e-05 5.77097e-07 6.68595e-10 -6.30433e-13 -6964.71 3.15336 + 1.67212e-06 170.672; // ************************************************************************* // diff --git a/tutorials/combustion/XiFoam/les/pitzDaily/system/controlDict b/tutorials/combustion/XiFoam/les/pitzDaily/system/controlDict index f5fe65e622..ba28fbf560 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily/system/controlDict +++ b/tutorials/combustion/XiFoam/les/pitzDaily/system/controlDict @@ -23,7 +23,7 @@ startTime 0; stopAt endTime; -endTime 10; +endTime 0.5; deltaT 5e-06; diff --git a/tutorials/combustion/XiFoam/les/pitzDaily/system/fvSchemes b/tutorials/combustion/XiFoam/les/pitzDaily/system/fvSchemes index e74dbeb191..d4a2457583 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily/system/fvSchemes +++ b/tutorials/combustion/XiFoam/les/pitzDaily/system/fvSchemes @@ -17,34 +17,29 @@ FoamFile ddtSchemes { - default Euler; + default backward; } gradSchemes { default Gauss linear; - grad(p) Gauss linear; } divSchemes { default none; - div(phi,U) Gauss limitedLinearV 1; - div(phid,p) Gauss linear; + div(phi,U) Gauss linear; div(phiU,p) Gauss linear; - div(phi,k) Gauss limitedLinear 1; - div(phi,B) Gauss limitedLinear 1; - div(B) Gauss linear; - div(phiXi,Xi) Gauss limitedLinear 1; - div(phiXi,Su) Gauss limitedLinear 1; - div(phiSt,b) Gauss limitedLinear01 1; + div(phi,k) Gauss limitedLinear 0.1; + div(phiXi,Xi) Gauss limitedLinear01 0.1; + div(phiXi,Su) Gauss limitedLinear01 0.1; + div(phiSt,b) Gauss limitedLinear01 0.1; div(phi,ft_b_h_hu) Gauss multivariateSelection { - fu limitedLinear01 1; - ft limitedLinear01 1; - b limitedLinear01 1; - h limitedLinear 1; - hu limitedLinear 1; + ft limitedLinear01 0.1; + b limitedLinear01 0.1; + h limitedLinear 0.1; + hu limitedLinear 0.1; }; div(U) Gauss linear; div((Su*grad(b))) Gauss linear; diff --git a/tutorials/combustion/XiFoam/les/pitzDaily/system/fvSolution b/tutorials/combustion/XiFoam/les/pitzDaily/system/fvSolution index 6e1d1ffd3e..4dda010d66 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily/system/fvSolution +++ b/tutorials/combustion/XiFoam/les/pitzDaily/system/fvSolution @@ -124,8 +124,8 @@ solvers PISO { - nOuterCorrectors 1; - nCorrectors 2; + nOuterCorrectors 2; + nCorrectors 1; nNonOrthogonalCorrectors 0; } diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/B b/tutorials/combustion/XiFoam/les/pitzDaily3D/0/B deleted file mode 100644 index 65544498af..0000000000 --- a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/B +++ /dev/null @@ -1,50 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | -| \\ / A nd | Web: http://www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volTensorField; - object B; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [1 -1 -2 0 0 0 0]; - -internalField uniform (0 0 0 0 0 0 0 0 0); - -boundaryField -{ - inlet - { - type fixedValue; - value uniform (0 0 0 0 0 0 0 0 0); - } - - outlet - { - type zeroGradient; - } - - upperWall - { - type zeroGradient; - } - - lowerWall - { - type zeroGradient; - } - - frontAndBack - { - type cyclic; - } -} - -// ************************************************************************* // diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/Su b/tutorials/combustion/XiFoam/les/pitzDaily3D/0/Su index 82eb5d80e3..024869330e 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/Su +++ b/tutorials/combustion/XiFoam/les/pitzDaily3D/0/Su @@ -20,30 +20,30 @@ internalField uniform 0.135; boundaryField { - inlet + inlet { type fixedValue; value uniform 0.135; } - outlet + outlet { type inletOutlet; inletValue uniform 0.135; value uniform 0.135; } - upperWall + upperWall { type zeroGradient; } - lowerWall + lowerWall { type zeroGradient; } - frontAndBack + frontAndBack { type cyclic; } diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/T b/tutorials/combustion/XiFoam/les/pitzDaily3D/0/T index fdf764e06f..9c0947189b 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/T +++ b/tutorials/combustion/XiFoam/les/pitzDaily3D/0/T @@ -20,32 +20,32 @@ internalField uniform 293; boundaryField { - inlet + inlet { type fixedValue; value uniform 293; } - outlet + outlet { type inletOutlet; inletValue uniform 293; value uniform 293; } - upperWall + upperWall { type fixedValue; value uniform 293; } - lowerWall + lowerWall { type fixedValue; - value uniform 293; + value uniform 570; } - frontAndBack + frontAndBack { type cyclic; } diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/Tu b/tutorials/combustion/XiFoam/les/pitzDaily3D/0/Tu index e1299d7435..e0b9959787 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/Tu +++ b/tutorials/combustion/XiFoam/les/pitzDaily3D/0/Tu @@ -20,32 +20,32 @@ internalField uniform 293; boundaryField { - inlet + inlet { type fixedValue; value uniform 293; } - outlet + outlet { type inletOutlet; inletValue uniform 293; value uniform 293; } - upperWall + upperWall { type fixedValue; value uniform 293; } - lowerWall + lowerWall { type fixedValue; - value uniform 293; + value uniform 570; } - frontAndBack + frontAndBack { type cyclic; } diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/U b/tutorials/combustion/XiFoam/les/pitzDaily3D/0/U index ece734e9f3..c2ff1ef691 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/U +++ b/tutorials/combustion/XiFoam/les/pitzDaily3D/0/U @@ -20,33 +20,33 @@ internalField uniform (0 0 0); boundaryField { - inlet + inlet { type turbulentInlet; referenceField uniform (13.3 0 0); fluctuationScale (0.04 0.02 0.02); } - outlet + outlet { type inletOutlet; inletValue uniform (0 0 0); value uniform (0 0 0); } - upperWall + upperWall { type fixedValue; value uniform (0 0 0); } - lowerWall + lowerWall { type fixedValue; value uniform (0 0 0); } - frontAndBack + frontAndBack { type cyclic; } diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/Xi b/tutorials/combustion/XiFoam/les/pitzDaily3D/0/Xi index 1b3b3cc930..ac3b5633fa 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/Xi +++ b/tutorials/combustion/XiFoam/les/pitzDaily3D/0/Xi @@ -20,30 +20,30 @@ internalField uniform 1; boundaryField { - inlet + inlet { type fixedValue; value uniform 1; } - outlet + outlet { type inletOutlet; inletValue uniform 1; value uniform 1; } - upperWall + upperWall { type zeroGradient; } - lowerWall + lowerWall { type zeroGradient; } - frontAndBack + frontAndBack { type cyclic; } diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/alphaSgs b/tutorials/combustion/XiFoam/les/pitzDaily3D/0/alphaSgs index c5331748ae..5f7deec4ec 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/alphaSgs +++ b/tutorials/combustion/XiFoam/les/pitzDaily3D/0/alphaSgs @@ -20,27 +20,29 @@ internalField uniform 0; boundaryField { - inlet + inlet { type zeroGradient; } - outlet + outlet { type zeroGradient; } - upperWall + upperWall { - type zeroGradient; + type compressible::alphaSgsJayatillekeWallFunction; + value uniform 0; } - lowerWall + lowerWall { - type zeroGradient; + type compressible::alphaSgsJayatillekeWallFunction; + value uniform 0; } - frontAndBack + frontAndBack { type cyclic; } diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/b b/tutorials/combustion/XiFoam/les/pitzDaily3D/0/b index 7be4cfc6ac..7ca894170f 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/b +++ b/tutorials/combustion/XiFoam/les/pitzDaily3D/0/b @@ -20,30 +20,30 @@ internalField uniform 1; boundaryField { - inlet + inlet { type fixedValue; value uniform 1; } - outlet + outlet { type inletOutlet; inletValue uniform 1; value uniform 1; } - upperWall + upperWall { type zeroGradient; } - lowerWall + lowerWall { type zeroGradient; } - frontAndBack + frontAndBack { type cyclic; } diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/ft b/tutorials/combustion/XiFoam/les/pitzDaily3D/0/ft deleted file mode 100644 index 8d16f22209..0000000000 --- a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/ft +++ /dev/null @@ -1,52 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ -| ========= | | -| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.5 | -| \\ / A nd | Web: http://www.OpenFOAM.org | -| \\/ M anipulation | | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class volScalarField; - object ft; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -dimensions [0 0 0 0 0 0 0]; - -internalField uniform 0; - -boundaryField -{ - inlet - { - type fixedValue; - value uniform 0; - } - - outlet - { - type inletOutlet; - inletValue uniform 0; - value uniform 0; - } - - upperWall - { - type zeroGradient; - } - - lowerWall - { - type zeroGradient; - } - - frontAndBack - { - type cyclic; - } -} - -// ************************************************************************* // diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/k b/tutorials/combustion/XiFoam/les/pitzDaily3D/0/k index 69de845314..df6b081d5b 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/k +++ b/tutorials/combustion/XiFoam/les/pitzDaily3D/0/k @@ -35,14 +35,14 @@ boundaryField upperWall { - type fixedValue; - value uniform 1e-8; + type zeroGradient; + value uniform 2e-05; } lowerWall { - type fixedValue; - value uniform 1e-8; + type zeroGradient; + value uniform 2e-05; } frontAndBack diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/muSgs b/tutorials/combustion/XiFoam/les/pitzDaily3D/0/muSgs index a6befb8a9d..ff6a524d0d 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/muSgs +++ b/tutorials/combustion/XiFoam/les/pitzDaily3D/0/muSgs @@ -20,27 +20,29 @@ internalField uniform 0; boundaryField { - inlet + inlet { type zeroGradient; } - outlet + outlet { type zeroGradient; } - upperWall + upperWall { - type zeroGradient; + type compressible::muSgsWallFunction; + value uniform 0; } - lowerWall + lowerWall { - type zeroGradient; + type compressible::muSgsWallFunction; + value uniform 0; } - frontAndBack + frontAndBack { type cyclic; } diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/p b/tutorials/combustion/XiFoam/les/pitzDaily3D/0/p index 918b79c476..2a27d1e401 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily3D/0/p +++ b/tutorials/combustion/XiFoam/les/pitzDaily3D/0/p @@ -16,32 +16,39 @@ FoamFile dimensions [1 -1 -2 0 0 0 0]; -internalField uniform 100000; +internalField uniform 1e5; boundaryField { - inlet + inlet { type zeroGradient; } - outlet + outlet { - type fixedValue; - value uniform 100000; + type waveTransmissive; + field p; + phi phi; + rho rho; + psi psi; + gamma 1.3; + fieldInf 1e5; + lInf 0.3; + value uniform 1e5; } - upperWall + upperWall { type zeroGradient; } - lowerWall + lowerWall { type zeroGradient; } - frontAndBack + frontAndBack { type cyclic; } diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/LESProperties b/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/LESProperties index 95bb1c14f8..faa025c8e2 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/LESProperties +++ b/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/LESProperties @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | +| \\ / O peration | Version: 1.5 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -123,6 +123,7 @@ kappa 0.4187; wallFunctionCoeffs { E 9; + Prt 0.85; } diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/combustionProperties b/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/combustionProperties index 8d2c6962d7..f46b08c801 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/combustionProperties +++ b/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/combustionProperties @@ -68,16 +68,16 @@ GuldersCoeffs } } -ignite yes; +ignite yes; ignitionSites ( { - location (0 0 0); + location (0.005 -0.02 0.01905); diameter 0.003; start 0; - duration 0.001; - strength 2; + duration 0.1; + strength 200; } ); diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/g b/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/g index d182180d95..7b4411955d 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/g +++ b/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/g @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | +| \\ / O peration | Version: 1.5 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/thermophysicalProperties b/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/thermophysicalProperties index 7c8fd76fe3..dc9f1dae0f 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/thermophysicalProperties +++ b/tutorials/combustion/XiFoam/les/pitzDaily3D/constant/thermophysicalProperties @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | +| \\ / O peration | Version: 1.5 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -15,19 +15,44 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType hhuMixtureThermo>>>>; +thermoType + hhuMixtureThermo>>>>; -stoichiometricAirFuelMassRatio stoichiometricAirFuelMassRatio [ 0 0 0 0 0 0 0 ] 15.675; +stoichiometricAirFuelMassRatio + stoichiometricAirFuelMassRatio [0 0 0 0 0 0 0] 15.675; -fuel fuel 1 44.0962 200 5000 1000 7.53414 0.0188722 -6.27185e-06 9.14756e-10 -4.78381e-14 -16467.5 -17.8923 0.933554 0.0264246 6.10597e-06 -2.19775e-08 9.51493e-12 -13958.5 19.2017 1.67212e-06 170.672; +// phi = 0.57 +// ft = 0.0352993 +// Tad = 1650.1 -oxidant oxidant 1 28.8504 200 6000 1000 3.10205 0.00123963 -4.17512e-07 6.60292e-11 -3.87448e-15 -985.517 5.35187 3.58378 -0.0007269 1.66985e-06 -1.08452e-10 -4.31951e-13 -1050.53 3.11223 1.67212e-06 170.672; +fuel fuel 1 44.0962 + 100 5000 1000 + 7.53414 0.0188722 -6.27185e-06 9.14756e-10 -4.78381e-14 -16467.5 -17.8923 + 0.933554 0.0264246 6.10597e-06 -2.19775e-08 9.51493e-12 -13958.5 19.2017 + 1.67212e-06 170.672; -reactants reactants 24.8095 29.4649 200 5000 1000 3.28069 0.00195035 -6.53483e-07 1.00239e-10 -5.64653e-15 -1609.55 4.41496 3.47696 0.000367499 1.84866e-06 -9.8993e-10 -3.10214e-14 -1570.81 3.76075 1.67212e-06 170.672; +oxidant oxidant 1 28.8504 + 100 6000 1000 + 3.10131 0.00124137 -4.18816e-07 6.64158e-11 -3.91274e-15 -985.266 5.35597 + 3.58378 -0.000727005 1.67057e-06 -1.09203e-10 -4.31765e-13 -1050.53 3.11239 + 1.67212e-06 170.672; -products products 1 28.3233 200 5000 1000 3.106 0.00179682 -5.94382e-07 9.04998e-11 -5.08033e-15 -11003.7 5.11872 3.49612 0.000650364 -2.08029e-07 1.2291e-09 -7.73697e-13 -11080.3 3.18978 1.67212e-06 170.672; +reactants reactants 1 29.2068 + 100 5000 1000 + 3.20495 0.00165359 -5.55661e-07 8.62503e-11 -4.93973e-15 -1347.25 4.81241 + 3.52181 -9.21936e-05 1.77427e-06 -6.2049e-10 -1.99209e-13 -1352.32 3.48856 + 1.67212e-06 170.672; -burntProducts burntProducts 25.8095 28.3233 200 6000 1000 3.106 0.00179682 -5.94382e-07 9.04998e-11 -5.08033e-15 -11003.7 5.11872 3.49612 0.000650364 -2.08029e-07 1.2291e-09 -7.73697e-13 -11080.3 3.18978 1.67212e-06 170.672; +burntProducts burntProducts 1 28.3233 + 100 6000 1000 + 3.10558 0.00179747 -5.94696e-07 9.05605e-11 -5.08443e-15 -11003.6 5.12104 + 3.49796 0.000638555 -1.83881e-07 1.20989e-09 -7.68691e-13 -11080.5 3.18188 + 1.67212e-06 170.672; +products products 1 28.5396 + 100 5000 1000 + 3.10383 0.00156927 -5.22523e-07 8.06527e-11 -4.60363e-15 -6892.54 5.21744 + 3.53318 7.81943e-05 5.77097e-07 6.68595e-10 -6.30433e-13 -6964.71 3.15336 + 1.67212e-06 170.672; // ************************************************************************* // diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/system/controlDict b/tutorials/combustion/XiFoam/les/pitzDaily3D/system/controlDict index cd473319ff..364c823851 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily3D/system/controlDict +++ b/tutorials/combustion/XiFoam/les/pitzDaily3D/system/controlDict @@ -17,13 +17,13 @@ FoamFile application XiFoam; -startFrom startTime; +startFrom latestTime; startTime 0; stopAt endTime; -endTime 0.02; +endTime 0.5; deltaT 5e-06; diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/system/fvSchemes b/tutorials/combustion/XiFoam/les/pitzDaily3D/system/fvSchemes index 2398134a00..d4a2457583 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily3D/system/fvSchemes +++ b/tutorials/combustion/XiFoam/les/pitzDaily3D/system/fvSchemes @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | +| \\ / O peration | Version: 1.5 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -17,28 +17,30 @@ FoamFile ddtSchemes { - default Euler; + default backward; } gradSchemes { default Gauss linear; - grad(p) Gauss linear; } divSchemes { default none; - div(phi,U) Gauss limitedLinearV 1; - div(phid,p) Gauss linear; + div(phi,U) Gauss linear; div(phiU,p) Gauss linear; - div(phi,k) Gauss limitedLinear 1; - div(phi,B) Gauss limitedLinear 1; - div(B) Gauss linear; - div(phiXi,Xi) Gauss limitedLinear 1; - div(phiXi,Su) Gauss limitedLinear 1; - div(phiSt,b) Gauss limitedLinear01 1; - div(phi,ft_b_h_hu) Gauss multivariateSelection { fu limitedLinear01 1 ; ft limitedLinear01 1 ; b limitedLinear01 1 ; h limitedLinear 1 ; hu limitedLinear 1 ; }; + div(phi,k) Gauss limitedLinear 0.1; + div(phiXi,Xi) Gauss limitedLinear01 0.1; + div(phiXi,Su) Gauss limitedLinear01 0.1; + div(phiSt,b) Gauss limitedLinear01 0.1; + div(phi,ft_b_h_hu) Gauss multivariateSelection + { + ft limitedLinear01 0.1; + b limitedLinear01 0.1; + h limitedLinear 0.1; + hu limitedLinear 0.1; + }; div(U) Gauss linear; div((Su*grad(b))) Gauss linear; div((U+((Su*Xi)*grad(b)))) Gauss linear; @@ -52,8 +54,8 @@ laplacianSchemes laplacian(DkEff,k) Gauss linear corrected; laplacian(DBEff,B) Gauss linear corrected; laplacian((rho*(1|A(U))),p) Gauss linear corrected; - laplacian(muEff,b) Gauss linear corrected; - laplacian(muEff,ft) Gauss linear corrected; + laplacian(alphaEff,b) Gauss linear corrected; + laplacian(alphaEff,ft) Gauss linear corrected; laplacian(alphaEff,h) Gauss linear corrected; laplacian(alphaEff,hu) Gauss linear corrected; } diff --git a/tutorials/combustion/XiFoam/les/pitzDaily3D/system/fvSolution b/tutorials/combustion/XiFoam/les/pitzDaily3D/system/fvSolution index d4656531ed..4dda010d66 100644 --- a/tutorials/combustion/XiFoam/les/pitzDaily3D/system/fvSolution +++ b/tutorials/combustion/XiFoam/les/pitzDaily3D/system/fvSolution @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: dev | +| \\ / O peration | Version: 1.5 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -124,7 +124,8 @@ solvers PISO { - nCorrectors 2; + nOuterCorrectors 2; + nCorrectors 1; nNonOrthogonalCorrectors 0; }