From 204c6ee449ddf6eb416f648ccbb4c18d4ac04002 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Tue, 7 Nov 2017 13:53:46 +0000 Subject: [PATCH] basicThermo, heSolidThermo: Added support for specifying the boundary conditions of alpha MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Patch contributed by Björn Pfeiffelmann Resolves patch request https://bugs.openfoam.org/view.php?id=2713 --- .../basic/basicThermo/basicThermo.C | 18 ++++++++++++++---- .../solidThermo/solidThermo/heSolidThermo.C | 4 +++- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/thermophysicalModels/basic/basicThermo/basicThermo.C b/src/thermophysicalModels/basic/basicThermo/basicThermo.C index 1ab32893c..c77a0eab1 100644 --- a/src/thermophysicalModels/basic/basicThermo/basicThermo.C +++ b/src/thermophysicalModels/basic/basicThermo/basicThermo.C @@ -198,11 +198,16 @@ Foam::basicThermo::basicThermo phasePropertyName("thermo:alpha"), mesh.time().timeName(), mesh, - IOobject::NO_READ, + IOobject::READ_IF_PRESENT, IOobject::NO_WRITE ), mesh, - dimensionSet(1, -1, -1, 0, 0) + dimensionedScalar + ( + "zero", + dimensionSet(1, -1, -1, 0, 0), + Zero + ) ), dpdt_(lookupOrDefault("dpdt", true)) @@ -253,11 +258,16 @@ Foam::basicThermo::basicThermo phasePropertyName("thermo:alpha"), mesh.time().timeName(), mesh, - IOobject::NO_READ, + IOobject::READ_IF_PRESENT, IOobject::NO_WRITE ), mesh, - dimensionSet(1, -1, -1, 0, 0) + dimensionedScalar + ( + "zero", + dimensionSet(1, -1, -1, 0, 0), + Zero + ) ) {} diff --git a/src/thermophysicalModels/solidThermo/solidThermo/heSolidThermo.C b/src/thermophysicalModels/solidThermo/solidThermo/heSolidThermo.C index b2cce5611..376f0b025 100644 --- a/src/thermophysicalModels/solidThermo/solidThermo/heSolidThermo.C +++ b/src/thermophysicalModels/solidThermo/solidThermo/heSolidThermo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -134,6 +134,8 @@ void Foam::heSolidThermo::calculate() } } } + + this->alpha_.correctBoundaryConditions(); }