diff --git a/.gitignore b/.gitignore index a897b8121d..92f3a658f9 100644 --- a/.gitignore +++ b/.gitignore @@ -75,9 +75,10 @@ doc/Doxygen/DTAGS # Ignore .tags in the main directory /.tags -# Ignore eclipse project files in the main directory +# Ignore project files in the main directory /.cproject /.project +/.dir-locals.el # Ignore the test directory /tutorialsTest diff --git a/applications/Allwmake b/applications/Allwmake index 14ba388bf1..d851254b23 100755 --- a/applications/Allwmake +++ b/applications/Allwmake @@ -17,10 +17,7 @@ wmakeCheckPwd "$WM_PROJECT_DIR/applications" || { exit 1 } -set -x - wmake -all $targetType solvers wmake -all $targetType utilities - #------------------------------------------------------------------------------ diff --git a/applications/solvers/combustion/chemFoam/createFields.H b/applications/solvers/combustion/chemFoam/createFields.H index 62be3ce0dd..8b35089fc8 100644 --- a/applications/solvers/combustion/chemFoam/createFields.H +++ b/applications/solvers/combustion/chemFoam/createFields.H @@ -12,7 +12,7 @@ ( "initialConditions", runTime.constant(), - runTime, + mesh, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) @@ -37,7 +37,7 @@ ( "rho", runTime.timeName(), - runTime, + mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), @@ -50,7 +50,7 @@ ( "Rspecific", runTime.timeName(), - runTime, + mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), @@ -69,7 +69,7 @@ ( "U", runTime.timeName(), - runTime, + mesh, IOobject::NO_READ, IOobject::NO_WRITE ), diff --git a/applications/solvers/compressible/rhoCentralFoam/Allwclean b/applications/solvers/compressible/rhoCentralFoam/Allwclean index 34bab5c449..787221b83c 100755 --- a/applications/solvers/compressible/rhoCentralFoam/Allwclean +++ b/applications/solvers/compressible/rhoCentralFoam/Allwclean @@ -1,6 +1,5 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory -set -x wclean libso BCs wclean diff --git a/applications/solvers/compressible/rhoCentralFoam/Allwmake b/applications/solvers/compressible/rhoCentralFoam/Allwmake index 8595a53d01..5dee7d1a88 100755 --- a/applications/solvers/compressible/rhoCentralFoam/Allwmake +++ b/applications/solvers/compressible/rhoCentralFoam/Allwmake @@ -3,7 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory # Parse arguments for library compilation . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments -set -x (wmake $targetType BCs && wmake $targetType && wmake $targetType rhoCentralDyMFoam) diff --git a/applications/solvers/lagrangian/DPMFoam/Allwclean b/applications/solvers/lagrangian/DPMFoam/Allwclean index 6d736b2373..158a56c8f3 100755 --- a/applications/solvers/lagrangian/DPMFoam/Allwclean +++ b/applications/solvers/lagrangian/DPMFoam/Allwclean @@ -1,7 +1,6 @@ #!/bin/sh cd ${0%/*} || exit 1 -set -x wclean libso DPMTurbulenceModels wclean diff --git a/applications/solvers/lagrangian/DPMFoam/Allwmake b/applications/solvers/lagrangian/DPMFoam/Allwmake index 9f702db886..1f021bfc2f 100755 --- a/applications/solvers/lagrangian/DPMFoam/Allwmake +++ b/applications/solvers/lagrangian/DPMFoam/Allwmake @@ -3,7 +3,6 @@ cd ${0%/*} || exit 1 # Parse arguments for library compilation . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments -set -x wmake $targetType DPMTurbulenceModels diff --git a/applications/solvers/multiphase/MPPICInterFoam/Allwclean b/applications/solvers/multiphase/MPPICInterFoam/Allwclean index d6607c3db0..12d384e356 100755 --- a/applications/solvers/multiphase/MPPICInterFoam/Allwclean +++ b/applications/solvers/multiphase/MPPICInterFoam/Allwclean @@ -1,8 +1,7 @@ #!/bin/sh cd ${0%/*} || exit 1 # run from this directory -set -x wclean libso CompressibleTwoPhaseMixtureTurbulenceModels wclean -# ----------------------------------------------------------------- end-of-file +#------------------------------------------------------------------------------ diff --git a/applications/solvers/multiphase/MPPICInterFoam/Allwmake b/applications/solvers/multiphase/MPPICInterFoam/Allwmake index 110d4b093a..36e2f89646 100755 --- a/applications/solvers/multiphase/MPPICInterFoam/Allwmake +++ b/applications/solvers/multiphase/MPPICInterFoam/Allwmake @@ -1,8 +1,7 @@ #!/bin/sh cd ${0%/*} || exit 1 # run from this directory -set -x wmake libso CompressibleTwoPhaseMixtureTurbulenceModels wmake -# ----------------------------------------------------------------- end-of-file +#------------------------------------------------------------------------------ diff --git a/applications/solvers/multiphase/compressibleInterFoam/Allwclean b/applications/solvers/multiphase/compressibleInterFoam/Allwclean index 0e26512420..deb5e2378b 100755 --- a/applications/solvers/multiphase/compressibleInterFoam/Allwclean +++ b/applications/solvers/multiphase/compressibleInterFoam/Allwclean @@ -1,6 +1,5 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory -set -x wclean libso twoPhaseMixtureThermo wclean diff --git a/applications/solvers/multiphase/compressibleInterFoam/Allwmake b/applications/solvers/multiphase/compressibleInterFoam/Allwmake index 6542a62356..20da00c472 100755 --- a/applications/solvers/multiphase/compressibleInterFoam/Allwmake +++ b/applications/solvers/multiphase/compressibleInterFoam/Allwmake @@ -3,7 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory # Parse arguments for library compilation . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments -set -x wmake $targetType twoPhaseMixtureThermo diff --git a/applications/solvers/multiphase/compressibleInterFoam/TEqn.H b/applications/solvers/multiphase/compressibleInterFoam/TEqn.H index 13e1feb546..460c3c3e91 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/TEqn.H +++ b/applications/solvers/multiphase/compressibleInterFoam/TEqn.H @@ -5,7 +5,7 @@ + fvm::div(rhoPhi, T) - fvm::laplacian(mixture.alphaEff(turbulence->mut()), T) + ( - fvc::div(fvc::absolute(phi, U), p) + divU*p + fvc::ddt(rho, K) + fvc::div(rhoPhi, K) ) *( diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C index dc562c68e2..90d44b7a38 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/compressibleInterDyMFoam.C @@ -82,12 +82,12 @@ int main(int argc, char *argv[]) { #include "readControls.H" - { - // Store divU from the previous mesh so that it can be mapped - // and used in correctPhi to ensure the corrected phi has the - // same divergence - volScalarField divU("divU0", fvc::div(fvc::absolute(phi, U))); + // Store divU from the previous mesh so that it can be mapped + // and used in correctPhi to ensure the corrected phi has the + // same divergence + volScalarField divU("divU0", fvc::div(fvc::absolute(phi, U))); + { #include "CourantNo.H" #include "setDeltaT.H" @@ -110,8 +110,12 @@ int main(int argc, char *argv[]) ghf = (g & mesh.Cf()) - ghRef; } - if (mesh.changing() && correctPhi) + if ((correctPhi && mesh.changing()) || mesh.topoChanging()) { + // Calculate absolute flux from the mapped surface velocity + // SAF: temporary fix until mapped Uf is assessed + Uf = fvc::interpolate(U); + // Calculate absolute flux from the mapped surface velocity phi = mesh.Sf() & Uf; @@ -119,6 +123,8 @@ int main(int argc, char *argv[]) // Make the fluxes relative to the mesh motion fvc::makeRelative(phi, U); + + mesh.topoChanging(false); } } diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/pEqn.H b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/pEqn.H index fef73aa365..5423aee3c1 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/pEqn.H +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterDyMFoam/pEqn.H @@ -87,15 +87,6 @@ if (pimple.finalNonOrthogonalIter()) { - p = max(p_rgh + (alpha1*rho1 + alpha2*rho2)*gh, pMin); - p_rgh = p - (alpha1*rho1 + alpha2*rho2)*gh; - - dgdt = - ( - pos(alpha2)*(p_rghEqnComp2 & p_rgh)/rho2 - - pos(alpha1)*(p_rghEqnComp1 & p_rgh)/rho1 - ); - phi = phiHbyA + p_rghEqnIncomp.flux(); U = HbyA @@ -116,10 +107,16 @@ rho = alpha1*rho1 + alpha2*rho2; - // Correct p_rgh for consistency with p and the updated densities + p = max(p_rgh + rho*gh, pMin); p_rgh = p - rho*gh; p_rgh.correctBoundaryConditions(); + dgdt = + ( + pos(alpha2)*(p_rghEqnComp2 & p_rgh)/rho2 + - pos(alpha1)*(p_rghEqnComp1 & p_rgh)/rho1 + ); + K = 0.5*magSqr(U); Info<< "max(U) " << max(mag(U)).value() << endl; diff --git a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C index 6502258255..5042da7731 100644 --- a/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C +++ b/applications/solvers/multiphase/compressibleInterFoam/compressibleInterFoam.C @@ -98,6 +98,7 @@ int main(int argc, char *argv[]) solve(fvm::ddt(rho) + fvc::div(rhoPhi)); #include "UEqn.H" + volScalarField divU(fvc::div(fvc::absolute(phi, U))); #include "TEqn.H" // --- Pressure corrector loop diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Allwclean b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Allwclean index 628a70b516..657fd9d242 100755 --- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Allwclean +++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Allwclean @@ -1,6 +1,5 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory -set -x wclean libso multiphaseMixtureThermo wclean diff --git a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Allwmake b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Allwmake index 2a3c534c30..b92d87aef4 100755 --- a/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Allwmake +++ b/applications/solvers/multiphase/compressibleMultiphaseInterFoam/Allwmake @@ -3,7 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory # Parse arguments for library compilation . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments -set -x wmake $targetType multiphaseMixtureThermo wmake $targetType diff --git a/applications/solvers/multiphase/driftFluxFoam/Allwclean b/applications/solvers/multiphase/driftFluxFoam/Allwclean index dcdca8527f..e3d46596be 100755 --- a/applications/solvers/multiphase/driftFluxFoam/Allwclean +++ b/applications/solvers/multiphase/driftFluxFoam/Allwclean @@ -1,6 +1,5 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory -set -x wclean libso mixtureViscosityModels wclean libso relativeVelocityModels diff --git a/applications/solvers/multiphase/driftFluxFoam/Allwmake b/applications/solvers/multiphase/driftFluxFoam/Allwmake index e4af29196a..069235819e 100755 --- a/applications/solvers/multiphase/driftFluxFoam/Allwmake +++ b/applications/solvers/multiphase/driftFluxFoam/Allwmake @@ -3,7 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory # Parse arguments for library compilation . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments -set -x wmake $targetType mixtureViscosityModels wmake $targetType relativeVelocityModels diff --git a/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C b/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C index c8e3bb3721..b6e7fbae00 100644 --- a/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C +++ b/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.C @@ -24,6 +24,9 @@ License \*---------------------------------------------------------------------------*/ #include "relativeVelocityModel.H" +#include "fixedValueFvPatchFields.H" +#include "slipFvPatchFields.H" +#include "partialSlipFvPatchFields.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -33,6 +36,34 @@ namespace Foam defineRunTimeSelectionTable(relativeVelocityModel, dictionary); } +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +Foam::wordList Foam::relativeVelocityModel::UdmPatchFieldTypes() const +{ + const volVectorField& U = mixture_.U(); + + wordList UdmTypes + ( + U.boundaryField().size(), + calculatedFvPatchScalarField::typeName + ); + + forAll(U.boundaryField(), i) + { + if + ( + isA(U.boundaryField()[i]) + || isA(U.boundaryField()[i]) + || isA(U.boundaryField()[i]) + ) + { + UdmTypes[i] = fixedValueFvPatchVectorField::typeName; + } + } + + return UdmTypes; +} + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -55,11 +86,12 @@ Foam::relativeVelocityModel::relativeVelocityModel "Udm", alphac_.time().timeName(), alphac_.mesh(), - IOobject::NO_READ, + IOobject::READ_IF_PRESENT, IOobject::AUTO_WRITE ), alphac_.mesh(), - dimensionedVector("Udm", dimVelocity, Zero) + dimensionedVector("Udm", dimVelocity, Zero), + UdmPatchFieldTypes() ) {} diff --git a/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.H b/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.H index 475c87704e..420a7c3e8a 100644 --- a/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.H +++ b/applications/solvers/multiphase/driftFluxFoam/relativeVelocityModels/relativeVelocityModel/relativeVelocityModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2014 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -52,12 +52,16 @@ class relativeVelocityModel { // Private Member Functions + //- Return the list of patchFieldTypes for Udm derived from U + wordList UdmPatchFieldTypes() const; + //- Disallow default bitwise copy construct relativeVelocityModel(const relativeVelocityModel&); //- Disallow default bitwise assignment void operator=(const relativeVelocityModel&); + protected: // Protected data diff --git a/applications/solvers/multiphase/interCondensingEvaporatingFoam/Allwclean b/applications/solvers/multiphase/interCondensingEvaporatingFoam/Allwclean index 8717ef8953..eaec8f77a1 100755 --- a/applications/solvers/multiphase/interCondensingEvaporatingFoam/Allwclean +++ b/applications/solvers/multiphase/interCondensingEvaporatingFoam/Allwclean @@ -1,6 +1,5 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory -set -x wclean libso temperaturePhaseChangeTwoPhaseMixtures wclean diff --git a/applications/solvers/multiphase/interCondensingEvaporatingFoam/Allwmake b/applications/solvers/multiphase/interCondensingEvaporatingFoam/Allwmake index 523c10c33c..59af9259fe 100755 --- a/applications/solvers/multiphase/interCondensingEvaporatingFoam/Allwmake +++ b/applications/solvers/multiphase/interCondensingEvaporatingFoam/Allwmake @@ -4,7 +4,6 @@ cd ${0%/*} || exit 1 # Run from this directory # Parse arguments for library compilation targetType=libso . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments -set -x wmake $targetType temperaturePhaseChangeTwoPhaseMixtures wmake diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/Allwclean b/applications/solvers/multiphase/interPhaseChangeFoam/Allwclean index bc351e27d8..573e235fdc 100755 --- a/applications/solvers/multiphase/interPhaseChangeFoam/Allwclean +++ b/applications/solvers/multiphase/interPhaseChangeFoam/Allwclean @@ -1,6 +1,5 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory -set -x wclean libso phaseChangeTwoPhaseMixtures wclean diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/Allwmake b/applications/solvers/multiphase/interPhaseChangeFoam/Allwmake index c0ac039a55..dfcde284ea 100755 --- a/applications/solvers/multiphase/interPhaseChangeFoam/Allwmake +++ b/applications/solvers/multiphase/interPhaseChangeFoam/Allwmake @@ -3,7 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory # Parse arguments for library compilation . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments -set -x wmake $targetType phaseChangeTwoPhaseMixtures wmake $targetType diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/Allwclean b/applications/solvers/multiphase/multiphaseEulerFoam/Allwclean index 6d174c19d9..727191ec35 100755 --- a/applications/solvers/multiphase/multiphaseEulerFoam/Allwclean +++ b/applications/solvers/multiphase/multiphaseEulerFoam/Allwclean @@ -1,6 +1,5 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory -set -x wclean libso multiphaseSystem wclean libso interfacialModels diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/Allwmake b/applications/solvers/multiphase/multiphaseEulerFoam/Allwmake index d81a6d71a8..d38522312d 100755 --- a/applications/solvers/multiphase/multiphaseEulerFoam/Allwmake +++ b/applications/solvers/multiphase/multiphaseEulerFoam/Allwmake @@ -3,7 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory # Parse arguments for library compilation . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments -set -x wmakeLnInclude interfacialModels wmake $targetType multiphaseSystem diff --git a/applications/solvers/multiphase/multiphaseInterFoam/Allwclean b/applications/solvers/multiphase/multiphaseInterFoam/Allwclean index 75d8939d31..9b5595f2a0 100755 --- a/applications/solvers/multiphase/multiphaseInterFoam/Allwclean +++ b/applications/solvers/multiphase/multiphaseInterFoam/Allwclean @@ -1,6 +1,5 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory -set -x wclean libso multiphaseMixture wclean diff --git a/applications/solvers/multiphase/multiphaseInterFoam/Allwmake b/applications/solvers/multiphase/multiphaseInterFoam/Allwmake index 000e9f7743..50f78a705c 100755 --- a/applications/solvers/multiphase/multiphaseInterFoam/Allwmake +++ b/applications/solvers/multiphase/multiphaseInterFoam/Allwmake @@ -3,7 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory # Parse arguments for library compilation . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments -set -x wmake $targetType multiphaseMixture wmake $targetType diff --git a/applications/solvers/multiphase/reactingEulerFoam/Allwclean b/applications/solvers/multiphase/reactingEulerFoam/Allwclean index 5474c3349a..ad8f3f8faf 100755 --- a/applications/solvers/multiphase/reactingEulerFoam/Allwclean +++ b/applications/solvers/multiphase/reactingEulerFoam/Allwclean @@ -1,6 +1,5 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory -set -x wclean libso phaseSystems wclean libso interfacialModels diff --git a/applications/solvers/multiphase/reactingEulerFoam/Allwmake b/applications/solvers/multiphase/reactingEulerFoam/Allwmake index f67d35aa29..87e6a81e3f 100755 --- a/applications/solvers/multiphase/reactingEulerFoam/Allwmake +++ b/applications/solvers/multiphase/reactingEulerFoam/Allwmake @@ -3,7 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory # Parse arguments for library compilation . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments -set -x wmakeLnInclude interfacialModels wmakeLnInclude interfacialCompositionModels diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C index 6ca75c6ed4..b5dd4ab37a 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.C @@ -77,11 +77,39 @@ void Foam::AnisothermalPhaseModel::correctThermo() } +template +Foam::tmp +Foam::AnisothermalPhaseModel::filterPressureWork +( + const tmp& pressureWork +) const +{ + const volScalarField& alpha = *this; + + scalar pressureWorkAlphaLimit = + this->thermo_->lookupOrDefault("pressureWorkAlphaLimit", 0.0); + + if (pressureWorkAlphaLimit > 0) + { + return + ( + max(alpha - pressureWorkAlphaLimit, scalar(0)) + /max(alpha - pressureWorkAlphaLimit, pressureWorkAlphaLimit) + )*pressureWork; + } + else + { + return pressureWork; + } +} + + template Foam::tmp Foam::AnisothermalPhaseModel::heEqn() { const volScalarField& alpha = *this; + const volVectorField& U = this->U(); const surfaceScalarField& alphaPhi = this->alphaPhi(); const surfaceScalarField& alphaRhoPhi = this->alphaRhoPhi(); @@ -93,7 +121,8 @@ Foam::AnisothermalPhaseModel::heEqn() tmp tEEqn ( - fvm::ddt(alpha, this->rho(), he) + fvm::div(alphaRhoPhi, he) + fvm::ddt(alpha, this->rho(), he) + + fvm::div(alphaRhoPhi, he) - fvm::Sp(contErr, he) + fvc::ddt(alpha, this->rho(), K_) + fvc::div(alphaRhoPhi, K_) @@ -112,13 +141,15 @@ Foam::AnisothermalPhaseModel::heEqn() // Add the appropriate pressure-work term if (he.name() == this->thermo_->phasePropertyName("e")) { - tEEqn.ref() += - fvc::ddt(alpha)*this->thermo().p() - + fvc::div(alphaPhi, this->thermo().p()); + tEEqn.ref() += filterPressureWork + ( + fvc::div(fvc::absolute(alphaPhi, alpha, U), this->thermo().p()) + + this->thermo().p()*fvc::ddt(alpha) + ); } else if (this->thermo_->dpdt()) { - tEEqn.ref() -= alpha*this->fluid().dpdt(); + tEEqn.ref() -= filterPressureWork(alpha*this->fluid().dpdt()); } return tEEqn; diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.H b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.H index 7a9cbd51bf..86edbcd1f8 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.H +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/AnisothermalPhaseModel/AnisothermalPhaseModel.H @@ -58,6 +58,15 @@ class AnisothermalPhaseModel volScalarField K_; + // Private member functions + + //- Optionally filter the pressure work term as the phase-fraction -> 0 + tmp filterPressureWork + ( + const tmp& pressureWork + ) const; + + public: // Constructors diff --git a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ReactingPhaseModel/ReactingPhaseModel.C b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ReactingPhaseModel/ReactingPhaseModel.C index 96a76de169..b15f2898b5 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ReactingPhaseModel/ReactingPhaseModel.C +++ b/applications/solvers/multiphase/reactingEulerFoam/phaseSystems/phaseModel/ReactingPhaseModel/ReactingPhaseModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2015 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2016 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -40,7 +40,12 @@ Foam::ReactingPhaseModel::ReactingPhaseModel BasePhaseModel(fluid, phaseName, index, false), reaction_ ( - ReactionType::New(fluid.mesh(), this->name()) + ReactionType::New + ( + fluid.mesh(), + combustionModel::combustionPropertiesName, + this->name() + ) ) { this->thermo_ = &reaction_->thermo(); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Allwclean b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Allwclean index 983c20bdc1..451b6672a9 100755 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Allwclean +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Allwclean @@ -1,6 +1,5 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory -set -x wclean libso multiphaseSystem wclean libso multiphaseCompressibleTurbulenceModels diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Allwmake b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Allwmake index ea7fab7a82..05211a0039 100755 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Allwmake +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/Allwmake @@ -3,7 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory # Parse arguments for library compilation . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments -set -x wmake $targetType multiphaseSystem wmake $targetType multiphaseCompressibleTurbulenceModels diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/EEqns.H b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/EEqns.H index 0130a872c9..e4689efee6 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/EEqns.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/EEqns.H @@ -35,6 +35,7 @@ for (int Ecorr=0; Ecorr phiFs(phases.size()); // --- Pressure corrector loop while (pimple.correct()) { - // Update continuity errors due to temperature changes - fluid.correct(); - volScalarField rho("rho", fluid.rho()); // Correct p_rgh for consistency with p and the updated densities diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/reactingMultiphaseEulerFoam.C b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/reactingMultiphaseEulerFoam.C index 9807a0ae20..55b6773862 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/reactingMultiphaseEulerFoam.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingMultiphaseEulerFoam/reactingMultiphaseEulerFoam.C @@ -77,11 +77,6 @@ int main(int argc, char *argv[]) //#include "pUf/createDDtU.H" - int nEnergyCorrectors - ( - pimple.dict().lookupOrDefault("nEnergyCorrectors", 1) - ); - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; @@ -90,6 +85,11 @@ int main(int argc, char *argv[]) { #include "readTimeControls.H" + int nEnergyCorrectors + ( + pimple.dict().lookupOrDefault("nEnergyCorrectors", 1) + ); + if (LTS) { #include "setRDeltaT.H" diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/Allwclean b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/Allwclean index 59ec72ff10..2d0f2fde9e 100755 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/Allwclean +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/Allwclean @@ -1,6 +1,5 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory -set -x wclean libso twoPhaseSystem wclean libso twoPhaseCompressibleTurbulenceModels diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/Allwmake b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/Allwmake index d151b361df..49c983288e 100755 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/Allwmake +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/Allwmake @@ -3,7 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory # Parse arguments for library compilation . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments -set -x wmake $targetType twoPhaseSystem wmake $targetType twoPhaseCompressibleTurbulenceModels diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/EEqns.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/EEqns.H index 0cdbfba8b9..d9f1e85e6f 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/EEqns.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/EEqns.H @@ -29,36 +29,25 @@ for (int Ecorr=0; Ecorr E2eqn(phase2.heEqn()); + tmp E2Eqn(phase2.heEqn()); - if (E2eqn.valid()) + if (E2Eqn.valid()) { - E2eqn = + E2Eqn = ( - E2eqn + E2Eqn == *heatTransfer[phase2.name()] + alpha2*rho2*(U2&g) + fvOptions(alpha2, rho2, phase2.thermo().he()) ); - E2eqn->relax(); - fvOptions.constrain(E2eqn.ref()); - E2eqn->solve(); + E2Eqn->relax(); + fvOptions.constrain(E2Eqn.ref()); + E2Eqn->solve(); } } fluid.correctThermo(); + fluid.correct(); } - -Info<< phase1.name() << " min/max T " - << min(phase1.thermo().T()).value() - << " - " - << max(phase1.thermo().T()).value() - << endl; - -Info<< phase2.name() << " min/max T " - << min(phase2.thermo().T()).value() - << " - " - << max(phase2.thermo().T()).value() - << endl; diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/createRDeltaTf.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/createRDeltaTf.H new file mode 100644 index 0000000000..5a4c77eacf --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/createRDeltaTf.H @@ -0,0 +1,21 @@ +tmp trDeltaTf; + +if (LTS && faceMomentum) +{ + trDeltaTf = tmp + ( + new surfaceScalarField + ( + IOobject + ( + fv::localEulerDdt::rDeltaTfName, + runTime.timeName(), + mesh, + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ), + mesh, + dimensionedScalar("one", dimless/dimTime, 1) + ) + ); +} diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pU/pEqn.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pU/pEqn.H index 9020cd6d5d..3b225202e9 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pU/pEqn.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pU/pEqn.H @@ -83,9 +83,6 @@ tmp phiF2; // --- Pressure corrector loop while (pimple.correct()) { - // Update continuity errors due to temperature changes - fluid.correct(); - volScalarField rho("rho", fluid.rho()); // Correct p_rgh for consistency with p and the updated densities diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/DDtU.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/DDtU.H index 63b61cd61a..c7bccf66ea 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/DDtU.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/DDtU.H @@ -1,9 +1,2 @@ - ddtPhi1 = - ( - (phi1 - phi1.oldTime())/runTime.deltaT() - ); - - ddtPhi2 = - ( - (phi2 - phi2.oldTime())/runTime.deltaT() - ); +ddtPhi1 = fvc::ddt(phi1); +ddtPhi2 = fvc::ddt(phi2); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/createDDtU.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/createDDtU.H index 7445d4af23..14e66e47a8 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/createDDtU.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/createDDtU.H @@ -1,9 +1,2 @@ - surfaceScalarField ddtPhi1 - ( - (phi1 - phi1.oldTime())/runTime.deltaT() - ); - - surfaceScalarField ddtPhi2 - ( - (phi2 - phi2.oldTime())/runTime.deltaT() - ); +surfaceScalarField ddtPhi1(fvc::ddt(phi1)); +surfaceScalarField ddtPhi2(fvc::ddt(phi2)); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/pEqn.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/pEqn.H index b27c9f4646..7950d76b94 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/pEqn.H +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/pUf/pEqn.H @@ -32,10 +32,10 @@ surfaceScalarField rAUf1 IOobject::groupName("rAUf", phase1.name()), 1.0 /( - (alphaRhof10 + Vmf)/runTime.deltaT() + byDt(alphaRhof10 + Vmf) + fvc::interpolate(U1Eqn.A()) + Kdf - ) + ) ); surfaceScalarField rAUf2 @@ -43,10 +43,10 @@ surfaceScalarField rAUf2 IOobject::groupName("rAUf", phase2.name()), 1.0 /( - (alphaRhof20 + Vmf)/runTime.deltaT() + byDt(alphaRhof20 + Vmf) + fvc::interpolate(U2Eqn.A()) + Kdf - ) + ) ); @@ -93,9 +93,6 @@ tmp Ff2; while (pimple.correct()) { - // Update continuity errors due to temperature changes - fluid.correct(); - volScalarField rho("rho", fluid.rho()); // Correct p_rgh for consistency with p and the updated densities @@ -160,7 +157,7 @@ while (pimple.correct()) rAUf1 *( (alphaRhof10 + Vmf) - *MRF.absolute(phi1.oldTime())/runTime.deltaT() + *byDt(MRF.absolute(phi1.oldTime())) + fvc::flux(U1Eqn.H()) + Vmf*ddtPhi2 + Kdf*MRF.absolute(phi2) @@ -178,7 +175,7 @@ while (pimple.correct()) rAUf2 *( (alphaRhof20 + Vmf) - *MRF.absolute(phi2.oldTime())/runTime.deltaT() + *byDt(MRF.absolute(phi2.oldTime())) + fvc::flux(U2Eqn.H()) + Vmf*ddtPhi1 + Kdf*MRF.absolute(phi1) diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/reactingTwoPhaseEulerFoam.C b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/reactingTwoPhaseEulerFoam.C index 40bcc365a0..f180257e9c 100644 --- a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/reactingTwoPhaseEulerFoam.C +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/reactingTwoPhaseEulerFoam.C @@ -43,6 +43,22 @@ Description #include "localEulerDdtScheme.H" #include "fvcSmooth.H" +namespace Foam +{ + tmp byDt(const surfaceScalarField& sf) + { + if (fv::localEulerDdt::enabled(sf.mesh())) + { + return fv::localEulerDdt::localRDeltaTf(sf.mesh())*sf; + } + else + { + return sf/sf.mesh().time().deltaT(); + } + } +} + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // int main(int argc, char *argv[]) @@ -76,13 +92,9 @@ int main(int argc, char *argv[]) ) ); + #include "createRDeltaTf.H" #include "pUf/createDDtU.H" - int nEnergyCorrectors - ( - pimple.dict().lookupOrDefault("nEnergyCorrectors", 1) - ); - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // Info<< "\nStarting time loop\n" << endl; @@ -91,9 +103,18 @@ int main(int argc, char *argv[]) { #include "readTimeControls.H" + int nEnergyCorrectors + ( + pimple.dict().lookupOrDefault("nEnergyCorrectors", 1) + ); + if (LTS) { #include "setRDeltaT.H" + if (faceMomentum) + { + #include "setRDeltaTf.H" + } } else { diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/setRDeltaTf.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/setRDeltaTf.H new file mode 100644 index 0000000000..1c0366dc3b --- /dev/null +++ b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/setRDeltaTf.H @@ -0,0 +1 @@ +trDeltaTf.ref() = fvc::interpolate(fv::localEulerDdt::localRDeltaT(mesh)); diff --git a/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.H b/applications/solvers/multiphase/reactingEulerFoam/reactingTwoPhaseEulerFoam/twoPhaseCompressibleTurbulenceModels/derivedFvPatchFields/alphatWallBoilingWallFunction/alphatWallBoilingWallFunctionFvPatchScalarField.H old mode 100755 new mode 100644 diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/Allwclean b/applications/solvers/multiphase/twoPhaseEulerFoam/Allwclean index aec9873881..056bc90a3d 100755 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/Allwclean +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/Allwclean @@ -1,6 +1,5 @@ #!/bin/sh cd ${0%/*} || exit 1 # Run from this directory -set -x wclean libso twoPhaseSystem wclean libso interfacialModels diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/Allwmake b/applications/solvers/multiphase/twoPhaseEulerFoam/Allwmake index a73a5ce416..9eb3ae37c4 100755 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/Allwmake +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/Allwmake @@ -3,7 +3,6 @@ cd ${0%/*} || exit 1 # Run from this directory # Parse arguments for library compilation . $WM_PROJECT_DIR/wmake/scripts/AllwmakeParseArguments -set -x wmakeLnInclude interfacialModels wmake $targetType twoPhaseSystem diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/EEqns.H b/applications/solvers/multiphase/twoPhaseEulerFoam/EEqns.H index 25b97c17a1..308e7589f9 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/EEqns.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/EEqns.H @@ -16,7 +16,8 @@ - contErr1*K1 + ( he1.name() == thermo1.phasePropertyName("e") - ? fvc::ddt(alpha1)*p + fvc::div(alphaPhi1, p) + ? fvc::div(fvc::absolute(alphaPhi1, alpha1, U1), p) + + p*fvc::ddt(alpha1) : -alpha1*dpdt ) @@ -48,7 +49,8 @@ - contErr2*K2 + ( he2.name() == thermo2.phasePropertyName("e") - ? fvc::ddt(alpha2)*p + fvc::div(alphaPhi2, p) + ? fvc::div(fvc::absolute(alphaPhi2, alpha2, U2), p) + + p*fvc::ddt(alpha1) : -alpha2*dpdt ) diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phaseModel/phaseModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phaseModel/phaseModel.C index eedb89cc55..f5522c7509 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phaseModel/phaseModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phaseModel/phaseModel.C @@ -248,4 +248,30 @@ bool Foam::phaseModel::read(const dictionary& phaseProperties) } +void Foam::phaseModel::correctInflowFlux(surfaceScalarField& alphaPhi) const +{ + surfaceScalarField::Boundary& alphaPhiBf = alphaPhi.boundaryFieldRef(); + + // Ensure that the flux at inflow BCs is preserved + forAll(alphaPhiBf, patchi) + { + fvsPatchScalarField& alphaPhip = alphaPhiBf[patchi]; + + if (!alphaPhip.coupled()) + { + const scalarField& phip = phi().boundaryField()[patchi]; + const scalarField& alphap = boundaryField()[patchi]; + + forAll(alphaPhip, facei) + { + if (phip[facei] < SMALL) + { + alphaPhip[facei] = alphap[facei]*phip[facei]; + } + } + } + } +} + + // ************************************************************************* // diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phaseModel/phaseModel.H b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phaseModel/phaseModel.H index 5fb0245513..a5ae107c90 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phaseModel/phaseModel.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/phaseModel/phaseModel.H @@ -319,6 +319,9 @@ public: return alphaRhoPhi_; } + //- Ensure that the flux at inflow BCs is preserved + void correctInflowFlux(surfaceScalarField& alphaPhi) const; + //- Correct the phase properties // other than the thermodynamics and turbulence // which have special treatment diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C index 7c2323a030..808fe255f9 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/twoPhaseSystem/twoPhaseSystem.C @@ -444,28 +444,7 @@ void Foam::twoPhaseSystem::solve() ) ); - surfaceScalarField::Boundary& alphaPhic1Bf = - alphaPhic1.boundaryFieldRef(); - - // Ensure that the flux at inflow BCs is preserved - forAll(alphaPhic1Bf, patchi) - { - fvsPatchScalarField& alphaPhic1p = alphaPhic1Bf[patchi]; - - if (!alphaPhic1p.coupled()) - { - const scalarField& phi1p = phi1.boundaryField()[patchi]; - const scalarField& alpha1p = alpha1.boundaryField()[patchi]; - - forAll(alphaPhic1p, facei) - { - if (phi1p[facei] < 0) - { - alphaPhic1p[facei] = alpha1p[facei]*phi1p[facei]; - } - } - } - } + phase1_.correctInflowFlux(alphaPhic1); if (nAlphaSubCycles > 1) { @@ -537,6 +516,7 @@ void Foam::twoPhaseSystem::solve() phase2_.alphaPhi() = phi_ - phase1_.alphaPhi(); alpha2 = scalar(1) - alpha1; + phase2_.correctInflowFlux(phase2_.alphaPhi()); phase2_.alphaRhoPhi() = fvc::interpolate(phase2_.rho())*phase2_.alphaPhi(); diff --git a/applications/test/dimensionedType/Test-dimensionedType.C b/applications/test/dimensionedType/Test-dimensionedType.C index 965de25ead..892552fa70 100644 --- a/applications/test/dimensionedType/Test-dimensionedType.C +++ b/applications/test/dimensionedType/Test-dimensionedType.C @@ -81,6 +81,10 @@ int main(int argc, char *argv[]) } + Pout<< "zero scalar (time): " << dimensionedScalar(dimTime) << endl; + Pout<< "zero vector: " << dimensionedVector(dimLength) << endl; + Pout<< "zero tensor: " << dimensionedTensor(dimLength) << endl; + Info<< "End\n" << endl; return 0; diff --git a/applications/test/objectRegistry/Make/files b/applications/test/objectRegistry/Make/files new file mode 100644 index 0000000000..b7c477f791 --- /dev/null +++ b/applications/test/objectRegistry/Make/files @@ -0,0 +1,3 @@ +Test-objectRegistry.C + +EXE = $(FOAM_USER_APPBIN)/Test-objectRegistry diff --git a/applications/test/objectRegistry/Make/options b/applications/test/objectRegistry/Make/options new file mode 100644 index 0000000000..6a9e9810b3 --- /dev/null +++ b/applications/test/objectRegistry/Make/options @@ -0,0 +1,2 @@ +/* EXE_INC = -I$(LIB_SRC)/cfdTools/include */ +/* EXE_LIBS = -lfiniteVolume */ diff --git a/applications/test/objectRegistry/Test-objectRegistry.C b/applications/test/objectRegistry/Test-objectRegistry.C new file mode 100644 index 0000000000..5ccdb3fe91 --- /dev/null +++ b/applications/test/objectRegistry/Test-objectRegistry.C @@ -0,0 +1,285 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2016 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 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 + Test-objectRegistry + +Description + Simple test of objectRegistry functionality. + Particular focus on the behaviour of subRegistry. + +\*---------------------------------------------------------------------------*/ + +#include "argList.H" +#include "Time.H" +#include "polyMesh.H" +#include "IOstreams.H" +#include "objectRegistry.H" +#include "hashedWordList.H" + +using namespace Foam; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// file variable, needed for switching the default in lookupObject etc. +bool recursive = false; + + +template +Foam::Ostream& printList(Foam::Ostream& os, const UList& list) +{ + // list with out any linebreaks + os << '('; + forAll(list, i) + { + if (i) os << ' '; + os << list[i]; + } + os << ')'; + + return os; +} + + +void printRegistry +( + Foam::Ostream& os, + const Foam::objectRegistry& obr, + Foam::label indent = 4 +); + + +void printRegistry +( + Foam::Ostream& os, + const Foam::objectRegistry& obr, + Foam::label indent +) +{ + wordList names = obr.sortedNames(); + hashedWordList regs = obr.sortedNames(); + + std::string prefix; + for (label i=indent; i; --i) + { + prefix += ' '; + } + + os << '#' << prefix.c_str() << obr.name() + << " parent:" << obr.parent().name() << nl; + + // all names + { + os << ' ' << prefix.c_str() << "objects: "; + printList(os, names) << nl; + } + + // sub-registry names + { + os << ' ' << prefix.c_str() << "registries: "; + printList(os, regs) << nl; + } + + // Print, but skip expansion of sub-registries for now + forAll(names, i) + { + const word& name = names[i]; + + os << (regs.found(name) ? '-' : ' ') + << prefix.c_str() << name << " => " << obr[name]->type() << nl; + } + for (label i=indent; i; --i) + { + os << '-'; // divider + } + os << '\n'; + + // Now descend into the sub-registries + forAll(regs, i) + { + const word& name = regs[i]; + const objectRegistry& next = obr.lookupObject + ( + name, + recursive + ); + + os << prefix.c_str() + << "current:" << obr.name() << " next:" + << next.name() << " next-parent:" << next.parent().name() << nl; + + os << prefix.c_str() << name << " => " << obr[name]->type(); + + if ("dictionary" == obr[name]->type()) + { + os << " (skip dictionary)" << nl; + } + else + { + os << nl; + printRegistry(os, next, indent + 4); + } + } +} + +// Main program: + +int main(int argc, char *argv[]) +{ + argList::noBanner(); + argList::noParallel(); + argList::addBoolOption + ( + "mesh", + "test with polyMesh objectRegistry instead of runTime" + ); + argList::addBoolOption + ( + "skip", + "skip some parts" + ); + argList::validArgs.append("recursive (true|false)"); + + #include "setRootCase.H" + #include "createTime.H" + #include "createPolyMesh.H" + + recursive = Switch(args[1]); + + const bool optMesh = args.optionFound("mesh"); + const bool optSkip = args.optionFound("skip"); + const objectRegistry& db = (optMesh ? mesh.thisDb() : runTime); + + Info<<"## start ##" << nl; + printRegistry(Info, db); + Info<< nl; + + const label nRegs = 3; + + // Add some items + for (label j = 0; j < 3; ++j) + { + word entryName = "entry" + name(j); + db.subRegistry + ( + entryName, + true, + recursive + ); + } + + Info<<"## initally populated ##" << nl; + printRegistry(Info, db); + Info<< nl; + + + // create a few sub-registries + for (label i = 0; i < nRegs; ++i) + { + word regName = "subreg" + name(i); + + const objectRegistry& subreg = db.subRegistry + ( + regName, + true, + recursive + ); + + for (label j = 0; j < 3; ++j) + { + word entryName = "entry" + name(j); + + subreg.subRegistry + ( + entryName, + true, + recursive + ); + subreg.subRegistry + ( + "$" + entryName, // qualified to avoid collisions + true, + recursive + ); + } + } + + Info<<"## after adding sub-registries" << nl; + printRegistry(Info, db); + Info<< nl; + + // Add further items into top-level + for (label j = 0; j < 6; ++j) + { + word entryName = "entry" + name(j); + db.subRegistry + ( + entryName, + true, + recursive + ); + } + + Info<< "after adding some entries, top-level now contains: "; + printList(Info, db.names()) << endl; + + Info<<"## Now attempt to add a few more entries ##" << nl; + + // Try adding the same items into sub registry + // create a few sub-registries + for (label i = 0; i < nRegs; ++i) + { + word regName = "subreg" + name(i); + + const objectRegistry& subreg = db.subRegistry + ( + regName, + false, + recursive + ); + + if (!optSkip) + { + for (label j = 0; j < 6; ++j) + { + word entryName = "entry" + name(j); + + subreg.subRegistry + ( + entryName, + true, + recursive + ); + } + } + } + + Info<<"## Complete picture ##" << nl; + printRegistry(Info, db); + Info<< nl; + + return 0; +} + + +// ************************************************************************* // diff --git a/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C b/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C index 7385fd5029..768f3c9f99 100644 --- a/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C +++ b/applications/utilities/mesh/advanced/PDRMesh/PDRMesh.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -56,7 +56,9 @@ Description #include "mapPolyMesh.H" #include "faceSet.H" #include "cellSet.H" +#include "pointSet.H" #include "syncTools.H" +#include "ReadFields.H" #include "polyTopoChange.H" #include "polyModifyFace.H" #include "polyAddFace.H" @@ -315,6 +317,59 @@ void initCreatedPatches } +template +void subsetTopoSets +( + const fvMesh& mesh, + const IOobjectList& objectsList, + const labelList& map, + const fvMesh& subMesh, + PtrList& subSets +) +{ + // Read original sets + PtrList sets; + ReadFields(objectsList, sets); + + subSets.setSize(sets.size()); + forAll(sets, i) + { + TopoSet& set = sets[i]; + + Info<< "Subsetting " << set.type() << " " << set.name() << endl; + + // Map the data + PackedBoolList isSet(set.maxSize(mesh)); + forAllConstIter(labelHashSet, set, iter) + { + isSet[iter.key()] = true; + } + label nSet = 0; + forAll(map, i) + { + if (isSet[map[i]]) + { + nSet++; + } + } + + subSets.set + ( + i, + new TopoSet(subMesh, set.name(), nSet, IOobject::AUTO_WRITE) + ); + TopoSet& subSet = subSets[i]; + forAll(map, i) + { + if (isSet[map[i]]) + { + subSet.insert(i); + } + } + } +} + + void createCoupledBaffles ( fvMesh& mesh, @@ -923,6 +978,41 @@ int main(int argc, char *argv[]) surfTensorFlds ); + + // Set handling + PtrList cellSets; + PtrList faceSets; + PtrList pointSets; + { + IOobjectList objects(mesh, mesh.facesInstance(), "polyMesh/sets"); + subsetTopoSets + ( + mesh, + objects, + subsetter.cellMap(), + subsetter.subMesh(), + cellSets + ); + subsetTopoSets + ( + mesh, + objects, + subsetter.faceMap(), + subsetter.subMesh(), + faceSets + ); + subsetTopoSets + ( + mesh, + objects, + subsetter.pointMap(), + subsetter.subMesh(), + pointSets + ); + } + + + if (!overwrite) { runTime++; @@ -1134,6 +1224,11 @@ int main(int argc, char *argv[]) Zero ); + // Update numbering of topoSets + topoSet::updateMesh(subsetter.subMesh().facesInstance(), map, cellSets); + topoSet::updateMesh(subsetter.subMesh().facesInstance(), map, faceSets); + topoSet::updateMesh(subsetter.subMesh().facesInstance(), map, pointSets); + // Move mesh (since morphing might not do this) if (map().hasMotionPoints()) diff --git a/applications/utilities/mesh/advanced/combinePatchFaces/Make/options b/applications/utilities/mesh/advanced/combinePatchFaces/Make/options index 3da3443a27..ff07063590 100644 --- a/applications/utilities/mesh/advanced/combinePatchFaces/Make/options +++ b/applications/utilities/mesh/advanced/combinePatchFaces/Make/options @@ -1,9 +1,11 @@ EXE_INC = \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ EXE_LIBS = \ -lfiniteVolume \ + -lreconstruct \ -ldynamicMesh diff --git a/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C b/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C index 2666d4c9de..c9eca74a58 100644 --- a/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C +++ b/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -48,7 +48,6 @@ Description \*---------------------------------------------------------------------------*/ -#include "PstreamReduceOps.H" #include "argList.H" #include "Time.H" #include "polyTopoChange.H" @@ -60,6 +59,9 @@ Description #include "mapPolyMesh.H" #include "unitConversion.H" #include "motionSmoother.H" +#include "topoSet.H" +#include "processorMeshes.H" +#include "PstreamReduceOps.H" using namespace Foam; @@ -450,6 +452,8 @@ int main(int argc, char *argv[]) Info<< "Writing morphed mesh to time " << runTime.timeName() << endl; mesh.write(); + topoSet::removeFiles(mesh); + processorMeshes::removeFiles(mesh); } else { diff --git a/applications/utilities/mesh/advanced/modifyMesh/Make/options b/applications/utilities/mesh/advanced/modifyMesh/Make/options index 70c838b774..4e67ae71f1 100644 --- a/applications/utilities/mesh/advanced/modifyMesh/Make/options +++ b/applications/utilities/mesh/advanced/modifyMesh/Make/options @@ -1,7 +1,10 @@ EXE_INC = \ -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude EXE_LIBS = \ -lmeshTools \ + -lreconstruct \ -ldynamicMesh diff --git a/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C b/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C index 661811afa8..f9b0e4ef2d 100644 --- a/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C +++ b/applications/utilities/mesh/advanced/modifyMesh/modifyMesh.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -62,6 +62,8 @@ Description #include "meshTools.H" #include "Pair.H" #include "globalIndex.H" +#include "topoSet.H" +#include "processorMeshes.H" using namespace Foam; @@ -567,6 +569,8 @@ int main(int argc, char *argv[]) // Write resulting mesh Info<< "Writing modified mesh to time " << runTime.timeName() << endl; mesh.write(); + topoSet::removeFiles(mesh); + processorMeshes::removeFiles(mesh); } else if (edgeToPos.size()) { @@ -641,6 +645,8 @@ int main(int argc, char *argv[]) // Write resulting mesh Info<< "Writing modified mesh to time " << runTime.timeName() << endl; mesh.write(); + topoSet::removeFiles(mesh); + processorMeshes::removeFiles(mesh); } else { @@ -684,6 +690,8 @@ int main(int argc, char *argv[]) // Write resulting mesh Info<< "Writing modified mesh to time " << runTime.timeName() << endl; mesh.write(); + topoSet::removeFiles(mesh); + processorMeshes::removeFiles(mesh); } diff --git a/applications/utilities/mesh/advanced/refineHexMesh/Make/options b/applications/utilities/mesh/advanced/refineHexMesh/Make/options index baa7b45f00..554d59b25d 100644 --- a/applications/utilities/mesh/advanced/refineHexMesh/Make/options +++ b/applications/utilities/mesh/advanced/refineHexMesh/Make/options @@ -1,11 +1,10 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ + -I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude - EXE_LIBS = \ + -lreconstruct \ -ldynamicMesh \ - -lmeshTools \ - -lfiniteVolume \ -lgenericPatchFields diff --git a/applications/utilities/mesh/advanced/refineHexMesh/refineHexMesh.C b/applications/utilities/mesh/advanced/refineHexMesh/refineHexMesh.C index 6a07259605..3a6cdfe11a 100644 --- a/applications/utilities/mesh/advanced/refineHexMesh/refineHexMesh.C +++ b/applications/utilities/mesh/advanced/refineHexMesh/refineHexMesh.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2014 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -49,6 +49,7 @@ Description #include "surfaceFields.H" #include "pointFields.H" #include "ReadFields.H" +#include "processorMeshes.H" using namespace Foam; @@ -197,6 +198,8 @@ int main(int argc, char *argv[]) mesh.write(); meshCutter.write(); + topoSet::removeFiles(mesh); + processorMeshes::removeFiles(mesh); Info<< "End\n" << endl; diff --git a/applications/utilities/mesh/advanced/refineWallLayer/Make/options b/applications/utilities/mesh/advanced/refineWallLayer/Make/options index 7349856cab..19716ca4ec 100644 --- a/applications/utilities/mesh/advanced/refineWallLayer/Make/options +++ b/applications/utilities/mesh/advanced/refineWallLayer/Make/options @@ -1,7 +1,10 @@ EXE_INC = \ -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude EXE_LIBS = \ -ldynamicMesh \ + -lreconstruct \ -lmeshTools diff --git a/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C b/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C index 2fc8f5ec3e..e8d84ab180 100644 --- a/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C +++ b/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -53,6 +53,7 @@ Description #include "cellCuts.H" #include "cellSet.H" #include "meshCutter.H" +#include "processorMeshes.H" using namespace Foam; @@ -257,6 +258,8 @@ int main(int argc, char *argv[]) Info<< "Writing refined mesh to time " << runTime.timeName() << endl; mesh.write(); + topoSet::removeFiles(mesh); + processorMeshes::removeFiles(mesh); Info<< "End\n" << endl; diff --git a/applications/utilities/mesh/advanced/removeFaces/Make/options b/applications/utilities/mesh/advanced/removeFaces/Make/options index 63c5dc5d78..b23c26cceb 100644 --- a/applications/utilities/mesh/advanced/removeFaces/Make/options +++ b/applications/utilities/mesh/advanced/removeFaces/Make/options @@ -1,10 +1,12 @@ EXE_INC = \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ + -I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ -lmeshTools \ -ldynamicMesh \ -lfiniteVolume \ + -lreconstruct \ -lgenericPatchFields diff --git a/applications/utilities/mesh/advanced/removeFaces/removeFaces.C b/applications/utilities/mesh/advanced/removeFaces/removeFaces.C index ca82886601..31989eca13 100644 --- a/applications/utilities/mesh/advanced/removeFaces/removeFaces.C +++ b/applications/utilities/mesh/advanced/removeFaces/removeFaces.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -44,6 +44,7 @@ Description #include "ReadFields.H" #include "volFields.H" #include "surfaceFields.H" +#include "processorMeshes.H" using namespace Foam; @@ -179,6 +180,8 @@ int main(int argc, char *argv[]) // Take over refinement levels and write to new time directory. Pout<< "Writing mesh to time " << runTime.timeName() << endl; mesh.write(); + topoSet::removeFiles(mesh); + processorMeshes::removeFiles(mesh); Pout<< "End\n" << endl; diff --git a/applications/utilities/mesh/conversion/Optional/Allwmake b/applications/utilities/mesh/conversion/Optional/Allwmake index a7a614f5ca..6e64d2c834 100755 --- a/applications/utilities/mesh/conversion/Optional/Allwmake +++ b/applications/utilities/mesh/conversion/Optional/Allwmake @@ -11,7 +11,6 @@ cd ${0%/*} || exit 1 # Run from this directory . $WM_PROJECT_DIR/etc/config.sh/functions _foamSource $($WM_PROJECT_DIR/bin/foamEtcFile config.sh/ccmio) -set -x # Build libccmio (.a|.so) $WM_THIRD_PARTY_DIR/makeCCMIO lib # libso diff --git a/applications/utilities/mesh/generation/blockMesh/blockMesh.C b/applications/utilities/mesh/generation/blockMesh/blockMesh.C index 4441f15e49..d48980cb8c 100644 --- a/applications/utilities/mesh/generation/blockMesh/blockMesh.C +++ b/applications/utilities/mesh/generation/blockMesh/blockMesh.C @@ -3,7 +3,7 @@ \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation - \\/ M anipulation | + \\/ M anipulation | Copyright (C) 2016 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -148,6 +148,15 @@ int main(int argc, char *argv[]) dictPath = runTime.constant() /regionPath/polyMesh::meshSubDir/dictName; + + // Warn that constant/polyMesh/blockMesh was selected instead of + // system/blockMesh + WarningIn(args[0]) + << "Using the old blockMeshDict location: " + << dictPath << nl + << " instead of the default location: " + << runTime.system()/regionPath/dictName << nl + << endl; } // Otherwise assume the dictionary is present in the system directory else diff --git a/applications/utilities/mesh/generation/extrude/extrudeMesh/Make/options b/applications/utilities/mesh/generation/extrude/extrudeMesh/Make/options index 94b355be3c..517a98473f 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeMesh/Make/options +++ b/applications/utilities/mesh/generation/extrude/extrudeMesh/Make/options @@ -4,6 +4,7 @@ EXE_INC = \ -I$(LIB_SRC)/surfMesh/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/dynamicMesh/lnInclude \ + -I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \ -I$(LIB_SRC)/mesh/extrudeModel/lnInclude EXE_LIBS = \ @@ -11,4 +12,5 @@ EXE_LIBS = \ -lsurfMesh \ -lmeshTools \ -ldynamicMesh \ + -lreconstruct \ -lextrudeModel diff --git a/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C b/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C index 14b3ca71eb..26b23f691a 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C +++ b/applications/utilities/mesh/generation/extrude/extrudeMesh/extrudeMesh.C @@ -56,6 +56,7 @@ Description #include "wedgePolyPatch.H" #include "planeExtrusion.H" #include "emptyPolyPatch.H" +#include "processorMeshes.H" using namespace Foam; @@ -1058,6 +1059,8 @@ int main(int argc, char *argv[]) FatalErrorInFunction << exit(FatalError); } + // Remove any left-over files + processorMeshes::removeFiles(mesh); // Need writing cellSet label nAdded = returnReduce(addedCellsSet.size(), sumOp