From 150b1d22bb962fdd6f175822f30c398a0e24c9d0 Mon Sep 17 00:00:00 2001 From: Andrew Heather <> Date: Tue, 16 Oct 2018 15:04:38 +0100 Subject: [PATCH] ENH: Added warning if using an isotropic assumption with an anisotropic thermal conductivity --- .../temperatureCoupledBase.C | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C index eade488e867..32467fe6702 100644 --- a/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.C +++ b/src/TurbulenceModels/compressible/turbulentFluidThermoModels/derivedFvPatchFields/temperatureCoupledBase/temperatureCoupledBase.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) 2017 OpenCFD Ltd. + \\/ M anipulation | Copyright (C) 2017-2018 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -191,6 +191,26 @@ Foam::tmp<Foam::scalarField> Foam::temperatureCoupledBase::kappa const solidThermo& thermo = mesh.lookupObject<solidThermo>(basicThermo::dictName); + if (!thermo.isotropic()) + { + word regionName = ""; + if (mesh.name() != polyMesh::defaultRegion) + { + regionName = " for region " + mesh.name(); + } + + const word& patchName = mesh.boundaryMesh()[patchi].name(); + + WarningInFunction + << "Applying isotropic thermal conductivity assumption to " + << "anisotropic model" << regionName << " at patch " + << patchName << nl + << "Consider using an isotropic conductivity model or " + << "set 'kappaMethod' to " + << KMethodTypeNames_[mtDirectionalSolidThermo] + << nl << endl; + } + return thermo.kappa(patchi); break; } -- GitLab