diff --git a/applications/solvers/combustion/rhoReactingFoam/Make/files b/applications/solvers/combustion/rhoReactingFoam/Make/files new file mode 100644 index 0000000000..3a97a48fd6 --- /dev/null +++ b/applications/solvers/combustion/rhoReactingFoam/Make/files @@ -0,0 +1,3 @@ +rhoReactingFoam.C + +EXE = $(FOAM_APPBIN)/rhoReactingFoam diff --git a/applications/solvers/combustion/rhoReactingFoam/Make/options b/applications/solvers/combustion/rhoReactingFoam/Make/options new file mode 100644 index 0000000000..e982f635a1 --- /dev/null +++ b/applications/solvers/combustion/rhoReactingFoam/Make/options @@ -0,0 +1,19 @@ +EXE_INC = \ + -I../XiFoam \ + -I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \ + -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ + -I$(LIB_SRC)/thermophysicalModels/chemistryModel/lnInclude \ + -I$(LIB_SRC)/ODE/lnInclude \ + -I$(LIB_SRC)/finiteVolume/lnInclude + +EXE_LIBS = \ + -lcompressibleRASModels \ + -lcompressibleLESModels \ + -lreactionThermophysicalModels \ + -lspecie \ + -lbasicThermophysicalModels \ + -lchemistryModel \ + -lODE \ + -lfiniteVolume diff --git a/applications/solvers/combustion/rhoReactingFoam/YEqn.H b/applications/solvers/combustion/rhoReactingFoam/YEqn.H new file mode 100644 index 0000000000..cda24ec2f7 --- /dev/null +++ b/applications/solvers/combustion/rhoReactingFoam/YEqn.H @@ -0,0 +1,43 @@ +tmp > mvConvection +( + fv::convectionScheme::New + ( + mesh, + fields, + phi, + mesh.divScheme("div(phi,Yi_h)") + ) +); + +{ + label inertIndex = -1; + volScalarField Yt = 0.0*Y[0]; + + for (label i=0; ifvmDiv(phi, Yi) + - fvm::laplacian(turbulence->muEff(), Yi) + == + kappa*chemistry.RR(i), + mesh.solver("Yi") + ); + + Yi.max(0.0); + Yt += Yi; + } + else + { + inertIndex = i; + } + } + + Y[inertIndex] = scalar(1) - Yt; + Y[inertIndex].max(0.0); +} diff --git a/applications/solvers/combustion/rhoReactingFoam/chemistry.H b/applications/solvers/combustion/rhoReactingFoam/chemistry.H new file mode 100644 index 0000000000..d059bd9ed3 --- /dev/null +++ b/applications/solvers/combustion/rhoReactingFoam/chemistry.H @@ -0,0 +1,24 @@ +{ + Info << "Solving chemistry" << endl; + + chemistry.solve + ( + runTime.value() - runTime.deltaT().value(), + runTime.deltaT().value() + ); + + // turbulent time scale + if (turbulentReaction) + { + volScalarField tk = + Cmix*sqrt(turbulence->muEff()/rho/turbulence->epsilon()); + volScalarField tc = chemistry.tc(); + + // Chalmers PaSR model + kappa = (runTime.deltaT() + tc)/(runTime.deltaT() + tc + tk); + } + else + { + kappa = 1.0; + } +} diff --git a/applications/solvers/combustion/rhoReactingFoam/createFields.H b/applications/solvers/combustion/rhoReactingFoam/createFields.H new file mode 100644 index 0000000000..d44b4b9171 --- /dev/null +++ b/applications/solvers/combustion/rhoReactingFoam/createFields.H @@ -0,0 +1,85 @@ +Info<< nl << "Reading thermophysicalProperties" << endl; +autoPtr pChemistry +( + rhoChemistryModel::New(mesh) +); +rhoChemistryModel& chemistry = pChemistry(); + +hReactionThermo& thermo = chemistry.thermo(); + +basicMultiComponentMixture& composition = thermo.composition(); +PtrList& Y = composition.Y(); + +word inertSpecie(thermo.lookup("inertSpecie")); + +volScalarField rho +( + IOobject + ( + "rho", + runTime.timeName(), + mesh + ), + thermo.rho() +); + +Info<< "Reading field U\n" << endl; +volVectorField U +( + IOobject + ( + "U", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh +); + + +volScalarField& p = thermo.p(); +const volScalarField& psi = thermo.psi(); +volScalarField& h = thermo.h(); + + +#include "compressibleCreatePhi.H" + +volScalarField kappa +( + IOobject + ( + "kappa", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh, + dimensionedScalar("zero", dimless, 0.0) +); + +Info << "Creating turbulence model.\n" << nl; +autoPtr turbulence +( + compressible::turbulenceModel::New + ( + rho, + U, + phi, + thermo + ) +); + +Info<< "Creating field DpDt\n" << endl; +volScalarField DpDt = + fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); + +multivariateSurfaceInterpolationScheme::fieldTable fields; + +forAll (Y, i) +{ + fields.add(Y[i]); +} +fields.add(h); + diff --git a/applications/solvers/combustion/rhoReactingFoam/pEqn.H b/applications/solvers/combustion/rhoReactingFoam/pEqn.H new file mode 100644 index 0000000000..a58cd28dec --- /dev/null +++ b/applications/solvers/combustion/rhoReactingFoam/pEqn.H @@ -0,0 +1,93 @@ +{ + rho = thermo.rho(); + + // Thermodynamic density needs to be updated by psi*d(p) after the + // pressure solution - done in 2 parts. Part 1: + thermo.rho() -= psi*p; + + volScalarField rUA = 1.0/UEqn.A(); + U = rUA*UEqn.H(); + + if (transonic) + { + surfaceScalarField phiv = + (fvc::interpolate(U) & mesh.Sf()) + + fvc::ddtPhiCorr(rUA, rho, U, phi); + + phi = fvc::interpolate(rho)*phiv; + + surfaceScalarField phid + ( + "phid", + fvc::interpolate(thermo.psi())*phiv + ); + + for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) + { + fvScalarMatrix pEqn + ( + fvc::ddt(rho) + fvc::div(phi) + + correction(fvm::ddt(psi, p) + fvm::div(phid, p)) + - fvm::laplacian(rho*rUA, p) + ); + + if (ocorr == nOuterCorr && corr == nCorr && nonOrth == nNonOrthCorr) + { + pEqn.solve(mesh.solver(p.name() + "Final")); + } + else + { + pEqn.solve(); + } + + if (nonOrth == nNonOrthCorr) + { + phi += pEqn.flux(); + } + } + } + else + { + phi = + fvc::interpolate(rho) + *( + (fvc::interpolate(U) & mesh.Sf()) + + fvc::ddtPhiCorr(rUA, rho, U, phi) + ); + + for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) + { + fvScalarMatrix pEqn + ( + fvc::ddt(rho) + psi*correction(fvm::ddt(p)) + + fvc::div(phi) + - fvm::laplacian(rho*rUA, p) + ); + + if (ocorr == nOuterCorr && corr == nCorr && nonOrth == nNonOrthCorr) + { + pEqn.solve(mesh.solver(p.name() + "Final")); + } + else + { + pEqn.solve(); + } + + if (nonOrth == nNonOrthCorr) + { + phi += pEqn.flux(); + } + } + } + + // Second part of thermodynamic density update + thermo.rho() += psi*p; + + #include "rhoEqn.H" + #include "compressibleContinuityErrs.H" + + U -= rUA*fvc::grad(p); + U.correctBoundaryConditions(); + + DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); +} diff --git a/applications/solvers/combustion/rhoReactingFoam/readChemistryProperties.H b/applications/solvers/combustion/rhoReactingFoam/readChemistryProperties.H new file mode 100644 index 0000000000..ab51afe283 --- /dev/null +++ b/applications/solvers/combustion/rhoReactingFoam/readChemistryProperties.H @@ -0,0 +1,23 @@ +Info<< "Reading chemistry properties\n" << endl; + +IOdictionary chemistryProperties +( + IOobject + ( + "chemistryProperties", + runTime.constant(), + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE, + false + ) +); + +Switch turbulentReaction(chemistryProperties.lookup("turbulentReaction")); + +dimensionedScalar Cmix("Cmix", dimless, 1.0); + +if (turbulentReaction) +{ + chemistryProperties.lookup("Cmix") >> Cmix; +} diff --git a/applications/solvers/combustion/rhoReactingFoam/rhoReactingFoam.C b/applications/solvers/combustion/rhoReactingFoam/rhoReactingFoam.C new file mode 100644 index 0000000000..16f49a197f --- /dev/null +++ b/applications/solvers/combustion/rhoReactingFoam/rhoReactingFoam.C @@ -0,0 +1,102 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM; if not, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +Application + rhoReactingFoam + +Description + Chemical reaction code using density based thermodynamics package. + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" +#include "hReactionThermo.H" +#include "turbulenceModel.H" +#include "rhoChemistryModel.H" +#include "chemistrySolver.H" +#include "multivariateScheme.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int main(int argc, char *argv[]) +{ + #include "setRootCase.H" + #include "createTime.H" + #include "createMesh.H" + #include "readChemistryProperties.H" + #include "readEnvironmentalProperties.H" + #include "createFields.H" + #include "initContinuityErrs.H" + #include "readTimeControls.H" + #include "compressibleCourantNo.H" + #include "setInitialDeltaT.H" + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + Info << "\nStarting time loop\n" << endl; + + while (runTime.run()) + { + #include "readTimeControls.H" + #include "readPISOControls.H" + #include "compressibleCourantNo.H" + #include "setDeltaT.H" + + runTime++; + Info<< "Time = " << runTime.timeName() << nl << endl; + + #include "chemistry.H" + #include "rhoEqn.H" + #include "UEqn.H" + + for (label ocorr=1; ocorr <= nOuterCorr; ocorr++) + { + #include "YEqn.H" + #include "hEqn.H" + + // --- PISO loop + for (int corr=1; corr<=nCorr; corr++) + { + #include "pEqn.H" + } + } + + turbulence->correct(); + + rho = thermo.rho(); + + runTime.write(); + + Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" + << " ClockTime = " << runTime.elapsedClockTime() << " s" + << nl << endl; + } + + Info<< "End\n" << endl; + + return 0; +} + + +// ************************************************************************* // diff --git a/applications/solvers/discreteMethods/dsmc/dsmcFoam/Make/files b/applications/solvers/discreteMethods/dsmc/dsmcFoam/Make/files old mode 100755 new mode 100644 diff --git a/applications/solvers/discreteMethods/dsmc/dsmcFoam/Make/options b/applications/solvers/discreteMethods/dsmc/dsmcFoam/Make/options old mode 100755 new mode 100644 diff --git a/applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/Make/files b/applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/Make/files old mode 100755 new mode 100644 diff --git a/applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/Make/options b/applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/Make/options old mode 100755 new mode 100644 diff --git a/applications/solvers/discreteMethods/molecularDynamics/mdFoam/Make/files b/applications/solvers/discreteMethods/molecularDynamics/mdFoam/Make/files old mode 100755 new mode 100644 diff --git a/applications/solvers/discreteMethods/molecularDynamics/mdFoam/Make/options b/applications/solvers/discreteMethods/molecularDynamics/mdFoam/Make/options old mode 100755 new mode 100644 diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/UEqn.H b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/UEqn.H index 3fbe9f63b5..b408709aed 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/UEqn.H +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/UEqn.H @@ -9,35 +9,10 @@ + parcels.SU() ); - UEqn.relax(); + pZones.addResistance(UEqn); - tmp trAU; - tmp trTU; - - if (pressureImplicitPorosity) + if (momentumPredictor) { - tmp tTU = tensor(I)*UEqn.A(); - pZones.addResistance(UEqn, tTU()); - trTU = inv(tTU()); - trTU().rename("rAU"); - - volVectorField gradp = fvc::grad(p); - - for (int UCorr=0; UCorr > mvConvection Y[inertIndex] = scalar(1) - Yt; Y[inertIndex].max(0.0); - } diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createFields.H b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createFields.H index da3cca5a5b..a3054db0f5 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createFields.H @@ -73,13 +73,7 @@ ) ); - Info<< "Creating field DpDt\n" << endl; - volScalarField DpDt - ( - "DpDt", - fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p) - ); - + Info<< "Creating multi-variate interpolation scheme\n" << endl; multivariateSurfaceInterpolationScheme::fieldTable fields; forAll (Y, i) diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createPorousZones.H b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createPorousZones.H index caed85ecba..90506856d2 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createPorousZones.H +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createPorousZones.H @@ -1,21 +1,3 @@ Info<< "Creating porous zones" << nl << endl; porousZones pZones(mesh); - Switch pressureImplicitPorosity(false); - - label nUCorr = 0; - if (pZones.size()) - { - // nUCorrectors for pressureImplicitPorosity - if (mesh.solutionDict().subDict("PISO").found("nUCorrectors")) - { - mesh.solutionDict().subDict("PISO").lookup("nUCorrectors") - >> nUCorr; - } - - if (nUCorr > 0) - { - pressureImplicitPorosity = true; - } - } - diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/hEqn.H b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/hEqn.H index d686e452f4..6e6b0c763a 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/hEqn.H +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/hEqn.H @@ -1,20 +1,51 @@ { - fvScalarMatrix hEqn + tmp pWork ( - fvm::ddt(rho, h) - + mvConvection->fvmDiv(phi, h) - - fvm::laplacian(turbulence->alphaEff(), h) - == - DpDt - + parcels.Sh() - + radiation->Sh(thermo) + new volScalarField + ( + IOobject + ( + "pWork", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimensionedScalar("zero", dimensionSet(1, -1, -3, 0, 0), 0.0) + ) ); - hEqn.relax(); + if (dpdt) + { + pWork() += fvc::ddt(p); + } + if (eWork) + { + pWork() = -p*fvc::div(phi/fvc::interpolate(rho)); + } + if (hWork) + { + pWork() += fvc::div(phi/fvc::interpolate(rho)*fvc::interpolate(p)); + } - hEqn.solve(); + { + solve + ( + fvm::ddt(rho, h) + + mvConvection->fvmDiv(phi, h) + - fvm::laplacian(turbulence->alphaEff(), h) + == + pWork() + + parcels.Sh() + + radiation->Sh(thermo) + ); - thermo.correct(); + thermo.correct(); - radiation->correct(); + radiation->correct(); + + Info<< "T gas min/max = " << min(T).value() << ", " + << max(T).value() << endl; + } } diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/pEqn.H b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/pEqn.H index be4c14c8e5..32657588b0 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/pEqn.H +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/pEqn.H @@ -5,65 +5,13 @@ // pressure solution - done in 2 parts. Part 1: thermo.rho() -= psi*p; - if (pressureImplicitPorosity) + volScalarField rAU = 1.0/UEqn.A(); + U = rAU*UEqn.H(); + + if (pZones.size() > 0) { - U = trTU()&UEqn.H(); - } - else - { - U = trAU()*UEqn.H(); - } - - if (transonic) - { - surfaceScalarField phiv = fvc::interpolate(U) & mesh.Sf(); - - phi = fvc::interpolate(rho)*phiv; - - surfaceScalarField phid("phid", fvc::interpolate(psi)*phiv); - - for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) - { - tmp lapTerm; - - if (pressureImplicitPorosity) - { - lapTerm = fvm::laplacian(rho*trTU(), p); - } - else - { - lapTerm = fvm::laplacian(rho*trAU(), p); - } - - fvScalarMatrix pEqn - ( - fvc::ddt(rho) + fvc::div(phi) - + correction(psi*fvm::ddt(p) + fvm::div(phid, p)) - - lapTerm() - == - parcels.Srho() - + pointMassSources.Su() - ); - - if - ( - oCorr == nOuterCorr-1 - && corr == nCorr-1 - && nonOrth == nNonOrthCorr - ) - { - pEqn.solve(mesh.solver("pFinal")); - } - else - { - pEqn.solve(); - } - - if (nonOrth == nNonOrthCorr) - { - phi == pEqn.flux(); - } - } + // ddtPhiCorr not well defined for cases with porosity + phi = fvc::interpolate(rho)*(fvc::interpolate(U) & mesh.Sf()); } else { @@ -71,50 +19,34 @@ fvc::interpolate(rho) *( (fvc::interpolate(U) & mesh.Sf()) -// + fvc::ddtPhiCorr(trAU(), rho, U, phi) + + fvc::ddtPhiCorr(rAU, rho, U, phi) ); + } - for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) + for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) + { + fvScalarMatrix pEqn + ( + fvc::ddt(rho) + psi*correction(fvm::ddt(p)) + + fvc::div(phi) + - fvm::laplacian(rho*rAU, p) + == + parcels.Srho() + + pointMassSources.Su() + ); + + if (corr == nCorr-1 && nonOrth == nNonOrthCorr) { - tmp lapTerm; + pEqn.solve(mesh.solver("pFinal")); + } + else + { + pEqn.solve(); + } - if (pressureImplicitPorosity) - { - lapTerm = fvm::laplacian(rho*trTU(), p); - } - else - { - lapTerm = fvm::laplacian(rho*trAU(), p); - } - - fvScalarMatrix pEqn - ( - fvc::ddt(rho) + psi*correction(fvm::ddt(p)) - + fvc::div(phi) - - lapTerm() - == - parcels.Srho() - + pointMassSources.Su() - ); - - if - ( - oCorr == nOuterCorr-1 - && corr == nCorr-1 - && nonOrth == nNonOrthCorr - ) - { - pEqn.solve(mesh.solver("pFinal")); - } - else - { - pEqn.solve(); - } - - if (nonOrth == nNonOrthCorr) - { - phi += pEqn.flux(); - } + if (nonOrth == nNonOrthCorr) + { + phi += pEqn.flux(); } } @@ -124,15 +56,6 @@ #include "rhoEqn.H" #include "compressibleContinuityErrs.H" - if (pressureImplicitPorosity) - { - U -= trTU()&fvc::grad(p); - } - else - { - U -= trAU()*fvc::grad(p); - } + U -= rAU*fvc::grad(p); U.correctBoundaryConditions(); - - DpDt = fvc::DDt(surfaceScalarField("phiU", phi/fvc::interpolate(rho)), p); } diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/porousExplicitSourceReactingParcelFoam.C b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/porousExplicitSourceReactingParcelFoam.C index c7e4fee7b6..760627de80 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/porousExplicitSourceReactingParcelFoam.C +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/porousExplicitSourceReactingParcelFoam.C @@ -23,15 +23,16 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Application - trackedReactingParcelFoam + porousExplicitSourceReactingParcelFoam Description - - reacting parcel cloud tracking + - reacting parcel cloud - porous media - point mass sources - polynomial based, incompressible thermodynamics (f(T)) - Note: ddtPhiCorr not used here - not well defined for porous calcs + Note: ddtPhiCorr not used here when porous zones are active + - not well defined for porous calcs \*---------------------------------------------------------------------------*/ @@ -74,6 +75,7 @@ int main(int argc, char *argv[]) { #include "readTimeControls.H" #include "readPISOControls.H" + #include "readAdditionalSolutionControls.H" #include "compressibleCourantNo.H" #include "setDeltaT.H" @@ -88,23 +90,16 @@ int main(int argc, char *argv[]) #include "chemistry.H" #include "rhoEqn.H" #include "UEqn.H" + #include "YEqn.H" + #include "hEqn.H" - // --- PIMPLE loop - for (int oCorr=1; oCorr<=nOuterCorr; oCorr++) + // --- PISO loop + for (int corr=0; corrcorrect(); rho = thermo.rho(); diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/readAdditionalSolutionControls.H b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/readAdditionalSolutionControls.H new file mode 100644 index 0000000000..8159205cae --- /dev/null +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/readAdditionalSolutionControls.H @@ -0,0 +1,20 @@ +dictionary additional = mesh.solutionDict().subDict("additional"); + +bool dpdt = true; +if (additional.found("dpdt")) +{ + additional.lookup("dpdt") >> dpdt; +} + +bool eWork = true; +if (additional.found("eWork")) +{ + additional.lookup("eWork") >> eWork; +} + +bool hWork = true; +if (additional.found("hWork")) +{ + additional.lookup("hWork") >> hWork; +} + diff --git a/applications/utilities/mesh/conversion/ideasUnvToFoam/Make/files b/applications/utilities/mesh/conversion/ideasUnvToFoam/Make/files old mode 100755 new mode 100644 diff --git a/applications/utilities/mesh/conversion/ideasUnvToFoam/Make/options b/applications/utilities/mesh/conversion/ideasUnvToFoam/Make/options old mode 100755 new mode 100644 diff --git a/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C b/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C index 74e505394d..69dc36bccf 100644 --- a/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C +++ b/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C @@ -78,6 +78,7 @@ int main(int argc, char *argv[]) if (sourceType == "patch") { fileName sourceCasePath(dict.lookup("sourceCase")); + sourceCasePath.expand(); fileName sourceRootDir = sourceCasePath.path(); fileName sourceCaseDir = sourceCasePath.name(); word patchName(dict.lookup("sourcePatch")); diff --git a/applications/utilities/mesh/generation/extrudeMesh/setRoots.H b/applications/utilities/mesh/generation/extrudeMesh/setRoots.H deleted file mode 100644 index 9c13db28d1..0000000000 --- a/applications/utilities/mesh/generation/extrudeMesh/setRoots.H +++ /dev/null @@ -1,16 +0,0 @@ - argList::validArgs.clear(); - argList::noParallel(); - - argList::validOptions.insert("sourceCase", "source case"); - argList::validOptions.insert("sourcePatch", "source patch"); - - argList::validOptions.insert("surface", "surface file"); - - argList::validOptions.insert("mergeFaces", ""); - - argList args(argc, argv); - - if (!args.check()) - { - FatalError.exit(); - } diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict index 1da4b92f08..b19b207124 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict +++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict @@ -209,6 +209,8 @@ snapControls // Settings for the layer addition. addLayersControls { + // Are the thickness parameters below relative to the undistorted + // size of the refined cell outside layer (true) or absolute sizes (false). relativeSizes true; // Per final patch (so not geometry!) the layer information @@ -230,14 +232,13 @@ addLayersControls //- Wanted thickness of final added cell layer. If multiple layers - // is the - // thickness of the layer furthest away from the wall. - // Relative to undistorted size of cell outside layer. + // is the thickness of the layer furthest away from the wall. + // See relativeSizes parameter. finalLayerThickness 0.3; //- Minimum thickness of cell layer. If for any reason layer // cannot be above minThickness do not add layer. - // Relative to undistorted size of cell outside layer. + // See relativeSizes parameter. minThickness 0.25; //- If points get not extruded do nGrow layers of connected faces that are diff --git a/applications/utilities/postProcessing/lagrangian/particleTracks/particleTracks.C b/applications/utilities/postProcessing/lagrangian/particleTracks/particleTracks.C index 596c9e4f88..3ad01ef870 100644 --- a/applications/utilities/postProcessing/lagrangian/particleTracks/particleTracks.C +++ b/applications/utilities/postProcessing/lagrangian/particleTracks/particleTracks.C @@ -38,7 +38,7 @@ Description #include "Time.H" #include "timeSelector.H" #include "OFstream.H" -#include "passiveParticle.H" +#include "passiveParticleCloud.H" using namespace Foam; @@ -61,7 +61,8 @@ int main(int argc, char *argv[]) fileName vtkPath(runTime.path()/"VTK"); mkDir(vtkPath); - Info<< "Scanning times to determine track data" << nl << endl; + Info<< "Scanning times to determine track data for cloud " << cloudName + << nl << endl; labelList maxIds(Pstream::nProcs(), -1); forAll(timeDirs, timeI) @@ -69,35 +70,33 @@ int main(int argc, char *argv[]) runTime.setTime(timeDirs[timeI], timeI); Info<< "Time = " << runTime.timeName() << endl; - IOobject positionsHeader - ( - "positions", - runTime.timeName(), - cloud::prefix/cloudName, - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE, - false - ); + Info<< " Reading particle positions" << endl; + passiveParticleCloud myCloud(mesh, cloudName); + Info<< " Read " << returnReduce(myCloud.size(), sumOp