INT: Additional integration updates

This commit is contained in:
Andrew Heather
2018-05-11 12:04:33 +01:00
parent 2f888d1684
commit 889791060c
10 changed files with 53 additions and 34 deletions

View File

@ -87,10 +87,13 @@ int main(int argc, char *argv[])
autoPtr<volScalarField> divrhoU;
if (correctPhi)
{
divrhoU = new volScalarField
divrhoU.reset
(
"divrhoU",
fvc::div(fvc::absolute(phi, rho, U))
new volScalarField
(
"divrhoU",
fvc::div(fvc::absolute(phi, rho, U))
)
);
}
@ -112,7 +115,7 @@ int main(int argc, char *argv[])
autoPtr<volVectorField> rhoU;
if (rhoUf.valid())
{
rhoU = new volVectorField("rhoU", rho*U);
rhoU.reset(new volVectorField("rhoU", rho*U));
}
// Do any mesh changes

View File

@ -56,7 +56,6 @@ int main(int argc, char *argv[])
#include "readEngineTimeControls.H"
#include "createFields.H"
#include "createFieldRefs.H"
#include "createFvOptions.H"
#include "createRhoUf.H"
#include "compressibleCourantNo.H"
#include "setInitialDeltaT.H"

View File

@ -396,7 +396,7 @@ Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureEThermo::gamma() const
{
return tmp<volScalarField>
(
(alpha1_*Cp1() + alpha2_*Cp2()) / (alpha1_*Cv1() + alpha2_*Cv2())
(alpha1_*Cp1() + alpha2_*Cp2())/(alpha1_*Cv1() + alpha2_*Cv2())
);
}
@ -429,7 +429,7 @@ Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureEThermo::Cpv
const label patchi
) const
{
// This is a e thermo (Cpv = Cv)
// This is an e thermo (Cpv = Cv)
return Cv(p, T, patchi);
}
@ -441,6 +441,13 @@ Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureEThermo::CpByCpv() const
}
Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixtureEThermo::W() const
{
NotImplemented;
return nullptr;
}
Foam::tmp<Foam::scalarField> Foam::twoPhaseMixtureEThermo::CpByCpv
(
const scalarField& p,

View File

@ -233,6 +233,9 @@ public:
const label patchi
) const;
//- Molecular weight [kg/kmol]
virtual tmp<volScalarField> W() const;
//- Thermal diffusivity for temperature of mixture [J/m/s/K]
virtual tmp<volScalarField> kappa() const;

View File

@ -38,8 +38,6 @@ SourceFiles
#include "fvMesh.H"
#define MOVING_MESH
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
namespace Foam

View File

@ -67,22 +67,25 @@ Foam::autoPtr<Foam::dynamicFvMesh> Foam::dynamicFvMesh::New(const IOobject& io)
<< exit(FatalError);
}
IOobjectConstructorTable::iterator cstrIter =
IOobjectConstructorTablePtr_->find(dynamicFvMeshTypeName);
auto cstrIter =
IOobjectConstructorTablePtr_->cfind(dynamicFvMeshTypeName);
if (cstrIter == IOobjectConstructorTablePtr_->end())
if (!cstrIter.found())
{
FatalErrorInFunction
FatalIOErrorInFunction(dict)
<< "Unknown dynamicFvMesh type "
<< dynamicFvMeshTypeName << nl << nl
<< "Valid dynamicFvMesh types are :" << endl
<< IOobjectConstructorTablePtr_->sortedToc()
<< exit(FatalError);
<< exit(FatalIOError);
}
#define MOVING_MESH
return autoPtr<dynamicFvMesh>(cstrIter()(io));
}
#undef MOVING_MESH
return autoPtr<dynamicFvMesh>(new staticFvMesh(io));
}

View File

@ -45,7 +45,7 @@ IOobject rhoUfHeader
if (rhoUfHeader.typeHeaderOk<surfaceVectorField>(true))
{
Info<< "Reading face momentum rhoUf\n" << endl;
rhoUf = new surfaceVectorField(rhoUfHeader, mesh);
rhoUf.reset(new surfaceVectorField(rhoUfHeader, mesh));
}
// ************************************************************************* //

View File

@ -37,17 +37,20 @@ if (mesh.changing())
{
Info<< "Constructing face momentum rhoUf" << endl;
rhoUf = new surfaceVectorField
rhoUf.reset
(
IOobject
new surfaceVectorField
(
"rhoUf",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
fvc::interpolate(rho*U)
IOobject
(
"rhoUf",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
fvc::interpolate(rho*U)
)
);
}
}

View File

@ -45,7 +45,7 @@ IOobject UfHeader
if (UfHeader.typeHeaderOk<surfaceVectorField>(true))
{
Info<< "Reading face velocity Uf\n" << endl;
Uf = new surfaceVectorField(UfHeader, mesh);
Uf.reset(new surfaceVectorField(UfHeader, mesh));
}
// ************************************************************************* //

View File

@ -37,17 +37,20 @@ if (mesh.changing())
{
Info<< "Constructing face velocity Uf" << endl;
Uf = new surfaceVectorField
Uf.reset
(
IOobject
new surfaceVectorField
(
"Uf",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
fvc::interpolate(U)
IOobject
(
"Uf",
runTime.timeName(),
mesh,
IOobject::READ_IF_PRESENT,
IOobject::AUTO_WRITE
),
fvc::interpolate(U)
)
);
}
}