Name fields to avoid duplicate registration

This commit is contained in:
Henry
2015-02-12 12:33:45 +00:00
parent a4f46eb5e6
commit 018de2e37a
7 changed files with 17 additions and 16 deletions

View File

@ -22,16 +22,13 @@ License
along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
Global Global
compressibleCourantNo centralCourantNo
Description Description
Calculates the mean and maximum wave speed based Courant Numbers. Calculates the mean and maximum wave speed based Courant Numbers.
\*---------------------------------------------------------------------------*/ \*---------------------------------------------------------------------------*/
scalar CoNum = 0.0;
scalar meanCoNum = 0.0;
if (mesh.nInternalFaces()) if (mesh.nInternalFaces())
{ {
surfaceScalarField amaxSfbyDelta surfaceScalarField amaxSfbyDelta

View File

@ -8,7 +8,6 @@ psiThermo& thermo = pThermo();
volScalarField& p = thermo.p(); volScalarField& p = thermo.p();
volScalarField& e = thermo.he(); volScalarField& e = thermo.he();
const volScalarField& T = thermo.T();
const volScalarField& psi = thermo.psi(); const volScalarField& psi = thermo.psi();
const volScalarField& mu = thermo.mu(); const volScalarField& mu = thermo.mu();

View File

@ -53,6 +53,10 @@ int main(int argc, char *argv[])
dimensionedScalar v_zero("v_zero", dimVolume/dimTime, 0.0); dimensionedScalar v_zero("v_zero", dimVolume/dimTime, 0.0);
// Courant numbers used to adjust the time-step
scalar CoNum = 0.0;
scalar meanCoNum = 0.0;
Info<< "\nStarting time loop\n" << endl; Info<< "\nStarting time loop\n" << endl;
while (runTime.run()) while (runTime.run())
@ -160,7 +164,7 @@ int main(int argc, char *argv[])
// estimated by the central scheme // estimated by the central scheme
amaxSf = max(mag(aphiv_pos), mag(aphiv_neg)); amaxSf = max(mag(aphiv_pos), mag(aphiv_neg));
#include "compressibleCourantNo.H" #include "centralCourantNo.H"
#include "readTimeControls.H" #include "readTimeControls.H"
#include "setDeltaT.H" #include "setDeltaT.H"
@ -199,8 +203,6 @@ int main(int argc, char *argv[])
U.correctBoundaryConditions(); U.correctBoundaryConditions();
rhoU.boundaryField() = rho.boundaryField()*U.boundaryField(); rhoU.boundaryField() = rho.boundaryField()*U.boundaryField();
volScalarField rhoBydt(rho/runTime.deltaT());
if (!inviscid) if (!inviscid)
{ {
solve solve

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -346,7 +346,10 @@ int main(int argc, char *argv[])
( (
regionName, regionName,
runTime.timeName(), runTime.timeName(),
runTime runTime,
IOobject::NO_READ,
IOobject::NO_WRITE,
false
) )
); );

View File

@ -316,7 +316,7 @@ int main(int argc, char *argv[])
( (
IOobject IOobject
( (
mesh.name(), "coarse:" + mesh.name(),
runTime.timeName(), runTime.timeName(),
runTime, runTime,
IOobject::NO_READ, IOobject::NO_READ,

View File

@ -72,15 +72,14 @@ void Foam::combustionModels::PaSR<Type>::correct()
if (turbulentReaction_) if (turbulentReaction_)
{ {
tmp<volScalarField> trho(this->rho());
const volScalarField& rho = trho();
tmp<volScalarField> tepsilon(this->turbulence().epsilon()); tmp<volScalarField> tepsilon(this->turbulence().epsilon());
const volScalarField& epsilon = tepsilon(); const volScalarField& epsilon = tepsilon();
tmp<volScalarField> tmuEff(this->turbulence().muEff()); tmp<volScalarField> tmuEff(this->turbulence().muEff());
const volScalarField& muEff = tmuEff(); const volScalarField& muEff = tmuEff();
tmp<volScalarField> ttc(this->tc()); tmp<volScalarField> ttc(this->tc());
const volScalarField& tc = ttc(); const volScalarField& tc = ttc();
tmp<volScalarField> trho(this->rho());
const volScalarField& rho = trho();
forAll(epsilon, i) forAll(epsilon, i)
{ {

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | \\ / O peration |
\\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -221,7 +221,8 @@ void Foam::processorMeshes::reconstructPoints(fvMesh& mesh)
polyMesh::meshSubDir, polyMesh::meshSubDir,
meshes_[procI], meshes_[procI],
IOobject::MUST_READ, IOobject::MUST_READ,
IOobject::NO_WRITE IOobject::NO_WRITE,
false
) )
) )
); );