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 - ) - ); - } -} - -// ************************************************************************* //