diff --git a/applications/solvers/multiphase/multiphaseInterFoam/Allwclean b/applications/solvers/multiphase/multiphaseInterFoam/Allwclean index 9b5595f2a0..11e82c1552 100755 --- a/applications/solvers/multiphase/multiphaseInterFoam/Allwclean +++ b/applications/solvers/multiphase/multiphaseInterFoam/Allwclean @@ -3,6 +3,5 @@ cd ${0%/*} || exit 1 # Run from this directory wclean libso multiphaseMixture wclean -wclean multiphaseInterDyMFoam #------------------------------------------------------------------------------ diff --git a/applications/solvers/multiphase/multiphaseInterFoam/Allwmake b/applications/solvers/multiphase/multiphaseInterFoam/Allwmake index 0e3a0ff103..98754d5700 100755 --- a/applications/solvers/multiphase/multiphaseInterFoam/Allwmake +++ b/applications/solvers/multiphase/multiphaseInterFoam/Allwmake @@ -6,6 +6,5 @@ cd ${0%/*} || exit 1 # Run from this directory wmake $targetType multiphaseMixture wmake $targetType -wmake $targetType multiphaseInterDyMFoam #------------------------------------------------------------------------------ diff --git a/applications/solvers/multiphase/multiphaseInterFoam/Make/options b/applications/solvers/multiphase/multiphaseInterFoam/Make/options index d3a759717d..3b41b5a13b 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/Make/options +++ b/applications/solvers/multiphase/multiphaseInterFoam/Make/options @@ -20,6 +20,7 @@ EXE_LIBS = \ -lturbulenceModels \ -lincompressibleTurbulenceModels \ -lfiniteVolume \ + -ldynamicFvMesh \ -lfvOptions \ -lmeshTools \ -lsampling diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/Make/files b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/Make/files deleted file mode 100644 index 3fb8d0245f..0000000000 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -multiphaseInterDyMFoam.C - -EXE = $(FOAM_APPBIN)/multiphaseInterDyMFoam diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/Make/options b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/Make/options deleted file mode 100644 index 1068525c26..0000000000 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/Make/options +++ /dev/null @@ -1,29 +0,0 @@ -EXE_INC = \ - -I.. \ - -I../../VoF \ - -I../../interFoam \ - -I../multiphaseMixture/lnInclude \ - -I$(LIB_SRC)/transportModels \ - -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ - -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/turbulenceModels/lnInclude \ - -I$(LIB_SRC)/TurbulenceModels/incompressible/lnInclude \ - -I$(LIB_SRC)/dynamicMesh/lnInclude \ - -I$(LIB_SRC)/dynamicFvMesh/lnInclude \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/sampling/lnInclude - -EXE_LIBS = \ - -lmultiphaseInterFoam \ - -linterfaceProperties \ - -lincompressibleTransportModels \ - -lturbulenceModels \ - -lincompressibleTurbulenceModels \ - -lfiniteVolume \ - -ldynamicMesh \ - -ldynamicFvMesh \ - -ltopoChangerFvMesh \ - -lfvOptions \ - -lmeshTools \ - -lsampling diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/multiphaseInterDyMFoam.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/multiphaseInterDyMFoam.C deleted file mode 100644 index 8ccd221759..0000000000 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterDyMFoam/multiphaseInterDyMFoam.C +++ /dev/null @@ -1,171 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2017 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 - multiphaseInterFoam - -Group - grpMultiphaseSolvers grpMovingMeshSolvers - -Description - Solver for n incompressible fluids which captures the interfaces and - includes surface-tension and contact-angle effects for each phase, with - optional mesh motion and mesh topology changes. - - Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected. - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "dynamicFvMesh.H" -#include "multiphaseMixture.H" -#include "turbulentTransportModel.H" -#include "pimpleControl.H" -#include "fvOptions.H" -#include "CorrectPhi.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - #include "postProcess.H" - - #include "setRootCase.H" - #include "createTime.H" - #include "createDynamicFvMesh.H" - #include "initContinuityErrs.H" - #include "createDyMControls.H" - #include "createFields.H" - - tmp rAU; - - if (correctPhi) - ( - rAU = new volScalarField - ( - IOobject - ( - "rAU", - runTime.timeName(), - mesh, - IOobject::READ_IF_PRESENT, - IOobject::AUTO_WRITE - ), - mesh, - dimensionedScalar("rAU", dimTime/dimDensity, 1) - ) - ); - - #include "correctPhi.H" - #include "createUfIfPresent.H" - - #include "CourantNo.H" - #include "setInitialDeltaT.H" - - const surfaceScalarField& rhoPhi(mixture.rhoPhi()); - - turbulence->validate(); - - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - Info<< "\nStarting time loop\n" << endl; - - while (runTime.run()) - { - #include "readDyMControls.H" - #include "CourantNo.H" - #include "alphaCourantNo.H" - - #include "setDeltaT.H" - - runTime++; - - Info<< "Time = " << runTime.timeName() << nl << endl; - - // --- Pressure-velocity PIMPLE corrector loop - while (pimple.loop()) - { - if (pimple.firstIter() || moveMeshOuterCorrectors) - { - scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime(); - - mesh.update(); - - if (mesh.changing()) - { - Info<< "Execution time for mesh.update() = " - << runTime.elapsedCpuTime() - timeBeforeMeshUpdate - << " s" << endl; - - gh = (g & mesh.C()) - ghRef; - ghf = (g & mesh.Cf()) - ghRef; - } - - if (mesh.changing() && correctPhi) - { - // Calculate absolute flux from the mapped surface velocity - phi = mesh.Sf() & Uf(); - - #include "correctPhi.H" - - // Make the flux relative to the mesh motion - fvc::makeRelative(phi, U); - - mixture.correct(); - } - - if (mesh.changing() && checkMeshCourantNo) - { - #include "meshCourantNo.H" - } - } - - mixture.solve(); - rho = mixture.rho(); - - #include "UEqn.H" - - // --- Pressure corrector loop - while (pimple.correct()) - { - #include "pEqn.H" - } - - if (pimple.turbCorr()) - { - turbulence->correct(); - } - } - - runTime.write(); - - runTime.printExecutionTime(Info); - } - - Info<< "End\n" << endl; - - return 0; -} - - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C index 3219140465..08985131e9 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseInterFoam.C @@ -29,13 +29,15 @@ Group Description Solver for n incompressible fluids which captures the interfaces and - includes surface-tension and contact-angle effects for each phase. + includes surface-tension and contact-angle effects for each phase, with + optional mesh motion and mesh topology changes. Turbulence modelling is generic, i.e. laminar, RAS or LES may be selected. \*---------------------------------------------------------------------------*/ #include "fvCFD.H" +#include "dynamicFvMesh.H" #include "multiphaseMixture.H" #include "turbulentTransportModel.H" #include "pimpleControl.H" @@ -50,7 +52,7 @@ int main(int argc, char *argv[]) #include "setRootCase.H" #include "createTime.H" - #include "createMesh.H" + #include "createDynamicFvMesh.H" #include "initContinuityErrs.H" #include "createDyMControls.H" #include "createFields.H" @@ -79,12 +81,50 @@ int main(int argc, char *argv[]) Info<< "Time = " << runTime.timeName() << nl << endl; - mixture.solve(); - rho = mixture.rho(); - - // --- Pressure-velocity PIMPLE corrector loop + // --- Pressure-velocity PIMPLE corrector loop while (pimple.loop()) { + if (pimple.firstIter() || moveMeshOuterCorrectors) + { + scalar timeBeforeMeshUpdate = runTime.elapsedCpuTime(); + + mesh.update(); + + if (mesh.changing()) + { + Info<< "Execution time for mesh.update() = " + << runTime.elapsedCpuTime() - timeBeforeMeshUpdate + << " s" << endl; + + gh = (g & mesh.C()) - ghRef; + ghf = (g & mesh.Cf()) - ghRef; + + MRF.update(); + + if (correctPhi) + { + // Calculate absolute flux + // from the mapped surface velocity + phi = mesh.Sf() & Uf(); + + #include "correctPhi.H" + + // Make the flux relative to the mesh motion + fvc::makeRelative(phi, U); + + mixture.correct(); + } + + if (checkMeshCourantNo) + { + #include "meshCourantNo.H" + } + } + } + + mixture.solve(); + rho = mixture.rho(); + #include "UEqn.H" // --- Pressure corrector loop diff --git a/bin/interDyMFoam b/bin/interDyMFoam deleted file mode 100755 index eed3824241..0000000000 --- a/bin/interDyMFoam +++ /dev/null @@ -1,38 +0,0 @@ -#!/bin/sh -#------------------------------------------------------------------------------ -# ========= | -# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox -# \\ / O peration | -# \\ / A nd | Copyright (C) 2017 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 -# supersededByPostProcess -# -# Description -# Script to suggest using the new "postProcess" utility. -# -#------------------------------------------------------------------------------ -DyMsolver=${0##*/} -solver=$(echo $DyMsolver | sed 's/DyM//') - -echo "The dynamic mesh functionality in $DyMsolver has been merged into $solver" -echo "and the $DyMsolver tutorials moved into the $solver tutorials directory" - -#------------------------------------------------------------------------------ diff --git a/bin/interDyMFoam b/bin/interDyMFoam new file mode 120000 index 0000000000..d9fcbed5a0 --- /dev/null +++ b/bin/interDyMFoam @@ -0,0 +1 @@ +mergedDyM \ No newline at end of file diff --git a/bin/multiphaseInterDyMFoam b/bin/multiphaseInterDyMFoam new file mode 120000 index 0000000000..d9fcbed5a0 --- /dev/null +++ b/bin/multiphaseInterDyMFoam @@ -0,0 +1 @@ +mergedDyM \ No newline at end of file