diff --git a/applications/solvers/multiphase/cavitatingFoam/CourantNo.H b/applications/solvers/multiphase/cavitatingFoam/CourantNo.H deleted file mode 100644 index cf83423557..0000000000 --- a/applications/solvers/multiphase/cavitatingFoam/CourantNo.H +++ /dev/null @@ -1,59 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2007 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 - -Global - CourantNo - -Description - Calculates and outputs the mean and maximum Courant Numbers. - -\*---------------------------------------------------------------------------*/ - -scalar CoNum = 0.0; -scalar meanCoNum = 0.0; -scalar acousticCoNum = 0.0; - -if (mesh.nInternalFaces()) -{ - surfaceScalarField SfUfbyDelta = - mesh.surfaceInterpolation::deltaCoeffs()*mag(phiv); - - CoNum = max(SfUfbyDelta/mesh.magSf()) - .value()*runTime.deltaT().value(); - - meanCoNum = (sum(SfUfbyDelta)/sum(mesh.magSf())) - .value()*runTime.deltaT().value(); - - acousticCoNum = max - ( - mesh.surfaceInterpolation::deltaCoeffs()/sqrt(fvc::interpolate(psi)) - ).value()*runTime.deltaT().value(); -} - -Info<< "phiv Courant Number mean: " << meanCoNum - << " max: " << CoNum - << " acoustic max: " << acousticCoNum - << endl; - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/cavitatingFoam/Make/files b/applications/solvers/multiphase/cavitatingFoam/Make/files deleted file mode 100644 index 832391f03f..0000000000 --- a/applications/solvers/multiphase/cavitatingFoam/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -cavitatingFoam.C - -EXE = $(FOAM_APPBIN)/cavitatingFoam diff --git a/applications/solvers/multiphase/cavitatingFoam/Make/options b/applications/solvers/multiphase/cavitatingFoam/Make/options deleted file mode 100644 index 5e28a0d50f..0000000000 --- a/applications/solvers/multiphase/cavitatingFoam/Make/options +++ /dev/null @@ -1,7 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/thermophysicalModels/barotropicCompressibilityModel/lnInclude - -EXE_LIBS = \ - -lfiniteVolume \ - -lbarotropicCompressibilityModel diff --git a/applications/solvers/multiphase/cavitatingFoam/UEqn.H b/applications/solvers/multiphase/cavitatingFoam/UEqn.H deleted file mode 100644 index bbd5e31fa9..0000000000 --- a/applications/solvers/multiphase/cavitatingFoam/UEqn.H +++ /dev/null @@ -1,16 +0,0 @@ - surfaceScalarField gammaf = fvc::interpolate(gamma); - surfaceScalarField muf("muf", gammaf*muv + (1.0 - gammaf)*mul); - - fvVectorMatrix UEqn - ( - fvm::ddt(rho, U) - + fvm::div(phi, U) - - fvm::laplacian(muf, U) - //- (fvc::grad(U) & fvc::grad(muf)) - - fvc::div(muf*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) - ); - - if (momentumPredictor) - { - solve(UEqn == -fvc::grad(p)); - } diff --git a/applications/solvers/multiphase/cavitatingFoam/cavitatingFoam.C b/applications/solvers/multiphase/cavitatingFoam/cavitatingFoam.C deleted file mode 100644 index 53960d57c1..0000000000 --- a/applications/solvers/multiphase/cavitatingFoam/cavitatingFoam.C +++ /dev/null @@ -1,90 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2007 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 - cavitatingFoam - -Description - -\*---------------------------------------------------------------------------*/ - -#include "fvCFD.H" -#include "barotropicCompressibilityModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -int main(int argc, char *argv[]) -{ - -# include "setRootCase.H" - -# include "createTime.H" -# include "createMesh.H" -# include "readThermodynamicProperties.H" -# include "readTransportProperties.H" -# include "readControls.H" -# include "createFields.H" -# include "initContinuityErrs.H" -# include "compressibleCourantNo.H" -# include "setInitialDeltaT.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - Info<< "\nStarting time loop\n" << endl; - - while (runTime.run()) - { -# include "readControls.H" -# include "CourantNo.H" -# include "setDeltaT.H" - - runTime++; - Info<< "Time = " << runTime.timeName() << nl << endl; - - for (int outerCorr=0; outerCorr psiModel = - barotropicCompressibilityModel::New - ( - thermodynamicProperties, - gamma - ); - - const volScalarField& psi = psiModel->psi(); - - rho == max - ( - psi*p - + (1.0 - gamma)*rhol0 - + ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat, - rhoMin - ); - - Info<< "Reading field U\n" << endl; - volVectorField U - ( - IOobject - ( - "U", - runTime.timeName(), - mesh, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - mesh - ); - -# include "createPhiv.H" -# include "compressibleCreatePhi.H" diff --git a/applications/solvers/multiphase/cavitatingFoam/gammaPsi.H b/applications/solvers/multiphase/cavitatingFoam/gammaPsi.H deleted file mode 100644 index b259ddd322..0000000000 --- a/applications/solvers/multiphase/cavitatingFoam/gammaPsi.H +++ /dev/null @@ -1,10 +0,0 @@ -{ - gamma = max(min((rho - rholSat)/(rhovSat - rholSat), scalar(1)), scalar(0)); - - Info<< "max-min gamma: " << max(gamma).value() - << " " << min(gamma).value() << endl; - - psiModel->correct(); - - //Info<< "min a: " << 1.0/sqrt(max(psi)).value() << endl; -} diff --git a/applications/solvers/multiphase/cavitatingFoam/pEqn.H b/applications/solvers/multiphase/cavitatingFoam/pEqn.H deleted file mode 100644 index c9382dfc0f..0000000000 --- a/applications/solvers/multiphase/cavitatingFoam/pEqn.H +++ /dev/null @@ -1,80 +0,0 @@ -{ - if (nOuterCorr == 1) - { - p = - ( - rho - - (1.0 - gamma)*rhol0 - - ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat - )/psi; - } - - surfaceScalarField rhof = fvc::interpolate(rho, "rhof"); - - volScalarField rUA = 1.0/UEqn.A(); - surfaceScalarField rUAf("rUAf", rhof*fvc::interpolate(rUA)); - volVectorField HbyA = rUA*UEqn.H(); - - phiv = (fvc::interpolate(HbyA) & mesh.Sf()) - + fvc::ddtPhiCorr(rUA, rho, U, phiv); - - p.boundaryField().updateCoeffs(); - - surfaceScalarField phiGradp = rUAf*mesh.magSf()*fvc::snGrad(p); - - phiv -= phiGradp/rhof; - -# include "resetPhivPatches.H" - - for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) - { - fvScalarMatrix pEqn - ( - fvm::ddt(psi, p) - - (rhol0 + (psil - psiv)*pSat)*fvc::ddt(gamma) - pSat*fvc::ddt(psi) - + fvc::div(phiv, rho) - + fvc::div(phiGradp) - - fvm::laplacian(rUAf, p) - ); - - pEqn.solve(); - - if (nonOrth == nNonOrthCorr) - { - phiv += (phiGradp + pEqn.flux())/rhof; - } - } - - Info<< "max-min p: " << max(p).value() - << " " << min(p).value() << endl; - - - U = HbyA - rUA*fvc::grad(p); - - // Remove the swirl component of velocity for "wedge" cases - if (piso.found("removeSwirl")) - { - label swirlCmpt(readLabel(piso.lookup("removeSwirl"))); - - Info<< "Removing swirl component-" << swirlCmpt << " of U" << endl; - U.field().replace(swirlCmpt, 0.0); - } - - U.correctBoundaryConditions(); - - Info<< "max(U) " << max(mag(U)).value() << endl; - - rho == max - ( - psi*p - + (1.0 - gamma)*rhol0 - + ((gamma*psiv + (1.0 - gamma)*psil) - psi)*pSat, - rhoMin - ); - - Info<< "max-min rho: " << max(rho).value() - << " " << min(rho).value() << endl; - -# include "gammaPsi.H" - -} diff --git a/applications/solvers/multiphase/cavitatingFoam/readControls.H b/applications/solvers/multiphase/cavitatingFoam/readControls.H deleted file mode 100644 index f53e7b9eb1..0000000000 --- a/applications/solvers/multiphase/cavitatingFoam/readControls.H +++ /dev/null @@ -1,9 +0,0 @@ -#include "readTimeControls.H" - -scalar maxAcousticCo -( - readScalar(runTime.controlDict().lookup("maxAcousticCo")) -); - - -#include "readPISOControls.H" diff --git a/applications/solvers/multiphase/cavitatingFoam/readThermodynamicProperties.H b/applications/solvers/multiphase/cavitatingFoam/readThermodynamicProperties.H deleted file mode 100644 index d3fbb9307a..0000000000 --- a/applications/solvers/multiphase/cavitatingFoam/readThermodynamicProperties.H +++ /dev/null @@ -1,27 +0,0 @@ - Info<< "Reading thermodynamicProperties\n" << endl; - - IOdictionary thermodynamicProperties - ( - IOobject - ( - "thermodynamicProperties", - runTime.constant(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE - ) - ); - - dimensionedScalar psil(thermodynamicProperties.lookup("psil")); - - dimensionedScalar rholSat(thermodynamicProperties.lookup("rholSat")); - - dimensionedScalar psiv(thermodynamicProperties.lookup("psiv")); - - dimensionedScalar pSat(thermodynamicProperties.lookup("pSat")); - - dimensionedScalar rhovSat("rhovSat", psiv*pSat); - - dimensionedScalar rhol0("rhol0", rholSat - pSat*psil); - - dimensionedScalar rhoMin(thermodynamicProperties.lookup("rhoMin")); diff --git a/applications/solvers/multiphase/cavitatingFoam/readTransportProperties.H b/applications/solvers/multiphase/cavitatingFoam/readTransportProperties.H deleted file mode 100644 index e413743b78..0000000000 --- a/applications/solvers/multiphase/cavitatingFoam/readTransportProperties.H +++ /dev/null @@ -1,23 +0,0 @@ - Info<< "Reading transportProperties\n" << endl; - - IOdictionary transportProperties - ( - IOobject - ( - "transportProperties", - runTime.constant(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE - ) - ); - - dimensionedScalar mul - ( - transportProperties.lookup("mul") - ); - - dimensionedScalar muv - ( - transportProperties.lookup("muv") - ); diff --git a/applications/solvers/multiphase/cavitatingFoam/resetPhiPatches.H b/applications/solvers/multiphase/cavitatingFoam/resetPhiPatches.H deleted file mode 100644 index e7d0c2f93e..0000000000 --- a/applications/solvers/multiphase/cavitatingFoam/resetPhiPatches.H +++ /dev/null @@ -1,15 +0,0 @@ -fvsPatchScalarFieldField& phiPatches = phi.boundaryField(); -const fvPatchScalarFieldField& rhoPatches = rho.boundaryField(); -const fvPatchVectorFieldField& Upatches = U.boundaryField(); -const fvsPatchVectorFieldField& SfPatches = mesh.Sf().boundaryField(); - -forAll(phiPatches, patchI) -{ - if (phi.boundaryField().types()[patchI] == "calculated") - { - calculatedFvsPatchScalarField& phiPatch = - refCast(phiPatches[patchI]); - - phiPatch == ((rhoPatches[patchI]*Upatches[patchI]) & SfPatches[patchI]); - } -} diff --git a/applications/solvers/multiphase/cavitatingFoam/resetPhivPatches.H b/applications/solvers/multiphase/cavitatingFoam/resetPhivPatches.H deleted file mode 100644 index 7e8b040bb6..0000000000 --- a/applications/solvers/multiphase/cavitatingFoam/resetPhivPatches.H +++ /dev/null @@ -1,14 +0,0 @@ -surfaceScalarField::GeometricBoundaryField& phivPatches = phiv.boundaryField(); -const volVectorField::GeometricBoundaryField& Upatches = U.boundaryField(); -const surfaceVectorField::GeometricBoundaryField& SfPatches = mesh.Sf().boundaryField(); - -forAll(phivPatches, patchI) -{ - if (phiv.boundaryField().types()[patchI] == "calculated") - { - calculatedFvsPatchScalarField& phivPatch = - refCast(phivPatches[patchI]); - - phivPatch == (Upatches[patchI] & SfPatches[patchI]); - } -} diff --git a/applications/solvers/multiphase/cavitatingFoam/rhoEqn.H b/applications/solvers/multiphase/cavitatingFoam/rhoEqn.H deleted file mode 100644 index d0bd6e1dad..0000000000 --- a/applications/solvers/multiphase/cavitatingFoam/rhoEqn.H +++ /dev/null @@ -1,16 +0,0 @@ -{ - fvScalarMatrix rhoEqn - ( - fvm::ddt(rho) - + fvm::div(phiv, rho) - ); - - rhoEqn.solve(); - - phi = rhoEqn.flux(); - - Info<< "max-min rho: " << max(rho).value() - << " " << min(rho).value() << endl; - - rho == max(rho, rhoMin); -} diff --git a/applications/solvers/multiphase/cavitatingFoam/setDeltaT.H b/applications/solvers/multiphase/cavitatingFoam/setDeltaT.H deleted file mode 100644 index fa77283ca5..0000000000 --- a/applications/solvers/multiphase/cavitatingFoam/setDeltaT.H +++ /dev/null @@ -1,54 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2007 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 - -Global - setDeltaT - -Description - Reset the timestep to maintain a constant maximum courant Number. - Reduction of time-step is imediate but increase is damped to avoid - unstable oscillations. - -\*---------------------------------------------------------------------------*/ - -if (adjustTimeStep) -{ - scalar maxDeltaTFact = - min(maxCo/(CoNum + SMALL), maxAcousticCo/(acousticCoNum + SMALL)); - - scalar deltaTFact = min(min(maxDeltaTFact, 1.0 + 0.1*maxDeltaTFact), 1.2); - - runTime.setDeltaT - ( - min - ( - deltaTFact*runTime.deltaT().value(), - maxDeltaT - ) - ); - - Info<< "deltaT = " << runTime.deltaT().value() << endl; -} - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/cavitatingFoam/setInitialDeltaT.H b/applications/solvers/multiphase/cavitatingFoam/setInitialDeltaT.H deleted file mode 100644 index 1c709c87f2..0000000000 --- a/applications/solvers/multiphase/cavitatingFoam/setInitialDeltaT.H +++ /dev/null @@ -1,54 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 1991-2007 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 - -Global - setInitialDeltaT - -Description - Set the initial timestep corresponding to the timestep adjustment - algorithm in setDeltaT - -\*---------------------------------------------------------------------------*/ - -if (adjustTimeStep) -{ -# include "CourantNo.H" - - if (CoNum > SMALL) - { - scalar maxDeltaTFact = - min(maxCo/(CoNum + SMALL), maxAcousticCo/(acousticCoNum + SMALL)); - - runTime.setDeltaT - ( - min - ( - maxDeltaTFact*runTime.deltaT().value(), - maxDeltaT - ) - ); - } -} - -// ************************************************************************* // diff --git a/applications/solvers/multiphase/lesCavitatingFoam/UEqn.H b/applications/solvers/multiphase/lesCavitatingFoam/UEqn.H index 22e4a47056..73033ddfaa 100644 --- a/applications/solvers/multiphase/lesCavitatingFoam/UEqn.H +++ b/applications/solvers/multiphase/lesCavitatingFoam/UEqn.H @@ -1,18 +1,17 @@ - surfaceScalarField gammaf = fvc::interpolate(gamma); - surfaceScalarField muf - ( - "muf", - gammaf*muv + (1.0 - gammaf)*mul - + fvc::interpolate(rho*turbulence->nuSgs()) - ); + surfaceScalarField muEff + ( + "muEff", + twoPhaseProperties.muf() + + fvc::interpolate(rho*turbulence->nuSgs()) + ); fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(phi, U) - - fvm::laplacian(muf, U) + - fvm::laplacian(muEff, U) //- (fvc::grad(U) & fvc::grad(muf)) - - fvc::div(muf*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) + - fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) ); if (momentumPredictor) diff --git a/applications/solvers/multiphase/lesCavitatingFoam/calculateAverages.H b/applications/solvers/multiphase/lesCavitatingFoam/calculateAverages.H deleted file mode 100644 index 1d5aace302..0000000000 --- a/applications/solvers/multiphase/lesCavitatingFoam/calculateAverages.H +++ /dev/null @@ -1,12 +0,0 @@ -Info << "Calculating averages" << endl; - -scalar alpha = - (runTime.value() - timeToStartAveraging - runTime.deltaT().value()) - /(runTime.value() - timeToStartAveraging); - -scalar onemAlpha = 1.0 - alpha; - -Umean == alpha*Umean + onemAlpha*U; -rhoMean == alpha*rhoMean + onemAlpha*rho; -pMean == alpha*pMean + onemAlpha*p; -gammaMean == alpha*gammaMean + onemAlpha*gamma; diff --git a/applications/solvers/multiphase/lesCavitatingFoam/createAverages.H b/applications/solvers/multiphase/lesCavitatingFoam/createAverages.H deleted file mode 100644 index d1ffac2958..0000000000 --- a/applications/solvers/multiphase/lesCavitatingFoam/createAverages.H +++ /dev/null @@ -1,53 +0,0 @@ -scalar timeToStartAveraging = runTime.value(); - -volVectorField Umean -( - IOobject - ( - "Umean", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - U -); - -volScalarField rhoMean -( - IOobject - ( - "rhoMean", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - rho -); - -volScalarField pMean -( - IOobject - ( - "pMean", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - p -); - -volScalarField gammaMean -( - IOobject - ( - "gammaMean", - runTime.timeName(), - mesh, - IOobject::NO_READ, - IOobject::AUTO_WRITE - ), - gamma -); diff --git a/applications/solvers/multiphase/lesCavitatingFoam/lesCavitatingFoam.C b/applications/solvers/multiphase/lesCavitatingFoam/lesCavitatingFoam.C index c1dba14b9f..b66186d43c 100644 --- a/applications/solvers/multiphase/lesCavitatingFoam/lesCavitatingFoam.C +++ b/applications/solvers/multiphase/lesCavitatingFoam/lesCavitatingFoam.C @@ -44,10 +44,8 @@ int main(int argc, char *argv[]) # include "createTime.H" # include "createMesh.H" # include "readThermodynamicProperties.H" -# include "readTransportProperties.H" # include "readControls.H" # include "createFields.H" -# include "createAverages.H" # include "initContinuityErrs.H" # include "compressibleCourantNo.H" # include "setInitialDeltaT.H" @@ -79,8 +77,6 @@ int main(int argc, char *argv[]) } } -# include "calculateAverages.H" - runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" diff --git a/applications/solvers/multiphase/lesCavitatingFoam/readTransportProperties.H b/applications/solvers/multiphase/lesCavitatingFoam/readTransportProperties.H deleted file mode 100644 index e413743b78..0000000000 --- a/applications/solvers/multiphase/lesCavitatingFoam/readTransportProperties.H +++ /dev/null @@ -1,23 +0,0 @@ - Info<< "Reading transportProperties\n" << endl; - - IOdictionary transportProperties - ( - IOobject - ( - "transportProperties", - runTime.constant(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE - ) - ); - - dimensionedScalar mul - ( - transportProperties.lookup("mul") - ); - - dimensionedScalar muv - ( - transportProperties.lookup("muv") - ); diff --git a/applications/solvers/multiphase/lesInterFoam/UEqn.H b/applications/solvers/multiphase/lesInterFoam/UEqn.H index 41b267791d..1bf56f02dd 100644 --- a/applications/solvers/multiphase/lesInterFoam/UEqn.H +++ b/applications/solvers/multiphase/lesInterFoam/UEqn.H @@ -1,14 +1,17 @@ - surfaceScalarField muf = - twoPhaseProperties.muf() - + fvc::interpolate(rho*turbulence->nuSgs()); + surfaceScalarField muEff + ( + "muEff", + twoPhaseProperties.muf() + + fvc::interpolate(rho*turbulence->nuSgs()) + ); fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(rhoPhi, U) - - fvm::laplacian(muf, U) - - (fvc::grad(U) & fvc::grad(muf)) - //- fvc::div(muf*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) + - fvm::laplacian(muEff, U) + - (fvc::grad(U) & fvc::grad(muEff)) + //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) ); if (momentumPredictor) diff --git a/applications/solvers/multiphase/rasCavitatingFoam/UEqn.H b/applications/solvers/multiphase/rasCavitatingFoam/UEqn.H index 2a54e1fba2..374e410c2e 100644 --- a/applications/solvers/multiphase/rasCavitatingFoam/UEqn.H +++ b/applications/solvers/multiphase/rasCavitatingFoam/UEqn.H @@ -1,18 +1,17 @@ - surfaceScalarField gammaf = fvc::interpolate(gamma); - surfaceScalarField muf - ( - "muf", - gammaf*muv + (1.0 - gammaf)*mul - + fvc::interpolate(rho*turbulence->nuEff()) - ); + surfaceScalarField muEff + ( + "muEff", + twoPhaseProperties.muf() + + fvc::interpolate(rho*turbulence->nut()) + ); fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(phi, U) - - fvm::laplacian(muf, U) + - fvm::laplacian(muEff, U) //- (fvc::grad(U) & fvc::grad(muf)) - - fvc::div(muf*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) + - fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) ); if (momentumPredictor) diff --git a/applications/solvers/multiphase/rasCavitatingFoam/rasCavitatingFoam.C b/applications/solvers/multiphase/rasCavitatingFoam/rasCavitatingFoam.C index b2ebdb46af..9ed182be37 100644 --- a/applications/solvers/multiphase/rasCavitatingFoam/rasCavitatingFoam.C +++ b/applications/solvers/multiphase/rasCavitatingFoam/rasCavitatingFoam.C @@ -44,7 +44,6 @@ int main(int argc, char *argv[]) # include "createTime.H" # include "createMesh.H" # include "readThermodynamicProperties.H" -# include "readTransportProperties.H" # include "readControls.H" # include "createFields.H" # include "initContinuityErrs.H" diff --git a/applications/solvers/multiphase/rasCavitatingFoam/readTransportProperties.H b/applications/solvers/multiphase/rasCavitatingFoam/readTransportProperties.H deleted file mode 100644 index e413743b78..0000000000 --- a/applications/solvers/multiphase/rasCavitatingFoam/readTransportProperties.H +++ /dev/null @@ -1,23 +0,0 @@ - Info<< "Reading transportProperties\n" << endl; - - IOdictionary transportProperties - ( - IOobject - ( - "transportProperties", - runTime.constant(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE - ) - ); - - dimensionedScalar mul - ( - transportProperties.lookup("mul") - ); - - dimensionedScalar muv - ( - transportProperties.lookup("muv") - ); diff --git a/applications/solvers/multiphase/rasInterFoam/UEqn.H b/applications/solvers/multiphase/rasInterFoam/UEqn.H index 59a6600777..c627f04d17 100644 --- a/applications/solvers/multiphase/rasInterFoam/UEqn.H +++ b/applications/solvers/multiphase/rasInterFoam/UEqn.H @@ -1,14 +1,17 @@ - surfaceScalarField muf = - twoPhaseProperties.muf() - + fvc::interpolate(rho*turbulence->nut()); + surfaceScalarField muEff + ( + "muEff", + twoPhaseProperties.muf() + + fvc::interpolate(rho*turbulence->nut()) + ); fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(rhoPhi, U) - - fvm::laplacian(muf, U) - - (fvc::grad(U) & fvc::grad(muf)) - //- fvc::div(muf*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) + - fvm::laplacian(muEff, U) + - (fvc::grad(U) & fvc::grad(muEff)) + //- fvc::div(muEff*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) ); if (momentumPredictor) diff --git a/applications/utilities/preProcessing/FoamX/lib/FoamX.jar b/applications/utilities/preProcessing/FoamX/lib/FoamX.jar index dd94900a87..6b0b7d77c2 100644 Binary files a/applications/utilities/preProcessing/FoamX/lib/FoamX.jar and b/applications/utilities/preProcessing/FoamX/lib/FoamX.jar differ diff --git a/src/Allwmake b/src/Allwmake index ba639cabc0..f20347166b 100755 --- a/src/Allwmake +++ b/src/Allwmake @@ -1,10 +1,10 @@ #!/bin/sh set -x -( cd $FOAM_SRC/other && ./Allwmake ) - ( cd $FOAM_SRC/OpenFOAM && wmakeLnInclude . ) +( cd $FOAM_SRC/other && ./Allwmake ) + ( cd Pstream && ./Allwmake ) wmake libo OSspecific/$WM_OS diff --git a/src/postProcessing/Allwmake b/src/postProcessing/Allwmake index 2af3a8dd33..ed91892bde 100755 --- a/src/postProcessing/Allwmake +++ b/src/postProcessing/Allwmake @@ -3,3 +3,5 @@ set -x wmake libo postCalc wmake libso forces +wmake libso fieldAverage + diff --git a/applications/utilities/postProcessing/sampling/fieldAverage/Make/files b/src/postProcessing/fieldAverage/Make/files similarity index 100% rename from applications/utilities/postProcessing/sampling/fieldAverage/Make/files rename to src/postProcessing/fieldAverage/Make/files diff --git a/applications/utilities/postProcessing/sampling/fieldAverage/Make/options b/src/postProcessing/fieldAverage/Make/options similarity index 71% rename from applications/utilities/postProcessing/sampling/fieldAverage/Make/options rename to src/postProcessing/fieldAverage/Make/options index 3ec0599e21..61fc018ad9 100644 --- a/applications/utilities/postProcessing/sampling/fieldAverage/Make/options +++ b/src/postProcessing/fieldAverage/Make/options @@ -1,9 +1,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ - -I$(LIB_SRC)/OpenFOAM/lnInclude \ -I$(LIB_SRC)/sampling/lnInclude LIB_LIBS = \ -lfiniteVolume \ - -lOpenFOAM \ -lsampling diff --git a/applications/utilities/postProcessing/sampling/fieldAverage/controlDict b/src/postProcessing/fieldAverage/controlDict similarity index 97% rename from applications/utilities/postProcessing/sampling/fieldAverage/controlDict rename to src/postProcessing/fieldAverage/controlDict index b20a0d1fdb..5dc2b007f9 100644 --- a/applications/utilities/postProcessing/sampling/fieldAverage/controlDict +++ b/src/postProcessing/fieldAverage/controlDict @@ -62,7 +62,7 @@ functions // Where to load it from (if not already in solver) functionObjectLibs ("libfieldAverage.so"); - // Fields to be probed. runTime modifiable! + // Fields to be averaged - runTime modifiable fields ( U diff --git a/applications/utilities/postProcessing/sampling/fieldAverage/fieldAverage/IOFieldAverage.H b/src/postProcessing/fieldAverage/fieldAverage/IOFieldAverage.H similarity index 100% rename from applications/utilities/postProcessing/sampling/fieldAverage/fieldAverage/IOFieldAverage.H rename to src/postProcessing/fieldAverage/fieldAverage/IOFieldAverage.H diff --git a/applications/utilities/postProcessing/sampling/fieldAverage/fieldAverage/fieldAverage.C b/src/postProcessing/fieldAverage/fieldAverage/fieldAverage.C similarity index 97% rename from applications/utilities/postProcessing/sampling/fieldAverage/fieldAverage/fieldAverage.C rename to src/postProcessing/fieldAverage/fieldAverage/fieldAverage.C index 72dfc00201..2cdd6bb70b 100644 --- a/applications/utilities/postProcessing/sampling/fieldAverage/fieldAverage/fieldAverage.C +++ b/src/postProcessing/fieldAverage/fieldAverage/fieldAverage.C @@ -66,8 +66,8 @@ void Foam::fieldAverage::resetLists(const label nItems) prime2MeanSymmTensorFields_.clear(); prime2MeanSymmTensorFields_.setSize(nItems); - nSteps_.clear(); - nSteps_.setSize(nItems, 1); + totalIter_.clear(); + totalIter_.setSize(nItems, 1); totalTime_.clear(); totalTime_.setSize(nItems, obr_.time().deltaT().value()); @@ -170,7 +170,7 @@ Foam::fieldAverage::fieldAverage meanSphericalTensorFields_(faItems_.size()), prime2MeanScalarFields_(faItems_.size()), prime2MeanSymmTensorFields_(faItems_.size()), - nSteps_(faItems_.size(), 1), + totalIter_(faItems_.size(), 1), totalTime_(faItems_.size(), obr_.time().deltaT().value()) { // Check if the available mesh is an fvMesh otherise deactivate @@ -239,7 +239,7 @@ void Foam::fieldAverage::calcAverages() Info<< "Calculating averages" << nl << endl; forAll(faItems_, i) { - nSteps_[i]++; + totalIter_[i]++; totalTime_[i] += obr_.time().deltaT().value(); } @@ -287,7 +287,7 @@ void Foam::fieldAverage::writeAveragingProperties() const { const word fieldName = faItems_[i].fieldName(); propsDict.add(fieldName, dictionary()); - propsDict.subDict(fieldName).add("nSteps", nSteps_[i]); + propsDict.subDict(fieldName).add("totalIter", totalIter_[i]); propsDict.subDict(fieldName).add("totalTime", totalTime_[i]); } @@ -317,7 +317,7 @@ void Foam::fieldAverage::readAveragingProperties() { dictionary fieldDict(propsDict.subDict(fieldName)); - nSteps_[i] = readLabel(fieldDict.lookup("nSteps")); + totalIter_[i] = readLabel(fieldDict.lookup("totalIter")); totalTime_[i] = readScalar(fieldDict.lookup("totalTime")); } } diff --git a/applications/utilities/postProcessing/sampling/fieldAverage/fieldAverage/fieldAverage.H b/src/postProcessing/fieldAverage/fieldAverage/fieldAverage.H similarity index 95% rename from applications/utilities/postProcessing/sampling/fieldAverage/fieldAverage/fieldAverage.H rename to src/postProcessing/fieldAverage/fieldAverage/fieldAverage.H index 8fbad3dea6..aabcd2cfa9 100644 --- a/applications/utilities/postProcessing/sampling/fieldAverage/fieldAverage/fieldAverage.H +++ b/src/postProcessing/fieldAverage/fieldAverage/fieldAverage.H @@ -29,19 +29,28 @@ Description Calculates the field averages given list of fieldAverageItems, e.g. @verbatim + fieldAverage1 + { + // Type of functionObject + type fieldAverage; + + // Where to load it from (if not already in solver) + functionObjectLibs ("libfieldAverage.so"); + + // Fields to be probed. runTime modifiable! fields ( U { mean on; prime2Mean on; - base time; // ensemble + base time; } p { mean on; prime2Mean on; - base time; // ensemble + base time; } ); @endverbatim @@ -133,8 +142,8 @@ protected: // Counters - //- Integration steps counter - List