compressibleInterFoam: Register dgdt to ensure it is mapped after mesh topology change

This commit is contained in:
Henry Weller
2022-06-04 11:14:26 +01:00
parent 2a2cc976c4
commit e3298597e1
2 changed files with 16 additions and 5 deletions

View File

@ -76,7 +76,18 @@ surfaceScalarField rhoPhi
fvc::interpolate(rho)*phi
);
volScalarField dgdt(alpha1*fvc::div(phi));
volScalarField::Internal dgdt
(
IOobject
(
"dgdt",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
alpha1*fvc::div(phi)
);
#include "createAlphaFluxes.H"

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2013-2021 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2013-2022 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -62,7 +62,7 @@ class phaseModel
const volScalarField& T_;
autoPtr<rhoThermo> thermo_;
volScalarField Alpha_;
volScalarField dgdt_;
volScalarField::Internal dgdt_;
public:
@ -143,13 +143,13 @@ public:
}
//- Return const-access to phase divergence
const volScalarField& dgdt() const
const volScalarField::Internal& dgdt() const
{
return dgdt_;
}
//- Return access to phase divergence
volScalarField& dgdt()
volScalarField::Internal& dgdt()
{
return dgdt_;
}