BUG: Using autoPtr for turbulence in interFoam and interIsoFoam

This commit is contained in:
sergio 2020-12-16 15:00:15 -08:00
parent 3e431de285
commit 4bd1bd7522
5 changed files with 27 additions and 7 deletions

View File

@ -4,7 +4,7 @@
(
fvm::ddt(rho, U) + fvm::div(rhoPhi, U)
+ MRF.DDt(rho, U)
+ turbulence.divDevRhoReff(rho, U)
+ turbulence->divDevRhoReff(rho, U)
==
fvOptions(rho, U)
);

View File

@ -70,8 +70,18 @@ surfaceScalarField rhoPhi
fvc::interpolate(rho)*phi
);
incompressibleInterPhaseTransportModel<immiscibleIncompressibleTwoPhaseMixture>
turbulence(rho, U, phi, rhoPhi, mixture);
typedef incompressibleInterPhaseTransportModel
<
immiscibleIncompressibleTwoPhaseMixture
> transportModelType;
autoPtr<transportModelType> turbulence
(
new transportModelType
(
rho, U, phi, rhoPhi, mixture
)
);
#include "readGravitationalAcceleration.H"
#include "readhRef.H"

View File

@ -168,7 +168,7 @@ int main(int argc, char *argv[])
if (pimple.turbCorr())
{
turbulence.correct();
turbulence->correct();
}
}

View File

@ -71,8 +71,18 @@ surfaceScalarField rhoPhi
);
incompressibleInterPhaseTransportModel<immiscibleIncompressibleTwoPhaseMixture>
turbulence(rho, U, phi, rhoPhi, mixture);
typedef incompressibleInterPhaseTransportModel
<
immiscibleIncompressibleTwoPhaseMixture
> transportModelType;
autoPtr<transportModelType> turbulence
(
new transportModelType
(
rho, U, phi, rhoPhi, mixture
)
);
#include "readGravitationalAcceleration.H"

View File

@ -180,7 +180,7 @@ int main(int argc, char *argv[])
if (pimple.turbCorr())
{
turbulence.correct();
turbulence->correct();
}
}