diff --git a/applications/solvers/combustion/coldEngineFoam/Make/files b/applications/solvers/combustion/coldEngineFoam/Make/files deleted file mode 100644 index f309e1575d..0000000000 --- a/applications/solvers/combustion/coldEngineFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -coldEngineFoam.C - -EXE = $(FOAM_APPBIN)/coldEngineFoam diff --git a/applications/solvers/combustion/coldEngineFoam/Make/options b/applications/solvers/combustion/coldEngineFoam/Make/options deleted file mode 100644 index aba4841b42..0000000000 --- a/applications/solvers/combustion/coldEngineFoam/Make/options +++ /dev/null @@ -1,28 +0,0 @@ -EXE_INC = \ - -I. \ - -I../XiFoam/XiEngineFoam \ - -I../XiFoam \ - -I../../compressible/rhoPimpleFoam \ - -I$(LIB_SRC)/engine/lnInclude \ - -I$(LIB_SRC)/physicalProperties/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/specie/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/reactionThermo/lnInclude \ - -I$(LIB_SRC)/MomentumTransportModels/momentumTransportModels/lnInclude \ - -I$(LIB_SRC)/MomentumTransportModels/compressible/lnInclude \ - -I$(LIB_SRC)/ThermophysicalTransportModels/lnInclude \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/sampling/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -EXE_LIBS = \ - -lengine \ - -lfluidThermophysicalModels \ - -lmomentumTransportModels \ - -lcompressibleMomentumTransportModels \ - -lthermophysicalTransportModels \ - -lspecie \ - -lfiniteVolume \ - -lmeshTools \ - -lfvModels \ - -lfvConstraints diff --git a/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C b/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C deleted file mode 100644 index 51a82d1f93..0000000000 --- a/applications/solvers/combustion/coldEngineFoam/coldEngineFoam.C +++ /dev/null @@ -1,120 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation - \\/ 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 3 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, see . - -Application - engineFoam - -Description - Solver for cold-flow in internal combustion engines. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "engineMesh.H" -#include "psiThermo.H" -#include "compressibleMomentumTransportModels.H" -#include "fluidThermophysicalTransportModel.H" -#include "OFstream.H" -#include "fvModels.H" -#include "fvConstraints.H" -#include "pimpleControl.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - #define CREATE_MESH createEngineMesh.H - #include "postProcess.H" - - #include "setRootCaseLists.H" - #include "createTime.H" - #include "createEngineMesh.H" - #include "createControl.H" - #include "createFields.H" - #include "createFieldRefs.H" - #include "createRhoUfIfPresent.H" - #include "initContinuityErrs.H" - #include "createEngineTimeControls.H" - #include "compressibleCourantNo.H" - #include "setInitialDeltaT.H" - #include "startSummary.H" - - turbulence->validate(); - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - Info<< "\nStarting time loop\n" << endl; - - while (pimple.run(runTime)) - { - #include "readEngineTimeControls.H" - #include "compressibleCourantNo.H" - #include "setDeltaT.H" - - runTime++; - - Info<< "Engine time = " << runTime.userTimeName() << endl; - - fvModels.preUpdateMesh(); - - mesh.move(); - - #include "rhoEqn.H" - - // --- Pressure-velocity PIMPLE corrector loop - while (pimple.loop()) - { - fvModels.correct(); - - #include "UEqn.H" - - // --- Pressure corrector loop - while (pimple.correct()) - { - #include "EEqn.H" - #include "pEqn.H" - } - - if (pimple.turbCorr()) - { - turbulence->correct(); - thermophysicalTransport->correct(); - } - } - - runTime.write(); - - #include "logSummary.H" - - Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" - << " ClockTime = " << runTime.elapsedClockTime() << " s" - << nl << endl; - } - - Info<< "End\n" << endl; - - return 0; -} - - -// ************************************************************************* // diff --git a/applications/solvers/combustion/coldEngineFoam/createFieldRefs.H b/applications/solvers/combustion/coldEngineFoam/createFieldRefs.H deleted file mode 100644 index 6e1184a1fa..0000000000 --- a/applications/solvers/combustion/coldEngineFoam/createFieldRefs.H +++ /dev/null @@ -1,2 +0,0 @@ -const volScalarField& psi = thermo.psi(); -const volScalarField& T = thermo.T(); diff --git a/applications/solvers/combustion/coldEngineFoam/createFields.H b/applications/solvers/combustion/coldEngineFoam/createFields.H deleted file mode 100644 index d4974eb0d6..0000000000 --- a/applications/solvers/combustion/coldEngineFoam/createFields.H +++ /dev/null @@ -1,78 +0,0 @@ -Info<< "Reading thermophysical properties\n" << endl; - -autoPtr pThermo -( - psiThermo::New(mesh) -); -psiThermo& thermo = pThermo(); -thermo.validate(args.executable(), "h", "e"); - -volScalarField rho -( - IOobject - ( - "rho", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - thermo.rho() -); - -volScalarField& p = thermo.p(); - -Info<< "\nReading field U\n" << endl; -volVectorField U -( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh -); - -#include "compressibleCreatePhi.H" - - -Info<< "Creating turbulence model\n" << endl; -autoPtr turbulence -( - compressible::momentumTransportModel::New - ( - rho, - U, - phi, - thermo - ) -); - -Info<< "Creating thermophysical transport model\n" << endl; -autoPtr thermophysicalTransport -( - fluidThermophysicalTransportModel::New(turbulence(), thermo) -); - -Info<< "Creating field dpdt\n" << endl; -volScalarField dpdt -( - IOobject - ( - "dpdt", - runTime.timeName(), - mesh - ), - mesh, - dimensionedScalar(p.dimensions()/dimTime, 0) -); - -Info<< "Creating field kinetic energy K\n" << endl; -volScalarField K("K", 0.5*magSqr(U)); - -#include "createMRF.H" -#include "createFvModels.H" -#include "createFvConstraints.H" diff --git a/applications/solvers/combustion/coldEngineFoam/logSummary.H b/applications/solvers/combustion/coldEngineFoam/logSummary.H deleted file mode 100644 index 62664f774f..0000000000 --- a/applications/solvers/combustion/coldEngineFoam/logSummary.H +++ /dev/null @@ -1,20 +0,0 @@ -{ - const scalar meanp = p.weightedAverage(mesh.V()).value(); - const scalar meanT = T.weightedAverage(mesh.V()).value(); - const scalar meanup = - (sqrt((2.0/3.0)*turbulence->k()))().weightedAverage(mesh.V()).value(); - - if (Pstream::master()) - { - Info<< "Mean pressure:" << meanp << endl; - Info<< "Mean temperature:" << meanT << endl; - Info<< "Mean u':" << meanup << endl; - - logSummaryFile() - << runTime.userTimeValue() << tab - << meanp << tab - << meanT << tab - << meanup - << endl; - } -} diff --git a/applications/solvers/combustion/coldEngineFoam/startSummary.H b/applications/solvers/combustion/coldEngineFoam/startSummary.H deleted file mode 100644 index af32e589ed..0000000000 --- a/applications/solvers/combustion/coldEngineFoam/startSummary.H +++ /dev/null @@ -1,15 +0,0 @@ -Info<< "Total cylinder mass: " << fvc::domainIntegrate(rho).value() << endl; - -autoPtr logSummaryFile; - -if (Pstream::master()) -{ - logSummaryFile = new OFstream - ( - runTime.rootPath()/runTime.globalCaseName() - /("logSummary." + runTime.timeName() + ".dat") - ); - - logSummaryFile() - << "# CA" << " p" << " T" << " u'" << endl; -} diff --git a/bin/coldEngineFoam b/bin/coldEngineFoam new file mode 100755 index 0000000000..2a9ee61616 --- /dev/null +++ b/bin/coldEngineFoam @@ -0,0 +1,59 @@ +#!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | Website: https://openfoam.org +# \\ / A nd | Copyright (C) 2021 OpenFOAM Foundation +# \\/ 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 3 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, see . +# +# Script +# coldEngineFoam +# +# Description +# Script to inform the user that coldEngineFoam has been replaced by the +# more general rhoPimpleFoam solver. +# +#------------------------------------------------------------------------------ + +cat << EOF + +The coldEngineFoam solver has solver has been replaced by the more general rhoPimpleFoam +solver, which supports engine mesh motion using an appropriate +fvMeshMover. e.g. layeredEngine + +To run a coldEngineFoam case in rhoPimpleFoam add a mover entry in +constant/dynamicMeshDict +e.g. from the tutorials/combustion/rhoPimpleFoam/RAS/kivaTest case: + +mover +{ + type layeredEngine; + + libs ("libfvMeshMovers.so"); + + conRodLength 0.147; + bore 0.092; + stroke 0.08423; + clearance 0.00115; + pistonLayers 0; +} + +EOF + +#------------------------------------------------------------------------------