From cdec7b0e1aa8df37e4abd10ccb8c5591ae15d463 Mon Sep 17 00:00:00 2001 From: Prashant Date: Fri, 22 Apr 2016 12:11:10 +0530 Subject: [PATCH 1/7] bugFixes --- ...urbulentTemperatureRadCoupledMixedFvPatchScalarField.H | 2 +- .../field/regionSizeDistribution/regionSizeDistribution.H | 7 ++++--- .../graphics/runTimePostProcessing/scene.C | 4 ++-- .../pisoFoam/les/motorBike/motorBike/Allrun | 8 ++++---- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.H b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.H index 77365b2aa6..1676c71058 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.H +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/turbulentTemperatureRadCoupledMixed/turbulentTemperatureRadCoupledMixedFvPatchScalarField.H @@ -59,7 +59,7 @@ Description QrNbr Qr; // or none. Name of Qr field on neighbour region Qr Qr; // or none. Name of Qr field on local region thicknessLayers (0.1 0.2 0.3 0.4); - kappaLayers (1 2 3 4) + kappaLayers (1 2 3 4); value uniform 300; } \endverbatim diff --git a/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.H b/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.H index d89106bdde..8185c46b6b 100644 --- a/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.H +++ b/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.H @@ -69,10 +69,10 @@ Description maxDiameter 0.5e-4; minDiameter 0; setFormat gnuplot; - coordinateSystem + origin (0 0 0); + coordinateRoation { type cartesian; - origin (0 0 0); e3 (0 1 1); e1 (1 0 0); } @@ -91,7 +91,8 @@ Description maxDiameter | maximum region equivalent diameter | yes | minDiameter | minimum region equivalent diameter | no | 0 setFormat | writing format | yes | - coordinateSystem | transformation for vector fields | no | + origin | origin of local co-ordinate system | yes | + coordinateRoation | orientation of local co-ordinate system | no | log | Log to standard output | no | yes \endtable diff --git a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/scene.C b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/scene.C index 54b6257d82..75d2bfb6b4 100644 --- a/src/postProcessing/functionObjects/graphics/runTimePostProcessing/scene.C +++ b/src/postProcessing/functionObjects/graphics/runTimePostProcessing/scene.C @@ -348,8 +348,6 @@ bool Foam::scene::loop(vtkRenderer* renderer) currentFrameI_++; - position_ += dPosition_; - if (position_ > (1 + 0.5*dPosition_)) { WarningInFunction @@ -357,6 +355,8 @@ bool Foam::scene::loop(vtkRenderer* renderer) << endl; } + position_ += dPosition_; + if (currentFrameI_ < nFrameTotal_) { return true; diff --git a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/Allrun b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/Allrun index 29462ed538..0fed82661f 100755 --- a/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/Allrun +++ b/tutorials/incompressible/pisoFoam/les/motorBike/motorBike/Allrun @@ -11,11 +11,11 @@ cp $FOAM_TUTORIALS/resources/geometry/motorBike.obj.gz constant/triSurface/ mkdir 0 runApplication blockMesh -cp system/decomposeParDict.hierarchical system/decomposeParDict -runApplication decomposePar +# cp system/decomposeParDict.hierarchical system/decomposeParDict +runApplication decomposePar -decomposeParDict system/decomposeParDict.hierarchical -cp system/decomposeParDict.ptscotch system/decomposeParDict -runParallel snappyHexMesh 8 -overwrite -parallel +# cp system/decomposeParDict.ptscotch system/decomposeParDict +runParallel snappyHexMesh 8 -decomposeParDict system/decomposeParDict.ptscotch -overwrite -parallel find . -type f -iname "*level*" -exec rm {} \; From fd27dafcc61fd634c04995eb88141493bbb877e4 Mon Sep 17 00:00:00 2001 From: sergio Date: Wed, 27 Apr 2016 12:15:31 -0700 Subject: [PATCH 2/7] ENH: Adding option for closing or opening wall/cyclic double baffle in activePressureForceBaffleVelocityFvPatchVectorField --- ...ureForceBaffleVelocityFvPatchVectorField.C | 59 ++++++++++++------- ...ureForceBaffleVelocityFvPatchVectorField.H | 16 +++-- .../flamePropagationWithObstacles/0.org/U | 2 +- 3 files changed, 49 insertions(+), 28 deletions(-) diff --git a/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.C index 02a63dd00d..4ed3e20412 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | OpenCFD Ltd 2016 ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -42,7 +42,6 @@ activePressureForceBaffleVelocityFvPatchVectorField pName_("p"), cyclicPatchName_(), cyclicPatchLabel_(-1), - orientation_(1), initWallSf_(0), initCyclicSf_(0), nbrCyclicSf_(0), @@ -52,7 +51,8 @@ activePressureForceBaffleVelocityFvPatchVectorField curTimeIndex_(-1), minThresholdValue_(0), fBased_(1), - baffleActivated_(0) + baffleActivated_(0), + opening_(1) {} @@ -69,7 +69,6 @@ activePressureForceBaffleVelocityFvPatchVectorField pName_(ptf.pName_), cyclicPatchName_(ptf.cyclicPatchName_), cyclicPatchLabel_(ptf.cyclicPatchLabel_), - orientation_(ptf.orientation_), initWallSf_(ptf.initWallSf_), initCyclicSf_(ptf.initCyclicSf_), nbrCyclicSf_(ptf.nbrCyclicSf_), @@ -79,7 +78,8 @@ activePressureForceBaffleVelocityFvPatchVectorField curTimeIndex_(-1), minThresholdValue_(ptf.minThresholdValue_), fBased_(ptf.fBased_), - baffleActivated_(ptf.baffleActivated_) + baffleActivated_(ptf.baffleActivated_), + opening_(ptf.opening_) {} @@ -95,7 +95,6 @@ activePressureForceBaffleVelocityFvPatchVectorField pName_(dict.lookupOrDefault("p", "p")), cyclicPatchName_(dict.lookup("cyclicPatch")), cyclicPatchLabel_(p.patch().boundaryMesh().findPatchID(cyclicPatchName_)), - orientation_(readLabel(dict.lookup("orientation"))), initWallSf_(0), initCyclicSf_(0), nbrCyclicSf_(0), @@ -105,7 +104,8 @@ activePressureForceBaffleVelocityFvPatchVectorField curTimeIndex_(-1), minThresholdValue_(readScalar(dict.lookup("minThresholdValue"))), fBased_(readBool(dict.lookup("forceBased"))), - baffleActivated_(0) + baffleActivated_(0), + opening_(readBool(dict.lookup("opening"))) { fvPatchVectorField::operator=(vector::zero); @@ -136,7 +136,6 @@ activePressureForceBaffleVelocityFvPatchVectorField pName_(ptf.pName_), cyclicPatchName_(ptf.cyclicPatchName_), cyclicPatchLabel_(ptf.cyclicPatchLabel_), - orientation_(ptf.orientation_), initWallSf_(ptf.initWallSf_), initCyclicSf_(ptf.initCyclicSf_), nbrCyclicSf_(ptf.nbrCyclicSf_), @@ -146,7 +145,8 @@ activePressureForceBaffleVelocityFvPatchVectorField curTimeIndex_(-1), minThresholdValue_(ptf.minThresholdValue_), fBased_(ptf.fBased_), - baffleActivated_(ptf.baffleActivated_) + baffleActivated_(ptf.baffleActivated_), + opening_(ptf.opening_) {} @@ -161,7 +161,6 @@ activePressureForceBaffleVelocityFvPatchVectorField pName_(ptf.pName_), cyclicPatchName_(ptf.cyclicPatchName_), cyclicPatchLabel_(ptf.cyclicPatchLabel_), - orientation_(ptf.orientation_), initWallSf_(ptf.initWallSf_), initCyclicSf_(ptf.initCyclicSf_), nbrCyclicSf_(ptf.nbrCyclicSf_), @@ -171,7 +170,8 @@ activePressureForceBaffleVelocityFvPatchVectorField curTimeIndex_(-1), minThresholdValue_(ptf.minThresholdValue_), fBased_(ptf.fBased_), - baffleActivated_(ptf.baffleActivated_) + baffleActivated_(ptf.baffleActivated_), + opening_(ptf.opening_) {} @@ -249,6 +249,7 @@ void Foam::activePressureForceBaffleVelocityFvPatchVectorField::updateCoeffs() // Execute the change to the openFraction only once per time-step if (curTimeIndex_ != this->db().time().timeIndex()) { + const volScalarField& p = db().lookupObject ( pName_ @@ -296,21 +297,23 @@ void Foam::activePressureForceBaffleVelocityFvPatchVectorField::updateCoeffs() Info<< "Pressure difference = " << valueDiff << endl; } - if ((mag(valueDiff) > mag(minThresholdValue_)) || baffleActivated_) + if (mag(valueDiff) > mag(minThresholdValue_) || baffleActivated_) { openFraction_ = - max( - min( + max + ( + min + ( openFraction_ + min ( this->db().time().deltaT().value()/openingTime_, maxOpenFractionDelta_ - )*(orientation_), - 1 - 1e-6 ), + 1 - 1e-6 + ), 1e-6 - ); + ); baffleActivated_ = true; } @@ -321,8 +324,20 @@ void Foam::activePressureForceBaffleVelocityFvPatchVectorField::updateCoeffs() Info<< "Open fraction = " << openFraction_ << endl; + scalar areaFraction = 0.0; + + if (opening_) + { + areaFraction = openFraction_; + } + else + { + areaFraction = 1 - openFraction_; + } + + // Update this wall patch vectorField::subField Sfw = patch().patch().faceAreas(); - vectorField newSfw((1 - openFraction_)*initWallSf_); + vectorField newSfw((1 - areaFraction)*initWallSf_); forAll(Sfw, facei) { Sfw[facei] = newSfw[facei]; @@ -331,14 +346,14 @@ void Foam::activePressureForceBaffleVelocityFvPatchVectorField::updateCoeffs() // Update owner side of cyclic const_cast(cyclicPatch.Sf()) = - openFraction_*initCyclicSf_; + areaFraction*initCyclicSf_; const_cast(cyclicPatch.magSf()) = mag(cyclicPatch.Sf()); // Update neighbour side of cyclic const_cast(nbrPatch.Sf()) = - openFraction_*nbrCyclicSf_; + areaFraction*nbrCyclicSf_; const_cast(nbrPatch.magSf()) = mag(nbrPatch.Sf()); @@ -357,8 +372,6 @@ write(Ostream& os) const writeEntryIfDifferent(os, "p", "p", pName_); os.writeKeyword("cyclicPatch") << cyclicPatchName_ << token::END_STATEMENT << nl; - os.writeKeyword("orientation") - << orientation_ << token::END_STATEMENT << nl; os.writeKeyword("openingTime") << openingTime_ << token::END_STATEMENT << nl; os.writeKeyword("maxOpenFractionDelta") @@ -369,6 +382,8 @@ write(Ostream& os) const << minThresholdValue_ << token::END_STATEMENT << nl; os.writeKeyword("forceBased") << fBased_ << token::END_STATEMENT << nl; + os.writeKeyword("opening") + << opening_ << token::END_STATEMENT << nl; writeEntry("value", os); } diff --git a/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.H b/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.H index 289e735586..ffbafc3cae 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.H +++ b/src/finiteVolume/fields/fvPatchFields/derived/activePressureForceBaffleVelocity/activePressureForceBaffleVelocityFvPatchVectorField.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | OpenCFD Ltd 2016 ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -38,6 +38,11 @@ Description used in an extra wall beyond an existing cyclic patch pair. See PDRMesh for more details. + The baffle is activated when the pressure difference between master and + slave paches is positive and larger then minThresholdValue. The + orientation flag is used to to calculate the pressure difference bwetween + master-slave or slave-master. + Once the threshold is crossed, this condition activated and continues to open or close at a fixed rate using @@ -70,6 +75,7 @@ Description minThresholdValue | minimum absolute pressure or force difference for activation | yes | forceBased | force (true) or pressure-based (false) activation | yes | + opening | Baffle is opening or closing (1 opening, 0 closing) | yes \endtable Example of the boundary condition specification: @@ -85,6 +91,7 @@ Description maxOpenFractionDelta 0.1; minThresholdValue 0.01; forceBased false; + opening 1; } \endverbatim @@ -124,10 +131,6 @@ class activePressureForceBaffleVelocityFvPatchVectorField //- Index of the cyclic patch used when the active baffle is open label cyclicPatchLabel_; - //- Orientation (1 or -1) of the active baffle mode - // Used to change the direction of opening or closing the baffle - label orientation_; - //- Initial wall patch areas vectorField initWallSf_; @@ -158,6 +161,9 @@ class activePressureForceBaffleVelocityFvPatchVectorField //- Baffle is activated bool baffleActivated_; + //- Baffle is opening or closing (1 opening, 0 closing) + bool opening_; + public: diff --git a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/0.org/U b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/0.org/U index 8ae84eb324..8152907323 100644 --- a/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/0.org/U +++ b/tutorials/combustion/PDRFoam/flamePropagationWithObstacles/0.org/U @@ -42,7 +42,7 @@ boundaryField type activePressureForceBaffleVelocity; value uniform (0 0 0); cyclicPatch baffleCyclic_half0; - orientation 1; + opening 1; openingTime 0.01; maxOpenFractionDelta 0.1; openFraction 0; From cfcaaa85e4b52ac06b4e06d6191355fced20ab2b Mon Sep 17 00:00:00 2001 From: Andrew Heather Date: Thu, 28 Apr 2016 14:23:38 +0100 Subject: [PATCH 3/7] BUG: forces/forceCoeffs - corrected behaviour for case that input fields are not available. Fixes #107 --- .../forces/forceCoeffs/forceCoeffs.C | 10 ++++++++-- .../functionObjects/forces/forces/forces.C | 14 +++++++------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.C b/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.C index ef37661708..038bc81c58 100644 --- a/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.C +++ b/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -219,7 +219,7 @@ Foam::forceCoeffs::forceCoeffs CdBinFilePtr_(), ClBinFilePtr_() { - if (readFields) + if (active_ && readFields) { read(dict); if (log_) Info << endl; @@ -310,6 +310,12 @@ void Foam::forceCoeffs::execute() forces::calcForcesMoment(); + // Need to re-check active_ flag - may have been reset in calcForcesMoment + if (!active_) + { + return; + } + createFiles(); scalar pDyn = 0.5*rhoRef_*magUInf_*magUInf_; diff --git a/src/postProcessing/functionObjects/forces/forces/forces.C b/src/postProcessing/functionObjects/forces/forces/forces.C index 9501fad1b0..6e7acae283 100644 --- a/src/postProcessing/functionObjects/forces/forces/forces.C +++ b/src/postProcessing/functionObjects/forces/forces/forces.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -279,8 +279,8 @@ void Foam::forces::initialiseBins() // Allocate storage for forces and moments forAll(force_, i) { - force_[i].setSize(nBin_); - moment_[i].setSize(nBin_); + force_[i].setSize(nBin_, vector::zero); + moment_[i].setSize(nBin_, vector::zero); } } } @@ -841,8 +841,8 @@ Foam::forces::forces forAll(force_, i) { - force_[i].setSize(nBin_); - moment_[i].setSize(nBin_); + force_[i].setSize(nBin_, vector::zero); + moment_[i].setSize(nBin_, vector::zero); } } @@ -944,8 +944,8 @@ void Foam::forces::read(const dictionary& dict) // Allocate storage for forces and moments forAll(force_, i) { - force_[i].setSize(1); - moment_[i].setSize(1); + force_[i].setSize(1, vector::zero); + moment_[i].setSize(1, vector::zero); } } From 123ca7b2ce0807fb39c7b82e92c61d46792233d0 Mon Sep 17 00:00:00 2001 From: Andrew Heather Date: Fri, 29 Apr 2016 15:54:46 +0100 Subject: [PATCH 4/7] BUG: SpalartAllmarasDES - updated for SP build. Fixes #98 --- .../DES/SpalartAllmarasDES/SpalartAllmarasDES.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDES/SpalartAllmarasDES.C b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDES/SpalartAllmarasDES.C index 3767153d78..867a6a7814 100644 --- a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDES/SpalartAllmarasDES.C +++ b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDES/SpalartAllmarasDES.C @@ -186,7 +186,7 @@ tmp SpalartAllmarasDES::psi ( scalar(100), (1 - Cb1_/(Cw1_*sqr(kappa_)*fwStar_)*(ft2 + (1 - ft2)*fv2)) - /max(SMALL, (fv1*max(1e-10, 1 - ft2))) + /max(SMALL, (fv1*max(scalar(1e-10), 1 - ft2))) ) ); } From 93566da71decc4ab02328d249cfb241ea6e147c7 Mon Sep 17 00:00:00 2001 From: Andrew Heather Date: Fri, 29 Apr 2016 15:55:44 +0100 Subject: [PATCH 5/7] STYLE: Updated header documentation --- src/TurbulenceModels/schemes/DEShybrid/DEShybrid.H | 12 ++++++++---- .../DES/SpalartAllmarasDES/SpalartAllmarasDES.H | 7 ++++++- .../turbulenceModels/DES/kOmegaSSTDES/kOmegaSSTDES.H | 9 ++++++--- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/src/TurbulenceModels/schemes/DEShybrid/DEShybrid.H b/src/TurbulenceModels/schemes/DEShybrid/DEShybrid.H index 291a47a8ec..3e30d55ac2 100644 --- a/src/TurbulenceModels/schemes/DEShybrid/DEShybrid.H +++ b/src/TurbulenceModels/schemes/DEShybrid/DEShybrid.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -27,9 +27,13 @@ Class Description Hybrid convection scheme of Travin et al. for hybrid RAS/LES calculations. - The scheme blends between a low-dissipative convection scheme within the - LES region (e.g. linear) and a numerically more robust convection scheme in - the RAS region (e.g. upwind-biased schemes). + + The scheme provides a blend between two convection schemes, based on local + properties including the wall distance, velocity gradient and eddy + viscosity. The scheme was originally developed for DES calculations to + blend a low-dissipative scheme, e.g. linear, in the vorticity-dominated, + finely-resolved regions and a numerically more robust, e.g. upwind-biased, + convection scheme in irrotational or coarsely-resolved regions. The routine calculates the blending factor denoted as "sigma" in the literature reference, where 0 <= sigma <= sigmaMax, which is then employed diff --git a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDES/SpalartAllmarasDES.H b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDES/SpalartAllmarasDES.H index ea2aacc3a3..64723e5fe5 100644 --- a/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDES/SpalartAllmarasDES.H +++ b/src/TurbulenceModels/turbulenceModels/DES/SpalartAllmarasDES/SpalartAllmarasDES.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2015 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2015-2016 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -48,6 +48,11 @@ Description Theor. Comput. Fluid Dyn., 20, 181-195. \endverbatim +Note + The default value of the DES constant implemented was calibrated for + OpenFOAM using decaying isotropic turbulence and agrees with the value + suggested in the reference publication. + SourceFiles SpalartAllmarasDES.C diff --git a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDES/kOmegaSSTDES.H b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDES/kOmegaSSTDES.H index a7648d0dd1..2d88fadf07 100644 --- a/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDES/kOmegaSSTDES.H +++ b/src/TurbulenceModels/turbulenceModels/DES/kOmegaSSTDES/kOmegaSSTDES.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2016 OpenFOAM Foundation ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -37,8 +37,11 @@ Description 39th AIAA Aerospace Sciences Meeting and Exhibit, Reno, NV \endverbatim - Note: DES constants CDES_kom and CDES_keps have been re-calibrated to - OpenFOAM numerics via decaying isotropic turbulence test case +Note + The default values of the DES constants implemented are code-specific + values calibrated for OpenFOAM using decaying isotropic turbulence, and + hence deviate slightly from the values suggested in the reference + publication. SourceFiles kOmegaSSTDES.C From 1b8017697c0f032c8f177cd62d4cdaee3f7db7cf Mon Sep 17 00:00:00 2001 From: Andrew Heather Date: Fri, 29 Apr 2016 15:56:07 +0100 Subject: [PATCH 6/7] STYLE: Minor code style correction --- .../turbulenceModels/RAS/kOmegaSST/kOmegaSSTBase.H | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSST/kOmegaSSTBase.H b/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSST/kOmegaSSTBase.H index 9684892ea9..f191c16d51 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSST/kOmegaSSTBase.H +++ b/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSST/kOmegaSSTBase.H @@ -276,7 +276,7 @@ public: //- Return the turbulence kinetic energy dissipation rate virtual tmp epsilon() const { - return tmp + return tmp ( new volScalarField ( From c91712fbc3c47b6b27573374301b0c6882b7d949 Mon Sep 17 00:00:00 2001 From: Andrew Heather Date: Fri, 29 Apr 2016 16:05:47 +0100 Subject: [PATCH 7/7] ENH: foamHelp solver - added option to read solver type from the system/controlDict. Fixes #37 --- .../foamHelp/helpTypes/helpSolver/helpSolver.C | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/applications/utilities/miscellaneous/foamHelp/helpTypes/helpSolver/helpSolver.C b/applications/utilities/miscellaneous/foamHelp/helpTypes/helpSolver/helpSolver.C index 116be3f552..cac59967c3 100644 --- a/applications/utilities/miscellaneous/foamHelp/helpTypes/helpSolver/helpSolver.C +++ b/applications/utilities/miscellaneous/foamHelp/helpTypes/helpSolver/helpSolver.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -25,6 +25,7 @@ License #include "helpSolver.H" #include "addToRunTimeSelectionTable.H" +#include "fvMesh.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -63,6 +64,11 @@ void Foam::helpTypes::helpSolver::init() helpType::init(); argList::validArgs.append("solver"); + argList::addBoolOption + ( + "read", + "read solver type from the system/controlDict" + ); } @@ -78,6 +84,11 @@ void Foam::helpTypes::helpSolver::execute { displayDoc(solver, ".*solvers/.*Foam/", true, "C"); } + else if (args.optionFound("read")) + { + mesh.time().controlDict().lookup("application") >> solver; + displayDoc(solver, ".*solvers/.*Foam/", true, "C"); + } else { displayDocOptions(".*solvers/.*Foam/", true, "C");