diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/Allwclean b/applications/solvers/multiphase/multiphaseEulerFoam/Allwclean new file mode 100755 index 0000000000..191aa8e312 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/Allwclean @@ -0,0 +1,11 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory +set -x + +wclean libso phaseModel +wclean libso multiphaseSystem +wclean libso interfacialModels +wclean libso kineticTheoryModels +wclean + +# ----------------------------------------------------------------- end-of-file diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/Allwmake b/applications/solvers/multiphase/multiphaseEulerFoam/Allwmake new file mode 100755 index 0000000000..421f05ab35 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/Allwmake @@ -0,0 +1,11 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory +set -x + +wmake libso phaseModel +wmake libso multiphaseSystem +wmake libso interfacialModels +wmake libso kineticTheoryModels +wmake + +# ----------------------------------------------------------------- end-of-file diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/CourantNo.H b/applications/solvers/multiphase/multiphaseEulerFoam/CourantNo.H new file mode 100644 index 0000000000..4bfc58978e --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/CourantNo.H @@ -0,0 +1,51 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Global + CourantNo + +Description + Calculates and outputs the mean and maximum Courant Numbers. + +\*---------------------------------------------------------------------------*/ + +scalar CoNum = 0.0; +scalar meanCoNum = 0.0; + +if (mesh.nInternalFaces()) +{ + scalarField sumPhi + ( + fvc::surfaceSum(mag(phi))().internalField() + ); + + CoNum = 0.5*gMax(sumPhi/mesh.V().field())*runTime.deltaTValue(); + + meanCoNum = + 0.5*(gSum(sumPhi)/gSum(mesh.V().field()))*runTime.deltaTValue(); +} + +Info<< "Courant Number mean: " << meanCoNum + << " max: " << CoNum << endl; + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/CourantNos.H b/applications/solvers/multiphase/multiphaseEulerFoam/CourantNos.H new file mode 100644 index 0000000000..9bd18a9fcc --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/CourantNos.H @@ -0,0 +1,12 @@ +# include "CourantNo.H" + +// { +// scalar UrCoNum = 0.5*gMax +// ( +// fvc::surfaceSum(mag(phi1 - phi2))().internalField()/mesh.V().field() +// )*runTime.deltaTValue(); + +// Info<< "Max Ur Courant Number = " << UrCoNum << endl; + +// CoNum = max(CoNum, UrCoNum); +// } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/DDtU.H b/applications/solvers/multiphase/multiphaseEulerFoam/DDtU.H new file mode 100644 index 0000000000..f0f5bad356 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/DDtU.H @@ -0,0 +1,9 @@ +forAllIter(PtrDictionary, fluid.phases(), iter) +{ + phaseModel& phase = iter(); + + phase.DDtU() = + fvc::ddt(phase.U()) + + fvc::div(phase.phi(), phase.U()) + - fvc::div(phase.phi())*phase.U(); +} diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/Make/files b/applications/solvers/multiphase/multiphaseEulerFoam/Make/files new file mode 100644 index 0000000000..b5b45045f1 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/Make/files @@ -0,0 +1,4 @@ +multiphaseEulerFoam.C +multiphaseFixedFluxPressure/multiphaseFixedFluxPressureFvPatchScalarField.C + +EXE = $(FOAM_APPBIN)/multiphaseEulerFoam diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/Make/options b/applications/solvers/multiphase/multiphaseEulerFoam/Make/options new file mode 100644 index 0000000000..d4cfc30136 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/Make/options @@ -0,0 +1,24 @@ +EXE_INC = -ggdb3 \ + -IphaseModel/lnInclude \ + -ImultiphaseSystem/lnInclude \ + /*-IkineticTheoryModels/lnInclude*/ \ + -IinterfacialModels/lnInclude \ + -I$(LIB_SRC)/transportModels \ + -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ + -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ + -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ + -I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel \ + -I$(LIB_SRC)/turbulenceModels \ + -I$(LIB_SRC)/turbulenceModels/incompressible/LES/LESModel \ + -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \ + -I$(LIB_SRC)/finiteVolume/lnInclude + +EXE_LIBS = \ + -lmultiphaseSystem \ + -lcompressibleMultiPhaseModel \ + -linterfaceProperties \ + -lincompressibleTransportModels \ + -lcompressibleMultiphaseEulerianInterfacialModels \ + /*-lcompressibleKineticTheoryModel*/ \ + -lincompressibleLESModels \ + -lfiniteVolume diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/TEqns.H b/applications/solvers/multiphase/multiphaseEulerFoam/TEqns.H new file mode 100644 index 0000000000..26015141d2 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/TEqns.H @@ -0,0 +1,38 @@ +{ + volScalarField kByCp1("kByCp1", alpha1*(k1/Cp1/rho1 + sqr(Ct)*nut2/Prt)); + volScalarField kByCp2("kByCp2", alpha2*(k2/Cp2/rho2 + nut2/Prt)); + + fvScalarMatrix T1Eqn + ( + fvm::ddt(alpha1, T1) + + fvm::div(alphaPhi1, T1) + - fvm::Sp(fvc::ddt(alpha1) + fvc::div(alphaPhi1), T1) + - fvm::laplacian(kByCp1, T1) + == + heatTransferCoeff*T2/Cp1/rho1 + - fvm::Sp(heatTransferCoeff/Cp1/rho1, T1) + + alpha1*Dp1Dt/Cp1/rho1 + ); + + fvScalarMatrix T2Eqn + ( + fvm::ddt(alpha2, T2) + + fvm::div(alphaPhi2, T2) + - fvm::Sp(fvc::ddt(alpha2) + fvc::div(alphaPhi2), T2) + - fvm::laplacian(kByCp2, T2) + == + heatTransferCoeff*T1/Cp2/rho2 + - fvm::Sp(heatTransferCoeff/Cp2/rho2, T2) + + alpha2*Dp2Dt/Cp2/rho2 + ); + + T1Eqn.relax(); + T1Eqn.solve(); + + T2Eqn.relax(); + T2Eqn.solve(); + + // Update compressibilities + psi1 = 1.0/(R1*T1); + psi2 = 1.0/(R2*T2); +} diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/UEqns.H b/applications/solvers/multiphase/multiphaseEulerFoam/UEqns.H new file mode 100644 index 0000000000..1d12ba871d --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/UEqns.H @@ -0,0 +1,40 @@ +PtrList UEqns(fluid.phases().size()); +autoPtr dragCoeffs(fluid.dragCoeffs()); + +int phasei = 0; +forAllIter(PtrDictionary, fluid.phases(), iter) +{ + phaseModel& phase = iter(); + const volScalarField& alpha = phase; + volVectorField& U = phase.U(); + + volScalarField nuEff(sgsModel->nut() + iter().nu()); + + UEqns.set + ( + phasei, + new fvVectorMatrix + ( + (scalar(1) + fluid.Cvm(phase)/phase.rho())* + ( + fvm::ddt(alpha, U) + + fvm::div(phase.phiAlpha(), U) + - fvm::Sp(fvc::ddt(alpha) + fvc::div(phase.phiAlpha()), U) + ) + - fvm::laplacian(alpha*nuEff, U) + - fvc::div + ( + alpha*(nuEff*dev(T(fvc::grad(U))) /*- ((2.0/3.0)*I)*k*/), + "div(Rc)" + ) + == + - fvm::Sp(fluid.dragCoeff(phase, dragCoeffs())/phase.rho(), U) + //- (alpha*phase.rho())*fluid.lift(phase) + + (alpha/phase.rho())*fluid.Svm(phase) + ) + ); + mrfZones.addCoriolis(UEqns[phasei]); + UEqns[phasei].relax(); + + phasei++; +} diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/alphaEqnComp.H b/applications/solvers/multiphase/multiphaseEulerFoam/alphaEqnComp.H new file mode 100644 index 0000000000..f0ebde6332 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/alphaEqnComp.H @@ -0,0 +1,105 @@ +surfaceScalarField alphaPhi1("alphaPhi1", phi1); +surfaceScalarField alphaPhi2("alphaPhi2", phi2); + +{ + word scheme("div(phi,alpha1)"); + word schemer("div(phir,alpha1)"); + + surfaceScalarField phic("phic", phi); + surfaceScalarField phir("phir", phi1 - phi2); + + if (g0.value() > 0.0) + { + surfaceScalarField alpha1f = fvc::interpolate(alpha1); + surfaceScalarField phipp = ppMagf*fvc::snGrad(alpha1)*mesh.magSf(); + phir += phipp; + phic += fvc::interpolate(alpha1)*phipp; + } + + for (int acorr=0; acorr 0.0 && alpha1[celli] > 0.0) + { + Sp[celli] -= dgdt[celli]*alpha1[celli]; + Su[celli] += dgdt[celli]*alpha1[celli]; + } + else if (dgdt[celli] < 0.0 && alpha1[celli] < 1.0) + { + Sp[celli] += dgdt[celli]*(1.0 - alpha1[celli]); + } + } + + + fvScalarMatrix alpha1Eqn + ( + fvm::ddt(alpha1) + + fvm::div(phic, alpha1, scheme) + + fvm::div(-fvc::flux(-phir, alpha2, schemer), alpha1, schemer) + == + fvm::Sp(Sp, alpha1) + Su + ); + + if (g0.value() > 0.0) + { + ppMagf = rU1Af*fvc::interpolate + ( + (1.0/(rho1*(alpha1 + scalar(0.0001)))) + *g0*min(exp(preAlphaExp*(alpha1 - alphaMax)), expMax) + ); + + alpha1Eqn -= fvm::laplacian + ( + (fvc::interpolate(alpha1) + scalar(0.0001))*ppMagf, + alpha1, + "laplacian(alphaPpMag,alpha1)" + ); + } + + alpha1Eqn.relax(); + alpha1Eqn.solve(); + + //***HGW temporary boundedness-fix pending the introduction of MULES + alpha1 = max(min(alpha1, 1.0), 0.0); + + #include "packingLimiter.H" + + alphaPhi1 = alpha1Eqn.flux(); + alphaPhi2 = phi - alphaPhi1; + alpha2 = scalar(1) - alpha1; + + Info<< "Dispersed phase volume fraction = " + << alpha1.weightedAverage(mesh.V()).value() + << " Min(alpha1) = " << min(alpha1).value() + << " Max(alpha1) = " << max(alpha1).value() + << endl; + } +} + +rho = alpha1*rho1 + alpha2*rho2; diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/correctPhi.H b/applications/solvers/multiphase/multiphaseEulerFoam/correctPhi.H new file mode 100644 index 0000000000..92c8676225 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/correctPhi.H @@ -0,0 +1,54 @@ +{ + #include "continuityErrs.H" + + wordList pcorrTypes + ( + p.boundaryField().size(), + zeroGradientFvPatchScalarField::typeName + ); + + forAll (p.boundaryField(), i) + { + if (p.boundaryField()[i].fixesValue()) + { + pcorrTypes[i] = fixedValueFvPatchScalarField::typeName; + } + } + + volScalarField pcorr + ( + IOobject + ( + "pcorr", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh, + dimensionedScalar("pcorr", p.dimensions(), 0.0), + pcorrTypes + ); + + dimensionedScalar rAUf("(1|A(U))", dimTime/rho.dimensions(), 1.0); + + adjustPhi(phi, U, pcorr); + + for (int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) + { + fvScalarMatrix pcorrEqn + ( + fvm::laplacian(rAUf, pcorr) == fvc::div(phi) + ); + + pcorrEqn.setReference(pRefCell, pRefValue); + pcorrEqn.solve(); + + if (nonOrth == pimple.nNonOrthCorr()) + { + phi -= pcorrEqn.flux(); + } + } + + #include "continuityErrs.H" +} diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/createFields.H b/applications/solvers/multiphase/multiphaseEulerFoam/createFields.H new file mode 100644 index 0000000000..6b859f068f --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/createFields.H @@ -0,0 +1,85 @@ + #include "readGravitationalAcceleration.H" + + Info<< "Reading field p\n" << endl; + volScalarField p + ( + IOobject + ( + "p", + runTime.timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ); + + volVectorField U + ( + IOobject + ( + "U", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh, + dimensionedVector("U", dimVelocity, vector::zero) + ); + + surfaceScalarField phi + ( + IOobject + ( + "phi", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh, + dimensionedScalar("phi", dimArea*dimVelocity, 0) + ); + + multiphaseSystem fluid(mesh, phi); + + forAllIter(PtrDictionary, fluid.phases(), iter) + { + phaseModel& phase = iter(); + const volScalarField& alpha = phase; + + U += alpha*phase.U(); + phi += fvc::interpolate(alpha)*phase.phi(); + } + + // dimensionedScalar pMin + // ( + // "pMin", + // dimPressure, + // fluid.lookup("pMin") + // ); + + volScalarField rho + ( + IOobject + ( + "rho", + runTime.timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + fluid.rho() + ); + + label pRefCell = 0; + scalar pRefValue = 0.0; + setRefCell(p, mesh.solutionDict().subDict("PIMPLE"), pRefCell, pRefValue); + + singlePhaseTransportModel laminarTransport(U, phi); + + autoPtr sgsModel + ( + incompressible::LESModel::New(U, phi, laminarTransport) + ); diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/createMRFZones.H b/applications/solvers/multiphase/multiphaseEulerFoam/createMRFZones.H new file mode 100644 index 0000000000..161446a8e6 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/createMRFZones.H @@ -0,0 +1,2 @@ + MRFZones mrfZones(mesh); + mrfZones.correctBoundaryVelocity(U); diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialCoeffs.H b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialCoeffs.H new file mode 100644 index 0000000000..436b68a2f2 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialCoeffs.H @@ -0,0 +1,80 @@ +volScalarField dragCoeff +( + IOobject + ( + "dragCoeff", + runTime.timeName(), + mesh + ), + mesh, + dimensionedScalar("dragCoeff", dimensionSet(1, -3, -1, 0, 0), 0) +); + +volVectorField liftForce +( + IOobject + ( + "liftForce", + runTime.timeName(), + mesh + ), + mesh, + dimensionedVector("liftForce", dimensionSet(1, -2, -2, 0, 0), vector::zero) +); + +volScalarField heatTransferCoeff +( + IOobject + ( + "heatTransferCoeff", + runTime.timeName(), + mesh + ), + mesh, + dimensionedScalar("heatTransferCoeff", dimensionSet(1, -1, -3, -1, 0), 0) +); + +{ + volVectorField Ur = U1 - U2; + volScalarField magUr = mag(Ur); + + if (dispersedPhase == "1") + { + dragCoeff = drag1->K(magUr); + heatTransferCoeff = heatTransfer1->K(magUr); + } + else if (dispersedPhase == "2") + { + dragCoeff = drag2->K(magUr); + heatTransferCoeff = heatTransfer2->K(magUr); + } + else if (dispersedPhase == "both") + { + dragCoeff = + ( + alpha2*drag1->K(magUr) + + alpha1*drag2->K(magUr) + ); + + heatTransferCoeff = + ( + alpha2*heatTransfer1->K(magUr) + + alpha1*heatTransfer2->K(magUr) + ); + } + else + { + FatalErrorIn(args.executable()) + << "dispersedPhase: " << dispersedPhase << " is incorrect" + << exit(FatalError); + } + + volScalarField alphaCoeff + ( + (alpha1 + minInterfaceAlpha)*(alpha2 + minInterfaceAlpha) + ); + dragCoeff *= alphaCoeff; + heatTransferCoeff *= alphaCoeff; + + liftForce = Cl*(alpha1*rho1 + alpha2*rho2)*(Ur ^ fvc::curl(U)); +} diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/Make/files b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/Make/files new file mode 100644 index 0000000000..43869fde40 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/Make/files @@ -0,0 +1,16 @@ +dragModels/dragModel/dragModel.C +dragModels/dragModel/newDragModel.C +dragModels/Ergun/Ergun.C +dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C +dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C +dragModels/SchillerNaumann/SchillerNaumann.C +dragModels/Gibilaro/Gibilaro.C +dragModels/WenYu/WenYu.C +dragModels/SyamlalOBrien/SyamlalOBrien.C +dragModels/blended/blended.C + +heatTransferModels/heatTransferModel/heatTransferModel.C +heatTransferModels/heatTransferModel/newHeatTransferModel.C +heatTransferModels/RanzMarshall/RanzMarshall.C + +LIB = $(FOAM_LIBBIN)/libcompressibleMultiphaseEulerianInterfacialModels diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/Make/options b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/Make/options new file mode 100644 index 0000000000..42c2cb54c9 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/Make/options @@ -0,0 +1,6 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I../phaseModel/lnInclude + +LIB_LIBS = \ + -lphaseModel diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/Ergun/Ergun.C b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/Ergun/Ergun.C new file mode 100644 index 0000000000..589f4a4e81 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/Ergun/Ergun.C @@ -0,0 +1,82 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "Ergun.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace dragModels +{ + defineTypeNameAndDebug(Ergun, 0); + + addToRunTimeSelectionTable + ( + dragModel, + Ergun, + dictionary + ); +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::dragModels::Ergun::Ergun +( + const dictionary& interfaceDict, + const phaseModel& phase1, + const phaseModel& phase2 +) +: + dragModel(interfaceDict, phase1, phase2) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::dragModels::Ergun::~Ergun() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp Foam::dragModels::Ergun::K +( + const volScalarField& Ur +) const +{ + volScalarField beta(max(phase2_, scalar(1.0e-6))); + + return + 150.0*phase1_*phase2_.nu()*phase2_.rho() + /sqr(beta*phase1_.d()) + + 1.75*phase2_.rho()*Ur/(beta*phase1_.d()); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/Ergun/Ergun.H b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/Ergun/Ergun.H new file mode 100644 index 0000000000..8efc5d4ce8 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/Ergun/Ergun.H @@ -0,0 +1,95 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::dragModels::Ergun + +Description + H, Enwald, E. Peirano, A-E Almstedt + 'Eulerian Two-Phase Flow Theory Applied to Fluidization' + Int. J. Multiphase Flow, Vol. 22, Suppl, pp. 21-66 (1996) + Eq. 104, p. 42 + +SourceFiles + Ergun.C + +\*---------------------------------------------------------------------------*/ + +#ifndef Ergun_H +#define Ergun_H + +#include "dragModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace dragModels +{ + +/*---------------------------------------------------------------------------*\ + Class Ergun Declaration +\*---------------------------------------------------------------------------*/ + +class Ergun +: + public dragModel +{ + +public: + + //- Runtime type information + TypeName("Ergun"); + + + // Constructors + + //- Construct from components + Ergun + ( + const dictionary& interfaceDict, + const phaseModel& phase1, + const phaseModel& phase2 + ); + + + //- Destructor + virtual ~Ergun(); + + + // Member Functions + + tmp K(const volScalarField& Ur) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace dragModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/Gibilaro/Gibilaro.C b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/Gibilaro/Gibilaro.C new file mode 100644 index 0000000000..767d2e34fe --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/Gibilaro/Gibilaro.C @@ -0,0 +1,81 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "Gibilaro.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace dragModels +{ + defineTypeNameAndDebug(Gibilaro, 0); + + addToRunTimeSelectionTable + ( + dragModel, + Gibilaro, + dictionary + ); +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::dragModels::Gibilaro::Gibilaro +( + const dictionary& interfaceDict, + const phaseModel& phase1, + const phaseModel& phase2 +) +: + dragModel(interfaceDict, phase1, phase2) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::dragModels::Gibilaro::~Gibilaro() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp Foam::dragModels::Gibilaro::K +( + const volScalarField& Ur +) const +{ + volScalarField beta(max(phase2_, scalar(1.0e-6))); + volScalarField bp(pow(beta, -2.8)); + volScalarField Re(max(beta*Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3))); + + return (17.3/Re + scalar(0.336))*phase2_.rho()*Ur*bp/phase1_.d(); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/Gibilaro/Gibilaro.H b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/Gibilaro/Gibilaro.H new file mode 100644 index 0000000000..c6c0e3c88d --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/Gibilaro/Gibilaro.H @@ -0,0 +1,95 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::dragModels::Gibilaro + +Description + H, Enwald, E. Peirano, A-E Almstedt + 'Eulerian Two-Phase Flow Theory Applied to Fluidization' + Int. J. Multiphase Flow, Vol. 22, Suppl, pp. 21-66 (1996) + Eq. 106, p. 43 + +SourceFiles + Gibilaro.C + +\*---------------------------------------------------------------------------*/ + +#ifndef Gibilaro_H +#define Gibilaro_H + +#include "dragModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace dragModels +{ + +/*---------------------------------------------------------------------------*\ + Class Gibilaro Declaration +\*---------------------------------------------------------------------------*/ + +class Gibilaro +: + public dragModel +{ + +public: + + //- Runtime type information + TypeName("Gibilaro"); + + + // Constructors + + //- Construct from components + Gibilaro + ( + const dictionary& interfaceDict, + const phaseModel& phase1, + const phaseModel& phase2 + ); + + + //- Destructor + virtual ~Gibilaro(); + + + // Member Functions + + tmp K(const volScalarField& Ur) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace dragModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C new file mode 100644 index 0000000000..e34f219ebc --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C @@ -0,0 +1,109 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "GidaspowErgunWenYu.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace dragModels +{ + defineTypeNameAndDebug(GidaspowErgunWenYu, 0); + + addToRunTimeSelectionTable + ( + dragModel, + GidaspowErgunWenYu, + dictionary + ); +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::dragModels::GidaspowErgunWenYu::GidaspowErgunWenYu +( + const dictionary& interfaceDict, + const phaseModel& phase1, + const phaseModel& phase2 +) +: + dragModel(interfaceDict, phase1, phase2) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::dragModels::GidaspowErgunWenYu::~GidaspowErgunWenYu() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp Foam::dragModels::GidaspowErgunWenYu::K +( + const volScalarField& Ur +) const +{ + volScalarField beta(max(phase2_, scalar(1.0e-6))); + volScalarField d = phase1_.d(); + volScalarField bp(pow(beta, -2.65)); + volScalarField Re(max(Ur*d/phase2_.nu(), scalar(1.0e-3))); + + volScalarField Cds(24.0*(1.0 + 0.15*pow(Re, 0.687))/Re); + + forAll(Re, celli) + { + if (Re[celli] > 1000.0) + { + Cds[celli] = 0.44; + } + } + + // Wen and Yu (1966) + tmp tKWenYu = 0.75*Cds*phase2_.rho()*Ur*bp/d; + volScalarField& KWenYu = tKWenYu(); + + // Ergun + forAll (beta, cellj) + { + if (beta[cellj] <= 0.8) + { + KWenYu[cellj] = + 150.0*phase1_[cellj]*phase2_.nu().value()*phase2_.rho().value() + /sqr(beta[cellj]*d[cellj]) + + 1.75*phase2_.rho().value()*Ur[cellj] + /(beta[cellj]*d[cellj]); + } + } + + return tKWenYu; +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.H b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.H new file mode 100644 index 0000000000..3e1812fbbb --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.H @@ -0,0 +1,93 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::dragModels::GidaspowErgunWenYu + +Description + D. Gidaspow, Multiphase flow and fluidization, + Academic Press, New York, 1994. + +SourceFiles + GidaspowErgunWenYu.C + +\*---------------------------------------------------------------------------*/ + +#ifndef GidaspowErgunWenYu_H +#define GidaspowErgunWenYu_H + +#include "dragModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace dragModels +{ + +/*---------------------------------------------------------------------------*\ + Class GidaspowErgunWenYu Declaration +\*---------------------------------------------------------------------------*/ + +class GidaspowErgunWenYu +: + public dragModel +{ + +public: + + //- Runtime type information + TypeName("GidaspowErgunWenYu"); + + + // Constructors + + //- Construct from components + GidaspowErgunWenYu + ( + const dictionary& interfaceDict, + const phaseModel& phase1, + const phaseModel& phase2 + ); + + + //- Destructor + virtual ~GidaspowErgunWenYu(); + + + // Member Functions + + tmp K(const volScalarField& Ur) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace dragModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C new file mode 100644 index 0000000000..ecd25eb386 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C @@ -0,0 +1,91 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "GidaspowSchillerNaumann.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace dragModels +{ + defineTypeNameAndDebug(GidaspowSchillerNaumann, 0); + + addToRunTimeSelectionTable + ( + dragModel, + GidaspowSchillerNaumann, + dictionary + ); +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::dragModels::GidaspowSchillerNaumann::GidaspowSchillerNaumann +( + const dictionary& interfaceDict, + const phaseModel& phase1, + const phaseModel& phase2 +) +: + dragModel(interfaceDict, phase1, phase2) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::dragModels::GidaspowSchillerNaumann::~GidaspowSchillerNaumann() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp Foam::dragModels::GidaspowSchillerNaumann::K +( + const volScalarField& Ur +) const +{ + volScalarField beta(max(phase2_, scalar(1e-6))); + volScalarField bp(pow(beta, -2.65)); + + volScalarField Re(max(beta*Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3))); + volScalarField Cds(24.0*(scalar(1) + 0.15*pow(Re, 0.687))/Re); + + forAll(Re, celli) + { + if (Re[celli] > 1000.0) + { + Cds[celli] = 0.44; + } + } + + return 0.75*Cds*phase2_.rho()*Ur*bp/phase1_.d(); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.H b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.H new file mode 100644 index 0000000000..d7c316536b --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.H @@ -0,0 +1,102 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::dragModels::GidaspowSchillerNaumann + +Description + H, Enwald, E. Peirano, A-E Almstedt + 'Eulerian Two-Phase Flow Theory Applied to Fluidization' + Int. J. Multiphase Flow, Vol. 22, Suppl, pp. 21-66 (1996) + Eq. 86-87, p. 40 + + This is identical to the Wen and Yu, Rowe model Table 3.6 p.56 in + the Ph.D. thesis of Berend van Wachem + 'Derivation, Implementation and Validation + of + Computer Simulation Models + for Gas-Solid Fluidized Beds' + +SourceFiles + GidaspowSchillerNaumann.C + +\*---------------------------------------------------------------------------*/ + +#ifndef GidaspowSchillerNaumann_H +#define GidaspowSchillerNaumann_H + +#include "dragModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace dragModels +{ + +/*---------------------------------------------------------------------------*\ + Class GidaspowSchillerNaumann Declaration +\*---------------------------------------------------------------------------*/ + +class GidaspowSchillerNaumann +: + public dragModel +{ + +public: + + //- Runtime type information + TypeName("GidaspowSchillerNaumann"); + + + // Constructors + + //- Construct from components + GidaspowSchillerNaumann + ( + const dictionary& interfaceDict, + const phaseModel& phase1, + const phaseModel& phase2 + ); + + + //- Destructor + virtual ~GidaspowSchillerNaumann(); + + + // Member Functions + + tmp K(const volScalarField& Ur) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace dragModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/SchillerNaumann/SchillerNaumann.C b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/SchillerNaumann/SchillerNaumann.C new file mode 100644 index 0000000000..3259b5d0e0 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/SchillerNaumann/SchillerNaumann.C @@ -0,0 +1,88 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "SchillerNaumann.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace dragModels +{ + defineTypeNameAndDebug(SchillerNaumann, 0); + + addToRunTimeSelectionTable + ( + dragModel, + SchillerNaumann, + dictionary + ); +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::dragModels::SchillerNaumann::SchillerNaumann +( + const dictionary& interfaceDict, + const phaseModel& phase1, + const phaseModel& phase2 +) +: + dragModel(interfaceDict, phase1, phase2) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::dragModels::SchillerNaumann::~SchillerNaumann() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp Foam::dragModels::SchillerNaumann::K +( + const volScalarField& Ur +) const +{ + volScalarField Re(max(Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3))); + volScalarField Cds(24.0*(scalar(1) + 0.15*pow(Re, 0.687))/Re); + + forAll(Re, celli) + { + if (Re[celli] > 1000.0) + { + Cds[celli] = 0.44; + } + } + + return 0.75*Cds*phase2_.rho()*Ur/phase1_.d(); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/SchillerNaumann/SchillerNaumann.H b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/SchillerNaumann/SchillerNaumann.H new file mode 100644 index 0000000000..33d291d6bb --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/SchillerNaumann/SchillerNaumann.H @@ -0,0 +1,91 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::dragModels::SchillerNaumann + +Description + +SourceFiles + SchillerNaumann.C + +\*---------------------------------------------------------------------------*/ + +#ifndef SchillerNaumann_H +#define SchillerNaumann_H + +#include "dragModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace dragModels +{ + +/*---------------------------------------------------------------------------*\ + Class SchillerNaumann Declaration +\*---------------------------------------------------------------------------*/ + +class SchillerNaumann +: + public dragModel +{ + +public: + + //- Runtime type information + TypeName("SchillerNaumann"); + + + // Constructors + + //- Construct from components + SchillerNaumann + ( + const dictionary& interfaceDict, + const phaseModel& phase1, + const phaseModel& phase2 + ); + + + //- Destructor + virtual ~SchillerNaumann(); + + + // Member Functions + + tmp K(const volScalarField& Ur) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace dragModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/SyamlalOBrien/SyamlalOBrien.C b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/SyamlalOBrien/SyamlalOBrien.C new file mode 100644 index 0000000000..736be885e0 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/SyamlalOBrien/SyamlalOBrien.C @@ -0,0 +1,101 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "SyamlalOBrien.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace dragModels +{ + defineTypeNameAndDebug(SyamlalOBrien, 0); + + addToRunTimeSelectionTable + ( + dragModel, + SyamlalOBrien, + dictionary + ); +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::dragModels::SyamlalOBrien::SyamlalOBrien +( + const dictionary& interfaceDict, + const phaseModel& phase1, + const phaseModel& phase2 +) +: + dragModel(interfaceDict, phase1, phase2) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::dragModels::SyamlalOBrien::~SyamlalOBrien() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp Foam::dragModels::SyamlalOBrien::K +( + const volScalarField& Ur +) const +{ + volScalarField beta(max(phase2_, scalar(1.0e-6))); + volScalarField A(pow(beta, 4.14)); + volScalarField B(0.8*pow(beta, 1.28)); + + forAll (beta, celli) + { + if (beta[celli] > 0.85) + { + B[celli] = pow(beta[celli], 2.65); + } + } + + volScalarField Re(max(Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3))); + + volScalarField Vr + ( + 0.5* + ( + A - 0.06*Re + sqrt(sqr(0.06*Re) + 0.12*Re*(2.0*B - A) + sqr(A)) + ) + ); + + volScalarField Cds(sqr(0.63 + 4.8*sqrt(Vr/Re))); + + return 0.75*Cds*phase2_.rho()*Ur/(phase1_.d()*sqr(Vr)); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/SyamlalOBrien/SyamlalOBrien.H b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/SyamlalOBrien/SyamlalOBrien.H new file mode 100644 index 0000000000..05aaa96480 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/SyamlalOBrien/SyamlalOBrien.H @@ -0,0 +1,94 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::dragModels::SyamlalOBrien + +Description + Syamlal, M., Rogers, W. and O'Brien, T. J. (1993) MFIX documentation, + Theory Guide. Technical Note DOE/METC-94/1004. Morgantown, West Virginia, + USA. + +SourceFiles + SyamlalOBrien.C + +\*---------------------------------------------------------------------------*/ + +#ifndef SyamlalOBrien_H +#define SyamlalOBrien_H + +#include "dragModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace dragModels +{ + +/*---------------------------------------------------------------------------*\ + Class SyamlalOBrien Declaration +\*---------------------------------------------------------------------------*/ + +class SyamlalOBrien +: + public dragModel +{ + +public: + + //- Runtime type information + TypeName("SyamlalOBrien"); + + + // Constructors + + //- Construct from components + SyamlalOBrien + ( + const dictionary& interfaceDict, + const phaseModel& phase1, + const phaseModel& phase2 + ); + + + //- Destructor + virtual ~SyamlalOBrien(); + + + // Member Functions + + tmp K(const volScalarField& Ur) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace dragModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/WenYu/WenYu.C b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/WenYu/WenYu.C new file mode 100644 index 0000000000..6cfc119c1c --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/WenYu/WenYu.C @@ -0,0 +1,91 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "WenYu.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace dragModels +{ + defineTypeNameAndDebug(WenYu, 0); + + addToRunTimeSelectionTable + ( + dragModel, + WenYu, + dictionary + ); +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::dragModels::WenYu::WenYu +( + const dictionary& interfaceDict, + const phaseModel& phase1, + const phaseModel& phase2 +) +: + dragModel(interfaceDict, phase1, phase2) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::dragModels::WenYu::~WenYu() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp Foam::dragModels::WenYu::K +( + const volScalarField& Ur +) const +{ + volScalarField beta(max(phase2_, scalar(1.0e-6))); + volScalarField bp(pow(beta, -2.65)); + + volScalarField Re(max(Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3))); + volScalarField Cds(24.0*(scalar(1) + 0.15*pow(Re, 0.687))/Re); + + forAll(Re, celli) + { + if (Re[celli] > 1000.0) + { + Cds[celli] = 0.44; + } + } + + return 0.75*Cds*phase2_.rho()*Ur*bp/phase1_.d(); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/WenYu/WenYu.H b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/WenYu/WenYu.H new file mode 100644 index 0000000000..ba326510e5 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/WenYu/WenYu.H @@ -0,0 +1,105 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::dragModels::WenYu + +Description + H, Enwald, E. Peirano, A-E Almstedt + 'Eulerian Two-Phase Flow Theory Applied to Fluidization' + Int. J. Multiphase Flow, Vol. 22, Suppl, pp. 21-66 (1996) + Eq. 86-87, p. 40 + + This is identical to the Wen and Yu, Rowe model Table 3.6 p.56 in + the Ph.D. thesis of Berend van Wachem + 'Derivation, Implementation and Validation + of + Computer Simulation Models + for Gas-Solid Fluidized Beds' + + NB: The difference between the Gidaspow-version is the void-fraction + in the Re-number + +SourceFiles + WenYu.C + +\*---------------------------------------------------------------------------*/ + +#ifndef WenYu_H +#define WenYu_H + +#include "dragModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace dragModels +{ + +/*---------------------------------------------------------------------------*\ + Class WenYu Declaration +\*---------------------------------------------------------------------------*/ + +class WenYu +: + public dragModel +{ + +public: + + //- Runtime type information + TypeName("WenYu"); + + + // Constructors + + //- Construct from components + WenYu + ( + const dictionary& interfaceDict, + const phaseModel& phase1, + const phaseModel& phase2 + ); + + + //- Destructor + virtual ~WenYu(); + + + // Member Functions + + tmp K(const volScalarField& Ur) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace dragModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/blended/blended.C b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/blended/blended.C new file mode 100644 index 0000000000..49b2a01e0e --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/blended/blended.C @@ -0,0 +1,79 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "blended.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace dragModels +{ + defineTypeNameAndDebug(blended, 0); + + addToRunTimeSelectionTable + ( + dragModel, + blended, + dictionary + ); +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::dragModels::blended::blended +( + const dictionary& interfaceDict, + const phaseModel& phase1, + const phaseModel& phase2 +) +: + dragModel(interfaceDict, phase1, phase2), + dragModel1_(New(interfaceDict.subDict(phase1.name()), phase1, phase2)), + dragModel2_(New(interfaceDict.subDict(phase2.name()), phase2, phase1)) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::dragModels::blended::~blended() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp Foam::dragModels::blended::K +( + const volScalarField& Ur +) const +{ + return phase2()*dragModel1_->K(Ur) + phase1()*dragModel2_->K(Ur); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/blended/blended.H b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/blended/blended.H new file mode 100644 index 0000000000..6836a228ef --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/blended/blended.H @@ -0,0 +1,99 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::dragModels::blended + +Description + Blends two drag models based on the phase fractions to handle + phase-inversion. + +SourceFiles + blended.C + +\*---------------------------------------------------------------------------*/ + +#ifndef blended_H +#define blended_H + +#include "dragModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace dragModels +{ + +/*---------------------------------------------------------------------------*\ + Class blended Declaration +\*---------------------------------------------------------------------------*/ + +class blended +: + public dragModel +{ + // Private data + + // The two drag models to be blended + autoPtr dragModel1_; + autoPtr dragModel2_; + + +public: + + //- Runtime type information + TypeName("blended"); + + + // Constructors + + //- Construct from components + blended + ( + const dictionary& interfaceDict, + const phaseModel& phase1, + const phaseModel& phase2 + ); + + + //- Destructor + virtual ~blended(); + + + // Member Functions + + tmp K(const volScalarField& Ur) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace dragModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/dragModel/dragModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/dragModel/dragModel.C new file mode 100644 index 0000000000..f3ec039684 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/dragModel/dragModel.C @@ -0,0 +1,64 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "dragModel.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(dragModel, 0); + defineRunTimeSelectionTable(dragModel, dictionary); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::dragModel::dragModel +( + const dictionary& interfaceDict, + const phaseModel& phase1, + const phaseModel& phase2 +) +: + interfaceDict_(interfaceDict), + phase1_(phase1), + phase2_(phase2), + residualDrag_ + ( + "residualDrag", + dimensionSet(1, -3, -1, 0, 0), + interfaceDict.lookup("residualDrag") + ) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::dragModel::~dragModel() +{} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/dragModel/dragModel.H b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/dragModel/dragModel.H new file mode 100644 index 0000000000..37413d83e4 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/dragModel/dragModel.H @@ -0,0 +1,145 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::dragModel + +Description + +SourceFiles + dragModel.C + newDragModel.C + +\*---------------------------------------------------------------------------*/ + +#ifndef dragModel_H +#define dragModel_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "dictionary.H" +#include "phaseModel.H" +#include "runTimeSelectionTables.H" + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class dragModel Declaration +\*---------------------------------------------------------------------------*/ + +class dragModel +{ +protected: + + // Protected data + + const dictionary& interfaceDict_; + const phaseModel& phase1_; + const phaseModel& phase2_; + dimensionedScalar residualDrag_; + +public: + + //- Runtime type information + TypeName("dragModel"); + + + // Declare runtime construction + + declareRunTimeSelectionTable + ( + autoPtr, + dragModel, + dictionary, + ( + const dictionary& interfaceDict, + const phaseModel& phase1, + const phaseModel& phase2 + ), + (interfaceDict, phase1, phase2) + ); + + + // Constructors + + dragModel + ( + const dictionary& interfaceDict, + const phaseModel& phase1, + const phaseModel& phase2 + ); + + + //- Destructor + virtual ~dragModel(); + + + // Selectors + + static autoPtr New + ( + const dictionary& interfaceDict, + const phaseModel& phase1, + const phaseModel& phase2 + ); + + + // Member Functions + + const phaseModel& phase1() const + { + return phase1_; + } + + const phaseModel& phase2() const + { + return phase2_; + } + + const dimensionedScalar& residualDrag() const + { + return residualDrag_; + } + + //- the dragfunction K used in the momentum eq. + // ddt(alpha*rhoa*Ua) + ... = ... alpha*beta*K*(Ua-Ub) + // ddt(beta*rhob*Ub) + ... = ... alpha*beta*K*(Ub-Ua) + // ********************************** NB ! ***************************** + // for numerical reasons alpha and beta has been + // extracted from the dragFunction K, + // so you MUST divide K by alpha*beta when implemnting the drag function + // ********************************** NB ! ***************************** + virtual tmp K(const volScalarField& Ur) const = 0; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C new file mode 100644 index 0000000000..72542bc01b --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C @@ -0,0 +1,61 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "dragModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +Foam::autoPtr Foam::dragModel::New +( + const dictionary& interfaceDict, + const phaseModel& phase1, + const phaseModel& phase2 +) +{ + word dragModelType(interfaceDict.lookup("type")); + + Info << "Selecting dragModel for phase " + << phase1.name() + << ": " + << dragModelType << endl; + + dictionaryConstructorTable::iterator cstrIter = + dictionaryConstructorTablePtr_->find(dragModelType); + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + FatalErrorIn("dragModel::New") + << "Unknown dragModelType type " + << dragModelType << endl << endl + << "Valid dragModel types are : " << endl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); + } + + return cstrIter()(interfaceDict, phase1, phase2); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/heatTransferModels/RanzMarshall/RanzMarshall.C b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/heatTransferModels/RanzMarshall/RanzMarshall.C new file mode 100644 index 0000000000..34a945690a --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/heatTransferModels/RanzMarshall/RanzMarshall.C @@ -0,0 +1,83 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "RanzMarshall.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace heatTransferModels +{ + defineTypeNameAndDebug(RanzMarshall, 0); + + addToRunTimeSelectionTable + ( + heatTransferModel, + RanzMarshall, + dictionary + ); +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::heatTransferModels::RanzMarshall::RanzMarshall +( + const dictionary& interfaceDict, + const volScalarField& alpha, + const phaseModel& phase1, + const phaseModel& phase2 +) +: + heatTransferModel(interfaceDict, alpha, phase1, phase2) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::heatTransferModels::RanzMarshall::~RanzMarshall() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp Foam::heatTransferModels::RanzMarshall::K +( + const volScalarField& Ur +) const +{ + volScalarField Re = max(Ur*phase1_.d()/phase2_.nu(), scalar(1.0e-3)); + dimensionedScalar Prb = + phase2_.rho()*phase2_.nu()*phase2_.Cp()/phase2_.kappa(); + volScalarField Nu = scalar(2) + 0.6*sqrt(Re)*cbrt(Prb); + + return 6.0*phase2_.kappa()*Nu/sqr(phase1_.d()); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/heatTransferModels/RanzMarshall/RanzMarshall.H b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/heatTransferModels/RanzMarshall/RanzMarshall.H new file mode 100644 index 0000000000..0013e3f1d1 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/heatTransferModels/RanzMarshall/RanzMarshall.H @@ -0,0 +1,92 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::heatTransferModels::RanzMarshall + +Description + +SourceFiles + RanzMarshall.C + +\*---------------------------------------------------------------------------*/ + +#ifndef RanzMarshall_H +#define RanzMarshall_H + +#include "heatTransferModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace heatTransferModels +{ + +/*---------------------------------------------------------------------------*\ + Class RanzMarshall Declaration +\*---------------------------------------------------------------------------*/ + +class RanzMarshall +: + public heatTransferModel +{ + +public: + + //- Runtime type information + TypeName("RanzMarshall"); + + + // Constructors + + //- Construct from components + RanzMarshall + ( + const dictionary& interfaceDict, + const volScalarField& alpha, + const phaseModel& phase1, + const phaseModel& phase2 + ); + + + //- Destructor + virtual ~RanzMarshall(); + + + // Member Functions + + tmp K(const volScalarField& Ur) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace heatTransferModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModel.C new file mode 100644 index 0000000000..810adfe415 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModel.C @@ -0,0 +1,60 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "heatTransferModel.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(heatTransferModel, 0); + defineRunTimeSelectionTable(heatTransferModel, dictionary); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::heatTransferModel::heatTransferModel +( + const dictionary& interfaceDict, + const volScalarField& alpha, + const phaseModel& phase1, + const phaseModel& phase2 +) +: + interfaceDict_(interfaceDict), + alpha_(alpha), + phase1_(phase1), + phase2_(phase2) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::heatTransferModel::~heatTransferModel() +{} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModel.H b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModel.H new file mode 100644 index 0000000000..e4871f2c51 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/heatTransferModel.H @@ -0,0 +1,135 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::heatTransferModel + +Description + +SourceFiles + heatTransferModel.C + newHeatTransferModel.C + +\*---------------------------------------------------------------------------*/ + +#ifndef heatTransferModel_H +#define heatTransferModel_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "dictionary.H" +#include "phaseModel.H" +#include "runTimeSelectionTables.H" + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class heatTransferModel Declaration +\*---------------------------------------------------------------------------*/ + +class heatTransferModel +{ +protected: + + // Protected data + + const dictionary& interfaceDict_; + const volScalarField& alpha_; + const phaseModel& phase1_; + const phaseModel& phase2_; + + +public: + + //- Runtime type information + TypeName("heatTransferModel"); + + + // Declare runtime construction + + declareRunTimeSelectionTable + ( + autoPtr, + heatTransferModel, + dictionary, + ( + const dictionary& interfaceDict, + const volScalarField& alpha, + const phaseModel& phase1, + const phaseModel& phase2 + ), + (interfaceDict, alpha, phase1, phase2) + ); + + + // Constructors + + heatTransferModel + ( + const dictionary& interfaceDict, + const volScalarField& alpha, + const phaseModel& phase1, + const phaseModel& phase2 + ); + + + //- Destructor + virtual ~heatTransferModel(); + + + // Selectors + + static autoPtr New + ( + const dictionary& interfaceDict, + const volScalarField& alpha, + const phaseModel& phase1, + const phaseModel& phase2 + ); + + + // Member Functions + + //- the heat-transfer function K used in the enthalpy eq. + // ddt(alpha*rhoa*ha) + ... = ... alpha*beta*K*(Ta - Tb) + // ddt(beta*rhob*hb) + ... = ... alpha*beta*K*(Tb - Ta) + // ********************************** NB ! ***************************** + // for numerical reasons alpha and beta has been + // extracted from the heat-transfer function K, + // so you MUST divide K by alpha*beta when implementing the + // heat-transfer function + // ********************************** NB ! ***************************** + virtual tmp K(const volScalarField& Ur) const = 0; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C new file mode 100644 index 0000000000..b14f3821bf --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/interfacialModels/heatTransferModels/heatTransferModel/newHeatTransferModel.C @@ -0,0 +1,65 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "heatTransferModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +Foam::autoPtr Foam::heatTransferModel::New +( + const dictionary& interfaceDict, + const volScalarField& alpha, + const phaseModel& phase1, + const phaseModel& phase2 +) +{ + word heatTransferModelType + ( + interfaceDict.lookup("heatTransferModel" + phase1.name()) + ); + + Info<< "Selecting heatTransferModel for phase " + << phase1.name() + << ": " + << heatTransferModelType << endl; + + dictionaryConstructorTable::iterator cstrIter = + dictionaryConstructorTablePtr_->find(heatTransferModelType); + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + FatalErrorIn("heatTransferModel::New") + << "Unknown heatTransferModelType type " + << heatTransferModelType << endl << endl + << "Valid heatTransferModel types are : " << endl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); + } + + return cstrIter()(interfaceDict, alpha, phase1, phase2); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/Make/files b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/Make/files new file mode 100644 index 0000000000..ab4aa2f7af --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/Make/files @@ -0,0 +1,33 @@ +kineticTheoryModel/kineticTheoryModel.C + +viscosityModel/viscosityModel/viscosityModel.C +viscosityModel/viscosityModel/newViscosityModel.C +viscosityModel/Gidaspow/GidaspowViscosity.C +viscosityModel/Syamlal/SyamlalViscosity.C +viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.C +viscosityModel/none/noneViscosity.C + +conductivityModel/conductivityModel/conductivityModel.C +conductivityModel/conductivityModel/newConductivityModel.C +conductivityModel/Gidaspow/GidaspowConductivity.C +conductivityModel/Syamlal/SyamlalConductivity.C +conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.C + +radialModel/radialModel/radialModel.C +radialModel/radialModel/newRadialModel.C +radialModel/CarnahanStarling/CarnahanStarlingRadial.C +radialModel/Gidaspow/GidaspowRadial.C +radialModel/LunSavage/LunSavageRadial.C +radialModel/SinclairJackson/SinclairJacksonRadial.C + +granularPressureModel/granularPressureModel/granularPressureModel.C +granularPressureModel/granularPressureModel/newGranularPressureModel.C +granularPressureModel/Lun/LunPressure.C +granularPressureModel/SyamlalRogersOBrien/SyamlalRogersOBrienPressure.C + +frictionalStressModel/frictionalStressModel/frictionalStressModel.C +frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C +frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.C +frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C + +LIB = $(FOAM_LIBBIN)/libcompressibleMultiphaseKineticTheoryModel diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/Make/options b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/Make/options new file mode 100644 index 0000000000..2fcce9913d --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/Make/options @@ -0,0 +1,5 @@ +EXE_INC = \ + -I$(LIB_SRC)/foam/lnInclude \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I../phaseModel/lnInclude \ + -I../interfacialModels/lnInclude diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/conductivityModel/Gidaspow/GidaspowConductivity.C b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/conductivityModel/Gidaspow/GidaspowConductivity.C new file mode 100644 index 0000000000..0a2ac036b3 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/conductivityModel/Gidaspow/GidaspowConductivity.C @@ -0,0 +1,93 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "GidaspowConductivity.H" +#include "mathematicalConstants.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ +namespace conductivityModels +{ + defineTypeNameAndDebug(Gidaspow, 0); + + addToRunTimeSelectionTable + ( + conductivityModel, + Gidaspow, + dictionary + ); +} +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::conductivityModels::Gidaspow::Gidaspow +( + const dictionary& dict +) +: + conductivityModel(dict) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::conductivityModels::Gidaspow::~Gidaspow() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp +Foam::kineticTheoryModels::conductivityModels::Gidaspow::kappa +( + const volScalarField& alpha, + const volScalarField& Theta, + const volScalarField& g0, + const dimensionedScalar& rhoa, + const volScalarField& da, + const dimensionedScalar& e +) const +{ + const scalar sqrtPi = sqrt(constant::mathematical::pi); + + return rhoa*da*sqrt(Theta)* + ( + 2.0*sqr(alpha)*g0*(1.0 + e)/sqrtPi + + (9.0/8.0)*sqrtPi*g0*0.5*(1.0 + e)*sqr(alpha) + + (15.0/16.0)*sqrtPi*alpha + + (25.0/64.0)*sqrtPi/((1.0 + e)*g0) + ); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/conductivityModel/Gidaspow/GidaspowConductivity.H b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/conductivityModel/Gidaspow/GidaspowConductivity.H new file mode 100644 index 0000000000..b6c55696ce --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/conductivityModel/Gidaspow/GidaspowConductivity.H @@ -0,0 +1,97 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::kineticTheoryModels::conductivityModels::Gidaspow + +Description + +SourceFiles + Gidaspow.C + +\*---------------------------------------------------------------------------*/ + +#ifndef Gidaspow_H +#define Gidaspow_H + +#include "conductivityModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ +namespace conductivityModels +{ + +/*---------------------------------------------------------------------------*\ + Class Gidaspow Declaration +\*---------------------------------------------------------------------------*/ + +class Gidaspow +: + public conductivityModel +{ + +public: + + //- Runtime type information + TypeName("Gidaspow"); + + + // Constructors + + //- Construct from components + Gidaspow(const dictionary& dict); + + + //- Destructor + virtual ~Gidaspow(); + + + // Member Functions + + tmp kappa + ( + const volScalarField& alpha, + const volScalarField& Theta, + const volScalarField& g0, + const dimensionedScalar& rhoa, + const volScalarField& da, + const dimensionedScalar& e + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace conductivityModels +} // End namespace kineticTheoryModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.C b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.C new file mode 100644 index 0000000000..cc9ac56cfd --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.C @@ -0,0 +1,104 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "HrenyaSinclairConductivity.H" +#include "mathematicalConstants.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ +namespace conductivityModels +{ + defineTypeNameAndDebug(HrenyaSinclair, 0); + + addToRunTimeSelectionTable + ( + conductivityModel, + HrenyaSinclair, + dictionary + ); +} +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair::HrenyaSinclair +( + const dictionary& dict +) +: + conductivityModel(dict), + coeffsDict_(dict.subDict(typeName + "Coeffs")), + L_(coeffsDict_.lookup("L")) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair:: +~HrenyaSinclair() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp +Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair::kappa +( + const volScalarField& alpha, + const volScalarField& Theta, + const volScalarField& g0, + const dimensionedScalar& rhoa, + const volScalarField& da, + const dimensionedScalar& e +) const +{ + const scalar sqrtPi = sqrt(constant::mathematical::pi); + + volScalarField lamda + ( + scalar(1) + da/(6.0*sqrt(2.0)*(alpha + scalar(1.0e-5)))/L_ + ); + + return rhoa*da*sqrt(Theta)* + ( + 2.0*sqr(alpha)*g0*(1.0 + e)/sqrtPi + + (9.0/8.0)*sqrtPi*0.25*sqr(1.0 + e)*(2.0*e - 1.0)*sqr(alpha) + /(49.0/16.0 - 33.0*e/16.0) + + (15.0/16.0)*sqrtPi*alpha*(0.5*sqr(e) + 0.25*e - 0.75 + lamda) + /((49.0/16.0 - 33.0*e/16.0)*lamda) + + (25.0/64.0)*sqrtPi + /((1.0 + e)*(49.0/16.0 - 33.0*e/16.0)*lamda*g0) + ); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.H b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.H new file mode 100644 index 0000000000..3a635724b3 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.H @@ -0,0 +1,102 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::kineticTheoryModels::conductivityModels::HrenyaSinclair + +Description + +SourceFiles + HrenyaSinclair.C + +\*---------------------------------------------------------------------------*/ + +#ifndef HrenyaSinclair_H +#define HrenyaSinclair_H + +#include "conductivityModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ +namespace conductivityModels +{ + +/*---------------------------------------------------------------------------*\ + Class HrenyaSinclair Declaration +\*---------------------------------------------------------------------------*/ + +class HrenyaSinclair +: + public conductivityModel +{ + + dictionary coeffsDict_; + + //- characteristic length of geometry + dimensionedScalar L_; + +public: + + //- Runtime type information + TypeName("HrenyaSinclair"); + + + // Constructors + + //- Construct from components + HrenyaSinclair(const dictionary& dict); + + + //- Destructor + virtual ~HrenyaSinclair(); + + + // Member Functions + + tmp kappa + ( + const volScalarField& alpha, + const volScalarField& Theta, + const volScalarField& g0, + const dimensionedScalar& rhoa, + const volScalarField& da, + const dimensionedScalar& e + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace conductivityModels +} // End namespace kineticTheoryModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/conductivityModel/Syamlal/SyamlalConductivity.C b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/conductivityModel/Syamlal/SyamlalConductivity.C new file mode 100644 index 0000000000..4d99b686a4 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/conductivityModel/Syamlal/SyamlalConductivity.C @@ -0,0 +1,93 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "SyamlalConductivity.H" +#include "mathematicalConstants.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ +namespace conductivityModels +{ + defineTypeNameAndDebug(Syamlal, 0); + + addToRunTimeSelectionTable + ( + conductivityModel, + Syamlal, + dictionary + ); +} +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::conductivityModels::Syamlal::Syamlal +( + const dictionary& dict +) +: + conductivityModel(dict) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::conductivityModels::Syamlal::~Syamlal() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp +Foam::kineticTheoryModels::conductivityModels::Syamlal::kappa +( + const volScalarField& alpha, + const volScalarField& Theta, + const volScalarField& g0, + const dimensionedScalar& rhoa, + const volScalarField& da, + const dimensionedScalar& e +) const +{ + const scalar sqrtPi = sqrt(constant::mathematical::pi); + + return rhoa*da*sqrt(Theta)* + ( + 2.0*sqr(alpha)*g0*(1.0 + e)/sqrtPi + + (9.0/8.0)*sqrtPi*g0*0.25*sqr(1.0 + e)*(2.0*e - 1.0)*sqr(alpha) + /(49.0/16.0 - 33.0*e/16.0) + + (15.0/32.0)*sqrtPi*alpha/(49.0/16.0 - 33.0*e/16.0) + ); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/conductivityModel/Syamlal/SyamlalConductivity.H b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/conductivityModel/Syamlal/SyamlalConductivity.H new file mode 100644 index 0000000000..e25c8f51e6 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/conductivityModel/Syamlal/SyamlalConductivity.H @@ -0,0 +1,97 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::kineticTheoryModels::conductivityModels::Syamlal + +Description + +SourceFiles + Syamlal.C + +\*---------------------------------------------------------------------------*/ + +#ifndef Syamlal_H +#define Syamlal_H + +#include "conductivityModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ +namespace conductivityModels +{ + +/*---------------------------------------------------------------------------*\ + Class Syamlal Declaration +\*---------------------------------------------------------------------------*/ + +class Syamlal +: + public conductivityModel +{ + +public: + + //- Runtime type information + TypeName("Syamlal"); + + + // Constructors + + //- Construct from components + Syamlal(const dictionary& dict); + + + //- Destructor + virtual ~Syamlal(); + + + // Member Functions + + tmp kappa + ( + const volScalarField& alpha, + const volScalarField& Theta, + const volScalarField& g0, + const dimensionedScalar& rhoa, + const volScalarField& da, + const dimensionedScalar& e + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace conductivityModels +} // End namespace kineticTheoryModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.C new file mode 100644 index 0000000000..145f10e218 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.C @@ -0,0 +1,58 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "conductivityModel.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ + defineTypeNameAndDebug(conductivityModel, 0); + + defineRunTimeSelectionTable(conductivityModel, dictionary); +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::conductivityModel::conductivityModel +( + const dictionary& dict +) +: + dict_(dict) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::conductivityModel::~conductivityModel() +{} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.H b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.H new file mode 100644 index 0000000000..4f872bbd3c --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModel.H @@ -0,0 +1,128 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::kineticTheoryModels::conductivityModel + +SourceFiles + conductivityModel.C + +\*---------------------------------------------------------------------------*/ + +#ifndef conductivityModel_H +#define conductivityModel_H + +#include "dictionary.H" +#include "volFields.H" +#include "dimensionedTypes.H" +#include "runTimeSelectionTables.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ + +/*---------------------------------------------------------------------------*\ + Class conductivityModel Declaration +\*---------------------------------------------------------------------------*/ + +class conductivityModel +{ + // Private member functions + + //- Disallow default bitwise copy construct + conductivityModel(const conductivityModel&); + + //- Disallow default bitwise assignment + void operator=(const conductivityModel&); + + +protected: + + // Protected data + + const dictionary& dict_; + + +public: + + //- Runtime type information + TypeName("conductivityModel"); + + // Declare runtime constructor selection table + declareRunTimeSelectionTable + ( + autoPtr, + conductivityModel, + dictionary, + ( + const dictionary& dict + ), + (dict) + ); + + + // Constructors + + //- Construct from components + conductivityModel(const dictionary& dict); + + + // Selectors + + static autoPtr New + ( + const dictionary& dict + ); + + + //- Destructor + virtual ~conductivityModel(); + + + // Member Functions + + virtual tmp kappa + ( + const volScalarField& alpha, + const volScalarField& Theta, + const volScalarField& g0, + const dimensionedScalar& rhoa, + const volScalarField& da, + const dimensionedScalar& e + ) const = 0; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace kineticTheoryModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/conductivityModel/conductivityModel/newConductivityModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/conductivityModel/conductivityModel/newConductivityModel.C new file mode 100644 index 0000000000..21aa88ec66 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/conductivityModel/conductivityModel/newConductivityModel.C @@ -0,0 +1,59 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "conductivityModel.H" + +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // + +Foam::autoPtr +Foam::kineticTheoryModels::conductivityModel::New +( + const dictionary& dict +) +{ + word conductivityModelType(dict.lookup("conductivityModel")); + + Info<< "Selecting conductivityModel " + << conductivityModelType << endl; + + dictionaryConstructorTable::iterator cstrIter = + dictionaryConstructorTablePtr_->find(conductivityModelType); + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + FatalError + << "conductivityModel::New(const dictionary&) : " << endl + << " unknown conductivityModelType type " + << conductivityModelType + << ", constructor not in hash table" << endl << endl + << " Valid conductivityModelType types are :" << endl; + Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); + } + + return autoPtr(cstrIter()(dict)); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.C b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.C new file mode 100644 index 0000000000..15c820874a --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.C @@ -0,0 +1,124 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "JohnsonJacksonFrictionalStress.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ +namespace frictionalStressModels +{ + defineTypeNameAndDebug(JohnsonJackson, 0); + + addToRunTimeSelectionTable + ( + frictionalStressModel, + JohnsonJackson, + dictionary + ); +} +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::frictionalStressModels::JohnsonJackson:: +JohnsonJackson +( + const dictionary& dict +) +: + frictionalStressModel(dict) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::frictionalStressModels::JohnsonJackson:: +~JohnsonJackson() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp +Foam::kineticTheoryModels::frictionalStressModels::JohnsonJackson:: +frictionalPressure +( + const volScalarField& alpha, + const dimensionedScalar& alphaMinFriction, + const dimensionedScalar& alphaMax, + const dimensionedScalar& Fr, + const dimensionedScalar& eta, + const dimensionedScalar& p +) const +{ + + return + Fr*pow(max(alpha - alphaMinFriction, scalar(0)), eta) + /pow(max(alphaMax - alpha, scalar(5.0e-2)), p); +} + + +Foam::tmp +Foam::kineticTheoryModels::frictionalStressModels::JohnsonJackson:: +frictionalPressurePrime +( + const volScalarField& alpha, + const dimensionedScalar& alphaMinFriction, + const dimensionedScalar& alphaMax, + const dimensionedScalar& Fr, + const dimensionedScalar& eta, + const dimensionedScalar& p +) const +{ + return Fr* + ( + eta*pow(max(alpha - alphaMinFriction, scalar(0)), eta - 1.0) + *(alphaMax-alpha) + p*pow(max(alpha - alphaMinFriction, scalar(0)), eta) + )/pow(max(alphaMax - alpha, scalar(5.0e-2)), p + 1.0); +} + + +Foam::tmp +Foam::kineticTheoryModels::frictionalStressModels::JohnsonJackson::muf +( + const volScalarField& alpha, + const dimensionedScalar& alphaMax, + const volScalarField& pf, + const volSymmTensorField& D, + const dimensionedScalar& phi +) const +{ + return dimensionedScalar("0.5", dimTime, 0.5)*pf*sin(phi); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.H b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.H new file mode 100644 index 0000000000..ace67f54d1 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.H @@ -0,0 +1,116 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::kineticTheoryModels::frictionalStressModels::JohnsonJackson + +Description + +SourceFiles + JohnsonJacksonFrictionalStress.C + +\*---------------------------------------------------------------------------*/ + +#ifndef JohnsonJackson_H +#define JohnsonJackson_H + +#include "frictionalStressModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ +namespace frictionalStressModels +{ + +/*---------------------------------------------------------------------------*\ + Class JohnsonJackson Declaration +\*---------------------------------------------------------------------------*/ + +class JohnsonJackson +: + public frictionalStressModel +{ + +public: + + //- Runtime type information + TypeName("JohnsonJackson"); + + + // Constructors + + //- Construct from components + JohnsonJackson(const dictionary& dict); + + + //- Destructor + virtual ~JohnsonJackson(); + + + // Member functions + + virtual tmp frictionalPressure + ( + const volScalarField& alpha, + const dimensionedScalar& alphaMinFriction, + const dimensionedScalar& alphaMax, + const dimensionedScalar& Fr, + const dimensionedScalar& eta, + const dimensionedScalar& p + ) const; + + virtual tmp frictionalPressurePrime + ( + const volScalarField& alpha, + const dimensionedScalar& alphaMinFriction, + const dimensionedScalar& alphaMax, + const dimensionedScalar& Fr, + const dimensionedScalar& eta, + const dimensionedScalar& p + ) const; + + virtual tmp muf + ( + const volScalarField& alpha, + const dimensionedScalar& alphaMax, + const volScalarField& pf, + const volSymmTensorField& D, + const dimensionedScalar& phi + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace frictionalStressModels +} // End namespace kineticTheoryModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C new file mode 100644 index 0000000000..4320bbad35 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C @@ -0,0 +1,156 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "SchaefferFrictionalStress.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ +namespace frictionalStressModels +{ + defineTypeNameAndDebug(Schaeffer, 0); + + addToRunTimeSelectionTable + ( + frictionalStressModel, + Schaeffer, + dictionary + ); +} +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::Schaeffer +( + const dictionary& dict +) +: + frictionalStressModel(dict) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::~Schaeffer() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp +Foam::kineticTheoryModels::frictionalStressModels::Schaeffer:: +frictionalPressure +( + const volScalarField& alpha, + const dimensionedScalar& alphaMinFriction, + const dimensionedScalar& alphaMax, + const dimensionedScalar& Fr, + const dimensionedScalar& eta, + const dimensionedScalar& p +) const +{ + return + dimensionedScalar("1e24", dimensionSet(1, -1, -2, 0, 0), 1e24) + *pow(Foam::max(alpha - alphaMinFriction, scalar(0)), 10.0); +} + + +Foam::tmp +Foam::kineticTheoryModels::frictionalStressModels::Schaeffer:: +frictionalPressurePrime +( + const volScalarField& alpha, + const dimensionedScalar& alphaMinFriction, + const dimensionedScalar& alphaMax, + const dimensionedScalar& Fr, + const dimensionedScalar& eta, + const dimensionedScalar& p +) const +{ + return + dimensionedScalar("1e25", dimensionSet(1, -1, -2, 0, 0), 1e25) + *pow(Foam::max(alpha - alphaMinFriction, scalar(0)), 9.0); +} + + +Foam::tmp +Foam::kineticTheoryModels::frictionalStressModels::Schaeffer::muf +( + const volScalarField& alpha, + const dimensionedScalar& alphaMax, + const volScalarField& pf, + const volSymmTensorField& D, + const dimensionedScalar& phi +) const +{ + const scalar I2Dsmall = 1.0e-15; + + // Creating muf assuming it should be 0 on the boundary which may not be + // true + tmp tmuf + ( + new volScalarField + ( + IOobject + ( + "muf", + alpha.mesh().time().timeName(), + alpha.mesh() + ), + alpha.mesh(), + dimensionedScalar("muf", dimensionSet(1, -1, -1, 0, 0), 0.0) + ) + ); + + volScalarField& muff = tmuf(); + + forAll (D, celli) + { + if (alpha[celli] > alphaMax.value() - 5e-2) + { + muff[celli] = + 0.5*pf[celli]*sin(phi.value()) + /( + sqrt(1.0/6.0*(sqr(D[celli].xx() - D[celli].yy()) + + sqr(D[celli].yy() - D[celli].zz()) + + sqr(D[celli].zz() - D[celli].xx())) + + sqr(D[celli].xy()) + sqr(D[celli].xz()) + + sqr(D[celli].yz())) + I2Dsmall + ); + } + } + + return tmuf; +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.H b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.H new file mode 100644 index 0000000000..ec517774a1 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/frictionalStressModel/Schaeffer/SchaefferFrictionalStress.H @@ -0,0 +1,116 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::kineticTheoryModels::frictionalStressModels::Schaeffer + +Description + +SourceFiles + SchaefferFrictionalStress.C + +\*---------------------------------------------------------------------------*/ + +#ifndef Schaeffer_H +#define Schaeffer_H + +#include "frictionalStressModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ +namespace frictionalStressModels +{ + +/*---------------------------------------------------------------------------*\ + Class Schaeffer Declaration +\*---------------------------------------------------------------------------*/ + +class Schaeffer +: + public frictionalStressModel +{ + +public: + + //- Runtime type information + TypeName("Schaeffer"); + + + // Constructors + + //- Construct from components + Schaeffer(const dictionary& dict); + + + //- Destructor + virtual ~Schaeffer(); + + + // Member functions + + virtual tmp frictionalPressure + ( + const volScalarField& alpha, + const dimensionedScalar& alphaMinFriction, + const dimensionedScalar& alphaMax, + const dimensionedScalar& Fr, + const dimensionedScalar& eta, + const dimensionedScalar& p + ) const; + + virtual tmp frictionalPressurePrime + ( + const volScalarField& alpha, + const dimensionedScalar& alphaMinFriction, + const dimensionedScalar& alphaMax, + const dimensionedScalar& Fr, + const dimensionedScalar& n, + const dimensionedScalar& p + ) const; + + virtual tmp muf + ( + const volScalarField& alpha, + const dimensionedScalar& alphaMax, + const volScalarField& pf, + const volSymmTensorField& D, + const dimensionedScalar& phi + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace frictionalStressModels +} // End namespace kineticTheoryModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.C new file mode 100644 index 0000000000..3b59e3615f --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.C @@ -0,0 +1,58 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "frictionalStressModel.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ + defineTypeNameAndDebug(frictionalStressModel, 0); + + defineRunTimeSelectionTable(frictionalStressModel, dictionary); +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::frictionalStressModel::frictionalStressModel +( + const dictionary& dict +) +: + dict_(dict) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::frictionalStressModel::~frictionalStressModel() +{} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.H b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.H new file mode 100644 index 0000000000..aa5983d5d2 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModel.H @@ -0,0 +1,147 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::kineticTheoryModels::frictionalStressModel + +SourceFiles + frictionalStressModel.C + +\*---------------------------------------------------------------------------*/ + +#ifndef frictionalStressModel_H +#define frictionalStressModel_H + +#include "dictionary.H" +#include "volFields.H" +#include "dimensionedTypes.H" +#include "runTimeSelectionTables.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ + +/*---------------------------------------------------------------------------*\ + Class frictionalStressModel Declaration +\*---------------------------------------------------------------------------*/ + +class frictionalStressModel +{ + // Private member functions + + //- Disallow default bitwise copy construct + frictionalStressModel(const frictionalStressModel&); + + //- Disallow default bitwise assignment + void operator=(const frictionalStressModel&); + + +protected: + + // Protected data + + const dictionary& dict_; + + +public: + + //- Runtime type information + TypeName("frictionalStressModel"); + + // Declare runtime constructor selection table + declareRunTimeSelectionTable + ( + autoPtr, + frictionalStressModel, + dictionary, + ( + const dictionary& dict + ), + (dict) + ); + + + // Constructors + + //- Construct from components + frictionalStressModel(const dictionary& dict); + + + // Selectors + + static autoPtr New + ( + const dictionary& dict + ); + + + //- Destructor + virtual ~frictionalStressModel(); + + + // Member Functions + + virtual tmp frictionalPressure + ( + const volScalarField& alpha, + const dimensionedScalar& alphaMinFriction, + const dimensionedScalar& alphaMax, + const dimensionedScalar& Fr, + const dimensionedScalar& eta, + const dimensionedScalar& p + ) const = 0; + + virtual tmp frictionalPressurePrime + ( + const volScalarField& alphaf, + const dimensionedScalar& alphaMinFriction, + const dimensionedScalar& alphaMax, + const dimensionedScalar& Fr, + const dimensionedScalar& eta, + const dimensionedScalar& p + ) const = 0; + + virtual tmp muf + ( + const volScalarField& alpha, + const dimensionedScalar& alphaMax, + const volScalarField& pf, + const volSymmTensorField& D, + const dimensionedScalar& phi + ) const = 0; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace kineticTheoryModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C new file mode 100644 index 0000000000..4067c154fb --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C @@ -0,0 +1,60 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "frictionalStressModel.H" + +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // + +Foam::autoPtr +Foam::kineticTheoryModels::frictionalStressModel::New +( + const dictionary& dict +) +{ + word frictionalStressModelType(dict.lookup("frictionalStressModel")); + + Info<< "Selecting frictionalStressModel " + << frictionalStressModelType << endl; + + dictionaryConstructorTable::iterator cstrIter = + dictionaryConstructorTablePtr_->find(frictionalStressModelType); + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + FatalError + << "frictionalStressModel::New(const dictionary&) : " << endl + << " unknown frictionalStressModelType type " + << frictionalStressModelType + << ", constructor not in hash table" << endl << endl + << " Valid frictionalStressModelType types are :" << endl; + Info<< dictionaryConstructorTablePtr_->sortedToc() + << abort(FatalError); + } + + return autoPtr(cstrIter()(dict)); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/granularPressureModel/Lun/LunPressure.C b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/granularPressureModel/Lun/LunPressure.C new file mode 100644 index 0000000000..2655267134 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/granularPressureModel/Lun/LunPressure.C @@ -0,0 +1,98 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "LunPressure.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ +namespace granularPressureModels +{ + defineTypeNameAndDebug(Lun, 0); + + addToRunTimeSelectionTable + ( + granularPressureModel, + Lun, + dictionary + ); +} +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::granularPressureModels::Lun::Lun +( + const dictionary& dict +) +: + granularPressureModel(dict) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::granularPressureModels::Lun::~Lun() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp +Foam::kineticTheoryModels::granularPressureModels::Lun::granularPressureCoeff +( + const volScalarField& alpha, + const volScalarField& g0, + const dimensionedScalar& rhoa, + const dimensionedScalar& e +) const +{ + + return rhoa*alpha*(1.0 + 2.0*(1.0 + e)*alpha*g0); +} + + +Foam::tmp +Foam::kineticTheoryModels::granularPressureModels::Lun:: +granularPressureCoeffPrime +( + const volScalarField& alpha, + const volScalarField& g0, + const volScalarField& g0prime, + const dimensionedScalar& rhoa, + const dimensionedScalar& e +) const +{ + return rhoa*(1.0 + alpha*(1.0 + e)*(4.0*g0 + 2.0*g0prime*alpha)); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/granularPressureModel/Lun/LunPressure.H b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/granularPressureModel/Lun/LunPressure.H new file mode 100644 index 0000000000..81a58d409a --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/granularPressureModel/Lun/LunPressure.H @@ -0,0 +1,104 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::Lun + +Description + +SourceFiles + LunPressure.C + +\*---------------------------------------------------------------------------*/ + +#ifndef Lun_H +#define Lun_H + +#include "granularPressureModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ +namespace granularPressureModels +{ + +/*---------------------------------------------------------------------------*\ + Class Lun Declaration +\*---------------------------------------------------------------------------*/ + +class Lun +: + public granularPressureModel +{ + +public: + + //- Runtime type information + TypeName("Lun"); + + + // Constructors + + //- Construct from components + Lun(const dictionary& dict); + + + //- Destructor + virtual ~Lun(); + + + // Member Functions + + tmp granularPressureCoeff + ( + const volScalarField& alpha, + const volScalarField& g0, + const dimensionedScalar& rhoa, + const dimensionedScalar& e + ) const; + + tmp granularPressureCoeffPrime + ( + const volScalarField& alpha, + const volScalarField& g0, + const volScalarField& g0prime, + const dimensionedScalar& rhoa, + const dimensionedScalar& e + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace granularPressureModels +} // End namespace kineticTheoryModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/granularPressureModel/SyamlalRogersOBrien/SyamlalRogersOBrienPressure.C b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/granularPressureModel/SyamlalRogersOBrien/SyamlalRogersOBrienPressure.C new file mode 100644 index 0000000000..34ba15cbcf --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/granularPressureModel/SyamlalRogersOBrien/SyamlalRogersOBrienPressure.C @@ -0,0 +1,101 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "SyamlalRogersOBrienPressure.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ +namespace granularPressureModels +{ + defineTypeNameAndDebug(SyamlalRogersOBrien, 0); + + addToRunTimeSelectionTable + ( + granularPressureModel, + SyamlalRogersOBrien, + dictionary + ); +} +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::granularPressureModels::SyamlalRogersOBrien:: +SyamlalRogersOBrien +( + const dictionary& dict +) +: + granularPressureModel(dict) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::granularPressureModels::SyamlalRogersOBrien:: +~SyamlalRogersOBrien() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp +Foam::kineticTheoryModels::granularPressureModels::SyamlalRogersOBrien:: +granularPressureCoeff +( + const volScalarField& alpha, + const volScalarField& g0, + const dimensionedScalar& rhoa, + const dimensionedScalar& e +) const +{ + + return 2.0*rhoa*(1.0 + e)*sqr(alpha)*g0; +} + + +Foam::tmp +Foam::kineticTheoryModels::granularPressureModels::SyamlalRogersOBrien:: +granularPressureCoeffPrime +( + const volScalarField& alpha, + const volScalarField& g0, + const volScalarField& g0prime, + const dimensionedScalar& rhoa, + const dimensionedScalar& e +) const +{ + return rhoa*alpha*(1.0 + e)*(4.0*g0 + 2.0*g0prime*alpha); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/granularPressureModel/SyamlalRogersOBrien/SyamlalRogersOBrienPressure.H b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/granularPressureModel/SyamlalRogersOBrien/SyamlalRogersOBrienPressure.H new file mode 100644 index 0000000000..c328481a1c --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/granularPressureModel/SyamlalRogersOBrien/SyamlalRogersOBrienPressure.H @@ -0,0 +1,104 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::SyamlalRogersOBrien + +Description + +SourceFiles + SyamlalRogersOBrienPressure.C + +\*---------------------------------------------------------------------------*/ + +#ifndef SyamlalRogersOBrien_H +#define SyamlalRogersOBrien_H + +#include "granularPressureModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ +namespace granularPressureModels +{ + +/*---------------------------------------------------------------------------*\ + Class SyamlalRogersOBrien Declaration +\*---------------------------------------------------------------------------*/ + +class SyamlalRogersOBrien +: + public granularPressureModel +{ + +public: + + //- Runtime type information + TypeName("SyamlalRogersOBrien"); + + + // Constructors + + //- Construct from components + SyamlalRogersOBrien(const dictionary& dict); + + + //- Destructor + virtual ~SyamlalRogersOBrien(); + + + // Member Functions + + tmp granularPressureCoeff + ( + const volScalarField& alpha, + const volScalarField& g0, + const dimensionedScalar& rhoa, + const dimensionedScalar& e + ) const; + + tmp granularPressureCoeffPrime + ( + const volScalarField& alpha, + const volScalarField& g0, + const volScalarField& g0prime, + const dimensionedScalar& rhoa, + const dimensionedScalar& e + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace granularPressureModels +} // End namespace kineticTheoryModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.C new file mode 100644 index 0000000000..6bbae86d37 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.C @@ -0,0 +1,58 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "granularPressureModel.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ + defineTypeNameAndDebug(granularPressureModel, 0); + + defineRunTimeSelectionTable(granularPressureModel, dictionary); +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::granularPressureModel::granularPressureModel +( + const dictionary& dict +) +: + dict_(dict) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::granularPressureModel::~granularPressureModel() +{} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.H b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.H new file mode 100644 index 0000000000..1ae4da2e8e --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModel.H @@ -0,0 +1,137 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::kineticTheoryModels::granularPressureModel + +SourceFiles + granularPressureModel.C + +\*---------------------------------------------------------------------------*/ + +#ifndef granularPressureModel_H +#define granularPressureModel_H + +#include "dictionary.H" +#include "volFields.H" +#include "dimensionedTypes.H" +#include "runTimeSelectionTables.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ + +/*---------------------------------------------------------------------------*\ + Class granularPressureModel Declaration +\*---------------------------------------------------------------------------*/ + +class granularPressureModel +{ + // Private member functions + + //- Disallow default bitwise copy construct + granularPressureModel(const granularPressureModel&); + + //- Disallow default bitwise assignment + void operator=(const granularPressureModel&); + + +protected: + + // Protected data + + const dictionary& dict_; + + +public: + + //- Runtime type information + TypeName("granularPressureModel"); + + // Declare runtime constructor selection table + declareRunTimeSelectionTable + ( + autoPtr, + granularPressureModel, + dictionary, + ( + const dictionary& dict + ), + (dict) + ); + + + // Constructors + + //- Construct from components + granularPressureModel(const dictionary& dict); + + + // Selectors + + static autoPtr New + ( + const dictionary& dict + ); + + + //- Destructor + virtual ~granularPressureModel(); + + + // Member Functions + + //- Granular pressure coefficient + virtual tmp granularPressureCoeff + ( + const volScalarField& alpha, + const volScalarField& g0, + const dimensionedScalar& rhoa, + const dimensionedScalar& e + ) const = 0; + + //- Derivative of the granular pressure coefficient + virtual tmp granularPressureCoeffPrime + ( + const volScalarField& alpha, + const volScalarField& g0, + const volScalarField& g0prime, + const dimensionedScalar& rhoa, + const dimensionedScalar& e + ) const = 0; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace kineticTheoryModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/granularPressureModel/granularPressureModel/newGranularPressureModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/granularPressureModel/granularPressureModel/newGranularPressureModel.C new file mode 100644 index 0000000000..d8e1540f0f --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/granularPressureModel/granularPressureModel/newGranularPressureModel.C @@ -0,0 +1,60 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "granularPressureModel.H" + +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // + +Foam::autoPtr +Foam::kineticTheoryModels::granularPressureModel::New +( + const dictionary& dict +) +{ + word granularPressureModelType(dict.lookup("granularPressureModel")); + + Info<< "Selecting granularPressureModel " + << granularPressureModelType << endl; + + dictionaryConstructorTable::iterator cstrIter = + dictionaryConstructorTablePtr_->find(granularPressureModelType); + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + FatalError + << "granularPressureModel::New(const dictionary&) : " << endl + << " unknown granularPressureModelType type " + << granularPressureModelType + << ", constructor not in hash table" << endl << endl + << " Valid granularPressureModelType types are :" << endl; + Info<< dictionaryConstructorTablePtr_->sortedToc() + << abort(FatalError); + } + + return autoPtr(cstrIter()(dict)); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C new file mode 100644 index 0000000000..d4513e922f --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C @@ -0,0 +1,390 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "kineticTheoryModel.H" +#include "surfaceInterpolate.H" +#include "mathematicalConstants.H" +#include "fvCFD.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::kineticTheoryModel::kineticTheoryModel +( + const Foam::phaseModel& phase1, + const Foam::volVectorField& Ub, + const Foam::volScalarField& alpha, + const Foam::dragModel& draga +) +: + phase1_(phase1), + Ua_(phase1.U()), + Ub_(Ub), + alpha_(alpha), + phia_(phase1.phi()), + draga_(draga), + + rhoa_(phase1.rho()), + nua_(phase1.nu()), + + kineticTheoryProperties_ + ( + IOobject + ( + "kineticTheoryProperties", + Ua_.time().constant(), + Ua_.mesh(), + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ), + kineticTheory_(kineticTheoryProperties_.lookup("kineticTheory")), + equilibrium_(kineticTheoryProperties_.lookup("equilibrium")), + + viscosityModel_ + ( + kineticTheoryModels::viscosityModel::New + ( + kineticTheoryProperties_ + ) + ), + conductivityModel_ + ( + kineticTheoryModels::conductivityModel::New + ( + kineticTheoryProperties_ + ) + ), + radialModel_ + ( + kineticTheoryModels::radialModel::New + ( + kineticTheoryProperties_ + ) + ), + granularPressureModel_ + ( + kineticTheoryModels::granularPressureModel::New + ( + kineticTheoryProperties_ + ) + ), + frictionalStressModel_ + ( + kineticTheoryModels::frictionalStressModel::New + ( + kineticTheoryProperties_ + ) + ), + e_(kineticTheoryProperties_.lookup("e")), + alphaMax_(kineticTheoryProperties_.lookup("alphaMax")), + alphaMinFriction_(kineticTheoryProperties_.lookup("alphaMinFriction")), + Fr_(kineticTheoryProperties_.lookup("Fr")), + eta_(kineticTheoryProperties_.lookup("eta")), + p_(kineticTheoryProperties_.lookup("p")), + phi_(dimensionedScalar(kineticTheoryProperties_.lookup("phi"))*M_PI/180.0), + Theta_ + ( + IOobject + ( + "Theta", + Ua_.time().timeName(), + Ua_.mesh(), + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + Ua_.mesh() + ), + mua_ + ( + IOobject + ( + "mua", + Ua_.time().timeName(), + Ua_.mesh(), + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + Ua_.mesh(), + dimensionedScalar("zero", dimensionSet(1, -1, -1, 0, 0), 0.0) + ), + lambda_ + ( + IOobject + ( + "lambda", + Ua_.time().timeName(), + Ua_.mesh(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + Ua_.mesh(), + dimensionedScalar("zero", dimensionSet(1, -1, -1, 0, 0), 0.0) + ), + pa_ + ( + IOobject + ( + "pa", + Ua_.time().timeName(), + Ua_.mesh(), + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + Ua_.mesh(), + dimensionedScalar("zero", dimensionSet(1, -1, -2, 0, 0), 0.0) + ), + kappa_ + ( + IOobject + ( + "kappa", + Ua_.time().timeName(), + Ua_.mesh(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + Ua_.mesh(), + dimensionedScalar("zero", dimensionSet(1, -1, -1, 0, 0), 0.0) + ), + gs0_ + ( + IOobject + ( + "gs0", + Ua_.time().timeName(), + Ua_.mesh(), + IOobject::NO_READ, + IOobject::NO_WRITE + ), + Ua_.mesh(), + dimensionedScalar("zero", dimensionSet(0, 0, 0, 0, 0), 1.0) + ) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::kineticTheoryModel::~kineticTheoryModel() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::kineticTheoryModel::solve(const volTensorField& gradUat) +{ + if (!kineticTheory_) + { + return; + } + + const scalar sqrtPi = sqrt(constant::mathematical::pi); + + volScalarField da_(phase1_.d()); + + surfaceScalarField phi(1.5*rhoa_*phia_*fvc::interpolate(alpha_)); + + volTensorField dU(gradUat.T()); //fvc::grad(Ua_); + volSymmTensorField D(symm(dU)); + + // NB, drag = K*alpha*beta, + // (the alpha and beta has been extracted from the drag function for + // numerical reasons) + volScalarField Ur(mag(Ua_ - Ub_)); + volScalarField betaPrim(alpha_*(1.0 - alpha_)*draga_.K(Ur)); + + // Calculating the radial distribution function (solid volume fraction is + // limited close to the packing limit, but this needs improvements) + // The solution is higly unstable close to the packing limit. + gs0_ = radialModel_->g0 + ( + min(max(alpha_, scalar(1e-6)), alphaMax_ - 0.01), + alphaMax_ + ); + + // particle pressure - coefficient in front of Theta (Eq. 3.22, p. 45) + volScalarField PsCoeff + ( + granularPressureModel_->granularPressureCoeff + ( + alpha_, + gs0_, + rhoa_, + e_ + ) + ); + + // 'thermal' conductivity (Table 3.3, p. 49) + kappa_ = conductivityModel_->kappa(alpha_, Theta_, gs0_, rhoa_, da_, e_); + + // particle viscosity (Table 3.2, p.47) + mua_ = viscosityModel_->mua(alpha_, Theta_, gs0_, rhoa_, da_, e_); + + dimensionedScalar Tsmall + ( + "small", + dimensionSet(0 , 2 ,-2 ,0 , 0, 0, 0), + 1.0e-6 + ); + + dimensionedScalar TsmallSqrt = sqrt(Tsmall); + volScalarField ThetaSqrt(sqrt(Theta_)); + + // dissipation (Eq. 3.24, p.50) + volScalarField gammaCoeff + ( + 12.0*(1.0 - sqr(e_))*sqr(alpha_)*rhoa_*gs0_*(1.0/da_)*ThetaSqrt/sqrtPi + ); + + // Eq. 3.25, p. 50 Js = J1 - J2 + volScalarField J1(3.0*betaPrim); + volScalarField J2 + ( + 0.25*sqr(betaPrim)*da_*sqr(Ur) + /(max(alpha_, scalar(1e-6))*rhoa_*sqrtPi*(ThetaSqrt + TsmallSqrt)) + ); + + // bulk viscosity p. 45 (Lun et al. 1984). + lambda_ = (4.0/3.0)*sqr(alpha_)*rhoa_*da_*gs0_*(1.0+e_)*ThetaSqrt/sqrtPi; + + // stress tensor, Definitions, Table 3.1, p. 43 + volSymmTensorField tau(2.0*mua_*D + (lambda_ - (2.0/3.0)*mua_)*tr(D)*I); + + if (!equilibrium_) + { + // construct the granular temperature equation (Eq. 3.20, p. 44) + // NB. note that there are two typos in Eq. 3.20 + // no grad infront of Ps + // wrong sign infront of laplacian + fvScalarMatrix ThetaEqn + ( + fvm::ddt(1.5*alpha_*rhoa_, Theta_) + + fvm::div(phi, Theta_, "div(phi,Theta)") + == + fvm::SuSp(-((PsCoeff*I) && dU), Theta_) + + (tau && dU) + + fvm::laplacian(kappa_, Theta_, "laplacian(kappa,Theta)") + + fvm::Sp(-gammaCoeff, Theta_) + + fvm::Sp(-J1, Theta_) + + fvm::Sp(J2/(Theta_ + Tsmall), Theta_) + ); + + ThetaEqn.relax(); + ThetaEqn.solve(); + } + else + { + // equilibrium => dissipation == production + // Eq. 4.14, p.82 + volScalarField K1(2.0*(1.0 + e_)*rhoa_*gs0_); + volScalarField K3 + ( + 0.5*da_*rhoa_* + ( + (sqrtPi/(3.0*(3.0-e_))) + *(1.0 + 0.4*(1.0 + e_)*(3.0*e_ - 1.0)*alpha_*gs0_) + +1.6*alpha_*gs0_*(1.0 + e_)/sqrtPi + ) + ); + + volScalarField K2 + ( + 4.0*da_*rhoa_*(1.0 + e_)*alpha_*gs0_/(3.0*sqrtPi) - 2.0*K3/3.0 + ); + + volScalarField K4(12.0*(1.0 - sqr(e_))*rhoa_*gs0_/(da_*sqrtPi)); + + volScalarField trD(tr(D)); + volScalarField tr2D(sqr(trD)); + volScalarField trD2(tr(D & D)); + + volScalarField t1(K1*alpha_ + rhoa_); + volScalarField l1(-t1*trD); + volScalarField l2(sqr(t1)*tr2D); + volScalarField l3 + ( + 4.0 + *K4 + *max(alpha_, scalar(1e-6)) + *(2.0*K3*trD2 + K2*tr2D) + ); + + Theta_ = sqr((l1 + sqrt(l2 + l3))/(2.0*(alpha_ + 1.0e-4)*K4)); + } + + Theta_.max(1.0e-15); + Theta_.min(1.0e+3); + + volScalarField pf + ( + frictionalStressModel_->frictionalPressure + ( + alpha_, + alphaMinFriction_, + alphaMax_, + Fr_, + eta_, + p_ + ) + ); + + PsCoeff += pf/(Theta_+Tsmall); + + PsCoeff.min(1.0e+10); + PsCoeff.max(-1.0e+10); + + // update particle pressure + pa_ = PsCoeff*Theta_; + + // frictional shear stress, Eq. 3.30, p. 52 + volScalarField muf + ( + frictionalStressModel_->muf + ( + alpha_, + alphaMax_, + pf, + D, + phi_ + ) + ); + + // add frictional stress + mua_ += muf; + mua_.min(1.0e+2); + mua_.max(0.0); + + Info<< "kinTheory: max(Theta) = " << max(Theta_).value() << endl; + + volScalarField ktn(mua_/rhoa_); + + Info<< "kinTheory: min(nua) = " << min(ktn).value() + << ", max(nua) = " << max(ktn).value() << endl; + + Info<< "kinTheory: min(pa) = " << min(pa_).value() + << ", max(pa) = " << max(pa_).value() << endl; +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.H b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.H new file mode 100644 index 0000000000..59e80062ca --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.H @@ -0,0 +1,197 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::kineticTheoryModel + +Description + +SourceFiles + kineticTheoryModel.C + +\*---------------------------------------------------------------------------*/ + +#ifndef kineticTheoryModel_H +#define kineticTheoryModel_H + +#include "dragModel.H" +#include "phaseModel.H" +#include "autoPtr.H" +#include "viscosityModel.H" +#include "conductivityModel.H" +#include "radialModel.H" +#include "granularPressureModel.H" +#include "frictionalStressModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class kineticTheoryModel Declaration +\*---------------------------------------------------------------------------*/ + +class kineticTheoryModel +{ + // Private data + + const phaseModel& phase1_; + const volVectorField& Ua_; + const volVectorField& Ub_; + const volScalarField& alpha_; + const surfaceScalarField& phia_; + + const dragModel& draga_; + + const dimensionedScalar& rhoa_; + const dimensionedScalar& nua_; + + //- dictionary holding the modeling info + IOdictionary kineticTheoryProperties_; + + //- use kinetic theory or not. + Switch kineticTheory_; + + //- use generation == dissipation + Switch equilibrium_; + + autoPtr viscosityModel_; + + autoPtr conductivityModel_; + + autoPtr radialModel_; + + autoPtr + granularPressureModel_; + + autoPtr + frictionalStressModel_; + + //- coefficient of restitution + const dimensionedScalar e_; + + //- maximum packing + const dimensionedScalar alphaMax_; + + //- min value for which the frictional stresses are zero + const dimensionedScalar alphaMinFriction_; + + //- material constant for frictional normal stress + const dimensionedScalar Fr_; + + //- material constant for frictional normal stress + const dimensionedScalar eta_; + + //- material constant for frictional normal stress + const dimensionedScalar p_; + + //- angle of internal friction + const dimensionedScalar phi_; + + //- The granular energy/temperature + volScalarField Theta_; + + //- The granular viscosity + volScalarField mua_; + + //- The granular bulk viscosity + volScalarField lambda_; + + //- The granular pressure + volScalarField pa_; + + //- The granular temperature conductivity + volScalarField kappa_; + + //- The radial distribution function + volScalarField gs0_; + + + // Private Member Functions + + //- Disallow default bitwise copy construct + kineticTheoryModel(const kineticTheoryModel&); + + //- Disallow default bitwise assignment + void operator=(const kineticTheoryModel&); + + +public: + + // Constructors + + //- Construct from components + kineticTheoryModel + ( + const phaseModel& phase1, + const volVectorField& Ub, + const volScalarField& alpha, + const dragModel& draga + ); + + + //- Destructor + virtual ~kineticTheoryModel(); + + + // Member Functions + + void solve(const volTensorField& gradUat); + + bool on() const + { + return kineticTheory_; + } + + const volScalarField& mua() const + { + return mua_; + } + + const volScalarField& pa() const + { + return pa_; + } + + const volScalarField& lambda() const + { + return lambda_; + } + + const volScalarField& kappa() const + { + return kappa_; + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/radialModel/CarnahanStarling/CarnahanStarlingRadial.C b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/radialModel/CarnahanStarling/CarnahanStarlingRadial.C new file mode 100644 index 0000000000..42c709068b --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/radialModel/CarnahanStarling/CarnahanStarlingRadial.C @@ -0,0 +1,99 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "CarnahanStarlingRadial.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ +namespace radialModels +{ + defineTypeNameAndDebug(CarnahanStarling, 0); + + addToRunTimeSelectionTable + ( + radialModel, + CarnahanStarling, + dictionary + ); +} +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::radialModels::CarnahanStarling::CarnahanStarling +( + const dictionary& dict +) +: + radialModel(dict) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::radialModels::CarnahanStarling::~CarnahanStarling() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp +Foam::kineticTheoryModels::radialModels::CarnahanStarling::g0 +( + const volScalarField& alpha, + const dimensionedScalar& alphaMax +) const +{ + + return + 1.0/(1.0 - alpha) + + 3.0*alpha/(2.0*sqr(1.0 - alpha)) + + sqr(alpha)/(2.0*pow(1.0 - alpha, 3)); +} + + +Foam::tmp +Foam::kineticTheoryModels::radialModels::CarnahanStarling::g0prime +( + const volScalarField& alpha, + const dimensionedScalar& alphaMax +) const +{ + return + - alpha/sqr(1.0 - alpha) + + (3.0*(1.0 - alpha) + 6.0*sqr(alpha))/(2.0*(1.0 - alpha)) + + (2.0*alpha*(1.0 - alpha) + 3.0*pow(alpha, 3)) + /(2.0*pow(1.0 - alpha, 4)); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/radialModel/CarnahanStarling/CarnahanStarlingRadial.H b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/radialModel/CarnahanStarling/CarnahanStarlingRadial.H new file mode 100644 index 0000000000..de5c24a182 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/radialModel/CarnahanStarling/CarnahanStarlingRadial.H @@ -0,0 +1,100 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::kineticTheoryModels::radialModels::CarnahanStarling + +Description + +SourceFiles + CarnahanStarlingRadial.C + +\*---------------------------------------------------------------------------*/ + +#ifndef CarnahanStarling_H +#define CarnahanStarling_H + +#include "radialModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ +namespace radialModels +{ + +/*---------------------------------------------------------------------------*\ + Class CarnahanStarling Declaration +\*---------------------------------------------------------------------------*/ + +class CarnahanStarling +: + public radialModel +{ + +public: + + //- Runtime type information + TypeName("CarnahanStarling"); + + + // Constructors + + //- Construct from components + CarnahanStarling(const dictionary& dict); + + + //- Destructor + virtual ~CarnahanStarling(); + + + // Member Functions + + + tmp g0 + ( + const volScalarField& alpha, + const dimensionedScalar& alphaMax + ) const; + + tmp g0prime + ( + const volScalarField& alpha, + const dimensionedScalar& alphaMax + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace radialModels +} // End namespace kineticTheoryModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/radialModel/Gidaspow/GidaspowRadial.C b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/radialModel/Gidaspow/GidaspowRadial.C new file mode 100644 index 0000000000..9cd4675ce9 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/radialModel/Gidaspow/GidaspowRadial.C @@ -0,0 +1,93 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "GidaspowRadial.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ +namespace radialModels +{ + defineTypeNameAndDebug(Gidaspow, 0); + + addToRunTimeSelectionTable + ( + radialModel, + Gidaspow, + dictionary + ); +} +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::radialModels::Gidaspow::Gidaspow +( + const dictionary& dict +) +: + radialModel(dict) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::radialModels::Gidaspow::~Gidaspow() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp +Foam::kineticTheoryModels::radialModels::Gidaspow::g0 +( + const volScalarField& alpha, + const dimensionedScalar& alphaMax +) const +{ + return 0.6/(1.0 - pow(alpha/alphaMax, 1.0/3.0)); +} + + +Foam::tmp +Foam::kineticTheoryModels::radialModels::Gidaspow::g0prime +( + const volScalarField& alpha, + const dimensionedScalar& alphaMax +) const +{ + return + (-1.0/5.0)*pow(alpha/alphaMax, -2.0/3.0) + /(alphaMax*sqr(1.0 - pow(alpha/alphaMax, 1.0/3.0))); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/radialModel/Gidaspow/GidaspowRadial.H b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/radialModel/Gidaspow/GidaspowRadial.H new file mode 100644 index 0000000000..7f94c23a97 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/radialModel/Gidaspow/GidaspowRadial.H @@ -0,0 +1,99 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::kineticTheoryModels::radialModels::Gidaspow + +Description + +SourceFiles + GidaspowRadial.C + +\*---------------------------------------------------------------------------*/ + +#ifndef Gidaspow_H +#define Gidaspow_H + +#include "radialModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ +namespace radialModels +{ + +/*---------------------------------------------------------------------------*\ + Class Gidaspow Declaration +\*---------------------------------------------------------------------------*/ + +class Gidaspow +: + public radialModel +{ + +public: + + //- Runtime type information + TypeName("Gidaspow"); + + + // Constructors + + //- Construct from components + Gidaspow(const dictionary& dict); + + + //- Destructor + virtual ~Gidaspow(); + + + // Member Functions + + tmp g0 + ( + const volScalarField& alpha, + const dimensionedScalar& alphaMax + ) const; + + tmp g0prime + ( + const volScalarField& alpha, + const dimensionedScalar& alphaMax + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace radialModels +} // End namespace kineticTheoryModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/radialModel/LunSavage/LunSavageRadial.C b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/radialModel/LunSavage/LunSavageRadial.C new file mode 100644 index 0000000000..91571b3bb3 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/radialModel/LunSavage/LunSavageRadial.C @@ -0,0 +1,92 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "LunSavageRadial.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ +namespace radialModels +{ + defineTypeNameAndDebug(LunSavage, 0); + + addToRunTimeSelectionTable + ( + radialModel, + LunSavage, + dictionary + ); +} +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::radialModels::LunSavage::LunSavage +( + const dictionary& dict +) +: + radialModel(dict) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::radialModels::LunSavage::~LunSavage() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp +Foam::kineticTheoryModels::radialModels::LunSavage::g0 +( + const volScalarField& alpha, + const dimensionedScalar& alphaMax +) const +{ + + return pow(1.0 - alpha/alphaMax, -2.5*alphaMax); +} + + +Foam::tmp +Foam::kineticTheoryModels::radialModels::LunSavage::g0prime +( + const volScalarField& alpha, + const dimensionedScalar& alphaMax +) const +{ + return 2.5*alphaMax*alpha*pow(1.0 - alpha, -1.0 - 2.5*alphaMax); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/radialModel/LunSavage/LunSavageRadial.H b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/radialModel/LunSavage/LunSavageRadial.H new file mode 100644 index 0000000000..1e95f838ae --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/radialModel/LunSavage/LunSavageRadial.H @@ -0,0 +1,99 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::kineticTheoryModels::radialModels::LunSavage + +Description + +SourceFiles + LunSavage.C + +\*---------------------------------------------------------------------------*/ + +#ifndef LunSavage_H +#define LunSavage_H + +#include "radialModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ +namespace radialModels +{ + +/*---------------------------------------------------------------------------*\ + Class LunSavage Declaration +\*---------------------------------------------------------------------------*/ + +class LunSavage +: + public radialModel +{ + +public: + + //- Runtime type information + TypeName("LunSavage"); + + + // Constructors + + //- Construct from components + LunSavage(const dictionary& dict); + + + //- Destructor + virtual ~LunSavage(); + + + // Member Functions + + tmp g0 + ( + const volScalarField& alpha, + const dimensionedScalar& alphaMax + ) const; + + tmp g0prime + ( + const volScalarField& alpha, + const dimensionedScalar& alphaMax + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace radialModels +} // End namespace kineticTheoryModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/radialModel/SinclairJackson/SinclairJacksonRadial.C b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/radialModel/SinclairJackson/SinclairJacksonRadial.C new file mode 100644 index 0000000000..d9ffa4714b --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/radialModel/SinclairJackson/SinclairJacksonRadial.C @@ -0,0 +1,93 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "SinclairJacksonRadial.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ +namespace radialModels +{ + defineTypeNameAndDebug(SinclairJackson, 0); + + addToRunTimeSelectionTable + ( + radialModel, + SinclairJackson, + dictionary + ); +} +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::radialModels::SinclairJackson::SinclairJackson +( + const dictionary& dict +) +: + radialModel(dict) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::radialModels::SinclairJackson::~SinclairJackson() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp +Foam::kineticTheoryModels::radialModels::SinclairJackson::g0 +( + const volScalarField& alpha, + const dimensionedScalar& alphaMax +) const +{ + return 1.0/(1.0 - pow(alpha/alphaMax, 1.0/3.0)); +} + + +Foam::tmp +Foam::kineticTheoryModels::radialModels::SinclairJackson::g0prime +( + const volScalarField& alpha, + const dimensionedScalar& alphaMax +) const +{ + return + (-1.0/3.0)*pow(alpha/alphaMax, -2.0/3.0) + /(alphaMax*sqr(1.0 - pow(alpha/alphaMax, 1.0/3.0))); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/radialModel/SinclairJackson/SinclairJacksonRadial.H b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/radialModel/SinclairJackson/SinclairJacksonRadial.H new file mode 100644 index 0000000000..8df30f1945 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/radialModel/SinclairJackson/SinclairJacksonRadial.H @@ -0,0 +1,99 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::SinclairJackson + +Description + +SourceFiles + SinclairJacksonRadial.C + +\*---------------------------------------------------------------------------*/ + +#ifndef SinclairJackson_H +#define SinclairJackson_H + +#include "radialModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ +namespace radialModels +{ + +/*---------------------------------------------------------------------------*\ + Class SinclairJackson Declaration +\*---------------------------------------------------------------------------*/ + +class SinclairJackson +: + public radialModel +{ + +public: + + //- Runtime type information + TypeName("SinclairJackson"); + + + // Constructors + + //- Construct from components + SinclairJackson(const dictionary& dict); + + + //- Destructor + virtual ~SinclairJackson(); + + + // Member Functions + + tmp g0 + ( + const volScalarField& alpha, + const dimensionedScalar& alphaMax + ) const; + + tmp g0prime + ( + const volScalarField& alpha, + const dimensionedScalar& alphaMax + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace radialModels +} // End namespace kineticTheoryModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/radialModel/radialModel/newRadialModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/radialModel/radialModel/newRadialModel.C new file mode 100644 index 0000000000..aa79335145 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/radialModel/radialModel/newRadialModel.C @@ -0,0 +1,60 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "radialModel.H" + +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // + +Foam::autoPtr +Foam::kineticTheoryModels::radialModel::New +( + const dictionary& dict +) +{ + word radialModelType(dict.lookup("radialModel")); + + Info<< "Selecting radialModel " + << radialModelType << endl; + + dictionaryConstructorTable::iterator cstrIter = + dictionaryConstructorTablePtr_->find(radialModelType); + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + FatalError + << "radialModel::New(const dictionary&) : " << endl + << " unknown radialModelType type " + << radialModelType + << ", constructor not in hash table" << endl << endl + << " Valid radialModelType types are :" << endl; + Info<< dictionaryConstructorTablePtr_->sortedToc() + << abort(FatalError); + } + + return autoPtr(cstrIter()(dict)); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/radialModel/radialModel/radialModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/radialModel/radialModel/radialModel.C new file mode 100644 index 0000000000..7caf81d366 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/radialModel/radialModel/radialModel.C @@ -0,0 +1,58 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "radialModel.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ + defineTypeNameAndDebug(radialModel, 0); + + defineRunTimeSelectionTable(radialModel, dictionary); +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::radialModel::radialModel +( + const dictionary& dict +) +: + dict_(dict) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::radialModel::~radialModel() +{} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/radialModel/radialModel/radialModel.H b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/radialModel/radialModel/radialModel.H new file mode 100644 index 0000000000..bad05a99df --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/radialModel/radialModel/radialModel.H @@ -0,0 +1,132 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::kineticTheoryModels::radialModel + +SourceFiles + radialModel.C + +\*---------------------------------------------------------------------------*/ + +#ifndef radialModel_H +#define radialModel_H + +#include "dictionary.H" +#include "volFields.H" +#include "dimensionedTypes.H" +#include "runTimeSelectionTables.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ + +/*---------------------------------------------------------------------------*\ + Class radialModel Declaration +\*---------------------------------------------------------------------------*/ + +class radialModel +{ + // Private member functions + + //- Disallow default bitwise copy construct + radialModel(const radialModel&); + + //- Disallow default bitwise assignment + void operator=(const radialModel&); + + +protected: + + // Protected data + + const dictionary& dict_; + + +public: + + //- Runtime type information + TypeName("radialModel"); + + // Declare runtime constructor selection table + declareRunTimeSelectionTable + ( + autoPtr, + radialModel, + dictionary, + ( + const dictionary& dict + ), + (dict) + ); + + + // Constructors + + //- Construct from components + radialModel(const dictionary& dict); + + + // Selectors + + static autoPtr New + ( + const dictionary& dict + ); + + + //- Destructor + virtual ~radialModel(); + + + // Member Functions + + //- Radial distribution function + virtual tmp g0 + ( + const volScalarField& alpha, + const dimensionedScalar& alphaMax + ) const = 0; + + //- Derivative of the radial distribution function + virtual tmp g0prime + ( + const volScalarField& alpha, + const dimensionedScalar& alphaMax + ) const = 0; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace kineticTheoryModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/viscosityModel/Gidaspow/GidaspowViscosity.C b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/viscosityModel/Gidaspow/GidaspowViscosity.C new file mode 100644 index 0000000000..dc51322752 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/viscosityModel/Gidaspow/GidaspowViscosity.C @@ -0,0 +1,87 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "GidaspowViscosity.H" +#include "mathematicalConstants.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ +namespace viscosityModels +{ + defineTypeNameAndDebug(Gidaspow, 0); + addToRunTimeSelectionTable(viscosityModel, Gidaspow, dictionary); +} +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::viscosityModels::Gidaspow::Gidaspow +( + const dictionary& dict +) +: + viscosityModel(dict) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::viscosityModels::Gidaspow::~Gidaspow() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp +Foam::kineticTheoryModels::viscosityModels::Gidaspow::mua +( + const volScalarField& alpha, + const volScalarField& Theta, + const volScalarField& g0, + const dimensionedScalar& rhoa, + const volScalarField& da, + const dimensionedScalar& e +) const +{ + const scalar sqrtPi = sqrt(constant::mathematical::pi); + + return rhoa*da*sqrt(Theta)* + ( + (4.0/5.0)*sqr(alpha)*g0*(1.0 + e)/sqrtPi + + (1.0/15.0)*sqrtPi*g0*(1.0 + e)*sqr(alpha) + + (1.0/6.0)*sqrtPi*alpha + + (10.0/96.0)*sqrtPi/((1.0 + e)*g0) + ); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/viscosityModel/Gidaspow/GidaspowViscosity.H b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/viscosityModel/Gidaspow/GidaspowViscosity.H new file mode 100644 index 0000000000..efe2c5727c --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/viscosityModel/Gidaspow/GidaspowViscosity.H @@ -0,0 +1,96 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::kineticTheoryModels::viscosityModels::Gidaspow + +Description + +SourceFiles + GidaspowViscosity.C + +\*---------------------------------------------------------------------------*/ + +#ifndef Gidaspow_H +#define Gidaspow_H + +#include "viscosityModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ +namespace viscosityModels +{ + +/*---------------------------------------------------------------------------*\ + Class Gidaspow Declaration +\*---------------------------------------------------------------------------*/ + +class Gidaspow +: + public viscosityModel +{ + +public: + + //- Runtime type information + TypeName("Gidaspow"); + + // Constructors + + //- Construct from components + Gidaspow(const dictionary& dict); + + + //- Destructor + virtual ~Gidaspow(); + + + // Member functions + + tmp mua + ( + const volScalarField& alpha, + const volScalarField& Theta, + const volScalarField& g0, + const dimensionedScalar& rhoa, + const volScalarField& da, + const dimensionedScalar& e + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace viscosityModels +} // End namespace kineticTheoryModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.C b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.C new file mode 100644 index 0000000000..5f65f3c74c --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.C @@ -0,0 +1,101 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "HrenyaSinclairViscosity.H" +#include "mathematicalConstants.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ +namespace viscosityModels +{ + defineTypeNameAndDebug(HrenyaSinclair, 0); + + addToRunTimeSelectionTable + ( + viscosityModel, + HrenyaSinclair, + dictionary + ); +} +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::viscosityModels::HrenyaSinclair::HrenyaSinclair +( + const dictionary& dict +) +: + viscosityModel(dict), + coeffsDict_(dict.subDict(typeName + "Coeffs")), + L_(coeffsDict_.lookup("L")) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::viscosityModels::HrenyaSinclair::~HrenyaSinclair() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp +Foam::kineticTheoryModels::viscosityModels::HrenyaSinclair::mua +( + const volScalarField& alpha, + const volScalarField& Theta, + const volScalarField& g0, + const dimensionedScalar& rhoa, + const volScalarField& da, + const dimensionedScalar& e +) const +{ + const scalar sqrtPi = sqrt(constant::mathematical::pi); + + volScalarField lamda + ( + scalar(1) + da/(6.0*sqrt(2.0)*(alpha + scalar(1.0e-5)))/L_ + ); + + return rhoa*da*sqrt(Theta)* + ( + (4.0/5.0)*sqr(alpha)*g0*(1.0 + e)/sqrtPi + + (1.0/15.0)*sqrtPi*g0*(1.0 + e)*(3.0*e - 1)*sqr(alpha)/(3.0-e) + + (1.0/6.0)*sqrtPi*alpha*(0.5*lamda + 0.25*(3.0*e - 1.0)) + /(0.5*(3.0 - e)*lamda) + + (10/96.0)*sqrtPi/((1.0 + e)*0.5*(3.0 - e)*g0*lamda) + ); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.H b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.H new file mode 100644 index 0000000000..7d9640b471 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.H @@ -0,0 +1,104 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::kineticTheoryModels::viscosityModels::HrenyaSinclair + +Description + +SourceFiles + HrenyaSinclairViscosity.C + +\*---------------------------------------------------------------------------*/ + +#ifndef HrenyaSinclair_H +#define HrenyaSinclair_H + +#include "viscosityModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ +namespace viscosityModels +{ + +/*---------------------------------------------------------------------------*\ + Class HrenyaSinclair Declaration +\*---------------------------------------------------------------------------*/ + +class HrenyaSinclair +: + public viscosityModel +{ + // Private data + + dictionary coeffsDict_; + + //- characteristic length of geometry + dimensionedScalar L_; + + +public: + + //- Runtime type information + TypeName("HrenyaSinclair"); + + + // Constructors + + //- Construct from components + HrenyaSinclair(const dictionary& dict); + + + //- Destructor + virtual ~HrenyaSinclair(); + + + // Member functions + + tmp mua + ( + const volScalarField& alpha, + const volScalarField& Theta, + const volScalarField& g0, + const dimensionedScalar& rhoa, + const volScalarField& da, + const dimensionedScalar& e + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace viscosityModels +} // End namespace kineticTheoryModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/viscosityModel/Syamlal/SyamlalViscosity.C b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/viscosityModel/Syamlal/SyamlalViscosity.C new file mode 100644 index 0000000000..7529baa3ae --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/viscosityModel/Syamlal/SyamlalViscosity.C @@ -0,0 +1,86 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "SyamlalViscosity.H" +#include "mathematicalConstants.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ +namespace viscosityModels +{ + defineTypeNameAndDebug(Syamlal, 0); + addToRunTimeSelectionTable(viscosityModel, Syamlal, dictionary); +} +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::viscosityModels::Syamlal::Syamlal +( + const dictionary& dict +) +: + viscosityModel(dict) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::viscosityModels::Syamlal::~Syamlal() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp +Foam::kineticTheoryModels::viscosityModels::Syamlal::mua +( + const volScalarField& alpha, + const volScalarField& Theta, + const volScalarField& g0, + const dimensionedScalar& rhoa, + const volScalarField& da, + const dimensionedScalar& e +) const +{ + const scalar sqrtPi = sqrt(constant::mathematical::pi); + + return rhoa*da*sqrt(Theta)* + ( + (4.0/5.0)*sqr(alpha)*g0*(1.0 + e)/sqrtPi + + (1.0/15.0)*sqrtPi*g0*(1.0 + e)*(3.0*e - 1.0)*sqr(alpha)/(3.0 - e) + + (1.0/6.0)*alpha*sqrtPi/(3.0 - e) + ); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/viscosityModel/Syamlal/SyamlalViscosity.H b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/viscosityModel/Syamlal/SyamlalViscosity.H new file mode 100644 index 0000000000..9d784aeeb2 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/viscosityModel/Syamlal/SyamlalViscosity.H @@ -0,0 +1,97 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::kineticTheoryModels::viscosityModels::Syamlal + +Description + +SourceFiles + SyamlalViscosity.C + +\*---------------------------------------------------------------------------*/ + +#ifndef Syamlal_H +#define Syamlal_H + +#include "viscosityModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ +namespace viscosityModels +{ + +/*---------------------------------------------------------------------------*\ + Class Syamlal Declaration +\*---------------------------------------------------------------------------*/ + +class Syamlal +: + public viscosityModel +{ + +public: + + //- Runtime type information + TypeName("Syamlal"); + + + // Constructors + + //- Construct from components + Syamlal(const dictionary& dict); + + + //- Destructor + virtual ~Syamlal(); + + + // Member functions + + tmp mua + ( + const volScalarField& alpha, + const volScalarField& Theta, + const volScalarField& g0, + const dimensionedScalar& rhoa, + const volScalarField& da, + const dimensionedScalar& e + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace viscosityModels +} // End namespace kineticTheoryModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/viscosityModel/none/noneViscosity.C b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/viscosityModel/none/noneViscosity.C new file mode 100644 index 0000000000..36f4bab76a --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/viscosityModel/none/noneViscosity.C @@ -0,0 +1,75 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "noneViscosity.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ + defineTypeNameAndDebug(noneViscosity, 0); + addToRunTimeSelectionTable(viscosityModel, noneViscosity, dictionary); +} +} + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::noneViscosity::noneViscosity(const dictionary& dict) +: + viscosityModel(dict) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::noneViscosity::~noneViscosity() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp Foam::kineticTheoryModels::noneViscosity::mua +( + const volScalarField& alpha, + const volScalarField& Theta, + const volScalarField& g0, + const dimensionedScalar& rhoa, + const volScalarField& da, + const dimensionedScalar& e +) const +{ + return dimensionedScalar + ( + "0", + dimensionSet(1, -1, -1, 0, 0, 0, 0), + 0.0 + )*alpha; +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/viscosityModel/none/noneViscosity.H b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/viscosityModel/none/noneViscosity.H new file mode 100644 index 0000000000..22f60d9602 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/viscosityModel/none/noneViscosity.H @@ -0,0 +1,94 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::noneViscosity + +Description + +SourceFiles + noneViscosity.C + +\*---------------------------------------------------------------------------*/ + +#ifndef noneViscosity_H +#define noneViscosity_H + +#include "viscosityModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ + +/*---------------------------------------------------------------------------*\ + Class noneViscosity Declaration +\*---------------------------------------------------------------------------*/ + +class noneViscosity +: + public viscosityModel +{ + +public: + + //- Runtime type information + TypeName("none"); + + + // Constructors + + //- Construct from components + noneViscosity(const dictionary& dict); + + + //- Destructor + virtual ~noneViscosity(); + + + // Member functions + + tmp mua + ( + const volScalarField& alpha, + const volScalarField& Theta, + const volScalarField& g0, + const dimensionedScalar& rhoa, + const volScalarField& da, + const dimensionedScalar& e + ) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace kineticTheoryModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/viscosityModel/viscosityModel/newViscosityModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/viscosityModel/viscosityModel/newViscosityModel.C new file mode 100644 index 0000000000..2b50f09359 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/viscosityModel/viscosityModel/newViscosityModel.C @@ -0,0 +1,59 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "viscosityModel.H" + +// * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // + +Foam::autoPtr +Foam::kineticTheoryModels::viscosityModel::New +( + const dictionary& dict +) +{ + word viscosityModelType(dict.lookup("viscosityModel")); + + Info<< "Selecting viscosityModel " + << viscosityModelType << endl; + + dictionaryConstructorTable::iterator cstrIter = + dictionaryConstructorTablePtr_->find(viscosityModelType); + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + FatalError + << "viscosityModel::New(const dictionary&) : " << endl + << " unknown viscosityModelType type " + << viscosityModelType + << ", constructor not in hash table" << endl << endl + << " Valid viscosityModelType types are :" << endl; + Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); + } + + return autoPtr(cstrIter()(dict)); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.C new file mode 100644 index 0000000000..dc4c1ca1de --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.C @@ -0,0 +1,57 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "viscosityModel.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ + defineTypeNameAndDebug(viscosityModel, 0); + defineRunTimeSelectionTable(viscosityModel, dictionary); +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::viscosityModel::viscosityModel +( + const dictionary& dict +) +: + dict_(dict) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::kineticTheoryModels::viscosityModel::~viscosityModel() +{} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.H b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.H new file mode 100644 index 0000000000..9030938220 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModel.H @@ -0,0 +1,130 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::viscosityModel + +Description + +SourceFiles + viscosityModel.C + +\*---------------------------------------------------------------------------*/ + +#ifndef viscosityModel_H +#define viscosityModel_H + +#include "dictionary.H" +#include "volFields.H" +#include "dimensionedTypes.H" +#include "runTimeSelectionTables.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace kineticTheoryModels +{ + +/*---------------------------------------------------------------------------*\ + Class viscosityModel Declaration +\*---------------------------------------------------------------------------*/ + +class viscosityModel +{ + // Private member functions + + //- Disallow default bitwise copy construct + viscosityModel(const viscosityModel&); + + //- Disallow default bitwise assignment + void operator=(const viscosityModel&); + + +protected: + + // Protected data + + const dictionary& dict_; + + +public: + + //- Runtime type information + TypeName("viscosityModel"); + + // Declare runtime constructor selection table + declareRunTimeSelectionTable + ( + autoPtr, + viscosityModel, + dictionary, + ( + const dictionary& dict + ), + (dict) + ); + + + // Constructors + + //- Construct from components + viscosityModel(const dictionary& dict); + + + // Selectors + + static autoPtr New + ( + const dictionary& dict + ); + + + //- Destructor + virtual ~viscosityModel(); + + + // Member Functions + + virtual tmp mua + ( + const volScalarField& alpha, + const volScalarField& Theta, + const volScalarField& g0, + const dimensionedScalar& rhoa, + const volScalarField& da, + const dimensionedScalar& e + ) const = 0; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace kineticTheoryModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam.C new file mode 100644 index 0000000000..814b4dcb6d --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam.C @@ -0,0 +1,115 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Application + multiphaseEulerFoam + +Description + Solver for a system of many compressible fluid phases including + heat-transfer. + +\*---------------------------------------------------------------------------*/ + +#include "fvCFD.H" +#include "multiphaseSystem.H" +#include "phaseModel.H" +#include "dragModel.H" +#include "heatTransferModel.H" +#include "pimpleControl.H" + +#include "singlePhaseTransportModel.H" +#include "LESModel.H" + +#include "MRFZones.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +int main(int argc, char *argv[]) +{ + #include "setRootCase.H" + + #include "createTime.H" + #include "createMesh.H" + + pimpleControl pimple(mesh); + + #include "createFields.H" + #include "createMRFZones.H" + #include "initContinuityErrs.H" + #include "readTimeControls.H" + #include "correctPhi.H" + #include "CourantNos.H" + #include "setInitialDeltaT.H" + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + Info<< "\nStarting time loop\n" << endl; + + while (runTime.run()) + { + #include "readTimeControls.H" + #include "CourantNos.H" + #include "setDeltaT.H" + + runTime++; + Info<< "Time = " << runTime.timeName() << nl << endl; + + // --- Pressure-velocity PIMPLE corrector loop + for (pimple.start(); pimple.loop(); pimple++) + { + if (pimple.nOuterCorr() != 1) + { + p.storePrevIter(); + } + + sgsModel->correct(); + fluid.solve(); + rho = fluid.rho(); + + //#include "interfacialCoeffs.H" + //#include "TEqns.H" + #include "UEqns.H" + + // --- PISO loop + for (int corr=0; corr. + +\*---------------------------------------------------------------------------*/ + +#include "multiphaseFixedFluxPressureFvPatchScalarField.H" +#include "fvPatchFieldMapper.H" +#include "volFields.H" +#include "surfaceFields.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::multiphaseFixedFluxPressureFvPatchScalarField::multiphaseFixedFluxPressureFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF +) +: + fixedGradientFvPatchScalarField(p, iF), + UName_("U"), + phiName_("phi"), + rhoName_("rho") +{} + + +Foam::multiphaseFixedFluxPressureFvPatchScalarField::multiphaseFixedFluxPressureFvPatchScalarField +( + const multiphaseFixedFluxPressureFvPatchScalarField& ptf, + const fvPatch& p, + const DimensionedField& iF, + const fvPatchFieldMapper& mapper +) +: + fixedGradientFvPatchScalarField(ptf, p, iF, mapper), + UName_(ptf.UName_), + phiName_(ptf.phiName_), + rhoName_(ptf.rhoName_) +{} + + +Foam::multiphaseFixedFluxPressureFvPatchScalarField::multiphaseFixedFluxPressureFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF, + const dictionary& dict +) +: + fixedGradientFvPatchScalarField(p, iF), + UName_(dict.lookupOrDefault("U", "U")), + phiName_(dict.lookupOrDefault("phi", "phi")), + rhoName_(dict.lookupOrDefault("rho", "rho")) +{ + if (dict.found("gradient")) + { + gradient() = scalarField("gradient", dict, p.size()); + fixedGradientFvPatchScalarField::updateCoeffs(); + fixedGradientFvPatchScalarField::evaluate(); + } + else + { + fvPatchField::operator=(patchInternalField()); + gradient() = 0.0; + } +} + + +Foam::multiphaseFixedFluxPressureFvPatchScalarField::multiphaseFixedFluxPressureFvPatchScalarField +( + const multiphaseFixedFluxPressureFvPatchScalarField& wbppsf +) +: + fixedGradientFvPatchScalarField(wbppsf), + UName_(wbppsf.UName_), + phiName_(wbppsf.phiName_), + rhoName_(wbppsf.rhoName_) +{} + + +Foam::multiphaseFixedFluxPressureFvPatchScalarField::multiphaseFixedFluxPressureFvPatchScalarField +( + const multiphaseFixedFluxPressureFvPatchScalarField& wbppsf, + const DimensionedField& iF +) +: + fixedGradientFvPatchScalarField(wbppsf, iF), + UName_(wbppsf.UName_), + phiName_(wbppsf.phiName_), + rhoName_(wbppsf.rhoName_) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::multiphaseFixedFluxPressureFvPatchScalarField::updateCoeffs() +{ + if (updated()) + { + return; + } + + const fvPatchField& Up = + patch().lookupPatchField(UName_); + + const surfaceScalarField& phi = + db().lookupObject(phiName_); + + fvsPatchField phip = + patch().patchField(phi); + + if (phi.dimensions() == dimDensity*dimVelocity*dimArea) + { + const fvPatchField& rhop = + patch().lookupPatchField(rhoName_); + + phip /= rhop; + } + + const fvsPatchField& Dpp = + patch().lookupPatchField("Dp"); + + gradient() = (phip - (patch().Sf() & Up))/patch().magSf()/Dpp; + + fixedGradientFvPatchScalarField::updateCoeffs(); +} + + +void Foam::multiphaseFixedFluxPressureFvPatchScalarField::write(Ostream& os) const +{ + fvPatchScalarField::write(os); + writeEntryIfDifferent(os, "U", "U", UName_); + writeEntryIfDifferent(os, "phi", "phi", phiName_); + writeEntryIfDifferent(os, "rho", "rho", rhoName_); + gradient().writeEntry("gradient", os); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + makePatchTypeField + ( + fvPatchScalarField, + multiphaseFixedFluxPressureFvPatchScalarField + ); +} + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseFixedFluxPressure/multiphaseFixedFluxPressureFvPatchScalarField.H b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseFixedFluxPressure/multiphaseFixedFluxPressureFvPatchScalarField.H new file mode 100644 index 0000000000..a647681564 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseFixedFluxPressure/multiphaseFixedFluxPressureFvPatchScalarField.H @@ -0,0 +1,154 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::multiphaseFixedFluxPressureFvPatchScalarField + +Description + Foam::multiphaseFixedFluxPressureFvPatchScalarField + +SourceFiles + multiphaseFixedFluxPressureFvPatchScalarField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef multiphaseFixedFluxPressureFvPatchScalarFields_H +#define multiphaseFixedFluxPressureFvPatchScalarFields_H + +#include "fvPatchFields.H" +#include "fixedGradientFvPatchFields.H" +#include "Switch.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class multiphaseFixedFluxPressureFvPatch Declaration +\*---------------------------------------------------------------------------*/ + +class multiphaseFixedFluxPressureFvPatchScalarField +: + public fixedGradientFvPatchScalarField +{ + // Private data + + //- Name of the velocity field + word UName_; + + //- Name of the flux transporting the field + word phiName_; + + //- Name of the density field used to normalise the mass flux + // if neccessary + word rhoName_; + + +public: + + //- Runtime type information + TypeName("multiphaseFixedFluxPressure"); + + + // Constructors + + //- Construct from patch and internal field + multiphaseFixedFluxPressureFvPatchScalarField + ( + const fvPatch&, + const DimensionedField& + ); + + //- Construct from patch, internal field and dictionary + multiphaseFixedFluxPressureFvPatchScalarField + ( + const fvPatch&, + const DimensionedField&, + const dictionary& + ); + + //- Construct by mapping given multiphaseFixedFluxPressureFvPatchScalarField onto + // a new patch + multiphaseFixedFluxPressureFvPatchScalarField + ( + const multiphaseFixedFluxPressureFvPatchScalarField&, + const fvPatch&, + const DimensionedField&, + const fvPatchFieldMapper& + ); + + //- Construct as copy + multiphaseFixedFluxPressureFvPatchScalarField + ( + const multiphaseFixedFluxPressureFvPatchScalarField& + ); + + //- Construct and return a clone + virtual tmp clone() const + { + return tmp + ( + new multiphaseFixedFluxPressureFvPatchScalarField(*this) + ); + } + + //- Construct as copy setting internal field reference + multiphaseFixedFluxPressureFvPatchScalarField + ( + const multiphaseFixedFluxPressureFvPatchScalarField&, + const DimensionedField& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp clone + ( + const DimensionedField& iF + ) const + { + return tmp + ( + new multiphaseFixedFluxPressureFvPatchScalarField(*this, iF) + ); + } + + + // Member functions + + //- Update the coefficients associated with the patch field + virtual void updateCoeffs(); + + //- Write + virtual void write(Ostream&) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/Make/files b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/Make/files new file mode 100644 index 0000000000..1f6106038e --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/Make/files @@ -0,0 +1,4 @@ +alphaContactAngle/alphaContactAngleFvPatchScalarField.C +multiphaseSystem.C + +LIB = $(FOAM_LIBBIN)/libmultiphaseSystem diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/Make/options b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/Make/options new file mode 100644 index 0000000000..e956bfdc91 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/Make/options @@ -0,0 +1,15 @@ +EXE_INC = -ggdb3 \ + -I../phaseModel/lnInclude \ + -I../interfacialModels/lnInclude \ + -IalphaContactAngle \ + -I$(LIB_SRC)/transportModels \ + -I$(LIB_SRC)/transportModels/incompressible/lnInclude \ + -I$(LIB_SRC)/transportModels/interfaceProperties/lnInclude \ + -I$(LIB_SRC)/finiteVolume/lnInclude + +LIB_LIBS = \ + -lcompressibleMultiPhaseModel \ + -linterfaceProperties \ + -lincompressibleTransportModels \ + -lcompressibleMultiphaseEulerianInterfacialModels \ + -lfiniteVolume diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/alphaContactAngle/alphaContactAngleFvPatchScalarField.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/alphaContactAngle/alphaContactAngleFvPatchScalarField.C new file mode 100644 index 0000000000..a0d433f4e8 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/alphaContactAngle/alphaContactAngleFvPatchScalarField.C @@ -0,0 +1,146 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "alphaContactAngleFvPatchScalarField.H" +#include "addToRunTimeSelectionTable.H" +#include "fvPatchFieldMapper.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +alphaContactAngleFvPatchScalarField::interfaceThetaProps::interfaceThetaProps +( + Istream& is +) +: + theta0_(readScalar(is)), + uTheta_(readScalar(is)), + thetaA_(readScalar(is)), + thetaR_(readScalar(is)) +{} + + +Istream& operator>> +( + Istream& is, + alphaContactAngleFvPatchScalarField::interfaceThetaProps& tp +) +{ + is >> tp.theta0_ >> tp.uTheta_ >> tp.thetaA_ >> tp.thetaR_; + return is; +} + + +Ostream& operator<< +( + Ostream& os, + const alphaContactAngleFvPatchScalarField::interfaceThetaProps& tp +) +{ + os << tp.theta0_ << token::SPACE + << tp.uTheta_ << token::SPACE + << tp.thetaA_ << token::SPACE + << tp.thetaR_; + + return os; +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF +) +: + zeroGradientFvPatchScalarField(p, iF) +{} + + +alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField +( + const alphaContactAngleFvPatchScalarField& gcpsf, + const fvPatch& p, + const DimensionedField& iF, + const fvPatchFieldMapper& mapper +) +: + zeroGradientFvPatchScalarField(gcpsf, p, iF, mapper), + thetaProps_(gcpsf.thetaProps_) +{} + + +alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF, + const dictionary& dict +) +: + zeroGradientFvPatchScalarField(p, iF), + thetaProps_(dict.lookup("thetaProperties")) +{ + evaluate(); +} + + +alphaContactAngleFvPatchScalarField::alphaContactAngleFvPatchScalarField +( + const alphaContactAngleFvPatchScalarField& gcpsf, + const DimensionedField& iF +) +: + zeroGradientFvPatchScalarField(gcpsf, iF), + thetaProps_(gcpsf.thetaProps_) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void alphaContactAngleFvPatchScalarField::write(Ostream& os) const +{ + fvPatchScalarField::write(os); + os.writeKeyword("thetaProperties") + << thetaProps_ << token::END_STATEMENT << nl; + writeEntry("value", os); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +makePatchTypeField +( + fvPatchScalarField, + alphaContactAngleFvPatchScalarField +); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/alphaContactAngle/alphaContactAngleFvPatchScalarField.H b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/alphaContactAngle/alphaContactAngleFvPatchScalarField.H new file mode 100644 index 0000000000..8f980046e2 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/alphaContactAngle/alphaContactAngleFvPatchScalarField.H @@ -0,0 +1,215 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::alphaContactAngleFvPatchScalarField + +Description + Contact-angle boundary condition for multi-phase interface-capturing + simulations. Used in conjuction with multiphaseSystem. + +SourceFiles + alphaContactAngleFvPatchScalarField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef alphaContactAngleFvPatchScalarField_H +#define alphaContactAngleFvPatchScalarField_H + +#include "zeroGradientFvPatchFields.H" +#include "multiphaseSystem.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class alphaContactAngleFvPatch Declaration +\*---------------------------------------------------------------------------*/ + +class alphaContactAngleFvPatchScalarField +: + public zeroGradientFvPatchScalarField +{ +public: + + class interfaceThetaProps + { + //- Equilibrium contact angle + scalar theta0_; + + //- Dynamic contact angle velocity scale + scalar uTheta_; + + //- Limiting advancing contact angle + scalar thetaA_; + + //- Limiting receeding contact angle + scalar thetaR_; + + + public: + + // Constructors + interfaceThetaProps() + {} + + interfaceThetaProps(Istream&); + + + // Member functions + + //- Return the equilibrium contact angle theta0 + scalar theta0(bool matched=true) const + { + if (matched) return theta0_; + else return 180.0 - theta0_; + } + + //- Return the dynamic contact angle velocity scale + scalar uTheta() const + { + return uTheta_; + } + + //- Return the limiting advancing contact angle + scalar thetaA(bool matched=true) const + { + if (matched) return thetaA_; + else return 180.0 - thetaA_; + } + + //- Return the limiting receeding contact angle + scalar thetaR(bool matched=true) const + { + if (matched) return thetaR_; + else return 180.0 - thetaR_; + } + + + // IO functions + + friend Istream& operator>>(Istream&, interfaceThetaProps&); + friend Ostream& operator<<(Ostream&, const interfaceThetaProps&); + }; + + typedef HashTable + < + interfaceThetaProps, + multiphaseSystem::interfacePair, + multiphaseSystem::interfacePair::hash + > thetaPropsTable; + + +private: + + // Private data + + thetaPropsTable thetaProps_; + + +public: + + //- Runtime type information + TypeName("alphaContactAngle"); + + + // Constructors + + //- Construct from patch and internal field + alphaContactAngleFvPatchScalarField + ( + const fvPatch&, + const DimensionedField& + ); + + //- Construct from patch, internal field and dictionary + alphaContactAngleFvPatchScalarField + ( + const fvPatch&, + const DimensionedField&, + const dictionary& + ); + + //- Construct by mapping given alphaContactAngleFvPatchScalarField + // onto a new patch + alphaContactAngleFvPatchScalarField + ( + const alphaContactAngleFvPatchScalarField&, + const fvPatch&, + const DimensionedField&, + const fvPatchFieldMapper& + ); + + //- Construct and return a clone + virtual tmp clone() const + { + return tmp + ( + new alphaContactAngleFvPatchScalarField(*this) + ); + } + + //- Construct as copy setting internal field reference + alphaContactAngleFvPatchScalarField + ( + const alphaContactAngleFvPatchScalarField&, + const DimensionedField& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp clone + ( + const DimensionedField& iF + ) const + { + return tmp + ( + new alphaContactAngleFvPatchScalarField(*this, iF) + ); + } + + + // Member functions + + //- Return the contact angle properties + const thetaPropsTable& thetaProps() const + { + return thetaProps_; + } + + //- Write + virtual void write(Ostream&) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C new file mode 100644 index 0000000000..a215300501 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.C @@ -0,0 +1,814 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "multiphaseSystem.H" +#include "alphaContactAngleFvPatchScalarField.H" +#include "Time.H" +#include "subCycle.H" +#include "MULES.H" +#include "fvcSnGrad.H" +#include "fvcFlux.H" + +// * * * * * * * * * * * * * * * Static Member Data * * * * * * * * * * * * // + +const Foam::scalar Foam::multiphaseSystem::convertToRad = + Foam::constant::mathematical::pi/180.0; + + +// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // + +void Foam::multiphaseSystem::calcAlphas() +{ + scalar level = 0.0; + alphas_ == 0.0; + + forAllIter(PtrDictionary, phases_, iter) + { + alphas_ += level*iter(); + level += 1.0; + } + + alphas_.correctBoundaryConditions(); +} + + +void Foam::multiphaseSystem::solveAlphas() +{ + word alphaScheme("div(phi,alpha)"); + word alpharScheme("div(phirb,alpha)"); + + surfaceScalarField phic(mag(phi_/mesh_.magSf())); + + PtrList phiAlphaCorrs(phases_.size()); + int phasei = 0; + + forAllIter(PtrDictionary, phases_, iter) + { + phaseModel& phase1 = iter(); + + phase1.phiAlpha() = + dimensionedScalar("0", dimensionSet(0, 3, -1, 0, 0), 0); + + phiAlphaCorrs.set + ( + phasei, + new surfaceScalarField + ( + fvc::flux + ( + phi_, + phase1, + alphaScheme + ) + ) + ); + + surfaceScalarField& phiAlphaCorr = phiAlphaCorrs[phasei]; + + forAllIter(PtrDictionary, phases_, iter2) + { + phaseModel& phase2 = iter2(); + + if (&phase2 == &phase1) continue; + + surfaceScalarField phir + ( + (phase1.phi() - phase2.phi()) + + min(cAlpha(phase1, phase2)*phic, max(phic))*nHatf(phase1, phase2) + ); + + phiAlphaCorr += fvc::flux + ( + -fvc::flux(-phir, phase2, alpharScheme), + phase1, + alpharScheme + ); + } + + MULES::limit + ( + geometricOneField(), + phase1, + phi_, + phiAlphaCorr, + zeroField(), + zeroField(), + 1, + 0, + 3, + true + ); + + phasei++; + } + + MULES::limitSum(phiAlphaCorrs); + + volScalarField sumAlpha + ( + IOobject + ( + "sumAlpha", + mesh_.time().timeName(), + mesh_ + ), + mesh_, + dimensionedScalar("sumAlpha", dimless, 0) + ); + + phasei = 0; + + forAllIter(PtrDictionary, phases_, iter) + { + phaseModel& phase1 = iter(); + + surfaceScalarField& phiAlpha = phiAlphaCorrs[phasei]; + phiAlpha += upwind(mesh_, phi_).flux(phase1); + + MULES::explicitSolve + ( + geometricOneField(), + phase1, + phiAlpha, + zeroField(), + zeroField() + ); + + phase1.phiAlpha() += phiAlpha; + + Info<< phase1.name() << " volume fraction, min, max = " + << phase1.weightedAverage(mesh_.V()).value() + << ' ' << min(phase1).value() + << ' ' << max(phase1).value() + << endl; + + sumAlpha += phase1; + + phasei++; + } + + Info<< "Phase-sum volume fraction, min, max = " + << sumAlpha.weightedAverage(mesh_.V()).value() + << ' ' << min(sumAlpha).value() + << ' ' << max(sumAlpha).value() + << endl; + + calcAlphas(); +} + + +Foam::dimensionedScalar Foam::multiphaseSystem::sigma +( + const phaseModel& phase1, + const phaseModel& phase2 +) const +{ + scalarCoeffTable::const_iterator sigma + ( + sigmas_.find(interfacePair(phase1, phase2)) + ); + + if (sigma == sigmas_.end()) + { + FatalErrorIn + ( + "multiphaseSystem::sigma(const phaseModel& phase1, const phaseModel& phase2) const" + ) << "Cannot find interface " << interfacePair(phase1, phase2) + << " in list of sigma values" + << exit(FatalError); + } + + return dimensionedScalar("sigma", dimSigma_, sigma()); +} + + +Foam::scalar Foam::multiphaseSystem::cAlpha +( + const phaseModel& phase1, + const phaseModel& phase2 +) const +{ + scalarCoeffTable::const_iterator cAlpha + ( + cAlphas_.find(interfacePair(phase1, phase2)) + ); + + if (cAlpha == cAlphas_.end()) + { + FatalErrorIn + ( + "multiphaseSystem::cAlpha(const phaseModel& phase1, const phaseModel& phase2) const" + ) << "Cannot find interface " << interfacePair(phase1, phase2) + << " in list of cAlpha values" + << exit(FatalError); + } + + return cAlpha(); +} + + +Foam::dimensionedScalar Foam::multiphaseSystem::Cvm +( + const phaseModel& phase1, + const phaseModel& phase2 +) const +{ + scalarCoeffTable::const_iterator Cvm + ( + Cvms_.find(interfacePair(phase1, phase2)) + ); + + if (Cvm != Cvms_.end()) + { + return Cvm()*phase2.rho(); + } + + Cvm = Cvms_.find(interfacePair(phase2, phase1)); + + if (Cvm != Cvms_.end()) + { + return Cvm()*phase1.rho(); + } + + FatalErrorIn + ( + "multiphaseSystem::sigma(const phaseModel& phase1, const phaseModel& phase2) const" + ) << "Cannot find interface " << interfacePair(phase1, phase2) + << " in list of sigma values" + << exit(FatalError); + + return Cvm()*phase2.rho(); +} + + +Foam::tmp Foam::multiphaseSystem::nHatfv +( + const volScalarField& alpha1, + const volScalarField& alpha2 +) const +{ + /* + // Cell gradient of alpha + volVectorField gradAlpha = + alpha2*fvc::grad(alpha1) - alpha1*fvc::grad(alpha2); + + // Interpolated face-gradient of alpha + surfaceVectorField gradAlphaf = fvc::interpolate(gradAlpha); + */ + + surfaceVectorField gradAlphaf + ( + fvc::interpolate(alpha2)*fvc::interpolate(fvc::grad(alpha1)) + - fvc::interpolate(alpha1)*fvc::interpolate(fvc::grad(alpha2)) + ); + + // Face unit interface normal + return gradAlphaf/(mag(gradAlphaf) + deltaN_); +} + + +Foam::tmp Foam::multiphaseSystem::nHatf +( + const volScalarField& alpha1, + const volScalarField& alpha2 +) const +{ + // Face unit interface normal flux + return nHatfv(alpha1, alpha2) & mesh_.Sf(); +} + + +// Correction for the boundary condition on the unit normal nHat on +// walls to produce the correct contact angle. + +// The dynamic contact angle is calculated from the component of the +// velocity on the direction of the interface, parallel to the wall. + +void Foam::multiphaseSystem::correctContactAngle +( + const phaseModel& phase1, + const phaseModel& phase2, + surfaceVectorField::GeometricBoundaryField& nHatb +) const +{ + const volScalarField::GeometricBoundaryField& gbf + = phase1.boundaryField(); + + const fvBoundaryMesh& boundary = mesh_.boundary(); + + forAll(boundary, patchi) + { + if (isA(gbf[patchi])) + { + const alphaContactAngleFvPatchScalarField& acap = + refCast(gbf[patchi]); + + vectorField& nHatPatch = nHatb[patchi]; + + vectorField AfHatPatch + ( + mesh_.Sf().boundaryField()[patchi] + /mesh_.magSf().boundaryField()[patchi] + ); + + alphaContactAngleFvPatchScalarField::thetaPropsTable:: + const_iterator tp = + acap.thetaProps().find(interfacePair(phase1, phase2)); + + if (tp == acap.thetaProps().end()) + { + FatalErrorIn + ( + "multiphaseSystem::correctContactAngle" + "(const phaseModel& phase1, const phaseModel& phase2, " + "fvPatchVectorFieldField& nHatb) const" + ) << "Cannot find interface " << interfacePair(phase1, phase2) + << "\n in table of theta properties for patch " + << acap.patch().name() + << exit(FatalError); + } + + bool matched = (tp.key().first() == phase1.name()); + + scalar theta0 = convertToRad*tp().theta0(matched); + scalarField theta(boundary[patchi].size(), theta0); + + scalar uTheta = tp().uTheta(); + + // Calculate the dynamic contact angle if required + if (uTheta > SMALL) + { + scalar thetaA = convertToRad*tp().thetaA(matched); + scalar thetaR = convertToRad*tp().thetaR(matched); + + // Calculated the component of the velocity parallel to the wall + vectorField Uwall + ( + phase1.U().boundaryField()[patchi].patchInternalField() + - phase1.U().boundaryField()[patchi] + ); + Uwall -= (AfHatPatch & Uwall)*AfHatPatch; + + // Find the direction of the interface parallel to the wall + vectorField nWall + ( + nHatPatch - (AfHatPatch & nHatPatch)*AfHatPatch + ); + + // Normalise nWall + nWall /= (mag(nWall) + SMALL); + + // Calculate Uwall resolved normal to the interface parallel to + // the interface + scalarField uwall(nWall & Uwall); + + theta += (thetaA - thetaR)*tanh(uwall/uTheta); + } + + + // Reset nHatPatch to correspond to the contact angle + + scalarField a12(nHatPatch & AfHatPatch); + + scalarField b1(cos(theta)); + + scalarField b2(nHatPatch.size()); + + forAll(b2, facei) + { + b2[facei] = cos(acos(a12[facei]) - theta[facei]); + } + + scalarField det(1.0 - a12*a12); + + scalarField a((b1 - a12*b2)/det); + scalarField b((b2 - a12*b1)/det); + + nHatPatch = a*AfHatPatch + b*nHatPatch; + + nHatPatch /= (mag(nHatPatch) + deltaN_.value()); + } + } +} + + +Foam::tmp Foam::multiphaseSystem::K +( + const phaseModel& phase1, + const phaseModel& phase2 +) const +{ + tmp tnHatfv = nHatfv(phase1, phase2); + + correctContactAngle(phase1, phase2, tnHatfv().boundaryField()); + + // Simple expression for curvature + return -fvc::div(tnHatfv & mesh_.Sf()); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::multiphaseSystem::multiphaseSystem +( + const fvMesh& mesh, + const surfaceScalarField& phi +) +: + IOdictionary + ( + IOobject + ( + "transportProperties", + mesh.time().constant(), + mesh, + IOobject::MUST_READ_IF_MODIFIED, + IOobject::NO_WRITE + ) + ), + phases_(lookup("phases"), phaseModel::iNew(mesh)), + + mesh_(mesh), + phi_(phi), + + alphas_ + ( + IOobject + ( + "alphas", + mesh_.time().timeName(), + mesh_, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh_, + dimensionedScalar("alphas", dimless, 0.0), + zeroGradientFvPatchScalarField::typeName + ), + + sigmas_(lookup("sigmas")), + dimSigma_(1, 0, -2, 0, 0), + cAlphas_(lookup("interfaceCompression")), + Cvms_(lookup("virtualMass")), + deltaN_ + ( + "deltaN", + 1e-8/pow(average(mesh_.V()), 1.0/3.0) + ) +{ + calcAlphas(); + alphas_.write(); + + forAllIter(PtrDictionary, phases_, iter) + { + phaseModelTable_.add(iter()); + } + + interfaceDictTable dragModelsDict(lookup("drag")); + + forAllConstIter(interfaceDictTable, dragModelsDict, iter) + { + dragModels_.insert + ( + iter.key(), + dragModel::New + ( + iter(), + *phaseModelTable_.find(iter.key().first())(), + *phaseModelTable_.find(iter.key().second())() + ).ptr() + ); + } +} + + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + + +Foam::tmp Foam::multiphaseSystem::rho() const +{ + PtrDictionary::const_iterator iter = phases_.begin(); + + tmp trho = iter()*iter().rho(); + + for (++iter; iter != phases_.end(); ++iter) + { + trho() += iter()*iter().rho(); + } + + return trho; +} + + +Foam::tmp Foam::multiphaseSystem::Cvm +( + const phaseModel& phase +) const +{ + tmp tCvm + ( + new volScalarField + ( + IOobject + ( + "Cvm", + mesh_.time().timeName(), + mesh_ + ), + mesh_, + dimensionedScalar + ( + "Cvm", + dimensionSet(1, -3, 0, 0, 0), + 0 + ) + ) + ); + + forAllConstIter(PtrDictionary, phases_, iter) + { + const phaseModel& phase2 = iter(); + + if (&phase2 != &phase) + { + tCvm() += Cvm(phase, phase2)*phase2; + } + } + + return tCvm; +} + + +Foam::tmp Foam::multiphaseSystem::Svm +( + const phaseModel& phase +) const +{ + tmp tSvm + ( + new volVectorField + ( + IOobject + ( + "Svm", + mesh_.time().timeName(), + mesh_ + ), + mesh_, + dimensionedVector + ( + "Svm", + dimensionSet(1, -2, -2, 0, 0), + vector::zero + ) + ) + ); + + forAllConstIter(PtrDictionary, phases_, iter) + { + const phaseModel& phase2 = iter(); + + if (&phase2 != &phase) + { + tSvm() += Cvm(phase, phase2)*phase2*phase2.DDtU(); + } + } + + return tSvm; +} + + +Foam::autoPtr +Foam::multiphaseSystem::dragCoeffs() const +{ + autoPtr dragCoeffsPtr(new dragCoeffFields); + + forAllConstIter(dragModelTable, dragModels_, iter) + { + const dragModel& dm = *iter(); + + dragCoeffsPtr().insert + ( + iter.key(), + ( + dm.phase1()*dm.phase2() + *dm.K(mag(dm.phase1().U() - dm.phase2().U())) + + dm.residualDrag() + ).ptr() + ); + } + + return dragCoeffsPtr; +} + + +Foam::tmp Foam::multiphaseSystem::dragCoeff +( + const phaseModel& phase, + const dragCoeffFields& dragCoeffs +) const +{ + tmp tdragCoeff + ( + new volScalarField + ( + IOobject + ( + "dragCoeff", + mesh_.time().timeName(), + mesh_ + ), + mesh_, + dimensionedScalar + ( + "dragCoeff", + dimensionSet(1, -3, -1, 0, 0), + 0 + ) + ) + ); + + dragModelTable::const_iterator dmIter = dragModels_.begin(); + dragCoeffFields::const_iterator dcIter = dragCoeffs.begin(); + for + ( + ; + dmIter != dragModels_.end() && dcIter != dragCoeffs.end(); + ++dmIter, ++dcIter + ) + { + if + ( + &phase == &dmIter()->phase1() + || &phase == &dmIter()->phase2() + ) + { + tdragCoeff() += *dcIter(); + } + } + + return tdragCoeff; +} + + +Foam::tmp +Foam::multiphaseSystem::surfaceTensionForce() const +{ + tmp tstf + ( + new surfaceScalarField + ( + IOobject + ( + "surfaceTensionForce", + mesh_.time().timeName(), + mesh_ + ), + mesh_, + dimensionedScalar + ( + "surfaceTensionForce", + dimensionSet(1, -2, -2, 0, 0), + 0.0 + ) + ) + ); + + surfaceScalarField& stf = tstf(); + + forAllConstIter(PtrDictionary, phases_, iter1) + { + const phaseModel& phase1 = iter1(); + + PtrDictionary::const_iterator iter2 = iter1; + ++iter2; + + for (; iter2 != phases_.end(); ++iter2) + { + const phaseModel& phase2 = iter2(); + + stf += sigma(phase1, phase2) + *fvc::interpolate(K(phase1, phase2))* + ( + fvc::interpolate(phase2)*fvc::snGrad(phase1) + - fvc::interpolate(phase1)*fvc::snGrad(phase2) + ); + } + } + + return tstf; +} + + +Foam::tmp +Foam::multiphaseSystem::nearInterface() const +{ + tmp tnearInt + ( + new volScalarField + ( + IOobject + ( + "nearInterface", + mesh_.time().timeName(), + mesh_ + ), + mesh_, + dimensionedScalar("nearInterface", dimless, 0.0) + ) + ); + + forAllConstIter(PtrDictionary, phases_, iter) + { + tnearInt() = max(tnearInt(), pos(iter() - 0.01)*pos(0.99 - iter())); + } + + return tnearInt; +} + + +void Foam::multiphaseSystem::solve() +{ + forAllIter(PtrDictionary, phases_, iter) + { + iter().correct(); + } + + const Time& runTime = mesh_.time(); + + const dictionary& pimpleDict = mesh_.solutionDict().subDict("PIMPLE"); + + label nAlphaSubCycles(readLabel(pimpleDict.lookup("nAlphaSubCycles"))); + + volScalarField& alpha = phases_.first(); + + if (nAlphaSubCycles > 1) + { + dimensionedScalar totalDeltaT = runTime.deltaT(); + + for + ( + subCycle alphaSubCycle(alpha, nAlphaSubCycles); + !(++alphaSubCycle).end(); + ) + { + solveAlphas(); + } + } + else + { + solveAlphas(); + } +} + + +bool Foam::multiphaseSystem::read() +{ + if (regIOobject::read()) + { + bool readOK = true; + + PtrList phaseData(lookup("phases")); + label phasei = 0; + + forAllIter(PtrDictionary, phases_, iter) + { + readOK &= iter().read(phaseData[phasei++].dict()); + } + + lookup("sigmas") >> sigmas_; + lookup("interfaceCompression") >> cAlphas_; + lookup("virtualMass") >> Cvms_; + + return readOK; + } + else + { + return false; + } +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.H b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.H new file mode 100644 index 0000000000..4f951565a5 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseSystem/multiphaseSystem.H @@ -0,0 +1,317 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::multiphaseSystem + +Description + Incompressible multi-phase mixture with built in solution for the + phase fractions with interface compression for interface-capturing. + + Derived from transportModel so that it can be unsed in conjunction with + the incompressible turbulence models. + + Surface tension and contact-angle is handled for the interface + between each phase-pair. + +SourceFiles + multiphaseSystem.C + +\*---------------------------------------------------------------------------*/ + +#ifndef multiphaseSystem_H +#define multiphaseSystem_H + +#include "incompressible/transportModel/transportModel.H" +#include "phaseModel.H" +#include "PtrDictionary.H" +#include "volFields.H" +#include "surfaceFields.H" +#include "dragModel.H" +#include "HashPtrTable.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class multiphaseSystem Declaration +\*---------------------------------------------------------------------------*/ + +class multiphaseSystem +: + public IOdictionary +{ + +public: + + class interfacePair + : + public Pair + { + public: + + class hash + : + public Hash + { + public: + + hash() + {} + + label operator()(const interfacePair& key) const + { + return word::hash()(key.first()) + word::hash()(key.second()); + } + }; + + + // Constructors + + interfacePair() + {} + + interfacePair(const word& alpha1Name, const word& alpha2Name) + : + Pair(alpha1Name, alpha2Name) + {} + + interfacePair(const phaseModel& alpha1, const phaseModel& alpha2) + : + Pair(alpha1.name(), alpha2.name()) + {} + + + // Friend Operators + + friend bool operator== + ( + const interfacePair& a, + const interfacePair& b + ) + { + return + ( + ((a.first() == b.first()) && (a.second() == b.second())) + || ((a.first() == b.second()) && (a.second() == b.first())) + ); + } + + friend bool operator!= + ( + const interfacePair& a, + const interfacePair& b + ) + { + return (!(a == b)); + } + }; + + + typedef HashPtrTable + dragModelTable; + + typedef HashPtrTable + dragCoeffFields; + + +private: + + // Private data + + //- Dictionary of phases + PtrDictionary phases_; + + //- phaseModelTable + class phaseModelTable + : + public HashTable + { + public: + + phaseModelTable() + {} + + void add(const phaseModel& pm) + { + this->insert(pm.name(), &pm); + } + }; + + //- Phase model table for quick lookup + phaseModelTable phaseModelTable_; + + const fvMesh& mesh_; + const surfaceScalarField& phi_; + + volScalarField alphas_; + + typedef HashTable + scalarCoeffTable; + + scalarCoeffTable sigmas_; + dimensionSet dimSigma_; + + scalarCoeffTable cAlphas_; + + scalarCoeffTable Cvms_; + + typedef HashTable + interfaceDictTable; + + dragModelTable dragModels_; + + //- Stabilisation for normalisation of the interface normal + const dimensionedScalar deltaN_; + + //- Conversion factor for degrees into radians + static const scalar convertToRad; + + + // Private member functions + + void calcAlphas(); + + void solveAlphas(); + + dimensionedScalar sigma + ( + const phaseModel& phase1, + const phaseModel& phase2 + ) const; + + scalar cAlpha + ( + const phaseModel& phase1, + const phaseModel& phase2 + ) const; + + dimensionedScalar Cvm + ( + const phaseModel& phase1, + const phaseModel& phase2 + ) const; + + tmp nHatfv + ( + const volScalarField& alpha1, + const volScalarField& alpha2 + ) const; + + tmp nHatf + ( + const volScalarField& alpha1, + const volScalarField& alpha2 + ) const; + + void correctContactAngle + ( + const phaseModel& alpha1, + const phaseModel& alpha2, + surfaceVectorField::GeometricBoundaryField& nHatb + ) const; + + tmp K(const phaseModel& alpha1, const phaseModel& alpha2) const; + + +public: + + // Constructors + + //- Construct from components + multiphaseSystem + ( + const fvMesh& mesh, + const surfaceScalarField& phi + ); + + + //- Destructor + virtual ~multiphaseSystem() + {} + + + // Member Functions + + //- Return the phases + const PtrDictionary& phases() const + { + return phases_; + } + + //- Return the phases + PtrDictionary& phases() + { + return phases_; + } + + //- Return the mixture density + tmp rho() const; + + //- Return the virtual-mass coefficient for the given phase + tmp Cvm(const phaseModel& phase) const; + + //- Return the virtual-mass source for the given phase + tmp Svm(const phaseModel& phase) const; + + //- Return the table of drag models + const dragModelTable& dragModels() const + { + return dragModels_; + } + + //- Return the drag coefficients for all of the interfaces + autoPtr dragCoeffs() const; + + //- Return the sum of the drag coefficients for the given phase + tmp dragCoeff + ( + const phaseModel& phase, + const dragCoeffFields& dragCoeffs + ) const; + + tmp surfaceTensionForce() const; + + //- Indicator of the proximity of the interface + // Field values are 1 near and 0 away for the interface. + tmp nearInterface() const; + + //- Solve for the mixture phase-fractions + void solve(); + + //- Read base transportProperties dictionary + bool read(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H b/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H new file mode 100644 index 0000000000..a9c5dc2ed5 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/pEqn.H @@ -0,0 +1,237 @@ +{ + // rho1 = rho10 + psi1*p; + // rho2 = rho20 + psi2*p; + + // tmp pEqnComp1; + // tmp pEqnComp2; + + // //if (transonic) + // //{ + // //} + // //else + // { + // surfaceScalarField phid1("phid1", fvc::interpolate(psi1)*phi1); + // surfaceScalarField phid2("phid2", fvc::interpolate(psi2)*phi2); + + // pEqnComp1 = + // fvc::ddt(rho1) + psi1*correction(fvm::ddt(p)) + // + fvc::div(phid1, p) + // - fvc::Sp(fvc::div(phid1), p); + + // pEqnComp2 = + // fvc::ddt(rho2) + psi2*correction(fvm::ddt(p)) + // + fvc::div(phid2, p) + // - fvc::Sp(fvc::div(phid2), p); + // } + + PtrList alphafs(fluid.phases().size()); + PtrList U0s(fluid.phases().size()); + PtrList phi0s(fluid.phases().size()); + PtrList rAUs(fluid.phases().size()); + PtrList rAlphaAUfs(fluid.phases().size()); + + phasei = 0; + forAllIter(PtrDictionary, fluid.phases(), iter) + { + phaseModel& phase = iter(); + + U0s.set(phasei, new volVectorField(phase.U())); + phi0s.set(phasei, new surfaceScalarField(phase.phi())); + + phasei++; + } + + phasei = 0; + forAllIter(PtrDictionary, fluid.phases(), iter) + { + phaseModel& phase = iter(); + const volScalarField& alpha = phase; + + alphafs.set(phasei, fvc::interpolate(alpha).ptr()); + rAUs.set(phasei, (1.0/UEqns[phasei].A()).ptr()); + rAlphaAUfs.set(phasei, fvc::interpolate(alpha*rAUs[phasei]).ptr()); + + phase.U() = rAUs[phasei]*UEqns[phasei].H(); + + phase.phi() = + ( + (fvc::interpolate(phase.U()) & mesh.Sf()) + + fvc::ddtPhiCorr(rAUs[phasei], alpha, phase.U(), phase.phi()) + ); + + mrfZones.relativeFlux(phase.phi()); + phase.phi() += rAlphaAUfs[phasei]*(g & mesh.Sf()); + + multiphaseSystem::dragModelTable::const_iterator dmIter = fluid.dragModels().begin(); + multiphaseSystem::dragCoeffFields::const_iterator dcIter = dragCoeffs().begin(); + for + ( + ; + dmIter != fluid.dragModels().end() && dcIter != dragCoeffs().end(); + ++dmIter, ++dcIter + ) + { + if + ( + &phase == &dmIter()->phase1() + || &phase == &dmIter()->phase2() + ) + { + int phasej = 0; + forAllIter(PtrDictionary, fluid.phases(), iter2) + { + phaseModel& phase2 = iter2(); + + if + ( + (&phase == &dmIter()->phase1() && &phase2 == &dmIter()->phase2()) + || (&phase == &dmIter()->phase2() && &phase2 == &dmIter()->phase1()) + ) break; + + phasej++; + } + + phase.phi() += + fvc::interpolate((1.0/phase.rho())*rAUs[phasei]*(*dcIter()))*phi0s[phasej]; + } + } + + phasei++; + } + + phi = dimensionedScalar("phi", phi.dimensions(), 0); + surfaceScalarField Dp + ( + IOobject + ( + "Dp", + runTime.timeName(), + mesh + ), + mesh, + dimensionedScalar("Dp", dimensionSet(-1, 3, 1, 0, 0), 0) + ); + + phasei = 0; + forAllIter(PtrDictionary, fluid.phases(), iter) + { + phaseModel& phase = iter(); + phi += alphafs[phasei]*phase.phi(); + Dp += alphafs[phasei]*rAlphaAUfs[phasei]/phase.rho(); + + phasei++; + } + Dp = mag(Dp); + adjustPhi(phi, U, p); + + for(int nonOrth=0; nonOrth<=pimple.nNonOrthCorr(); nonOrth++) + { + fvScalarMatrix pEqnIncomp + ( + fvc::div(phi) + - fvm::laplacian(Dp, p) + ); + + solve + ( + // ( + // (alpha1/rho1)*pEqnComp1() + // + (alpha2/rho2)*pEqnComp2() + // ) + + pEqnIncomp, + mesh.solver(p.select(pimple.finalInnerIter(corr, nonOrth))) + ); + + if (nonOrth == pimple.nNonOrthCorr()) + { + surfaceScalarField mSfGradp = pEqnIncomp.flux()/Dp; + + phasei = 0; + phi = dimensionedScalar("phi", phi.dimensions(), 0); + forAllIter(PtrDictionary, fluid.phases(), iter) + { + phaseModel& phase = iter(); + + phase.phi() += rAlphaAUfs[phasei]*mSfGradp/phase.rho(); + phi += alphafs[phasei]*phase.phi(); + + phasei++; + } + + // dgdt = + // ( + // pos(alpha2)*(pEqnComp2 & p)/rho2 + // - pos(alpha1)*(pEqnComp1 & p)/rho1 + // ); + + p.relax(); + mSfGradp = pEqnIncomp.flux()/Dp; + + U = dimensionedVector("U", dimVelocity, vector::zero); + + phasei = 0; + forAllIter(PtrDictionary, fluid.phases(), iter) + { + phaseModel& phase = iter(); + const volScalarField& alpha = phase; + + phase.U() += + fvc::reconstruct + ( + rAlphaAUfs[phasei]*(g & mesh.Sf()) + + rAlphaAUfs[phasei]*mSfGradp/phase.rho() + ); + + multiphaseSystem::dragModelTable::const_iterator dmIter = fluid.dragModels().begin(); + multiphaseSystem::dragCoeffFields::const_iterator dcIter = dragCoeffs().begin(); + for + ( + ; + dmIter != fluid.dragModels().end() && dcIter != dragCoeffs().end(); + ++dmIter, ++dcIter + ) + { + if + ( + &phase == &dmIter()->phase1() + || &phase == &dmIter()->phase2() + ) + { + int phasej = 0; + forAllIter(PtrDictionary, fluid.phases(), iter2) + { + phaseModel& phase2 = iter2(); + + if + ( + (&phase == &dmIter()->phase1() && &phase2 == &dmIter()->phase2()) + || (&phase == &dmIter()->phase2() && &phase2 == &dmIter()->phase1()) + ) break; + + phasej++; + } + + phase.U() += (1.0/phase.rho())*rAUs[phasei]*(*dcIter())*U0s[phasej]; + } + } + + phase.U() = fvc::reconstruct(phase.phi()); + phase.U().correctBoundaryConditions(); + + U += alpha*phase.U(); + + phasei++; + } + } + } + + //p = max(p, pMin); + + #include "continuityErrs.H" + + // rho1 = rho10 + psi1*p; + // rho2 = rho20 + psi2*p; + + // Dp1Dt = fvc::DDt(phi1, p); + // Dp2Dt = fvc::DDt(phi2, p); +} diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/packingLimiter.H b/applications/solvers/multiphase/multiphaseEulerFoam/packingLimiter.H new file mode 100644 index 0000000000..3790bf9bb9 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/packingLimiter.H @@ -0,0 +1,36 @@ + if (packingLimiter) + { + // Calculating exceeding volume fractions + volScalarField alphaEx(max(alpha1 - alphaMax, scalar(0))); + + // Finding neighbouring cells of the whole domain + labelListList neighbour = mesh.cellCells(); + scalarField cellVolumes(mesh.cellVolumes()); + + forAll (alphaEx, celli) + { + // Finding the labels of the neighbouring cells + labelList neighbourCell = neighbour[celli]; + + // Initializing neighbouring cells contribution + scalar neighboursEx = 0.0; + + forAll (neighbourCell, cellj) + { + labelList neighboursNeighbour = neighbour[neighbourCell[cellj]]; + scalar neighboursNeighbourCellVolumes = 0.0; + + forAll (neighboursNeighbour, cellk) + { + neighboursNeighbourCellVolumes += + cellVolumes[neighboursNeighbour[cellk]]; + } + + neighboursEx += + alphaEx[neighbourCell[cellj]]*cellVolumes[celli] + /neighboursNeighbourCellVolumes; + } + + alpha1[celli] += neighboursEx - alphaEx[celli]; + } + } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/Make/files b/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/Make/files new file mode 100644 index 0000000000..216ae9a5e9 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/Make/files @@ -0,0 +1,7 @@ +phaseModel/phaseModel.C +diameterModels/diameterModel/diameterModel.C +diameterModels/diameterModel/newDiameterModel.C +diameterModels/constantDiameter/constantDiameter.C +diameterModels/isothermalDiameter/isothermalDiameter.C + +LIB = $(FOAM_LIBBIN)/libcompressibleMultiPhaseModel diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/Make/options b/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/Make/options new file mode 100644 index 0000000000..0ec1139209 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/Make/options @@ -0,0 +1,6 @@ +EXE_INC = \ + -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/transportModels/incompressible/lnInclude + +LIB_LIBS = \ + -lincompressibleTransportModels diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/diameterModels/constantDiameter/constantDiameter.C b/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/diameterModels/constantDiameter/constantDiameter.C new file mode 100644 index 0000000000..7be2be6d56 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/diameterModels/constantDiameter/constantDiameter.C @@ -0,0 +1,87 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "constantDiameter.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace diameterModels +{ + defineTypeNameAndDebug(constant, 0); + + addToRunTimeSelectionTable + ( + diameterModel, + constant, + dictionary + ); +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::diameterModels::constant::constant +( + const dictionary& dict, + const phaseModel& phase +) +: + diameterModel(dict, phase), + d_("d", dimLength, dict.lookup("d")) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::diameterModels::constant::~constant() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp Foam::diameterModels::constant::d() const +{ + return tmp + ( + new volScalarField + ( + IOobject + ( + "d", + phase_.U().time().timeName(), + phase_.U().mesh() + ), + phase_.U().mesh(), + d_ + ) + ); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/diameterModels/constantDiameter/constantDiameter.H b/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/diameterModels/constantDiameter/constantDiameter.H new file mode 100644 index 0000000000..5ce8c9a3d9 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/diameterModels/constantDiameter/constantDiameter.H @@ -0,0 +1,96 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::constant + +Description + Constant dispersed-phase particle diameter model. + +SourceFiles + constant.C + +\*---------------------------------------------------------------------------*/ + +#ifndef constant_H +#define constant_H + +#include "diameterModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace diameterModels +{ + +/*---------------------------------------------------------------------------*\ + Class constant Declaration +\*---------------------------------------------------------------------------*/ + +class constant +: + public diameterModel +{ + // Private data + + //- The constant diameter of the phase + dimensionedScalar d_; + + +public: + + //- Runtime type information + TypeName("constant"); + + + // Constructors + + //- Construct from components + constant + ( + const dictionary& dict, + const phaseModel& phase + ); + + + //- Destructor + virtual ~constant(); + + + // Member Functions + + tmp d() const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace diameterModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/diameterModels/diameterModel/diameterModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/diameterModels/diameterModel/diameterModel.C new file mode 100644 index 0000000000..800c700dce --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/diameterModels/diameterModel/diameterModel.C @@ -0,0 +1,56 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "diameterModel.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + defineTypeNameAndDebug(diameterModel, 0); + defineRunTimeSelectionTable(diameterModel, dictionary); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::diameterModel::diameterModel +( + const dictionary& dict, + const phaseModel& phase +) +: + dict_(dict), + phase_(phase) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::diameterModel::~diameterModel() +{} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/diameterModels/diameterModel/diameterModel.H b/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/diameterModels/diameterModel/diameterModel.H new file mode 100644 index 0000000000..3af7bd18ff --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/diameterModels/diameterModel/diameterModel.H @@ -0,0 +1,120 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::diameterModel + +Description + Abstract base-class for dispersed-phase particle diameter models. + +SourceFiles + diameterModel.C + newDiameterModel.C + +\*---------------------------------------------------------------------------*/ + +#ifndef diameterModel_H +#define diameterModel_H + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "dictionary.H" +#include "phaseModel.H" +#include "runTimeSelectionTables.H" + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class diameterModel Declaration +\*---------------------------------------------------------------------------*/ + +class diameterModel +{ +protected: + + // Protected data + + const dictionary& dict_; + const phaseModel& phase_; + + +public: + + //- Runtime type information + TypeName("diameterModel"); + + + // Declare runtime construction + + declareRunTimeSelectionTable + ( + autoPtr, + diameterModel, + dictionary, + ( + const dictionary& dict, + const phaseModel& phase + ), + (dict, phase) + ); + + + // Constructors + + diameterModel + ( + const dictionary& dict, + const phaseModel& phase + ); + + + //- Destructor + virtual ~diameterModel(); + + + // Selectors + + static autoPtr New + ( + const dictionary& dict, + const phaseModel& phase + ); + + + // Member Functions + + //- Return the phase mean diameter field + virtual tmp d() const = 0; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/diameterModels/diameterModel/newDiameterModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/diameterModels/diameterModel/newDiameterModel.C new file mode 100644 index 0000000000..01d685ad56 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/diameterModels/diameterModel/newDiameterModel.C @@ -0,0 +1,63 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "diameterModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +Foam::autoPtr Foam::diameterModel::New +( + const dictionary& dict, + const phaseModel& phase +) +{ + word diameterModelType + ( + dict.lookup("diameterModel") + ); + + Info << "Selecting diameterModel for phase " + << phase.name() + << ": " + << diameterModelType << endl; + + dictionaryConstructorTable::iterator cstrIter = + dictionaryConstructorTablePtr_->find(diameterModelType); + + if (cstrIter == dictionaryConstructorTablePtr_->end()) + { + FatalErrorIn("diameterModel::New") + << "Unknown diameterModelType type " + << diameterModelType << endl << endl + << "Valid diameterModel types are : " << endl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); + } + + return cstrIter()(dict.subDict(diameterModelType + "Coeffs"), phase); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/diameterModels/isothermalDiameter/isothermalDiameter.C b/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/diameterModels/isothermalDiameter/isothermalDiameter.C new file mode 100644 index 0000000000..39d6f1afbd --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/diameterModels/isothermalDiameter/isothermalDiameter.C @@ -0,0 +1,80 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "isothermalDiameter.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace diameterModels +{ + defineTypeNameAndDebug(isothermal, 0); + + addToRunTimeSelectionTable + ( + diameterModel, + isothermal, + dictionary + ); +} +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::diameterModels::isothermal::isothermal +( + const dictionary& dict, + const phaseModel& phase +) +: + diameterModel(dict, phase), + d0_("d0", dimLength, dict.lookup("d0")), + p0_("p0", dimPressure, dict.lookup("p0")) +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::diameterModels::isothermal::~isothermal() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::tmp Foam::diameterModels::isothermal::d() const +{ + const volScalarField& p = phase_.U().db().lookupObject + ( + "p" + ); + + return d0_*pow(p0_/p, 1.0/3.0); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/diameterModels/isothermalDiameter/isothermalDiameter.H b/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/diameterModels/isothermalDiameter/isothermalDiameter.H new file mode 100644 index 0000000000..29fe2c8642 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/diameterModels/isothermalDiameter/isothermalDiameter.H @@ -0,0 +1,99 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::isothermal + +Description + Isothermal dispersed-phase particle diameter model. + +SourceFiles + isothermal.C + +\*---------------------------------------------------------------------------*/ + +#ifndef isothermal_H +#define isothermal_H + +#include "diameterModel.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace diameterModels +{ + +/*---------------------------------------------------------------------------*\ + Class isothermal Declaration +\*---------------------------------------------------------------------------*/ + +class isothermal +: + public diameterModel +{ + // Private data + + //- Reference diameter for the isothermal expansion + dimensionedScalar d0_; + + //- Reference pressure for the isothermal expansion + dimensionedScalar p0_; + + +public: + + //- Runtime type information + TypeName("isothermal"); + + + // Constructors + + //- Construct from components + isothermal + ( + const dictionary& dict, + const phaseModel& phase + ); + + + //- Destructor + virtual ~isothermal(); + + + // Member Functions + + tmp d() const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace diameterModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/phaseModel/phaseModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/phaseModel/phaseModel.C new file mode 100644 index 0000000000..bf65fe659c --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/phaseModel/phaseModel.C @@ -0,0 +1,237 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "phaseModel.H" +#include "diameterModel.H" +#include "fixedValueFvPatchFields.H" +#include "surfaceInterpolate.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::phaseModel::phaseModel +( + const word& name, + const dictionary& phaseDict, + const fvMesh& mesh +) +: + volScalarField + ( + IOobject + ( + "alpha" + name, + mesh.time().timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ), + name_(name), + phaseDict_(phaseDict), + nu_ + ( + "nu", + dimensionSet(0, 2, -1, 0, 0), + phaseDict_.lookup("nu") + ), + kappa_ + ( + "kappa", + dimensionSet(1, 1, -3, -1, 0), + phaseDict_.lookup("kappa") + ), + Cp_ + ( + "Cp", + dimensionSet(0, 2, -2, -1, 0), + phaseDict_.lookup("Cp") + ), + rho_ + ( + "rho", + dimDensity, + phaseDict_.lookup("rho") + ), + U_ + ( + IOobject + ( + "U" + name, + mesh.time().timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ), + DDtU_ + ( + IOobject + ( + "DDtU" + name, + mesh.time().timeName(), + mesh + ), + mesh, + dimensionedVector("0", dimVelocity/dimTime, vector::zero) + ), + phiAlpha_ + ( + IOobject + ( + "phiAlpha" + name, + mesh.time().timeName(), + mesh + ), + mesh, + dimensionedScalar("0", dimensionSet(0, 3, -1, 0, 0), 0) + ) +{ + const word phiName = "phi" + name; + + IOobject phiHeader + ( + phiName, + mesh.time().timeName(), + mesh, + IOobject::NO_READ + ); + + if (phiHeader.headerOk()) + { + Info<< "Reading face flux field " << phiName << endl; + + phiPtr_.reset + ( + new surfaceScalarField + ( + IOobject + ( + phiName, + mesh.time().timeName(), + mesh, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + mesh + ) + ); + } + else + { + Info<< "Calculating face flux field " << phiName << endl; + + wordList phiTypes + ( + U_.boundaryField().size(), + calculatedFvPatchScalarField::typeName + ); + + forAll(U_.boundaryField(), i) + { + if (isA(U_.boundaryField()[i])) + { + phiTypes[i] = fixedValueFvPatchScalarField::typeName; + } + } + + phiPtr_.reset + ( + new surfaceScalarField + ( + IOobject + ( + phiName, + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + fvc::interpolate(U_) & mesh.Sf(), + phiTypes + ) + ); + } + + dPtr_ = diameterModel::New + ( + phaseDict_, + *this + ); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::phaseModel::~phaseModel() +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::autoPtr Foam::phaseModel::clone() const +{ + notImplemented("phaseModel::clone() const"); + return autoPtr(NULL); +} + + + +void Foam::phaseModel::correct() +{ + //nuModel_->correct(); +} + + +bool Foam::phaseModel::read(const dictionary& phaseDict) +{ + phaseDict_ = phaseDict; + + //if (nuModel_->read(phaseDict_)) + { + phaseDict_.lookup("nu") >> nu_; + phaseDict_.lookup("kappa") >> kappa_; + phaseDict_.lookup("Cp") >> Cp_; + phaseDict_.lookup("rho") >> rho_; + + return true; + } + // else + // { + // return false; + // } + + return true; +} + + +Foam::tmp Foam::phaseModel::d() const +{ + return dPtr_().d(); +} + + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/phaseModel/phaseModel.H b/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/phaseModel/phaseModel.H new file mode 100644 index 0000000000..9939eedb67 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/phaseModel/phaseModel/phaseModel.H @@ -0,0 +1,224 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::phaseModel + +SourceFiles + phaseModel.C + +\*---------------------------------------------------------------------------*/ + +#ifndef phaseModel_H +#define phaseModel_H + +#include "dictionary.H" +#include "dictionaryEntry.H" +#include "dimensionedScalar.H" +#include "volFields.H" +#include "surfaceFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Forward declarations +class diameterModel; + +/*---------------------------------------------------------------------------*\ + Class phaseModel Declaration +\*---------------------------------------------------------------------------*/ + +class phaseModel +: + public volScalarField +{ + // Private data + + //- Name of phase + word name_; + + dictionary phaseDict_; + + //- Kinematic viscosity + dimensionedScalar nu_; + + //- Thermal conductivity + dimensionedScalar kappa_; + + //- Heat capacity + dimensionedScalar Cp_; + + //- Density + dimensionedScalar rho_; + + //- Velocity + volVectorField U_; + + //- Substantive derivative of the velocity + volVectorField DDtU_; + + //- Volumetric flux of the phase + surfaceScalarField phiAlpha_; + + //- Volumetric flux for the phase + autoPtr phiPtr_; + + //- Diameter model + autoPtr dPtr_; + + +public: + + // Constructors + + phaseModel + ( + const word& phaseName, + const dictionary& phaseDict, + const fvMesh& mesh + ); + + //- Return clone + autoPtr clone() const; + + //- Return a pointer to a new phase created on freestore + // from Istream + class iNew + { + const fvMesh& mesh_; + + public: + + iNew + ( + const fvMesh& mesh + ) + : + mesh_(mesh) + {} + + autoPtr operator()(Istream& is) const + { + dictionaryEntry ent(dictionary::null, is); + return autoPtr(new phaseModel(ent.keyword(), ent, mesh_)); + } + }; + + + //- Destructor + virtual ~phaseModel(); + + + // Member Functions + + const word& name() const + { + return name_; + } + + const word& keyword() const + { + return name(); + } + + tmp d() const; + + const dimensionedScalar& nu() const + { + return nu_; + } + + const dimensionedScalar& kappa() const + { + return kappa_; + } + + const dimensionedScalar& Cp() const + { + return Cp_; + } + + const dimensionedScalar& rho() const + { + return rho_; + } + + const volVectorField& U() const + { + return U_; + } + + volVectorField& U() + { + return U_; + } + + const volVectorField& DDtU() const + { + return DDtU_; + } + + volVectorField& DDtU() + { + return DDtU_; + } + + const surfaceScalarField& phi() const + { + return phiPtr_(); + } + + surfaceScalarField& phi() + { + return phiPtr_(); + } + + const surfaceScalarField& phiAlpha() const + { + return phiAlpha_; + } + + surfaceScalarField& phiAlpha() + { + return phiAlpha_; + } + + //- Correct the phase properties + void correct(); + + //- Read base transportProperties dictionary + bool read(const dictionary& phaseDict); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/readPPProperties.H b/applications/solvers/multiphase/multiphaseEulerFoam/readPPProperties.H new file mode 100644 index 0000000000..3acbf758d0 --- /dev/null +++ b/applications/solvers/multiphase/multiphaseEulerFoam/readPPProperties.H @@ -0,0 +1,36 @@ + IOdictionary ppProperties + ( + IOobject + ( + "ppProperties", + runTime.constant(), + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ); + + scalar preAlphaExp + ( + readScalar(ppProperties.lookup("preAlphaExp")) + ); + + scalar alphaMax + ( + readScalar(ppProperties.lookup("alphaMax")) + ); + + scalar expMax + ( + readScalar(ppProperties.lookup("expMax")) + ); + + dimensionedScalar g0 + ( + ppProperties.lookup("g0") + ); + + Switch packingLimiter + ( + ppProperties.lookup("packingLimiter") + ); diff --git a/src/finiteVolume/fields/fvPatchFields/derived/multiphaseFixedFluxPressure/multiphaseFixedFluxPressureFvPatchScalarField.C b/src/finiteVolume/fields/fvPatchFields/derived/multiphaseFixedFluxPressure/multiphaseFixedFluxPressureFvPatchScalarField.C new file mode 100644 index 0000000000..503cfd9e70 --- /dev/null +++ b/src/finiteVolume/fields/fvPatchFields/derived/multiphaseFixedFluxPressure/multiphaseFixedFluxPressureFvPatchScalarField.C @@ -0,0 +1,169 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +\*---------------------------------------------------------------------------*/ + +#include "multiphaseFixedFluxPressureFvPatchScalarField.H" +#include "fvPatchFieldMapper.H" +#include "volFields.H" +#include "surfaceFields.H" +#include "addToRunTimeSelectionTable.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::multiphaseFixedFluxPressureFvPatchScalarField::multiphaseFixedFluxPressureFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF +) +: + fixedGradientFvPatchScalarField(p, iF), + UName_("U"), + phiName_("phi"), + rhoName_("rho") +{} + + +Foam::multiphaseFixedFluxPressureFvPatchScalarField::multiphaseFixedFluxPressureFvPatchScalarField +( + const multiphaseFixedFluxPressureFvPatchScalarField& ptf, + const fvPatch& p, + const DimensionedField& iF, + const fvPatchFieldMapper& mapper +) +: + fixedGradientFvPatchScalarField(ptf, p, iF, mapper), + UName_(ptf.UName_), + phiName_(ptf.phiName_), + rhoName_(ptf.rhoName_) +{} + + +Foam::multiphaseFixedFluxPressureFvPatchScalarField::multiphaseFixedFluxPressureFvPatchScalarField +( + const fvPatch& p, + const DimensionedField& iF, + const dictionary& dict +) +: + fixedGradientFvPatchScalarField(p, iF), + UName_(dict.lookupOrDefault("U", "U")), + phiName_(dict.lookupOrDefault("phi", "phi")), + rhoName_(dict.lookupOrDefault("rho", "rho")) +{ + if (dict.found("gradient")) + { + gradient() = scalarField("gradient", dict, p.size()); + fixedGradientFvPatchScalarField::updateCoeffs(); + fixedGradientFvPatchScalarField::evaluate(); + } + else + { + fvPatchField::operator=(patchInternalField()); + gradient() = 0.0; + } +} + + +Foam::multiphaseFixedFluxPressureFvPatchScalarField::multiphaseFixedFluxPressureFvPatchScalarField +( + const multiphaseFixedFluxPressureFvPatchScalarField& wbppsf +) +: + fixedGradientFvPatchScalarField(wbppsf), + UName_(wbppsf.UName_), + phiName_(wbppsf.phiName_), + rhoName_(wbppsf.rhoName_) +{} + + +Foam::multiphaseFixedFluxPressureFvPatchScalarField::multiphaseFixedFluxPressureFvPatchScalarField +( + const multiphaseFixedFluxPressureFvPatchScalarField& wbppsf, + const DimensionedField& iF +) +: + fixedGradientFvPatchScalarField(wbppsf, iF), + UName_(wbppsf.UName_), + phiName_(wbppsf.phiName_), + rhoName_(wbppsf.rhoName_) +{} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +void Foam::multiphaseFixedFluxPressureFvPatchScalarField::updateCoeffs() +{ + if (updated()) + { + return; + } + + const fvPatchField& Up = + patch().lookupPatchField(UName_); + + const surfaceScalarField& phi = + db().lookupObject(phiName_); + + fvsPatchField phip = + patch().patchField(phi); + + if (phi.dimensions() == dimDensity*dimVelocity*dimArea) + { + const fvPatchField& rhop = + patch().lookupPatchField(rhoName_); + + phip /= rhop; + } + + const fvsPatchField& Dpp = + patch().lookupPatchField("Dp"); + + gradient() = (phip - (patch().Sf() & Up))/patch().magSf()/Dpp; + + fixedGradientFvPatchScalarField::updateCoeffs(); +} + + +void Foam::multiphaseFixedFluxPressureFvPatchScalarField::write(Ostream& os) const +{ + fvPatchScalarField::write(os); + writeEntryIfDifferent(os, "U", "U", UName_); + writeEntryIfDifferent(os, "phi", "phi", phiName_); + writeEntryIfDifferent(os, "rho", "rho", rhoName_); + gradient().writeEntry("gradient", os); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + makePatchTypeField + ( + fvPatchScalarField, + multiphaseFixedFluxPressureFvPatchScalarField + ); +} + +// ************************************************************************* // diff --git a/src/finiteVolume/fields/fvPatchFields/derived/multiphaseFixedFluxPressure/multiphaseFixedFluxPressureFvPatchScalarField.H b/src/finiteVolume/fields/fvPatchFields/derived/multiphaseFixedFluxPressure/multiphaseFixedFluxPressureFvPatchScalarField.H new file mode 100644 index 0000000000..a647681564 --- /dev/null +++ b/src/finiteVolume/fields/fvPatchFields/derived/multiphaseFixedFluxPressure/multiphaseFixedFluxPressureFvPatchScalarField.H @@ -0,0 +1,154 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Class + Foam::multiphaseFixedFluxPressureFvPatchScalarField + +Description + Foam::multiphaseFixedFluxPressureFvPatchScalarField + +SourceFiles + multiphaseFixedFluxPressureFvPatchScalarField.C + +\*---------------------------------------------------------------------------*/ + +#ifndef multiphaseFixedFluxPressureFvPatchScalarFields_H +#define multiphaseFixedFluxPressureFvPatchScalarFields_H + +#include "fvPatchFields.H" +#include "fixedGradientFvPatchFields.H" +#include "Switch.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +/*---------------------------------------------------------------------------*\ + Class multiphaseFixedFluxPressureFvPatch Declaration +\*---------------------------------------------------------------------------*/ + +class multiphaseFixedFluxPressureFvPatchScalarField +: + public fixedGradientFvPatchScalarField +{ + // Private data + + //- Name of the velocity field + word UName_; + + //- Name of the flux transporting the field + word phiName_; + + //- Name of the density field used to normalise the mass flux + // if neccessary + word rhoName_; + + +public: + + //- Runtime type information + TypeName("multiphaseFixedFluxPressure"); + + + // Constructors + + //- Construct from patch and internal field + multiphaseFixedFluxPressureFvPatchScalarField + ( + const fvPatch&, + const DimensionedField& + ); + + //- Construct from patch, internal field and dictionary + multiphaseFixedFluxPressureFvPatchScalarField + ( + const fvPatch&, + const DimensionedField&, + const dictionary& + ); + + //- Construct by mapping given multiphaseFixedFluxPressureFvPatchScalarField onto + // a new patch + multiphaseFixedFluxPressureFvPatchScalarField + ( + const multiphaseFixedFluxPressureFvPatchScalarField&, + const fvPatch&, + const DimensionedField&, + const fvPatchFieldMapper& + ); + + //- Construct as copy + multiphaseFixedFluxPressureFvPatchScalarField + ( + const multiphaseFixedFluxPressureFvPatchScalarField& + ); + + //- Construct and return a clone + virtual tmp clone() const + { + return tmp + ( + new multiphaseFixedFluxPressureFvPatchScalarField(*this) + ); + } + + //- Construct as copy setting internal field reference + multiphaseFixedFluxPressureFvPatchScalarField + ( + const multiphaseFixedFluxPressureFvPatchScalarField&, + const DimensionedField& + ); + + //- Construct and return a clone setting internal field reference + virtual tmp clone + ( + const DimensionedField& iF + ) const + { + return tmp + ( + new multiphaseFixedFluxPressureFvPatchScalarField(*this, iF) + ); + } + + + // Member functions + + //- Update the coefficients associated with the patch field + virtual void updateCoeffs(); + + //- Write + virtual void write(Ostream&) const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/Tair b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/Tair new file mode 100644 index 0000000000..25bc08d671 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/Tair @@ -0,0 +1,45 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object Tair; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 300; + +boundaryField +{ + walls + { + type zeroGradient; + } + outlet + { + type inletOutlet; + phi phiair; + inletValue $internalField; + value $internalField; + } + inlet + { + type fixedValue; + value $internalField; + } + frontAndBackPlanes + { + type empty; + } +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/Theta b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/Theta new file mode 100644 index 0000000000..e45304b834 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/Theta @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object Theta; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [ 0 2 -2 0 0 0 0 ]; + +internalField uniform 0.0; + +boundaryField +{ + inlet + { + type fixedValue; + value uniform 1.0e-7; + } + + outlet + { + type inletOutlet; + inletValue uniform 1.0e-7; + value uniform 1.0e-7; + } + + walls + { + type zeroGradient; + } + + defaultFaces + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/Twater b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/Twater new file mode 100644 index 0000000000..f0f366c7dc --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/Twater @@ -0,0 +1,45 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object Twater; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0 0 0]; + +internalField uniform 350; + +boundaryField +{ + walls + { + type zeroGradient; + } + outlet + { + type inletOutlet; + phi phiwater; + inletValue uniform 300; + value $internalField; + } + inlet + { + type fixedValue; + value $internalField; + } + frontAndBackPlanes + { + type empty; + } +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/Uair b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/Uair new file mode 100644 index 0000000000..001c7c1f3b --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/Uair @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format binary; + class volVectorField; + object Uair; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + inlet + { + type fixedValue; + value uniform (0 0.1 0); + } + outlet + { + type pressureInletOutletVelocity; + phi phiair; + value $internalField; + } + walls + { + type fixedValue; + value uniform (0 0 0); + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/Uwater b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/Uwater new file mode 100644 index 0000000000..22ed59a0ef --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/Uwater @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format binary; + class volVectorField; + object Uwater; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + inlet + { + type fixedValue; + value $internalField; + } + outlet + { + type pressureInletOutletVelocity; + phi phiwater; + value $internalField; + } + walls + { + type fixedValue; + value uniform (0 0 0); + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/alphaair b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/alphaair new file mode 100644 index 0000000000..274ab3ede3 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/alphaair @@ -0,0 +1,1926 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alphaair; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField nonuniform List +1875 +( +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +) +; + +boundaryField +{ + inlet + { + type fixedValue; + value uniform 0.5; + } + outlet + { + type inletOutlet; + phi phiair; + inletValue uniform 1; + value uniform 1; + } + walls + { + type zeroGradient; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/alphaair.org b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/alphaair.org new file mode 100644 index 0000000000..62088eca23 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/alphaair.org @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object alphaair; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + inlet + { + type fixedValue; + value uniform 0.5; + } + outlet + { + type inletOutlet; + phi phiair; + inletValue uniform 1; + value uniform 1; + } + walls + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/alphas b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/alphas new file mode 100644 index 0000000000..833c25f034 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/alphas @@ -0,0 +1,1922 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alphas; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField nonuniform List +1875 +( +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +) +; + +boundaryField +{ + inlet + { + type zeroGradient; + } + outlet + { + type zeroGradient; + } + walls + { + type zeroGradient; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/alphawater b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/alphawater new file mode 100644 index 0000000000..2049100dbd --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/alphawater @@ -0,0 +1,1926 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alphawater; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField nonuniform List +1875 +( +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +1 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +0 +) +; + +boundaryField +{ + inlet + { + type fixedValue; + value uniform 0.5; + } + outlet + { + type inletOutlet; + phi phiwater; + inletValue uniform 0; + value uniform 0; + } + walls + { + type zeroGradient; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/alphawater.org b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/alphawater.org new file mode 100644 index 0000000000..9b11653fea --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/alphawater.org @@ -0,0 +1,41 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object alphawater; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 1; + +boundaryField +{ + inlet + { + type fixedValue; + value uniform 0.5; + } + outlet + { + type inletOutlet; + phi phiwater; + inletValue uniform 0; + value uniform 0; + } + walls + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/nuSgs b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/nuSgs new file mode 100644 index 0000000000..77f51f7980 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/nuSgs @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object nuSgs; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + inlet + { + type fixedValue; + value uniform 0; + } + + outlet + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } + + walls + { + type zeroGradient; + } + + defaultFaces + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/p b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/p new file mode 100644 index 0000000000..6fe844d27a --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/0/p @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [ 1 -1 -2 0 0 0 0 ]; + +internalField uniform 0; + +boundaryField +{ + inlet + { + type multiphaseFixedFluxPressure; + value uniform 0; + } + outlet + { + type fixedValue; + value uniform 0; + } + walls + { + type zeroGradient; + } +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/constant/LESProperties b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/constant/LESProperties new file mode 100644 index 0000000000..67d1183916 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/constant/LESProperties @@ -0,0 +1,86 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object LESProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +LESModel Smagorinsky; + +printCoeffs on; + +delta cubeRootVol; + +cubeRootVolCoeffs +{ + deltaCoeff 1; +} + +PrandtlCoeffs +{ + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + maxDeltaRatio 1.1; + } + + Cdelta 0.158; +} + +vanDriestCoeffs +{ + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + smoothCoeffs + { + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + maxDeltaRatio 1.1; + } + + Aplus 26; + Cdelta 0.158; +} + +smoothCoeffs +{ + delta cubeRootVol; + cubeRootVolCoeffs + { + deltaCoeff 1; + } + + maxDeltaRatio 1.1; +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/constant/MRFZones b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/constant/MRFZones new file mode 100644 index 0000000000..0034a58c22 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/constant/MRFZones @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object MRFZones; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +0() + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/constant/g b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/constant/g new file mode 100644 index 0000000000..0cc222ca34 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/constant/g @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedVectorField; + location "constant"; + object g; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -2 0 0 0 0]; +value (0 -9.81 0); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/constant/polyMesh/blockMeshDict b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/constant/polyMesh/blockMeshDict new file mode 100644 index 0000000000..d03967afdc --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/constant/polyMesh/blockMeshDict @@ -0,0 +1,61 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 1; + +vertices +( + (0 0 0) + (0.15 0 0) + (0.15 1 0) + (0 1 0) + (0 0 0.1) + (0.15 0 0.1) + (0.15 1 0.1) + (0 1 0.1) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (25 75 1) simpleGrading (1 1 1) +); + +edges +( +); + +patches +( + patch inlet + ( + (1 5 4 0) + ) + patch outlet + ( + (3 7 6 2) + ) + wall walls + ( + (0 4 7 3) + (2 6 5 1) + ) +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/constant/polyMesh/boundary b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/constant/polyMesh/boundary new file mode 100644 index 0000000000..56e0a545c1 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/constant/polyMesh/boundary @@ -0,0 +1,46 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class polyBoundaryMesh; + location "constant/polyMesh"; + object boundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +4 +( + inlet + { + type patch; + nFaces 25; + startFace 3650; + } + outlet + { + type patch; + nFaces 25; + startFace 3675; + } + walls + { + type wall; + nFaces 150; + startFace 3700; + } + defaultFaces + { + type empty; + nFaces 3750; + startFace 3850; + } +) + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/constant/transportProperties b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/constant/transportProperties new file mode 100644 index 0000000000..1f390a2c97 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/constant/transportProperties @@ -0,0 +1,93 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +phases +( + air + { + rho 1; + nu 1.6e-05; + kappa 0; + Cp 0; + + diameterModel constant; + constantCoeffs + { + d 3e-3; + } + } + + water + { + rho 1000; + nu 1e-06; + kappa 0; + Cp 0; + + diameterModel constant; + constantCoeffs + { + d 1e-4; + } + } +); + + +sigmas +( + (air water) 0.07 +); + +interfaceCompression +( + (air water) 0 +); + +virtualMass +( + (air water) 0.5 +); + +drag +( + (air water) + { + type blended; + + air + { + type SchillerNaumann; + residualDrag 0; + } + + water + { + type SchillerNaumann; + residualDrag 0; + } + + residualDrag 1; + } +); + + +// This is a dummy to support the Smagorinsky model +transportModel Newtonian; +nu nu [ 0 2 -1 0 0 0 0 ] 0; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/system/controlDict b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/system/controlDict new file mode 100644 index 0000000000..a29fcd583d --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/system/controlDict @@ -0,0 +1,95 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application multiphaseEulerFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 100; + +deltaT 0.005; + +writeControl runTime; + +writeInterval 1; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep no; + +maxCo 0.5; + +maxDeltaT 1; + +functions +{ + fieldAverage1 + { + type fieldAverage; + functionObjectLibs ( "libfieldFunctionObjects.so" ); + outputControl outputTime; + fields + ( + Uair + { + mean on; + prime2Mean off; + base time; + } + + Uwater + { + mean on; + prime2Mean off; + base time; + } + + alphaair + { + mean on; + prime2Mean off; + base time; + } + + p + { + mean on; + prime2Mean off; + base time; + } + ); + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/system/fvSchemes b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/system/fvSchemes new file mode 100644 index 0000000000..fe3f1e6de4 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/system/fvSchemes @@ -0,0 +1,63 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + default none; + + div(phi,alpha) Gauss upwind; //limitedLinear01 1; + div(phirb,alpha) Gauss upwind; + + "div\(phiAlpha.*,U.*\)" Gauss limitedLinearV 1; + div(Rc) Gauss linear; + "div\(phi.*,U.*\)" Gauss limitedLinearV 1; +} + +laplacianSchemes +{ + default Gauss linear uncorrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default uncorrected; +} + +fluxRequired +{ + default no; + p ; + pcorr ; +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/system/fvSolution b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/system/fvSolution new file mode 100644 index 0000000000..cf4ce79ecf --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/system/fvSolution @@ -0,0 +1,109 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + p + { + solver GAMG; + smoother DIC; + nPreSweeps 0; + nPostSweeps 2; + nFinestSweeps 2; + cacheAgglomeration true; + nCellsInCoarsestLevel 10; + agglomerator faceAreaPair; + mergeLevels 1; + tolerance 1e-8; + relTol 0.01; + } + + pFinal + { + $p; + tolerance 1e-9; + relTol 0; + } + + pcorr + { + $p; + tolerance 1e-5; + relTol 0; + } + + "U.*" + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0; + } + + "T.*" + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-8; + relTol 0; + } + + "Theta.*" + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0; + } + + "k.*" + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0; + } + + "epsilon.*" + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0; + } +} + +PIMPLE +{ + nOuterCorrectors 1; + nCorrectors 2; + nNonOrthogonalCorrectors 0; + nAlphaSubCycles 2; +} + +relaxationFactors +{ + "U.*" 1; + "T.*" 1; + "alpha.*" 1; + "Theta.*" 1; + "k.*" 1; + "epsilon.*" 1; +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/system/setFieldsDict b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/system/setFieldsDict new file mode 100644 index 0000000000..6c6bd80320 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/bubbleColumn/system/setFieldsDict @@ -0,0 +1,38 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object setFieldsDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defaultFieldValues +( + volScalarFieldValue alphaair 1 + volScalarFieldValue alphawater 0 +); + +regions +( + boxToCell + { + box (0 0 -0.1) (0.15 0.501 0.1); + fieldValues + ( + volScalarFieldValue alphaair 0 + volScalarFieldValue alphawater 1 + ); + } +); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/U b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/U new file mode 100644 index 0000000000..b82b7ce18a --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/U @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + location "0"; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + leftWall + { + type fixedValue; + value uniform (0 0 0); + } + rightWall + { + type fixedValue; + value uniform (0 0 0); + } + lowerWall + { + type fixedValue; + value uniform (0 0 0); + } + atmosphere + { + type fluxCorrectedVelocity; + value uniform (0 0 0); + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/Uair b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/Uair new file mode 100644 index 0000000000..e6cb214d17 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/Uair @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + location "0"; + object Uair; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + leftWall + { + type fixedValue; + value uniform (0 0 0); + } + rightWall + { + type fixedValue; + value uniform (0 0 0); + } + lowerWall + { + type fixedValue; + value uniform (0 0 0); + } + atmosphere + { + type fluxCorrectedVelocity; + value uniform (0 0 0); + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/Umercury b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/Umercury new file mode 100644 index 0000000000..71ee76460b --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/Umercury @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + location "0"; + object Umercury; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + leftWall + { + type fixedValue; + value uniform (0 0 0); + } + rightWall + { + type fixedValue; + value uniform (0 0 0); + } + lowerWall + { + type fixedValue; + value uniform (0 0 0); + } + atmosphere + { + type fluxCorrectedVelocity; + value uniform (0 0 0); + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/Uoil b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/Uoil new file mode 100644 index 0000000000..4f5e766638 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/Uoil @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + location "0"; + object Uoil; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + leftWall + { + type fixedValue; + value uniform (0 0 0); + } + rightWall + { + type fixedValue; + value uniform (0 0 0); + } + lowerWall + { + type fixedValue; + value uniform (0 0 0); + } + atmosphere + { + type fluxCorrectedVelocity; + value uniform (0 0 0); + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/Uwater b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/Uwater new file mode 100644 index 0000000000..4977c8a6d5 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/Uwater @@ -0,0 +1,51 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + location "0"; + object Uwater; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + leftWall + { + type fixedValue; + value uniform (0 0 0); + } + rightWall + { + type fixedValue; + value uniform (0 0 0); + } + lowerWall + { + type fixedValue; + value uniform (0 0 0); + } + atmosphere + { + type fluxCorrectedVelocity; + value uniform (0 0 0); + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/alphaair b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/alphaair new file mode 100644 index 0000000000..ba8f818579 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/alphaair @@ -0,0 +1,79 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alphaair; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + leftWall + { + type alphaContactAngle; + thetaProperties + ( + ( water air ) 90 0 0 0 + ( oil air ) 90 0 0 0 + ( mercury air ) 90 0 0 0 + ( water oil ) 90 0 0 0 + ( water mercury ) 90 0 0 0 + ( oil mercury ) 90 0 0 0 + ); + value uniform 0; + } + rightWall + { + type alphaContactAngle; + thetaProperties + ( + ( water air ) 90 0 0 0 + ( oil air ) 90 0 0 0 + ( mercury air ) 90 0 0 0 + ( water oil ) 90 0 0 0 + ( water mercury ) 90 0 0 0 + ( oil mercury ) 90 0 0 0 + ); + value uniform 1; + } + lowerWall + { + type alphaContactAngle; + thetaProperties + ( + ( water air ) 90 0 0 0 + ( oil air ) 90 0 0 0 + ( mercury air ) 90 0 0 0 + ( water oil ) 90 0 0 0 + ( water mercury ) 90 0 0 0 + ( oil mercury ) 90 0 0 0 + ); + value uniform 0; + } + atmosphere + { + type inletOutlet; + inletValue uniform 1; + value uniform 1; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/alphamercury b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/alphamercury new file mode 100644 index 0000000000..598b083fef --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/alphamercury @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alphamercury; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + leftWall + { + type zeroGradient; + } + rightWall + { + type zeroGradient; + } + lowerWall + { + type zeroGradient; + } + atmosphere + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/alphaoil b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/alphaoil new file mode 100644 index 0000000000..21ce07a42c --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/alphaoil @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alphaoil; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + leftWall + { + type zeroGradient; + } + rightWall + { + type zeroGradient; + } + lowerWall + { + type zeroGradient; + } + atmosphere + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/alphas b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/alphas new file mode 100644 index 0000000000..10e3ea7a07 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/alphas @@ -0,0 +1,47 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alphas; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + leftWall + { + type zeroGradient; + } + rightWall + { + type zeroGradient; + } + lowerWall + { + type zeroGradient; + } + atmosphere + { + type zeroGradient; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/alphawater b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/alphawater new file mode 100644 index 0000000000..a91b1a5968 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/alphawater @@ -0,0 +1,49 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object alphawater; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + leftWall + { + type zeroGradient; + } + rightWall + { + type zeroGradient; + } + lowerWall + { + type zeroGradient; + } + atmosphere + { + type inletOutlet; + inletValue uniform 0; + value uniform 0; + } + defaultFaces + { + type empty; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/p b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/p new file mode 100644 index 0000000000..318a5d779c --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/0.org/p @@ -0,0 +1,59 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + leftWall + { + type buoyantPressure; + value uniform 0; + } + + rightWall + { + type buoyantPressure; + value uniform 0; + } + + lowerWall + { + type buoyantPressure; + value uniform 0; + } + + atmosphere + { + type fixedValue; //totalPressure; + p0 uniform 0; + U Uair; + phi phiair; + rho rho; + psi none; + gamma 1; + value uniform 0; + } + + defaultFaces + { + type empty; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/Allclean b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/Allclean new file mode 100755 index 0000000000..cd78b26599 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/Allclean @@ -0,0 +1,11 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial clean functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +cleanCase + +\rm -rf 0 + +# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/Allrun b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/Allrun new file mode 100755 index 0000000000..887344985c --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/Allrun @@ -0,0 +1,17 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +# Set application name +application=`getApplication` + +\rm -rf 0 +cp -r 0.org 0 + +runApplication blockMesh +runApplication setFields +runApplication $application + +# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/constant/LESProperties b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/constant/LESProperties new file mode 100644 index 0000000000..ec20bc01dc --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/constant/LESProperties @@ -0,0 +1,29 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object LESProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +LESModel laminar; + +printCoeffs on; + +delta cubeRootVol; + +cubeRootVolCoeffs +{ + deltaCoeff 1; +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/constant/MRFZones b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/constant/MRFZones new file mode 100644 index 0000000000..0034a58c22 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/constant/MRFZones @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object MRFZones; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +0() + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/constant/g b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/constant/g new file mode 100644 index 0000000000..e0ac2653b5 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/constant/g @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedVectorField; + location "constant"; + object g; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -2 0 0 0 0]; +value ( 0 -9.81 0 ); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/constant/motionProperties b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/constant/motionProperties new file mode 100644 index 0000000000..93e0701984 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/constant/motionProperties @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object motionProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +movingFvMesh staticFvMesh; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/constant/polyMesh/blockMeshDict b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/constant/polyMesh/blockMeshDict new file mode 100644 index 0000000000..8fe280fa2f --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/constant/polyMesh/blockMeshDict @@ -0,0 +1,108 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 0.146; + +vertices +( + (0 0 0) + (2 0 0) + (2.16438 0 0) + (4 0 0) + (0 0.32876 0) + (2 0.32876 0) + (2.16438 0.32876 0) + (4 0.32876 0) + (0 4 0) + (2 4 0) + (2.16438 4 0) + (4 4 0) + (0 0 0.1) + (2 0 0.1) + (2.16438 0 0.1) + (4 0 0.1) + (0 0.32876 0.1) + (2 0.32876 0.1) + (2.16438 0.32876 0.1) + (4 0.32876 0.1) + (0 4 0.1) + (2 4 0.1) + (2.16438 4 0.1) + (4 4 0.1) +); + +blocks +( + hex (0 1 5 4 12 13 17 16) (23 8 1) simpleGrading (1 1 1) + hex (2 3 7 6 14 15 19 18) (19 8 1) simpleGrading (1 1 1) + hex (4 5 9 8 16 17 21 20) (23 42 1) simpleGrading (1 1 1) + hex (5 6 10 9 17 18 22 21) (4 42 1) simpleGrading (1 1 1) + hex (6 7 11 10 18 19 23 22) (19 42 1) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + leftWall + { + type wall; + faces + ( + (0 12 16 4) + (4 16 20 8) + ); + } + rightWall + { + type wall; + faces + ( + (7 19 15 3) + (11 23 19 7) + ); + } + lowerWall + { + type wall; + faces + ( + (0 1 13 12) + (1 5 17 13) + (5 6 18 17) + (2 14 18 6) + (2 3 15 14) + ); + } + atmosphere + { + type patch; + faces + ( + (8 20 21 9) + (9 21 22 10) + (10 22 23 11) + ); + } +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/constant/polyMesh/boundary b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/constant/polyMesh/boundary new file mode 100644 index 0000000000..41c06d5f3f --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/constant/polyMesh/boundary @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class polyBoundaryMesh; + location "constant/polyMesh"; + object boundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +5 +( + leftWall + { + type wall; + nFaces 50; + startFace 4432; + } + rightWall + { + type wall; + nFaces 50; + startFace 4482; + } + lowerWall + { + type wall; + nFaces 62; + startFace 4532; + } + atmosphere + { + type patch; + nFaces 46; + startFace 4594; + } + defaultFaces + { + type empty; + nFaces 4536; + startFace 4640; + } +) + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/constant/transportProperties b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/constant/transportProperties new file mode 100644 index 0000000000..d0fdbfd12b --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/constant/transportProperties @@ -0,0 +1,134 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +phases +( + water + { + nu 1e-06; + kappa 1e-06; + Cp 4195; + rho 1000; + + diameterModel constant; + constantCoeffs + { + d 1e-3; + } + } + + oil + { + nu 1e-06; + kappa 1e-06; + Cp 4195; + rho 500; + + diameterModel constant; + constantCoeffs + { + d 1e-3; + } + } + + mercury + { + nu 1.125e-07; + kappa 1e-06; + Cp 4195; + rho 13529; + + diameterModel constant; + constantCoeffs + { + d 1e-3; + } + } + + air + { + nu 1.48e-05; + kappa 2.63e-2; + Cp 1007; + rho 1; + + diameterModel constant; + constantCoeffs + { + d 1e-3; + } + } +); + +sigmas +( + (air water) 0.07 + (air oil) 0.07 + (air mercury) 0.07 + (water oil) 0.07 + (water mercury) 0.07 + (oil mercury) 0.07 +); + +interfaceCompression +( + (air water) 1 + (air oil) 1 + (air mercury) 1 + (water oil) 0 + (water mercury) 0 + (oil mercury) 0 +); + +virtualMass +( + (air water) 0.5 + (air oil) 0.5 + (air mercury) 0.5 + (water oil) 0.5 + (water mercury) 0.5 + (oil mercury) 0.5 +); + +drag +( + (air water) + { + type SchillerNaumann; + residualDrag 100; + } + + (air oil) + { + type SchillerNaumann; + residualDrag 100; + } + + (air mercury) + { + type SchillerNaumann; + residualDrag 100; + } +); + + +// This is a dummy to support the Smagorinsky model +transportModel Newtonian; +nu nu [ 0 2 -1 0 0 0 0 ] 0; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/constant/turbulenceProperties b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/constant/turbulenceProperties new file mode 100644 index 0000000000..c2c3b28a1b --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/constant/turbulenceProperties @@ -0,0 +1,21 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/system/controlDict b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/system/controlDict new file mode 100644 index 0000000000..5c1d344095 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/system/controlDict @@ -0,0 +1,56 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application multiphaseEulerFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 6; + +deltaT 0.001; + +writeControl adjustableRunTime; + +writeInterval 0.05; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep yes; + +maxCo 0.5; +maxAlphaCo 0.5; + +maxDeltaT 1; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/system/decomposeParDict b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/system/decomposeParDict new file mode 100644 index 0000000000..e7e490bf74 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/system/decomposeParDict @@ -0,0 +1,45 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 4; + +method simple; + +simpleCoeffs +{ + n ( 2 2 1 ); + delta 0.001; +} + +hierarchicalCoeffs +{ + n ( 1 1 1 ); + delta 0.001; + order xyz; +} + +manualCoeffs +{ + dataFile ""; +} + +distributed no; + +roots ( ); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/system/fvSchemes b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/system/fvSchemes new file mode 100644 index 0000000000..cd9e871aaf --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/system/fvSchemes @@ -0,0 +1,61 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; +} + +divSchemes +{ + div(phi,alpha) Gauss vanLeer; + div(phirb,alpha) Gauss vanLeer; + + "div\(phiAlpha.*,U.*\)" Gauss upwind; + div(Rc) Gauss linear; + "div\(phi.*,U.*\)" Gauss upwind; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +fluxRequired +{ + default no; + p; + pcorr; +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/system/fvSolution b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/system/fvSolution new file mode 100644 index 0000000000..296b0cd488 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/system/fvSolution @@ -0,0 +1,94 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + p + { + solver GAMG; + tolerance 1e-7; + relTol 0.05; + smoother GaussSeidel; + nPreSweeps 0; + nPostSweeps 2; + nFinestSweeps 2; + cacheAgglomeration on; + nCellsInCoarsestLevel 10; + agglomerator faceAreaPair; + mergeLevels 1; + } + + pFinal + { + solver PCG; + preconditioner + { + preconditioner GAMG; + tolerance 1e-7; + relTol 0; + nVcycles 2; + smoother GaussSeidel; + nPreSweeps 0; + nPostSweeps 2; + nFinestSweeps 2; + cacheAgglomeration on; + nCellsInCoarsestLevel 10; + agglomerator faceAreaPair; + mergeLevels 1; + } + tolerance 1e-7; + relTol 0; + maxIter 20; + } + + pcorr + { + $pFinal; + tolerance 1e-5; + relTol 0; + } + + U + { + solver smoothSolver; + smoother GaussSeidel; + tolerance 1e-8; + relTol 0.1; + nSweeps 1; + } + + UFinal + { + $U; + tolerance 1e-7; + relTol 0; + } +} + +PIMPLE +{ + nCorrectors 3; + nNonOrthogonalCorrectors 0; + nAlphaSubCycles 3; +} + +relaxationFactors +{ + "U.*" 1; +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/system/setFieldsDict b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/system/setFieldsDict new file mode 100644 index 0000000000..3abdf3f73a --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/damBreak4phase/system/setFieldsDict @@ -0,0 +1,65 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object setFieldsDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +defaultFieldValues +( + volScalarFieldValue alphaair 1 + volScalarFieldValue alphawater 0 + volScalarFieldValue alphaoil 0 + volScalarFieldValue alphamercury 0 + volVectorFieldValue U ( 0 0 0 ) +); + +regions +( + boxToCell + { + box ( 0 0 -1 ) ( 0.1461 0.292 1 ); + fieldValues + ( + volScalarFieldValue alphawater 1 + volScalarFieldValue alphaoil 0 + volScalarFieldValue alphamercury 0 + volScalarFieldValue alphaair 0 + ); + } + boxToCell + { + box ( 0.1461 0 -1 ) ( 0.2922 0.292 1 ); + fieldValues + ( + volScalarFieldValue alphawater 0 + volScalarFieldValue alphaoil 1 + volScalarFieldValue alphamercury 0 + volScalarFieldValue alphaair 0 + ); + } + boxToCell + { + box ( 0 0 -1 ) ( 0.1461 0.1 1 ); + fieldValues + ( + volScalarFieldValue alphawater 0 + volScalarFieldValue alphaoil 0 + volScalarFieldValue alphamercury 1 + volScalarFieldValue alphaair 0 + ); + } +); + + +// ************************************************************************* //