From f37b3c479a47433e27a4b8531eedd082b049b2de Mon Sep 17 00:00:00 2001 From: Andrew Heather Date: Thu, 18 Jan 2018 12:09:06 +0000 Subject: [PATCH 1/3] ENH: kOmegaSSTLM improved robustness --- .../turbulenceModels/RAS/kOmegaSSTLM/kOmegaSSTLM.C | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTLM/kOmegaSSTLM.C b/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTLM/kOmegaSSTLM.C index 371b0a51f1..16bcccc5fd 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTLM/kOmegaSSTLM.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/kOmegaSSTLM/kOmegaSSTLM.C @@ -81,7 +81,12 @@ tmp kOmegaSSTLM::Fthetat const volScalarField::Internal& omega = this->omega_(); const volScalarField::Internal& y = this->y_(); - const volScalarField::Internal delta(375*Omega*nu*ReThetat_()*y/sqr(Us)); + dimensionedScalar deltaMin("deltaMin", dimLength, SMALL); + volScalarField::Internal delta + ( + max(375*Omega*nu*ReThetat_()*y/sqr(Us), deltaMin) + ); + const volScalarField::Internal ReOmega(sqr(y)*omega/nu); const volScalarField::Internal Fwake(exp(-sqr(ReOmega/1e5))); @@ -617,11 +622,11 @@ void kOmegaSSTLM::correct() return; } - // Correct ReThetat and gammaInt - correctReThetatGammaInt(); - // Correct k and omega kOmegaSST::correct(); + + // Correct ReThetat and gammaInt + correctReThetatGammaInt(); } From d4fe3b931a1f8d625931a477fbf52c8a345cec09 Mon Sep 17 00:00:00 2001 From: Andrew Heather Date: Fri, 19 Jan 2018 12:48:59 +0000 Subject: [PATCH 2/3] BUG: noiseModel - added missing read of 'writePSDf' entry --- src/randomProcesses/noise/noiseModels/noiseModel/noiseModel.C | 1 + 1 file changed, 1 insertion(+) diff --git a/src/randomProcesses/noise/noiseModels/noiseModel/noiseModel.C b/src/randomProcesses/noise/noiseModels/noiseModel/noiseModel.C index 008d161cbd..a48b57835b 100644 --- a/src/randomProcesses/noise/noiseModels/noiseModel/noiseModel.C +++ b/src/randomProcesses/noise/noiseModels/noiseModel/noiseModel.C @@ -236,6 +236,7 @@ bool Foam::noiseModel::read(const dictionary& dict) readWriteOption(optDict, "writePrmsf", writePrmsf_); readWriteOption(optDict, "writeSPL", writeSPL_); readWriteOption(optDict, "writePSD", writePSD_); + readWriteOption(optDict, "writePSDf", writePSDf_); readWriteOption(optDict, "writeOctaves", writeOctaves_); From 294a3d05ba501fa00d74726b4510855f576e5de1 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Tue, 23 Jan 2018 15:39:45 +0100 Subject: [PATCH 3/3] BUG: problems converting clouds to ensight or vtk format (closes #708) - problems when the cloud was not available on all processors. - NB: ensight measured data only allows a single cloud, but foamToEnsight writes all clouds. --- .../foamToEnsight/ensightOutputCloud.H | 4 +- .../ensightOutputCloudTemplates.C | 19 ++- .../foamToEnsight/findCloudFields.H | 15 +- .../foamToEnsight/foamToEnsight.C | 24 ++- .../foamToEnsightParts/findFields.H | 60 ++++---- .../foamToEnsightParts/foamToEnsightParts.C | 33 +++-- .../dataConversion/foamToVTK/findClouds.H | 26 ++-- .../dataConversion/foamToVTK/foamToVTK.C | 137 ++++++++++++------ .../foamToVTK/foamVtkLagrangianWriter.C | 15 +- .../foamToVTK/foamVtkLagrangianWriter.H | 14 +- .../foamVtkLagrangianWriterTemplates.C | 42 ++++-- .../HashTables/HashTableOps/HashTableOps.H | 92 ++++++++++++ 12 files changed, 335 insertions(+), 146 deletions(-) create mode 100644 src/OpenFOAM/containers/HashTables/HashTableOps/HashTableOps.H diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightOutputCloud.H b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightOutputCloud.H index d8b87935ee..b768f5180a 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightOutputCloud.H +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightOutputCloud.H @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -74,7 +74,7 @@ bool writeCloudField template bool writeCloudField ( - const IOobject& fieldObject, + IOobject& fieldObject, const bool exists, autoPtr& output ); diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightOutputCloudTemplates.C b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightOutputCloudTemplates.C index fcf68edc19..04fd865c2c 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightOutputCloudTemplates.C +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/ensightOutputCloudTemplates.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | Copyright (C) 2016-2017 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2016-2018 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -36,8 +36,8 @@ License template bool Foam::ensightCloud::writeCloudField ( - const Foam::IOField& field, - Foam::ensightFile& os + const IOField& field, + ensightFile& os ) { const bool exists = (returnReduce(field.size(), sumOp