From d01afadbc19f8560558556a6ef28624ce7842f68 Mon Sep 17 00:00:00 2001 From: Henry <Henry> Date: Thu, 12 Feb 2015 12:33:45 +0000 Subject: [PATCH] Name fields to avoid duplicate registration --- .../{compressibleCourantNo.H => centralCourantNo.H} | 5 +---- .../solvers/compressible/rhoCentralFoam/createFields.H | 1 - .../solvers/compressible/rhoCentralFoam/rhoCentralFoam.C | 8 +++++--- .../parallelProcessing/decomposePar/decomposePar.C | 7 +++++-- .../preProcessing/viewFactorsGen/viewFactorsGen.C | 2 +- src/combustionModels/PaSR/PaSR.C | 5 ++--- src/parallel/reconstruct/reconstruct/processorMeshes.C | 5 +++-- 7 files changed, 17 insertions(+), 16 deletions(-) rename applications/solvers/compressible/rhoCentralFoam/{compressibleCourantNo.H => centralCourantNo.H} (96%) diff --git a/applications/solvers/compressible/rhoCentralFoam/compressibleCourantNo.H b/applications/solvers/compressible/rhoCentralFoam/centralCourantNo.H similarity index 96% rename from applications/solvers/compressible/rhoCentralFoam/compressibleCourantNo.H rename to applications/solvers/compressible/rhoCentralFoam/centralCourantNo.H index 3ccce14db10..58877400af4 100644 --- a/applications/solvers/compressible/rhoCentralFoam/compressibleCourantNo.H +++ b/applications/solvers/compressible/rhoCentralFoam/centralCourantNo.H @@ -22,16 +22,13 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Global - compressibleCourantNo + centralCourantNo Description Calculates the mean and maximum wave speed based Courant Numbers. \*---------------------------------------------------------------------------*/ -scalar CoNum = 0.0; -scalar meanCoNum = 0.0; - if (mesh.nInternalFaces()) { surfaceScalarField amaxSfbyDelta diff --git a/applications/solvers/compressible/rhoCentralFoam/createFields.H b/applications/solvers/compressible/rhoCentralFoam/createFields.H index c1618d6346a..1622dd3501d 100644 --- a/applications/solvers/compressible/rhoCentralFoam/createFields.H +++ b/applications/solvers/compressible/rhoCentralFoam/createFields.H @@ -8,7 +8,6 @@ psiThermo& thermo = pThermo(); volScalarField& p = thermo.p(); volScalarField& e = thermo.he(); -const volScalarField& T = thermo.T(); const volScalarField& psi = thermo.psi(); const volScalarField& mu = thermo.mu(); diff --git a/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C b/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C index 164f0d1a209..2ec5f476171 100644 --- a/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C +++ b/applications/solvers/compressible/rhoCentralFoam/rhoCentralFoam.C @@ -53,6 +53,10 @@ int main(int argc, char *argv[]) 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; while (runTime.run()) @@ -160,7 +164,7 @@ int main(int argc, char *argv[]) // estimated by the central scheme amaxSf = max(mag(aphiv_pos), mag(aphiv_neg)); - #include "compressibleCourantNo.H" + #include "centralCourantNo.H" #include "readTimeControls.H" #include "setDeltaT.H" @@ -199,8 +203,6 @@ int main(int argc, char *argv[]) U.correctBoundaryConditions(); rhoU.boundaryField() = rho.boundaryField()*U.boundaryField(); - volScalarField rhoBydt(rho/runTime.deltaT()); - if (!inviscid) { solve diff --git a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C index 9d7d5ac3aef..05d136a058a 100644 --- a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C +++ b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -346,7 +346,10 @@ int main(int argc, char *argv[]) ( regionName, runTime.timeName(), - runTime + runTime, + IOobject::NO_READ, + IOobject::NO_WRITE, + false ) ); diff --git a/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C b/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C index e374e1969af..247ff160efe 100644 --- a/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C +++ b/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C @@ -316,7 +316,7 @@ int main(int argc, char *argv[]) ( IOobject ( - mesh.name(), + "coarse:" + mesh.name(), runTime.timeName(), runTime, IOobject::NO_READ, diff --git a/src/combustionModels/PaSR/PaSR.C b/src/combustionModels/PaSR/PaSR.C index 2e9d3f011b3..9235d840d6a 100644 --- a/src/combustionModels/PaSR/PaSR.C +++ b/src/combustionModels/PaSR/PaSR.C @@ -72,15 +72,14 @@ void Foam::combustionModels::PaSR<Type>::correct() if (turbulentReaction_) { - tmp<volScalarField> trho(this->rho()); - const volScalarField& rho = trho(); tmp<volScalarField> tepsilon(this->turbulence().epsilon()); const volScalarField& epsilon = tepsilon(); tmp<volScalarField> tmuEff(this->turbulence().muEff()); const volScalarField& muEff = tmuEff(); - tmp<volScalarField> ttc(this->tc()); const volScalarField& tc = ttc(); + tmp<volScalarField> trho(this->rho()); + const volScalarField& rho = trho(); forAll(epsilon, i) { diff --git a/src/parallel/reconstruct/reconstruct/processorMeshes.C b/src/parallel/reconstruct/reconstruct/processorMeshes.C index 2ddbd7fe8a2..c9e63eebe38 100644 --- a/src/parallel/reconstruct/reconstruct/processorMeshes.C +++ b/src/parallel/reconstruct/reconstruct/processorMeshes.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -221,7 +221,8 @@ void Foam::processorMeshes::reconstructPoints(fvMesh& mesh) polyMesh::meshSubDir, meshes_[procI], IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) ) ); -- GitLab