From 910d1a3021d2bc2ac37088f61b93811a56208971 Mon Sep 17 00:00:00 2001 From: Andrew Heather Date: Thu, 10 May 2018 15:13:51 +0100 Subject: [PATCH] INT: Additional integration updates --- .../solvers/combustion/XiFoam/XiEngineFoam/logSummary.H | 2 +- .../combustion/XiFoam/XiEngineFoam/startSummary.H | 9 ++++++--- .../solvers/combustion/coldEngineFoam/startSummary.H | 9 ++++++--- .../integrationScheme/integrationSchemeNew.C | 6 +++--- .../standardPhaseChange/standardPhaseChange.C | 4 ++-- .../semiPermeableBaffleMassFractionFvPatchScalarField.C | 4 ++-- .../semiPermeableBaffleVelocityFvPatchVectorField.C | 2 +- 7 files changed, 21 insertions(+), 15 deletions(-) diff --git a/applications/solvers/combustion/XiFoam/XiEngineFoam/logSummary.H b/applications/solvers/combustion/XiFoam/XiEngineFoam/logSummary.H index c243b889ae..1946f38da8 100644 --- a/applications/solvers/combustion/XiFoam/XiEngineFoam/logSummary.H +++ b/applications/solvers/combustion/XiFoam/XiEngineFoam/logSummary.H @@ -5,7 +5,7 @@ Info<< "Mean u':" << (sqrt((2.0/3.0)*turbulence->k()))().weightedAverage(mesh.V()).value() << endl; -logSummaryFile +logSummaryFile() << runTime.theta() << tab << p.weightedAverage(mesh.V()).value() << tab << thermo.T().weightedAverage(mesh.V()).value() << tab diff --git a/applications/solvers/combustion/XiFoam/XiEngineFoam/startSummary.H b/applications/solvers/combustion/XiFoam/XiEngineFoam/startSummary.H index 2c2577e43b..2d0c6fd707 100644 --- a/applications/solvers/combustion/XiFoam/XiEngineFoam/startSummary.H +++ b/applications/solvers/combustion/XiFoam/XiEngineFoam/startSummary.H @@ -4,10 +4,13 @@ autoPtr logSummaryFile; if (Pstream::master()) { - logSummaryFile = new OFstream + logSummaryFile.reset ( - runTime.rootPath()/runTime.globalCaseName() - /("logSummary." + runTime.timeName() + ".dat") + new OFstream + ( + runTime.rootPath()/runTime.globalCaseName() + /("logSummary." + runTime.timeName() + ".dat") + ) ); logSummaryFile() diff --git a/applications/solvers/combustion/coldEngineFoam/startSummary.H b/applications/solvers/combustion/coldEngineFoam/startSummary.H index af32e589ed..b4b72be696 100644 --- a/applications/solvers/combustion/coldEngineFoam/startSummary.H +++ b/applications/solvers/combustion/coldEngineFoam/startSummary.H @@ -4,10 +4,13 @@ autoPtr logSummaryFile; if (Pstream::master()) { - logSummaryFile = new OFstream + logSummaryFile.reset ( - runTime.rootPath()/runTime.globalCaseName() - /("logSummary." + runTime.timeName() + ".dat") + new OFstream + ( + runTime.rootPath()/runTime.globalCaseName() + /("logSummary." + runTime.timeName() + ".dat") + ) ); logSummaryFile() diff --git a/src/lagrangian/intermediate/integrationScheme/integrationScheme/integrationSchemeNew.C b/src/lagrangian/intermediate/integrationScheme/integrationScheme/integrationSchemeNew.C index c30959c613..5659ca92cf 100644 --- a/src/lagrangian/intermediate/integrationScheme/integrationScheme/integrationSchemeNew.C +++ b/src/lagrangian/intermediate/integrationScheme/integrationScheme/integrationSchemeNew.C @@ -39,16 +39,16 @@ Foam::autoPtr Foam::integrationScheme::New Info<< "Selecting " << phiName << " integration scheme " << schemeName << endl; - auto cstrIter = dictionaryConstructorTablePtr_->cfind(schemeName); + auto cstrIter = wordConstructorTablePtr_->cfind(schemeName); if (!cstrIter.found()) { - FatalErrorInFunction + FatalIOErrorInFunction(dict) << "Unknown integration scheme type " << schemeName << nl << nl << "Valid integration scheme types are:" << nl << wordConstructorTablePtr_->sortedToc() << nl - << exit(FatalError); + << exit(FatalIOError); } return autoPtr(cstrIter()()); diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C index 85c6d473a7..8eef47f4be 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C @@ -177,13 +177,13 @@ void standardPhaseChange::correctModel const scalar Dab = filmThermo.D(pc, Tloc); // Schmidt number - const scalar Sc = muInfc/(rhoInfc*(Dab + rootVSmall)); + const scalar Sc = muInfc/(rhoInfc*(Dab + ROOTVSMALL)); // Sherwood number const scalar Sh = this->Sh(Re, Sc); // Mass transfer coefficient [m/s] - const scalar hm = Sh*Dab/(L_ + rootVSmall); + const scalar hm = Sh*Dab/(L_ + ROOTVSMALL); // Add mass contribution to source dm = dt*magSf[celli]*rhoInfc*hm*(Ys - YInf[celli])/(1.0 - Ys); diff --git a/src/semiPermeableBaffle/derivedFvPatchFields/semiPermeableBaffleMassFraction/semiPermeableBaffleMassFractionFvPatchScalarField.C b/src/semiPermeableBaffle/derivedFvPatchFields/semiPermeableBaffleMassFraction/semiPermeableBaffleMassFractionFvPatchScalarField.C index 9c6d470dbc..550b2952cb 100644 --- a/src/semiPermeableBaffle/derivedFvPatchFields/semiPermeableBaffleMassFraction/semiPermeableBaffleMassFractionFvPatchScalarField.C +++ b/src/semiPermeableBaffle/derivedFvPatchFields/semiPermeableBaffleMassFraction/semiPermeableBaffleMassFractionFvPatchScalarField.C @@ -170,8 +170,8 @@ void Foam::semiPermeableBaffleMassFractionFvPatchScalarField::write { fvPatchScalarField::write(os); mappedPatchBase::write(os); - writeEntryIfDifferent(os, "c", scalar(0), c_); - writeEntryIfDifferent(os, "phi", "phi", phiName_); + os.writeEntryIfDifferent("c", scalar(0), c_); + os.writeEntryIfDifferent("phi", "phi", phiName_); writeEntry("value", os); } diff --git a/src/semiPermeableBaffle/derivedFvPatchFields/semiPermeableBaffleVelocity/semiPermeableBaffleVelocityFvPatchVectorField.C b/src/semiPermeableBaffle/derivedFvPatchFields/semiPermeableBaffleVelocity/semiPermeableBaffleVelocityFvPatchVectorField.C index 2850f51686..ed0853805c 100644 --- a/src/semiPermeableBaffle/derivedFvPatchFields/semiPermeableBaffleVelocity/semiPermeableBaffleVelocityFvPatchVectorField.C +++ b/src/semiPermeableBaffle/derivedFvPatchFields/semiPermeableBaffleVelocity/semiPermeableBaffleVelocityFvPatchVectorField.C @@ -168,7 +168,7 @@ void Foam::semiPermeableBaffleVelocityFvPatchVectorField::write ) const { fvPatchVectorField::write(os); - writeEntryIfDifferent(os, "rho", "rho", rhoName_); + os.writeEntryIfDifferent("rho", "rho", rhoName_); writeEntry("value", os); }