From 441ff53e2d3303b8a84873f8b57e48bd662a2f0a Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Mon, 1 Feb 2021 11:06:25 +0000 Subject: [PATCH] multiphaseEulerFoam: Added moving-mesh support for both cell- and face-momentum algorithms Mesh-motion with or without topology change or AMI is now supported in multiphaseEulerFoam for both cell- and face-momentum algorithms. The new tutorial case mixerVesselAMI2D is provided which is the AMI version of the 4-phase MRF mixerVessel2D case. It is setup with the cell-momentum algorithm but also runs fine with the face-momentum algorithm although the results are noticeably less accurate, particularly when the case is run single-phase and compared directly with those from pimpleFoam. Further testing is in progress. I2D/constant/thermophysicalProperties.water --- .../multiphaseEulerFoam/Make/options | 4 +- .../multiphaseEulerFoam/multiphaseEulerFoam.C | 28 +- .../multiphaseEulerFoam/pU/pEqn.H | 39 +- .../multiphaseEulerFoam/pUf/pEqn.H | 49 +- .../MomentumTransferPhaseSystem.C | 42 +- .../MovingPhaseModel/MovingPhaseModel.C | 57 +- .../MovingPhaseModel/MovingPhaseModel.H | 12 +- .../StationaryPhaseModel.C | 14 +- .../StationaryPhaseModel.H | 6 +- .../phaseModel/phaseModel/phaseModel.C | 9 +- .../phaseModel/phaseModel/phaseModel.H | 9 +- .../phaseSystems/phaseSystem/phaseSystem.C | 14 + .../phaseSystems/phaseSystem/phaseSystem.H | 3 + .../cfdTools/general/MRF/MRFZoneList.C | 29 +- .../cfdTools/general/MRF/MRFZoneList.H | 9 +- .../general/constrainHbyA/constrainHbyA.C | 18 +- .../finiteVolume/fvc/fvcMeshPhi.C | 14 +- .../laminar/sloshingTank2D/system/fvSchemes | 2 +- .../laminar/mixerVesselAMI2D/0/T.air | 60 ++ .../laminar/mixerVesselAMI2D/0/T.mercury | 60 ++ .../laminar/mixerVesselAMI2D/0/T.oil | 60 ++ .../laminar/mixerVesselAMI2D/0/T.water | 60 ++ .../laminar/mixerVesselAMI2D/0/U.air | 57 ++ .../laminar/mixerVesselAMI2D/0/U.mercury | 57 ++ .../laminar/mixerVesselAMI2D/0/U.oil | 57 ++ .../laminar/mixerVesselAMI2D/0/U.water | 57 ++ .../laminar/mixerVesselAMI2D/0/alpha.air | 56 ++ .../laminar/mixerVesselAMI2D/0/alpha.mercury | 56 ++ .../laminar/mixerVesselAMI2D/0/alpha.oil | 56 ++ .../laminar/mixerVesselAMI2D/0/alpha.water | 56 ++ .../laminar/mixerVesselAMI2D/0/p | 58 ++ .../laminar/mixerVesselAMI2D/0/p_rgh | 58 ++ .../laminar/mixerVesselAMI2D/Allrun | 12 + .../mixerVesselAMI2D/constant/dynamicMeshDict | 30 + .../laminar/mixerVesselAMI2D/constant/g | 22 + .../constant/momentumTransport.air | 20 + .../constant/momentumTransport.mercury | 20 + .../constant/momentumTransport.oil | 20 + .../constant/momentumTransport.water | 20 + .../mixerVesselAMI2D/constant/phaseProperties | 475 +++++++++ .../constant/phasePropertiesAll | 474 +++++++++ .../constant/thermophysicalProperties.air | 48 + .../constant/thermophysicalProperties.mercury | 52 + .../constant/thermophysicalProperties.oil | 52 + .../constant/thermophysicalProperties.water | 52 + .../laminar/mixerVesselAMI2D/makeMesh | 13 + .../mixerVesselAMI2D/system/blockMeshDict.m4 | 924 ++++++++++++++++++ .../mixerVesselAMI2D/system/controlDict | 59 ++ .../laminar/mixerVesselAMI2D/system/fvSchemes | 58 ++ .../mixerVesselAMI2D/system/fvSolution | 96 ++ .../mixerVesselAMI2D/system/topoSetDict | 32 + 51 files changed, 3534 insertions(+), 111 deletions(-) create mode 100644 tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/T.air create mode 100644 tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/T.mercury create mode 100644 tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/T.oil create mode 100644 tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/T.water create mode 100644 tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/U.air create mode 100644 tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/U.mercury create mode 100644 tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/U.oil create mode 100644 tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/U.water create mode 100644 tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/alpha.air create mode 100644 tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/alpha.mercury create mode 100644 tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/alpha.oil create mode 100644 tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/alpha.water create mode 100644 tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/p create mode 100644 tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/p_rgh create mode 100755 tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/Allrun create mode 100644 tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/dynamicMeshDict create mode 100644 tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/g create mode 100644 tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/momentumTransport.air create mode 100644 tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/momentumTransport.mercury create mode 100644 tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/momentumTransport.oil create mode 100644 tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/momentumTransport.water create mode 100644 tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/phaseProperties create mode 100644 tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/phasePropertiesAll create mode 100644 tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/thermophysicalProperties.air create mode 100644 tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/thermophysicalProperties.mercury create mode 100644 tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/thermophysicalProperties.oil create mode 100644 tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/thermophysicalProperties.water create mode 100755 tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/makeMesh create mode 100644 tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/system/blockMeshDict.m4 create mode 100644 tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/system/controlDict create mode 100644 tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/system/fvSchemes create mode 100644 tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/system/fvSolution create mode 100644 tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/system/topoSetDict diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/Make/options b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/Make/options index 333bede9f4..c122b6ca9b 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/Make/options +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/Make/options @@ -9,7 +9,7 @@ EXE_INC = \ -I$(LIB_SRC)/MomentumTransportModels/phaseCompressible/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ - -I$(LIB_SRC)/sampling/lnInclude + -I$(LIB_SRC)/dynamicFvMesh/lnInclude EXE_LIBS = \ -lphaseSystem \ @@ -22,4 +22,4 @@ EXE_LIBS = \ -lfiniteVolume \ -lfvOptions \ -lmeshTools \ - -lsampling + -ldynamicFvMesh diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/multiphaseEulerFoam.C b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/multiphaseEulerFoam.C index 3291230639..33bec74ecc 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/multiphaseEulerFoam.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/multiphaseEulerFoam.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -34,6 +34,7 @@ Description \*---------------------------------------------------------------------------*/ #include "fvCFD.H" +#include "dynamicFvMesh.H" #include "phaseSystem.H" #include "phaseCompressibleMomentumTransportModel.H" #include "pimpleControl.H" @@ -48,9 +49,8 @@ int main(int argc, char *argv[]) #include "setRootCaseLists.H" #include "createTime.H" - #include "createMesh.H" - #include "createControl.H" - #include "createTimeControls.H" + #include "createDynamicFvMesh.H" + #include "createDyMControls.H" #include "createFields.H" #include "createFieldRefs.H" @@ -77,7 +77,7 @@ int main(int argc, char *argv[]) while (pimple.run(runTime)) { - #include "readTimeControls.H" + #include "readDyMControls.H" int nEnergyCorrectors ( @@ -104,6 +104,24 @@ int main(int argc, char *argv[]) // --- Pressure-velocity PIMPLE corrector loop while (pimple.loop()) { + if (pimple.firstPimpleIter() || moveMeshOuterCorrectors) + { + mesh.update(); + + if (mesh.changing()) + { + gh = (g & mesh.C()) - ghRef; + ghf = (g & mesh.Cf()) - ghRef; + + fluid.meshUpdate(); + + if (checkMeshCourantNo) + { + #include "meshCourantNo.H" + } + } + } + fluid.solve(rAUs, rAUfs); fluid.correct(); fluid.correctContinuityError(); diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/pU/pEqn.H b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/pU/pEqn.H index e56ab8dcb0..67155506bc 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/pU/pEqn.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/pU/pEqn.H @@ -61,13 +61,6 @@ while (pimple.correct()) // Correct p_rgh for consistency with p and the updated densities p_rgh = p - rho*gh; - // Correct fixed-flux BCs to be consistent with the velocity BCs - forAll(fluid.movingPhases(), movingPhasei) - { - phaseModel& phase = fluid.movingPhases()[movingPhasei]; - MRF.correctBoundaryFlux(phase.U(), phase.phiRef()); - } - // Combined buoyancy and force fluxes PtrList phigFs(phases.size()); { @@ -116,25 +109,23 @@ while (pimple.correct()) HbyAs.set ( phase.index(), - new volVectorField + constrainHbyA ( - IOobject::groupName("HbyA", phase.name()), - phase.U() + rAUs[phase.index()] + *( + UEqns[phase.index()].H() + + byDt + ( + max(phase.residualAlpha() - alpha, scalar(0)) + *phase.rho() + ) + *phase.U()().oldTime() + ), + phase.U(), + p_rgh ) ); - HbyAs[phase.index()] = - rAUs[phase.index()] - *( - UEqns[phase.index()].H() - + byDt - ( - max(phase.residualAlpha() - alpha, scalar(0)) - *phase.rho() - ) - *phase.U()().oldTime() - ); - phiHbyAs.set ( phase.index(), @@ -189,6 +180,7 @@ while (pimple.correct()) } MRF.makeRelative(phiHbyA); + fvc::makeRelative(phiHbyA, phases[0].U()); // Construct pressure "diffusivity" surfaceScalarField rAUf @@ -378,7 +370,9 @@ while (pimple.correct()) forAll(fluid.movingPhases(), movingPhasei) { phaseModel& phase = fluid.movingPhases()[movingPhasei]; + MRF.makeRelative(phase.phiRef()); + fvc::makeRelative(phase.phiRef(), phase.U()); } } @@ -387,6 +381,7 @@ while (pimple.correct()) phaseModel& phase = fluid.movingPhases()[movingPhasei]; phase.URef().correctBoundaryConditions(); + phase.correctUf(); fvOptions.correct(phase.URef()); } } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/pUf/pEqn.H b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/pUf/pEqn.H index 4f2325252c..74d924fb0d 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/pUf/pEqn.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/multiphaseEulerFoam/pUf/pEqn.H @@ -76,13 +76,6 @@ while (pimple.correct()) // Correct p_rgh for consistency with p and the updated densities p_rgh = p - rho*gh; - // Correct fixed-flux BCs to be consistent with the velocity BCs - forAll(fluid.movingPhases(), movingPhasei) - { - phaseModel& phase = fluid.movingPhases()[movingPhasei]; - MRF.correctBoundaryFlux(phase.U(), phase.phiRef()); - } - // Combined buoyancy and force fluxes PtrList phigFs(phases.size()); { @@ -125,16 +118,22 @@ while (pimple.correct()) phiHbyAs.set ( phase.index(), - new surfaceScalarField + constrainPhiHbyA ( - IOobject::groupName("phiHbyA", phase.name()), rAUfs[phase.index()] *( fvc::flux(UEqns[phase.index()].H()) + alphaRho0fs[phase.index()] - *byDt(MRF.absolute(phase.phi()().oldTime())) + *byDt + ( + phase.Uf().valid() + ? (mesh.Sf() & phase.Uf()().oldTime()) + : MRF.absolute(phase.phi()().oldTime()) + ) ) - - phigFs[phase.index()] + - phigFs[phase.index()], + phase.U(), + p_rgh ) ); } @@ -172,6 +171,7 @@ while (pimple.correct()) } MRF.makeRelative(phiHbyA); + fvc::makeRelative(phiHbyA, phases[0].U()); // Construct pressure "diffusivity" surfaceScalarField rAUf @@ -342,15 +342,6 @@ while (pimple.correct()) if (partialElimination) { fluid.partialEliminationf(rAUfs, alphafs, phiKdPhifs); - - forAll(fluid.movingPhases(), movingPhasei) - { - phaseModel& phase = fluid.movingPhases()[movingPhasei]; - - phase.URef() = fvc::reconstruct(MRF.absolute(phase.phi())); - phase.URef().correctBoundaryConditions(); - fvOptions.correct(phase.URef()); - } } else { @@ -358,12 +349,24 @@ while (pimple.correct()) { phaseModel& phase = fluid.movingPhases()[movingPhasei]; - phase.URef() = fvc::reconstruct(phase.phi()); MRF.makeRelative(phase.phiRef()); - phase.URef().correctBoundaryConditions(); - fvOptions.correct(phase.URef()); + fvc::makeRelative(phase.phiRef(), phase.U()); } } + + forAll(fluid.movingPhases(), movingPhasei) + { + phaseModel& phase = fluid.movingPhases()[movingPhasei]; + + phase.URef() = fvc::reconstruct + ( + fvc::absolute(MRF.absolute(phase.phi()), phase.U()) + ); + + phase.URef().correctBoundaryConditions(); + phase.correctUf(); + fvOptions.correct(phase.URef()); + } } } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C index f8703293e7..f9b348df0b 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2015-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -42,9 +42,9 @@ License #include "fvcDiv.H" #include "fvcFlux.H" #include "fvcSnGrad.H" +#include "fvcMeshPhi.H" #include "fvMatrix.H" - // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // template @@ -654,7 +654,14 @@ Foam::MomentumTransferPhaseSystem::phiFfs "phiFf", -rAUfs[iter().index()]*Vmf *( - byDt(this->MRF().absolute(iter().phi()().oldTime())) + byDt + ( + fvc::absolute + ( + this->MRF().absolute(iter().phi()().oldTime()), + iter().U() + ) + ) + iter.otherPhase().DUDtf() ), phiFfs @@ -794,7 +801,11 @@ Foam::MomentumTransferPhaseSystem::phiKdPhis iter(), "phiKdPhi", -fvc::interpolate(rAUs[iter().index()]*K) - *this->MRF().absolute(iter.otherPhase().phi()), + *fvc::absolute + ( + this->MRF().absolute(iter.otherPhase().phi()), + iter.otherPhase().U() + ), phiKdPhis ); } @@ -836,7 +847,11 @@ Foam::MomentumTransferPhaseSystem::phiKdPhifs iter(), "phiKdPhif", -rAUfs[iter().index()]*Kf - *this->MRF().absolute(iter.otherPhase().phi()), + *fvc::absolute + ( + this->MRF().absolute(iter.otherPhase().phi()), + iter.otherPhase().U() + ), phiKdPhifs ); } @@ -1105,8 +1120,15 @@ Foam::MomentumTransferPhaseSystem::ddtCorrByAs phiCorrs.set ( phasei, - this->MRF().absolute(phase.phi()().oldTime()) - -fvc::flux(phase.U()().oldTime()) + this->MRF().zeroFilter + ( + ( + phase.Uf().valid() + ? (this->mesh_.Sf() & phase.Uf()().oldTime())() + : phase.phi()().oldTime() + ) + - fvc::flux(phase.U()().oldTime()) + ) ); } @@ -1172,7 +1194,11 @@ Foam::MomentumTransferPhaseSystem::ddtCorrByAs -fvc::interpolate(Vm*byDt(rAUs[phase.index()])) *( phiCorrs[phase.index()] - + this->MRF().absolute(otherPhase.phi()) + + fvc::absolute + ( + this->MRF().absolute(otherPhase.phi()), + otherPhase.U() + ) - fvc::flux(otherPhase.U()) - phiCorrs[otherPhase.index()] ), diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C index 0f4eab24f8..753104abfc 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2015-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -157,6 +157,7 @@ Foam::MovingPhaseModel::MovingPhaseModel fluid.mesh(), dimensionedScalar(dimensionSet(1, 0, -1, 0, 0), 0) ), + Uf_(nullptr), DUDt_(nullptr), DUDtf_(nullptr), divU_(nullptr), @@ -195,6 +196,22 @@ Foam::MovingPhaseModel::MovingPhaseModel { phi_.writeOpt() = IOobject::AUTO_WRITE; + if (fluid.mesh().dynamic()) + { + Uf_ = new surfaceVectorField + ( + IOobject + ( + IOobject::groupName("Uf", this->name()), + fluid.mesh().time().timeName(), + fluid.mesh(), + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ), + fvc::interpolate(U_) + ); + } + correctKinematics(); } @@ -270,6 +287,33 @@ void Foam::MovingPhaseModel::correctEnergyTransport() } +template +void Foam::MovingPhaseModel::correctUf() +{ + const fvMesh& mesh = this->fluid().mesh(); + + if (mesh.dynamic()) + { + Uf_.ref() = fvc::interpolate(U_); + surfaceVectorField n(mesh.Sf()/mesh.magSf()); + Uf_.ref() += n*(fvc::absolute(phi_, U_)/mesh.magSf() - (n & Uf_())); + + surfaceVectorField::Boundary& UfBf = Uf_.ref().boundaryFieldRef(); + const volVectorField::Boundary& UBf = U_.boundaryField(); + + forAll(mesh.boundary(), patchi) + { + // Remove the flux correction on AMI patches to compensate for + // AMI non-conservation error + if (isA(mesh.boundary()[patchi])) + { + UfBf[patchi] = UBf[patchi]; + } + } + } +} + + template bool Foam::MovingPhaseModel::stationary() const { @@ -346,6 +390,17 @@ Foam::MovingPhaseModel::phiRef() } +template +Foam::tmp +Foam::MovingPhaseModel::Uf() const +{ + return + Uf_.valid() + ? tmp(Uf_()) + : tmp(); +} + + template Foam::tmp Foam::MovingPhaseModel::alphaPhi() const diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.H b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.H index 4c8238c279..a1b951133b 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2015-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -78,6 +78,9 @@ protected: //- Mass flux surfaceScalarField alphaRhoPhi_; + //- Face velocity field + tmp Uf_; + //- Lagrangian acceleration field (needed for virtual-mass) mutable tmp DUDt_; @@ -149,6 +152,9 @@ public: //- Correct the energy transport e.g. alphat virtual void correctEnergyTransport(); + //- Correct the face velocity for moving meshes + virtual void correctUf(); + // Momentum @@ -173,6 +179,10 @@ public: //- Access the volumetric flux virtual surfaceScalarField& phiRef(); + //- Return the face velocity + // Required for moving mesh cases + virtual tmp Uf() const; + //- Return the volumetric flux of the phase virtual tmp alphaPhi() const; diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseModel/StationaryPhaseModel/StationaryPhaseModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseModel/StationaryPhaseModel/StationaryPhaseModel.C index 9a8ab37d39..534e6d4906 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseModel/StationaryPhaseModel/StationaryPhaseModel.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseModel/StationaryPhaseModel/StationaryPhaseModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2015-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -130,6 +130,18 @@ Foam::StationaryPhaseModel::phiRef() } +template +Foam::tmp +Foam::StationaryPhaseModel::Uf() const +{ + FatalErrorInFunction + << "Cannot access the face velocity of a stationary phase" + << exit(FatalError); + + return tmp(); +} + + template Foam::tmp Foam::StationaryPhaseModel::alphaPhi() const diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseModel/StationaryPhaseModel/StationaryPhaseModel.H b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseModel/StationaryPhaseModel/StationaryPhaseModel.H index f35c4357b4..81ff31917f 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseModel/StationaryPhaseModel/StationaryPhaseModel.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseModel/StationaryPhaseModel/StationaryPhaseModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2015-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -100,6 +100,10 @@ public: //- Access the volumetric flux virtual surfaceScalarField& phiRef(); + //- Return the face velocity + // Required for moving mesh cases + virtual tmp Uf() const; + //- Return the volumetric flux of the phase virtual tmp alphaPhi() const; diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.C index 40a3709dd6..13f57eb221 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2015-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -171,12 +171,15 @@ void Foam::phaseModel::correctKinematics() void Foam::phaseModel::correctThermo() {} + void Foam::phaseModel::correctReactions() {} + void Foam::phaseModel::correctSpecies() {} + void Foam::phaseModel::correctTurbulence() {} @@ -185,6 +188,10 @@ void Foam::phaseModel::correctEnergyTransport() {} +void Foam::phaseModel::correctUf() +{} + + bool Foam::phaseModel::read() { return diameterModel_->read(fluid_.subDict(name_)); diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.H b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.H index 6084527893..ea50328e68 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseModel/phaseModel/phaseModel.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2015-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2015-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -222,6 +222,9 @@ public: //- Correct the energy transport virtual void correctEnergyTransport(); + //- Correct the face velocity for moving meshes + virtual void correctUf(); + //- Ensure that the flux at inflow/outflow BCs is preserved void correctInflowOutflow(surfaceScalarField& alphaPhi) const; @@ -312,6 +315,10 @@ public: //- Access the volumetric flux virtual surfaceScalarField& phiRef() = 0; + //- Return the face velocity + // Required for moving mesh cases + virtual tmp Uf() const = 0; + //- Return the volumetric flux of the phase virtual tmp alphaPhi() const = 0; diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseSystem/phaseSystem.C b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseSystem/phaseSystem.C index d029e41710..b99973b8a4 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseSystem/phaseSystem.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseSystem/phaseSystem.C @@ -842,6 +842,20 @@ void Foam::phaseSystem::correctEnergyTransport() } +void Foam::phaseSystem::meshUpdate() +{ + if (mesh_.changing()) + { + MRF_.update(); + + // forAll(phaseModels_, phasei) + // { + // phaseModels_[phasei].meshUpdate(); + // } + } +} + + bool Foam::phaseSystem::read() { if (regIOobject::read()) diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseSystem/phaseSystem.H b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseSystem/phaseSystem.H index 5bf411c44e..d3c11dab91 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseSystem/phaseSystem.H +++ b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseSystem/phaseSystem.H @@ -675,6 +675,9 @@ public: //- Correct the energy transport e.g. alphat virtual void correctEnergyTransport(); + //- Update the fluid properties for mesh changes + virtual void meshUpdate(); + // IO diff --git a/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.C b/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.C index dd89b3e63d..0644b4853a 100644 --- a/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.C +++ b/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2012-2020 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -363,33 +363,6 @@ void Foam::MRFZoneList::correctBoundaryVelocity(volVectorField& U) const } -void Foam::MRFZoneList::correctBoundaryFlux -( - const volVectorField& U, - surfaceScalarField& phi -) const -{ - FieldField Uf - ( - relative(mesh_.Sf().boundaryField() & U.boundaryField()) - ); - - - surfaceScalarField::Boundary& phibf = phi.boundaryFieldRef(); - - forAll(mesh_.boundary(), patchi) - { - if - ( - isA(phibf[patchi]) - ) - { - phibf[patchi] == Uf[patchi]; - } - } -} - - void Foam::MRFZoneList::update() { if (mesh_.topoChanging()) diff --git a/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.H b/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.H index b4b9d85149..e752a9e280 100644 --- a/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.H +++ b/src/finiteVolume/cfdTools/general/MRF/MRFZoneList.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2012-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -173,13 +173,6 @@ public: //- Correct the boundary velocity for the rotation of the MRF region void correctBoundaryVelocity(volVectorField& U) const; - //- Correct the boundary flux for the rotation of the MRF region - void correctBoundaryFlux - ( - const volVectorField& U, - surfaceScalarField& phi - ) const; - //- Filter-out the MRF region contribution from the given field // setting the corresponding values to zero template diff --git a/src/finiteVolume/cfdTools/general/constrainHbyA/constrainHbyA.C b/src/finiteVolume/cfdTools/general/constrainHbyA/constrainHbyA.C index 2a193d9e4f..3ef3def6d7 100644 --- a/src/finiteVolume/cfdTools/general/constrainHbyA/constrainHbyA.C +++ b/src/finiteVolume/cfdTools/general/constrainHbyA/constrainHbyA.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2016-2019 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2016-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -42,11 +42,15 @@ Foam::tmp Foam::constrainHbyA if (tHbyA.isTmp()) { tHbyANew = tHbyA; - tHbyANew.ref().rename("HbyA"); + tHbyANew.ref().rename(IOobject::groupName("HbyA", U.group())); } else { - tHbyANew = volVectorField::New("HbyA", tHbyA); + tHbyANew = volVectorField::New + ( + IOobject::groupName("HbyA", U.group()), + tHbyA + ); } volVectorField& HbyA = tHbyANew.ref(); @@ -83,11 +87,15 @@ Foam::tmp Foam::constrainPhiHbyA if (tphiHbyA.isTmp()) { tphiHbyANew = tphiHbyA; - tphiHbyANew.ref().rename("phiHbyA"); + tphiHbyANew.ref().rename(IOobject::groupName("phiHbyA", U.group())); } else { - tphiHbyANew = surfaceScalarField::New("phiHbyA", tphiHbyA); + tphiHbyANew = surfaceScalarField::New + ( + IOobject::groupName("phiHbyA", U.group()), + tphiHbyA + ); } surfaceScalarField& phiHbyA = tphiHbyANew.ref(); diff --git a/src/finiteVolume/finiteVolume/fvc/fvcMeshPhi.C b/src/finiteVolume/finiteVolume/fvc/fvcMeshPhi.C index f5c8535c88..f7e6ebe165 100644 --- a/src/finiteVolume/finiteVolume/fvc/fvcMeshPhi.C +++ b/src/finiteVolume/finiteVolume/fvc/fvcMeshPhi.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -192,7 +192,11 @@ Foam::tmp Foam::fvc::absolute { if (tphi().mesh().moving()) { - return tphi + fvc::meshPhi(U); + return surfaceScalarField::New + ( + tphi().name(), + tphi + fvc::meshPhi(U) + ); } else { @@ -210,7 +214,11 @@ Foam::tmp Foam::fvc::absolute { if (tphi().mesh().moving()) { - return tphi + fvc::interpolate(rho)*fvc::meshPhi(rho, U); + return surfaceScalarField::New + ( + tphi().name(), + tphi + fvc::interpolate(rho)*fvc::meshPhi(rho, U) + ); } else { diff --git a/tutorials/multiphase/compressibleInterFoam/laminar/sloshingTank2D/system/fvSchemes b/tutorials/multiphase/compressibleInterFoam/laminar/sloshingTank2D/system/fvSchemes index 7b6058c3ae..7e00dc5372 100644 --- a/tutorials/multiphase/compressibleInterFoam/laminar/sloshingTank2D/system/fvSchemes +++ b/tutorials/multiphase/compressibleInterFoam/laminar/sloshingTank2D/system/fvSchemes @@ -32,7 +32,7 @@ divSchemes div(rhoPhi,U) Gauss vanLeerV; div(rhoPhi,T) Gauss vanLeer; div(rhoPhi,K) Gauss linear; - div((phi+meshPhi),p) Gauss linear; + div(phi,p) Gauss linear; div(((thermo:rho*nuEff)*dev2(T(grad(U))))) Gauss linear; } diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/T.air b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/T.air new file mode 100644 index 0000000000..2d36c690a2 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/T.air @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object T.air; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0]; + +internalField uniform 300; + +boundaryField +{ + rotor + { + type zeroGradient; + value uniform 300; + } + + stator + { + type zeroGradient; + value uniform 300; + } + + front + { + type empty; + } + + back + { + type empty; + } + + AMI1 + { + type cyclicAMI; + value $internalField; + } + + AMI2 + { + type cyclicAMI; + value $internalField; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/T.mercury b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/T.mercury new file mode 100644 index 0000000000..4222212985 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/T.mercury @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object T.mercury; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0]; + +internalField uniform 300; + +boundaryField +{ + rotor + { + type zeroGradient; + value uniform 300; + } + + stator + { + type zeroGradient; + value uniform 300; + } + + front + { + type empty; + } + + back + { + type empty; + } + + AMI1 + { + type cyclicAMI; + value $internalField; + } + + AMI2 + { + type cyclicAMI; + value $internalField; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/T.oil b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/T.oil new file mode 100644 index 0000000000..a400d0a57a --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/T.oil @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object T.oil; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0]; + +internalField uniform 300; + +boundaryField +{ + rotor + { + type zeroGradient; + value uniform 300; + } + + stator + { + type zeroGradient; + value uniform 300; + } + + front + { + type empty; + } + + back + { + type empty; + } + + AMI1 + { + type cyclicAMI; + value $internalField; + } + + AMI2 + { + type cyclicAMI; + value $internalField; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/T.water b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/T.water new file mode 100644 index 0000000000..3f51979715 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/T.water @@ -0,0 +1,60 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object T.water; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 1 0]; + +internalField uniform 300; + +boundaryField +{ + rotor + { + type zeroGradient; + value uniform 300; + } + + stator + { + type zeroGradient; + value uniform 300; + } + + front + { + type empty; + } + + back + { + type empty; + } + + AMI1 + { + type cyclicAMI; + value $internalField; + } + + AMI2 + { + type cyclicAMI; + value $internalField; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/U.air b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/U.air new file mode 100644 index 0000000000..20a58f67a5 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/U.air @@ -0,0 +1,57 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object U.air; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + rotor + { + type movingWallVelocity; + value uniform (0 0 0); + } + + stator + { + type noSlip; + } + + front + { + type empty; + } + + back + { + type empty; + } + + AMI1 + { + type cyclicAMI; + value $internalField; + } + + AMI2 + { + type cyclicAMI; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/U.mercury b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/U.mercury new file mode 100644 index 0000000000..dfe05562b6 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/U.mercury @@ -0,0 +1,57 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object U.mercury; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + rotor + { + type movingWallVelocity; + value uniform (0 0 0); + } + + stator + { + type noSlip; + } + + front + { + type empty; + } + + back + { + type empty; + } + + AMI1 + { + type cyclicAMI; + value $internalField; + } + + AMI2 + { + type cyclicAMI; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/U.oil b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/U.oil new file mode 100644 index 0000000000..08915110e7 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/U.oil @@ -0,0 +1,57 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object U.oil; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + rotor + { + type movingWallVelocity; + value uniform (0 0 0); + } + + stator + { + type noSlip; + } + + front + { + type empty; + } + + back + { + type empty; + } + + AMI1 + { + type cyclicAMI; + value $internalField; + } + + AMI2 + { + type cyclicAMI; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/U.water b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/U.water new file mode 100644 index 0000000000..7a668c0192 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/U.water @@ -0,0 +1,57 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object U.water; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + rotor + { + type movingWallVelocity; + value uniform (0 0 0); + } + + stator + { + type noSlip; + } + + front + { + type empty; + } + + back + { + type empty; + } + + AMI1 + { + type cyclicAMI; + value $internalField; + } + + AMI2 + { + type cyclicAMI; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/alpha.air b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/alpha.air new file mode 100644 index 0000000000..a72b9312f2 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/alpha.air @@ -0,0 +1,56 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object alpha.air; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.1; + +boundaryField +{ + rotor + { + type zeroGradient; + } + + stator + { + type zeroGradient; + } + + front + { + type empty; + } + + back + { + type empty; + } + + AMI1 + { + type cyclicAMI; + value $internalField; + } + + AMI2 + { + type cyclicAMI; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/alpha.mercury b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/alpha.mercury new file mode 100644 index 0000000000..858f6cba4d --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/alpha.mercury @@ -0,0 +1,56 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object alpha.mercury; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.1; + +boundaryField +{ + rotor + { + type zeroGradient; + } + + stator + { + type zeroGradient; + } + + front + { + type empty; + } + + back + { + type empty; + } + + AMI1 + { + type cyclicAMI; + value $internalField; + } + + AMI2 + { + type cyclicAMI; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/alpha.oil b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/alpha.oil new file mode 100644 index 0000000000..5dc10a130f --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/alpha.oil @@ -0,0 +1,56 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object alpha.oil; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.1; + +boundaryField +{ + rotor + { + type zeroGradient; + } + + stator + { + type zeroGradient; + } + + front + { + type empty; + } + + back + { + type empty; + } + + AMI1 + { + type cyclicAMI; + value $internalField; + } + + AMI2 + { + type cyclicAMI; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/alpha.water b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/alpha.water new file mode 100644 index 0000000000..0830847c88 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/alpha.water @@ -0,0 +1,56 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object alpha.water; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 0 0 0 0 0 0]; + +internalField uniform 0.7; + +boundaryField +{ + rotor + { + type zeroGradient; + } + + stator + { + type zeroGradient; + } + + front + { + type empty; + } + + back + { + type empty; + } + + AMI1 + { + type cyclicAMI; + value $internalField; + } + + AMI2 + { + type cyclicAMI; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/p b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/p new file mode 100644 index 0000000000..ed4e703464 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/p @@ -0,0 +1,58 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 1e5; + +boundaryField +{ + rotor + { + type calculated; + value $internalField; + } + + stator + { + type calculated; + value $internalField; + } + + front + { + type empty; + } + + back + { + type empty; + } + + AMI1 + { + type cyclicAMI; + value $internalField; + } + + AMI2 + { + type cyclicAMI; + value $internalField; + } +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/p_rgh b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/p_rgh new file mode 100644 index 0000000000..fae098f9c8 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/0/p_rgh @@ -0,0 +1,58 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p_rgh; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [1 -1 -2 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + rotor + { + type fixedFluxPressure; + value $internalField; + } + + stator + { + type fixedFluxPressure; + value $internalField; + } + + front + { + type empty; + } + + back + { + type empty; + } + + AMI1 + { + type cyclicAMI; + value $internalField; + } + + AMI2 + { + type cyclicAMI; + value $internalField; + } +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/Allrun b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/Allrun new file mode 100755 index 0000000000..f5e6c61a9e --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/Allrun @@ -0,0 +1,12 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +application=$(getApplication) + +runApplication ./makeMesh +runApplication $application + +#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/dynamicMeshDict b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/dynamicMeshDict new file mode 100644 index 0000000000..e7d085d7d0 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/dynamicMeshDict @@ -0,0 +1,30 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object dynamicMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dynamicFvMesh dynamicMotionSolverFvMesh; + +motionSolver solidBody; + +cellZone rotor; + +solidBodyMotionFunction rotatingMotion; + +origin (0 0 0); +axis (0 0 1); +omega 6.2832; // rad/s + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/g b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/g new file mode 100644 index 0000000000..24a8dfba51 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/g @@ -0,0 +1,22 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class uniformDimensionedVectorField; + location "constant"; + object g; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -2 0 0 0 0]; +value (0 0 0); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/momentumTransport.air b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/momentumTransport.air new file mode 100644 index 0000000000..31424d6c73 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/momentumTransport.air @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object momentumTransport.air; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/momentumTransport.mercury b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/momentumTransport.mercury new file mode 100644 index 0000000000..20790cb5da --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/momentumTransport.mercury @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object momentumTransport.mercury; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/momentumTransport.oil b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/momentumTransport.oil new file mode 100644 index 0000000000..78d44fdd28 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/momentumTransport.oil @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object momentumTransport.oil; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/momentumTransport.water b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/momentumTransport.water new file mode 100644 index 0000000000..8f42ef3c8a --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/momentumTransport.water @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object momentumTransport.water; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType laminar; + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/phaseProperties b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/phaseProperties new file mode 100644 index 0000000000..568f1ed937 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/phaseProperties @@ -0,0 +1,475 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object phaseProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +type basicMultiphaseSystem; + +phases (water oil mercury air); + +water +{ + type purePhaseModel; + diameterModel constant; + constantCoeffs + { + d 1e-3; + } + + residualAlpha 1e-3; +} + +oil +{ + type purePhaseModel; + diameterModel constant; + constantCoeffs + { + d 1e-3; + } + + residualAlpha 1e-3; +} + +mercury +{ + type purePhaseModel; + diameterModel constant; + constantCoeffs + { + d 1e-3; + } + + residualAlpha 1e-3; +} + +air +{ + type purePhaseModel; + diameterModel isothermal; + isothermalCoeffs + { + d0 1e-3; + p0 1e5; + } + + residualAlpha 1e-3; +} + +blending +{ + default + { + type linear; + minFullyContinuousAlpha.water 0.7; + minPartlyContinuousAlpha.water 0.3; + minFullyContinuousAlpha.oil 0.7; + minPartlyContinuousAlpha.oil 0.3; + minFullyContinuousAlpha.mercury 0.7; + minPartlyContinuousAlpha.mercury 0.3; + minFullyContinuousAlpha.air 0.7; + minPartlyContinuousAlpha.air 0.3; + } + + drag + { + type linear; + minFullyContinuousAlpha.water 0.7; + minPartlyContinuousAlpha.water 0.5; + minFullyContinuousAlpha.oil 0.7; + minPartlyContinuousAlpha.oil 0.5; + minFullyContinuousAlpha.mercury 0.7; + minPartlyContinuousAlpha.mercury 0.5; + minFullyContinuousAlpha.air 0.7; + minPartlyContinuousAlpha.air 0.5; + } +} + +surfaceTension +( + (air and water) + { + type constant; + sigma 0.07; + } + (air and oil) + { + type constant; + sigma 0.07; + } + (air and mercury) + { + type constant; + sigma 0.07; + } + (water and oil) + { + type constant; + sigma 0; + } + (water and mercury) + { + type constant; + sigma 0; + } + (oil and mercury) + { + type constant; + sigma 0; + } +); + +interfaceCompression +( + (air and water) 1 + (air and oil) 1 + (air and mercury) 1 + (water and oil) 1 + (water and mercury) 1 + (oil and mercury) 1 +); + +aspectRatio +(); + +drag +( + (air in water) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (water in air) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (air and water) + { + type segregated; + + m 0.5; + n 8; + swarmCorrection + { + type none; + } + } + + + (air in oil) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (oil in air) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (air and oil) + { + type segregated; + + m 0.5; + n 8; + swarmCorrection + { + type none; + } + } + + + (air in mercury) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (mercury in air) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (air and mercury) + { + type segregated; + + m 0.5; + n 8; + swarmCorrection + { + type none; + } + } + + + + (water in oil) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (oil in water) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (water and oil) + { + type segregated; + + m 0.5; + n 8; + swarmCorrection + { + type none; + } + } + + + (water in mercury) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (mercury in water) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (water and mercury) + { + type segregated; + + m 0.5; + n 8; + swarmCorrection + { + type none; + } + } + + + + (oil in mercury) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (mercury in oil) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (oil and mercury) + { + type segregated; + + m 0.5; + n 8; + swarmCorrection + { + type none; + } + } +); + +virtualMass +( + (air in water) + { + type constantCoefficient; + Cvm 0.5; + } + + (air in oil) + { + type constantCoefficient; + Cvm 0.5; + } + + (air in mercury) + { + type constantCoefficient; + Cvm 0.5; + } +); + +heatTransfer +( + (air in water) + { + type RanzMarshall; + residualAlpha 1e-3; + } + + (water in air) + { + type RanzMarshall; + residualAlpha 1e-3; + } + + (air in oil) + { + type RanzMarshall; + residualAlpha 1e-3; + } + + (oil in air) + { + type RanzMarshall; + residualAlpha 1e-3; + } + + (air in mercury) + { + type RanzMarshall; + residualAlpha 1e-3; + } + + (mercury in air) + { + type RanzMarshall; + residualAlpha 1e-3; + } + + + (water in oil) + { + type RanzMarshall; + residualAlpha 1e-3; + } + + (oil in water) + { + type RanzMarshall; + residualAlpha 1e-3; + } + + (water in mercury) + { + type RanzMarshall; + residualAlpha 1e-3; + } + + (mercury in water) + { + type RanzMarshall; + residualAlpha 1e-3; + } + + + (oil in mercury) + { + type RanzMarshall; + residualAlpha 1e-3; + } + + (mercury in oil) + { + type RanzMarshall; + residualAlpha 1e-3; + } +); + +phaseTransfer +(); + +lift +(); + +wallLubrication +(); + +turbulentDispersion +(); + +// Minimum allowable pressure +pMin 10000; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/phasePropertiesAll b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/phasePropertiesAll new file mode 100644 index 0000000000..24b53f43a7 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/phasePropertiesAll @@ -0,0 +1,474 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object phaseProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +type basicMultiphaseSystem; + +phases (water oil mercury air); + +water +{ + type purePhaseModel; + diameterModel constant; + constantCoeffs + { + d 1e-3; + } + + residualAlpha 1e-3; +} + +oil +{ + type purePhaseModel; + diameterModel constant; + constantCoeffs + { + d 1e-3; + } + + residualAlpha 1e-3; +} + +mercury +{ + type purePhaseModel; + diameterModel constant; + constantCoeffs + { + d 1e-3; + } + + residualAlpha 1e-3; +} + +air +{ + type purePhaseModel; + diameterModel constant; + constantCoeffs + { + d 1e-3; + } + + residualAlpha 1e-3; +} + +blending +{ + default + { + type linear; + minFullyContinuousAlpha.water 0.7; + minPartlyContinuousAlpha.water 0.3; + minFullyContinuousAlpha.oil 0.7; + minPartlyContinuousAlpha.oil 0.3; + minFullyContinuousAlpha.mercury 0.7; + minPartlyContinuousAlpha.mercury 0.3; + minFullyContinuousAlpha.air 0.7; + minPartlyContinuousAlpha.air 0.3; + } + + drag + { + type linear; + minFullyContinuousAlpha.water 0.7; + minPartlyContinuousAlpha.water 0.5; + minFullyContinuousAlpha.oil 0.7; + minPartlyContinuousAlpha.oil 0.5; + minFullyContinuousAlpha.mercury 0.7; + minPartlyContinuousAlpha.mercury 0.5; + minFullyContinuousAlpha.air 0.7; + minPartlyContinuousAlpha.air 0.5; + } +} + +surfaceTension +( + (air and water) + { + type constant; + sigma 0.07; + } + (air and oil) + { + type constant; + sigma 0.07; + } + (air and mercury) + { + type constant; + sigma 0.07; + } + (water and oil) + { + type constant; + sigma 0; + } + (water and mercury) + { + type constant; + sigma 0; + } + (oil and mercury) + { + type constant; + sigma 0; + } +); + +interfaceCompression +( + (air and water) 1 + (air and oil) 1 + (air and mercury) 1 + (water and oil) 1 + (water and mercury) 1 + (oil and mercury) 1 +); + +aspectRatio +(); + +drag +( + (air in water) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (water in air) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (air and water) + { + type segregated; + + m 0.5; + n 8; + swarmCorrection + { + type none; + } + } + + + (air in oil) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (oil in air) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (air and oil) + { + type segregated; + + m 0.5; + n 8; + swarmCorrection + { + type none; + } + } + + + (air in mercury) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (mercury in air) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (air and mercury) + { + type segregated; + + m 0.5; + n 8; + swarmCorrection + { + type none; + } + } + + + + (water in oil) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (oil in water) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (water and oil) + { + type segregated; + + m 0.5; + n 8; + swarmCorrection + { + type none; + } + } + + + (water in mercury) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (mercury in water) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (water and mercury) + { + type segregated; + + m 0.5; + n 8; + swarmCorrection + { + type none; + } + } + + + + (oil in mercury) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (mercury in oil) + { + type SchillerNaumann; + + residualRe 1e-3; + swarmCorrection + { + type none; + } + } + + (oil and mercury) + { + type segregated; + + m 0.5; + n 8; + swarmCorrection + { + type none; + } + } +); + +virtualMass +( + (air in water) + { + type constantCoefficient; + Cvm 0.5; + } + + (air in oil) + { + type constantCoefficient; + Cvm 0.5; + } + + (air in mercury) + { + type constantCoefficient; + Cvm 0.5; + } +); + +heatTransfer +( + (air in water) + { + type RanzMarshall; + residualAlpha 1e-3; + } + + (water in air) + { + type RanzMarshall; + residualAlpha 1e-3; + } + + (air in oil) + { + type RanzMarshall; + residualAlpha 1e-3; + } + + (oil in air) + { + type RanzMarshall; + residualAlpha 1e-3; + } + + (air in mercury) + { + type RanzMarshall; + residualAlpha 1e-3; + } + + (mercury in air) + { + type RanzMarshall; + residualAlpha 1e-3; + } + + + (water in oil) + { + type RanzMarshall; + residualAlpha 1e-3; + } + + (oil in water) + { + type RanzMarshall; + residualAlpha 1e-3; + } + + (water in mercury) + { + type RanzMarshall; + residualAlpha 1e-3; + } + + (mercury in water) + { + type RanzMarshall; + residualAlpha 1e-3; + } + + + (oil in mercury) + { + type RanzMarshall; + residualAlpha 1e-3; + } + + (mercury in oil) + { + type RanzMarshall; + residualAlpha 1e-3; + } +); + +phaseTransfer +(); + +lift +(); + +wallLubrication +(); + +turbulentDispersion +(); + +// Minimum allowable pressure +pMin 10000; + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/thermophysicalProperties.air b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/thermophysicalProperties.air new file mode 100644 index 0000000000..aca85e96f4 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/thermophysicalProperties.air @@ -0,0 +1,48 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object thermophysicalProperties.air; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heRhoThermo; + mixture pureMixture; + transport const; + thermo hConst; + equationOfState perfectGas; + specie specie; + energy sensibleInternalEnergy; +} + +mixture +{ + specie + { + molWeight 28.9; + } + thermodynamics + { + Cp 1007; + Hf 0; + } + transport + { + mu 1.84e-05; + Pr 0.7; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/thermophysicalProperties.mercury b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/thermophysicalProperties.mercury new file mode 100644 index 0000000000..18091e495f --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/thermophysicalProperties.mercury @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object thermophysicalProperties.oil; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heRhoThermo; + mixture pureMixture; + transport const; + thermo hConst; + equationOfState rhoConst; + specie specie; + energy sensibleInternalEnergy; +} + +mixture +{ + specie + { + molWeight 200; + } + equationOfState + { + rho 13529; + } + thermodynamics + { + Cp 135; + Hf 0; + } + transport + { + mu 8.6e-4; + Pr 111; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/thermophysicalProperties.oil b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/thermophysicalProperties.oil new file mode 100644 index 0000000000..2a84f2b931 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/thermophysicalProperties.oil @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object thermophysicalProperties.oil; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heRhoThermo; + mixture pureMixture; + transport const; + thermo hConst; + equationOfState rhoConst; + specie specie; + energy sensibleInternalEnergy; +} + +mixture +{ + specie + { + molWeight 160; + } + equationOfState + { + rho 500; + } + thermodynamics + { + Cp 4195; + Hf 0; + } + transport + { + mu 5e-4; + Pr 1; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/thermophysicalProperties.water b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/thermophysicalProperties.water new file mode 100644 index 0000000000..f745ebe9c5 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/constant/thermophysicalProperties.water @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object thermophysicalProperties.water; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +thermoType +{ + type heRhoThermo; + mixture pureMixture; + transport const; + thermo eConst; + equationOfState rPolynomial; + specie specie; + energy sensibleInternalEnergy; +} + +mixture +{ + specie + { + molWeight 18; + } + equationOfState + { + C (0.001278 -2.1055e-06 3.9689e-09 4.3772e-13 -2.0225e-16); + } + thermodynamics + { + Cv 4195; + Hf 0; + } + transport + { + mu 3.645e-4; + Pr 2.289; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/makeMesh b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/makeMesh new file mode 100755 index 0000000000..bcb12c0e9a --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/makeMesh @@ -0,0 +1,13 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # Run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +m4 < system/blockMeshDict.m4 > system/blockMeshDict + +runApplication blockMesh + +runApplication topoSet + +#------------------------------------------------------------------------------ diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/system/blockMeshDict.m4 b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/system/blockMeshDict.m4 new file mode 100644 index 0000000000..7e2ea0cb6a --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/system/blockMeshDict.m4 @@ -0,0 +1,924 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + `format' ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// General macros to create 2D/extruded-2D meshes + +changecom(//)changequote([,]) +define(calc, [esyscmd(perl -e 'print ($1)')]) +define(VCOUNT, 0) +define(vlabel, [[// ]Vertex $1 = VCOUNT define($1, VCOUNT)define([VCOUNT], incr(VCOUNT))]) +define(pi, 3.14159265) + +define(hex2D, hex ($1b $2b $3b $4b $1t $2t $3t $4t)) +define(quad2D, ($1b $2b $2t $1t)) +define(frontQuad, ($1t $2t $3t $4t)) +define(backQuad, ($1b $4b $3b $2b)) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 0.1; + +// Hub radius +define(r, 0.2) + +// Impeller-tip radius +define(rb, 0.5) + +// Baffle-tip radius +define(Rb, 0.7) + +// Tank radius +define(R, 1) + +// MRF region radius +define(ri, calc(0.5*(rb + Rb))) + +// Thickness of 2D slab +define(z, 0.1) + +// Base z +define(Zb, 0) + +// Top z +define(Zt, calc(Zb + z)) + +// Number of cells radially between hub and impeller tip +define(Nr, 12) + +// Number of cells radially in each of the two regions between +// impeller and baffle tips +define(Ni, 4) + +// Number of cells radially between baffle tip and tank +define(NR, 12) + +// Number of cells azimuthally in each of the 8 blocks +define(Na, 12) + +// Number of cells in the thickness of the slab +define(Nz, 1) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +define(vert, (x$1$2 y$1$2 $3)) +define(evert, (ex$1$2 ey$1$2 $3)) + +define(a0, 0) +define(a1, -45) +define(a2, -90) +define(a3, -135) +define(a4, 180) +define(a5, 135) +define(a6, 90) +define(a7, 45) + +define(ea0, -22.5) +define(ea1, -67.5) +define(ea2, -112.5) +define(ea3, -157.5) +define(ea4, 157.5) +define(ea5, 112.5) +define(ea6, 67.5) +define(ea7, 22.5) + +define(ca0, calc(cos((pi/180)*a0))) +define(ca1, calc(cos((pi/180)*a1))) +define(ca2, calc(cos((pi/180)*a2))) +define(ca3, calc(cos((pi/180)*a3))) +define(ca4, calc(cos((pi/180)*a4))) +define(ca5, calc(cos((pi/180)*a5))) +define(ca6, calc(cos((pi/180)*a6))) +define(ca7, calc(cos((pi/180)*a7))) + +define(sa0, calc(sin((pi/180)*a0))) +define(sa1, calc(sin((pi/180)*a1))) +define(sa2, calc(sin((pi/180)*a2))) +define(sa3, calc(sin((pi/180)*a3))) +define(sa4, calc(sin((pi/180)*a4))) +define(sa5, calc(sin((pi/180)*a5))) +define(sa6, calc(sin((pi/180)*a6))) +define(sa7, calc(sin((pi/180)*a7))) + +define(cea0, calc(cos((pi/180)*ea0))) +define(cea1, calc(cos((pi/180)*ea1))) +define(cea2, calc(cos((pi/180)*ea2))) +define(cea3, calc(cos((pi/180)*ea3))) +define(cea4, calc(cos((pi/180)*ea4))) +define(cea5, calc(cos((pi/180)*ea5))) +define(cea6, calc(cos((pi/180)*ea6))) +define(cea7, calc(cos((pi/180)*ea7))) + +define(sea0, calc(sin((pi/180)*ea0))) +define(sea1, calc(sin((pi/180)*ea1))) +define(sea2, calc(sin((pi/180)*ea2))) +define(sea3, calc(sin((pi/180)*ea3))) +define(sea4, calc(sin((pi/180)*ea4))) +define(sea5, calc(sin((pi/180)*ea5))) +define(sea6, calc(sin((pi/180)*ea6))) +define(sea7, calc(sin((pi/180)*ea7))) + +define(x00, calc(r*ca0)) +define(x01, calc(r*ca1)) +define(x02, calc(r*ca2)) +define(x03, calc(r*ca3)) +define(x04, calc(r*ca4)) +define(x05, calc(r*ca5)) +define(x06, calc(r*ca6)) +define(x07, calc(r*ca7)) + +define(x10, calc(rb*ca0)) +define(x11, calc(rb*ca1)) +define(x12, calc(rb*ca2)) +define(x13, calc(rb*ca3)) +define(x14, calc(rb*ca4)) +define(x15, calc(rb*ca5)) +define(x16, calc(rb*ca6)) +define(x17, calc(rb*ca7)) + +define(x20, calc(ri*ca0)) +define(x21, calc(ri*ca1)) +define(x22, calc(ri*ca2)) +define(x23, calc(ri*ca3)) +define(x24, calc(ri*ca4)) +define(x25, calc(ri*ca5)) +define(x26, calc(ri*ca6)) +define(x27, calc(ri*ca7)) + +define(x30, calc(Rb*ca0)) +define(x31, calc(Rb*ca1)) +define(x32, calc(Rb*ca2)) +define(x33, calc(Rb*ca3)) +define(x34, calc(Rb*ca4)) +define(x35, calc(Rb*ca5)) +define(x36, calc(Rb*ca6)) +define(x37, calc(Rb*ca7)) + +define(x40, calc(R*ca0)) +define(x41, calc(R*ca1)) +define(x42, calc(R*ca2)) +define(x43, calc(R*ca3)) +define(x44, calc(R*ca4)) +define(x45, calc(R*ca5)) +define(x46, calc(R*ca6)) +define(x47, calc(R*ca7)) + +define(y00, calc(r*sa0)) +define(y01, calc(r*sa1)) +define(y02, calc(r*sa2)) +define(y03, calc(r*sa3)) +define(y04, calc(r*sa4)) +define(y05, calc(r*sa5)) +define(y06, calc(r*sa6)) +define(y07, calc(r*sa7)) + +define(y10, calc(rb*sa0)) +define(y11, calc(rb*sa1)) +define(y12, calc(rb*sa2)) +define(y13, calc(rb*sa3)) +define(y14, calc(rb*sa4)) +define(y15, calc(rb*sa5)) +define(y16, calc(rb*sa6)) +define(y17, calc(rb*sa7)) + +define(y20, calc(ri*sa0)) +define(y21, calc(ri*sa1)) +define(y22, calc(ri*sa2)) +define(y23, calc(ri*sa3)) +define(y24, calc(ri*sa4)) +define(y25, calc(ri*sa5)) +define(y26, calc(ri*sa6)) +define(y27, calc(ri*sa7)) + +define(y30, calc(Rb*sa0)) +define(y31, calc(Rb*sa1)) +define(y32, calc(Rb*sa2)) +define(y33, calc(Rb*sa3)) +define(y34, calc(Rb*sa4)) +define(y35, calc(Rb*sa5)) +define(y36, calc(Rb*sa6)) +define(y37, calc(Rb*sa7)) + +define(y40, calc(R*sa0)) +define(y41, calc(R*sa1)) +define(y42, calc(R*sa2)) +define(y43, calc(R*sa3)) +define(y44, calc(R*sa4)) +define(y45, calc(R*sa5)) +define(y46, calc(R*sa6)) +define(y47, calc(R*sa7)) + +define(ex00, calc(r*cea0)) +define(ex01, calc(r*cea1)) +define(ex02, calc(r*cea2)) +define(ex03, calc(r*cea3)) +define(ex04, calc(r*cea4)) +define(ex05, calc(r*cea5)) +define(ex06, calc(r*cea6)) +define(ex07, calc(r*cea7)) + +define(ex10, calc(rb*cea0)) +define(ex11, calc(rb*cea1)) +define(ex12, calc(rb*cea2)) +define(ex13, calc(rb*cea3)) +define(ex14, calc(rb*cea4)) +define(ex15, calc(rb*cea5)) +define(ex16, calc(rb*cea6)) +define(ex17, calc(rb*cea7)) + +define(ex20, calc(ri*cea0)) +define(ex21, calc(ri*cea1)) +define(ex22, calc(ri*cea2)) +define(ex23, calc(ri*cea3)) +define(ex24, calc(ri*cea4)) +define(ex25, calc(ri*cea5)) +define(ex26, calc(ri*cea6)) +define(ex27, calc(ri*cea7)) + +define(ex30, calc(Rb*cea0)) +define(ex31, calc(Rb*cea1)) +define(ex32, calc(Rb*cea2)) +define(ex33, calc(Rb*cea3)) +define(ex34, calc(Rb*cea4)) +define(ex35, calc(Rb*cea5)) +define(ex36, calc(Rb*cea6)) +define(ex37, calc(Rb*cea7)) + +define(ex40, calc(R*cea0)) +define(ex41, calc(R*cea1)) +define(ex42, calc(R*cea2)) +define(ex43, calc(R*cea3)) +define(ex44, calc(R*cea4)) +define(ex45, calc(R*cea5)) +define(ex46, calc(R*cea6)) +define(ex47, calc(R*cea7)) + +define(ey00, calc(r*sea0)) +define(ey01, calc(r*sea1)) +define(ey02, calc(r*sea2)) +define(ey03, calc(r*sea3)) +define(ey04, calc(r*sea4)) +define(ey05, calc(r*sea5)) +define(ey06, calc(r*sea6)) +define(ey07, calc(r*sea7)) + +define(ey10, calc(rb*sea0)) +define(ey11, calc(rb*sea1)) +define(ey12, calc(rb*sea2)) +define(ey13, calc(rb*sea3)) +define(ey14, calc(rb*sea4)) +define(ey15, calc(rb*sea5)) +define(ey16, calc(rb*sea6)) +define(ey17, calc(rb*sea7)) + +define(ey20, calc(ri*sea0)) +define(ey21, calc(ri*sea1)) +define(ey22, calc(ri*sea2)) +define(ey23, calc(ri*sea3)) +define(ey24, calc(ri*sea4)) +define(ey25, calc(ri*sea5)) +define(ey26, calc(ri*sea6)) +define(ey27, calc(ri*sea7)) + +define(ey30, calc(Rb*sea0)) +define(ey31, calc(Rb*sea1)) +define(ey32, calc(Rb*sea2)) +define(ey33, calc(Rb*sea3)) +define(ey34, calc(Rb*sea4)) +define(ey35, calc(Rb*sea5)) +define(ey36, calc(Rb*sea6)) +define(ey37, calc(Rb*sea7)) + +define(ey40, calc(R*sea0)) +define(ey41, calc(R*sea1)) +define(ey42, calc(R*sea2)) +define(ey43, calc(R*sea3)) +define(ey44, calc(R*sea4)) +define(ey45, calc(R*sea5)) +define(ey46, calc(R*sea6)) +define(ey47, calc(R*sea7)) + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +vertices +( + vert(0, 0, Zb) vlabel(r0b) + vert(0, 0, Zb) vlabel(r0sb) + vert(0, 1, Zb) vlabel(r1b) + vert(0, 2, Zb) vlabel(r2b) + vert(0, 2, Zb) vlabel(r2sb) + vert(0, 3, Zb) vlabel(r3b) + vert(0, 4, Zb) vlabel(r4b) + vert(0, 4, Zb) vlabel(r4sb) + vert(0, 5, Zb) vlabel(r5b) + vert(0, 6, Zb) vlabel(r6b) + vert(0, 6, Zb) vlabel(r6sb) + vert(0, 7, Zb) vlabel(r7b) + + vert(1, 0, Zb) vlabel(rb0b) + vert(1, 1, Zb) vlabel(rb1b) + vert(1, 2, Zb) vlabel(rb2b) + vert(1, 3, Zb) vlabel(rb3b) + vert(1, 4, Zb) vlabel(rb4b) + vert(1, 5, Zb) vlabel(rb5b) + vert(1, 6, Zb) vlabel(rb6b) + vert(1, 7, Zb) vlabel(rb7b) + + vert(2, 0, Zb) vlabel(ri0b) + vert(2, 1, Zb) vlabel(ri1b) + vert(2, 2, Zb) vlabel(ri2b) + vert(2, 3, Zb) vlabel(ri3b) + vert(2, 4, Zb) vlabel(ri4b) + vert(2, 5, Zb) vlabel(ri5b) + vert(2, 6, Zb) vlabel(ri6b) + vert(2, 7, Zb) vlabel(ri7b) + + vert(2, 0, Zb) vlabel(ris0b) + vert(2, 1, Zb) vlabel(ris1b) + vert(2, 2, Zb) vlabel(ris2b) + vert(2, 3, Zb) vlabel(ris3b) + vert(2, 4, Zb) vlabel(ris4b) + vert(2, 5, Zb) vlabel(ris5b) + vert(2, 6, Zb) vlabel(ris6b) + vert(2, 7, Zb) vlabel(ris7b) + + vert(3, 0, Zb) vlabel(Rb0b) + vert(3, 1, Zb) vlabel(Rb1b) + vert(3, 2, Zb) vlabel(Rb2b) + vert(3, 3, Zb) vlabel(Rb3b) + vert(3, 4, Zb) vlabel(Rb4b) + vert(3, 5, Zb) vlabel(Rb5b) + vert(3, 6, Zb) vlabel(Rb6b) + vert(3, 7, Zb) vlabel(Rb7b) + + vert(4, 0, Zb) vlabel(R0b) + vert(4, 1, Zb) vlabel(R1b) + vert(4, 1, Zb) vlabel(R1sb) + vert(4, 2, Zb) vlabel(R2b) + vert(4, 3, Zb) vlabel(R3b) + vert(4, 3, Zb) vlabel(R3sb) + vert(4, 4, Zb) vlabel(R4b) + vert(4, 5, Zb) vlabel(R5b) + vert(4, 5, Zb) vlabel(R5sb) + vert(4, 6, Zb) vlabel(R6b) + vert(4, 7, Zb) vlabel(R7b) + vert(4, 7, Zb) vlabel(R7sb) + + vert(0, 0, Zt) vlabel(r0t) + vert(0, 0, Zt) vlabel(r0st) + vert(0, 1, Zt) vlabel(r1t) + vert(0, 2, Zt) vlabel(r2t) + vert(0, 2, Zt) vlabel(r2st) + vert(0, 3, Zt) vlabel(r3t) + vert(0, 4, Zt) vlabel(r4t) + vert(0, 4, Zt) vlabel(r4st) + vert(0, 5, Zt) vlabel(r5t) + vert(0, 6, Zt) vlabel(r6t) + vert(0, 6, Zt) vlabel(r6st) + vert(0, 7, Zt) vlabel(r7t) + + vert(1, 0, Zt) vlabel(rb0t) + vert(1, 1, Zt) vlabel(rb1t) + vert(1, 2, Zt) vlabel(rb2t) + vert(1, 3, Zt) vlabel(rb3t) + vert(1, 4, Zt) vlabel(rb4t) + vert(1, 5, Zt) vlabel(rb5t) + vert(1, 6, Zt) vlabel(rb6t) + vert(1, 7, Zt) vlabel(rb7t) + + vert(2, 0, Zt) vlabel(ri0t) + vert(2, 1, Zt) vlabel(ri1t) + vert(2, 2, Zt) vlabel(ri2t) + vert(2, 3, Zt) vlabel(ri3t) + vert(2, 4, Zt) vlabel(ri4t) + vert(2, 5, Zt) vlabel(ri5t) + vert(2, 6, Zt) vlabel(ri6t) + vert(2, 7, Zt) vlabel(ri7t) + + vert(2, 0, Zt) vlabel(ris0t) + vert(2, 1, Zt) vlabel(ris1t) + vert(2, 2, Zt) vlabel(ris2t) + vert(2, 3, Zt) vlabel(ris3t) + vert(2, 4, Zt) vlabel(ris4t) + vert(2, 5, Zt) vlabel(ris5t) + vert(2, 6, Zt) vlabel(ris6t) + vert(2, 7, Zt) vlabel(ris7t) + + vert(3, 0, Zt) vlabel(Rb0t) + vert(3, 1, Zt) vlabel(Rb1t) + vert(3, 2, Zt) vlabel(Rb2t) + vert(3, 3, Zt) vlabel(Rb3t) + vert(3, 4, Zt) vlabel(Rb4t) + vert(3, 5, Zt) vlabel(Rb5t) + vert(3, 6, Zt) vlabel(Rb6t) + vert(3, 7, Zt) vlabel(Rb7t) + + vert(4, 0, Zt) vlabel(R0t) + vert(4, 1, Zt) vlabel(R1t) + vert(4, 1, Zt) vlabel(R1st) + vert(4, 2, Zt) vlabel(R2t) + vert(4, 3, Zt) vlabel(R3t) + vert(4, 3, Zt) vlabel(R3st) + vert(4, 4, Zt) vlabel(R4t) + vert(4, 5, Zt) vlabel(R5t) + vert(4, 5, Zt) vlabel(R5st) + vert(4, 6, Zt) vlabel(R6t) + vert(4, 7, Zt) vlabel(R7t) + vert(4, 7, Zt) vlabel(R7st) +); + +blocks +( + // block0 + hex2D(r0, r1, rb1, rb0) + rotor + (Na Nr Nz) + simpleGrading (1 1 1) + + // block1 + hex2D(r1, r2s, rb2, rb1) + rotor + (Na Nr Nz) + simpleGrading (1 1 1) + + // block2 + hex2D(r2, r3, rb3, rb2) + rotor + (Na Nr Nz) + simpleGrading (1 1 1) + + // block3 + hex2D(r3, r4s, rb4, rb3) + rotor + (Na Nr Nz) + simpleGrading (1 1 1) + + // block4 + hex2D(r4, r5, rb5, rb4) + rotor + (Na Nr Nz) + simpleGrading (1 1 1) + + // block5 + hex2D(r5, r6s, rb6, rb5) + rotor + (Na Nr Nz) + simpleGrading (1 1 1) + + // block6 + hex2D(r6, r7, rb7, rb6) + rotor + (Na Nr Nz) + simpleGrading (1 1 1) + + // block7 + hex2D(r7, r0s, rb0, rb7) + rotor + (Na Nr Nz) + simpleGrading (1 1 1) + + // block0 + hex2D(rb0, rb1, ri1, ri0) + rotor + (Na Ni Nz) + simpleGrading (1 1 1) + + // block1 + hex2D(rb1, rb2, ri2, ri1) + rotor + (Na Ni Nz) + simpleGrading (1 1 1) + + // block2 + hex2D(rb2, rb3, ri3, ri2) + rotor + (Na Ni Nz) + simpleGrading (1 1 1) + + // block3 + hex2D(rb3, rb4, ri4, ri3) + rotor + (Na Ni Nz) + simpleGrading (1 1 1) + + // block4 + hex2D(rb4, rb5, ri5, ri4) + rotor + (Na Ni Nz) + simpleGrading (1 1 1) + + // block5 + hex2D(rb5, rb6, ri6, ri5) + rotor + (Na Ni Nz) + simpleGrading (1 1 1) + + // block6 + hex2D(rb6, rb7, ri7, ri6) + rotor + (Na Ni Nz) + simpleGrading (1 1 1) + + // block7 + hex2D(rb7, rb0, ri0, ri7) + rotor + (Na Ni Nz) + simpleGrading (1 1 1) + + // block0 + hex2D(ris0, ris1, Rb1, Rb0) + (Na Ni Nz) + simpleGrading (1 1 1) + + // block1 + hex2D(ris1, ris2, Rb2, Rb1) + (Na Ni Nz) + simpleGrading (1 1 1) + + // block2 + hex2D(ris2, ris3, Rb3, Rb2) + (Na Ni Nz) + simpleGrading (1 1 1) + + // block3 + hex2D(ris3, ris4, Rb4, Rb3) + (Na Ni Nz) + simpleGrading (1 1 1) + + // block4 + hex2D(ris4, ris5, Rb5, Rb4) + (Na Ni Nz) + simpleGrading (1 1 1) + + // block5 + hex2D(ris5, ris6, Rb6, Rb5) + (Na Ni Nz) + simpleGrading (1 1 1) + + // block6 + hex2D(ris6, ris7, Rb7, Rb6) + (Na Ni Nz) + simpleGrading (1 1 1) + + // block7 + hex2D(ris7, ris0, Rb0, Rb7) + (Na Ni Nz) + simpleGrading (1 1 1) + + // block0 + hex2D(Rb0, Rb1, R1s, R0) + (Na NR Nz) + simpleGrading (1 1 1) + + // block1 + hex2D(Rb1, Rb2, R2, R1) + (Na NR Nz) + simpleGrading (1 1 1) + + // block2 + hex2D(Rb2, Rb3, R3s, R2) + (Na NR Nz) + simpleGrading (1 1 1) + + // block3 + hex2D(Rb3, Rb4, R4, R3) + (Na NR Nz) + simpleGrading (1 1 1) + + // block4 + hex2D(Rb4, Rb5, R5s, R4) + (Na NR Nz) + simpleGrading (1 1 1) + + // block5 + hex2D(Rb5, Rb6, R6, R5) + (Na NR Nz) + simpleGrading (1 1 1) + + // block6 + hex2D(Rb6, Rb7, R7s, R6) + (Na NR Nz) + simpleGrading (1 1 1) + + // block7 + hex2D(Rb7, Rb0, R0, R7) + (Na NR Nz) + simpleGrading (1 1 1) +); + +edges +( + arc r0b r1b evert(0, 0, Zb) + arc r1b r2sb evert(0, 1, Zb) + arc r2b r3b evert(0, 2, Zb) + arc r3b r4sb evert(0, 3, Zb) + arc r4b r5b evert(0, 4, Zb) + arc r5b r6sb evert(0, 5, Zb) + arc r6b r7b evert(0, 6, Zb) + arc r7b r0sb evert(0, 7, Zb) + + arc rb0b rb1b evert(1, 0, Zb) + arc rb1b rb2b evert(1, 1, Zb) + arc rb2b rb3b evert(1, 2, Zb) + arc rb3b rb4b evert(1, 3, Zb) + arc rb4b rb5b evert(1, 4, Zb) + arc rb5b rb6b evert(1, 5, Zb) + arc rb6b rb7b evert(1, 6, Zb) + arc rb7b rb0b evert(1, 7, Zb) + + arc ri0b ri1b evert(2, 0, Zb) + arc ri1b ri2b evert(2, 1, Zb) + arc ri2b ri3b evert(2, 2, Zb) + arc ri3b ri4b evert(2, 3, Zb) + arc ri4b ri5b evert(2, 4, Zb) + arc ri5b ri6b evert(2, 5, Zb) + arc ri6b ri7b evert(2, 6, Zb) + arc ri7b ri0b evert(2, 7, Zb) + + arc ris0b ris1b evert(2, 0, Zb) + arc ris1b ris2b evert(2, 1, Zb) + arc ris2b ris3b evert(2, 2, Zb) + arc ris3b ris4b evert(2, 3, Zb) + arc ris4b ris5b evert(2, 4, Zb) + arc ris5b ris6b evert(2, 5, Zb) + arc ris6b ris7b evert(2, 6, Zb) + arc ris7b ris0b evert(2, 7, Zb) + + arc Rb0b Rb1b evert(3, 0, Zb) + arc Rb1b Rb2b evert(3, 1, Zb) + arc Rb2b Rb3b evert(3, 2, Zb) + arc Rb3b Rb4b evert(3, 3, Zb) + arc Rb4b Rb5b evert(3, 4, Zb) + arc Rb5b Rb6b evert(3, 5, Zb) + arc Rb6b Rb7b evert(3, 6, Zb) + arc Rb7b Rb0b evert(3, 7, Zb) + + arc R0b R1sb evert(4, 0, Zb) + arc R1b R2b evert(4, 1, Zb) + arc R2b R3sb evert(4, 2, Zb) + arc R3b R4b evert(4, 3, Zb) + arc R4b R5sb evert(4, 4, Zb) + arc R5b R6b evert(4, 5, Zb) + arc R6b R7sb evert(4, 6, Zb) + arc R7b R0b evert(4, 7, Zb) + + arc r0t r1t evert(0, 0, Zt) + arc r1t r2st evert(0, 1, Zt) + arc r2t r3t evert(0, 2, Zt) + arc r3t r4st evert(0, 3, Zt) + arc r4t r5t evert(0, 4, Zt) + arc r5t r6st evert(0, 5, Zt) + arc r6t r7t evert(0, 6, Zt) + arc r7t r0st evert(0, 7, Zt) + + arc rb0t rb1t evert(1, 0, Zt) + arc rb1t rb2t evert(1, 1, Zt) + arc rb2t rb3t evert(1, 2, Zt) + arc rb3t rb4t evert(1, 3, Zt) + arc rb4t rb5t evert(1, 4, Zt) + arc rb5t rb6t evert(1, 5, Zt) + arc rb6t rb7t evert(1, 6, Zt) + arc rb7t rb0t evert(1, 7, Zt) + + arc ri0t ri1t evert(2, 0, Zt) + arc ri1t ri2t evert(2, 1, Zt) + arc ri2t ri3t evert(2, 2, Zt) + arc ri3t ri4t evert(2, 3, Zt) + arc ri4t ri5t evert(2, 4, Zt) + arc ri5t ri6t evert(2, 5, Zt) + arc ri6t ri7t evert(2, 6, Zt) + arc ri7t ri0t evert(2, 7, Zt) + + arc ris0t ris1t evert(2, 0, Zt) + arc ris1t ris2t evert(2, 1, Zt) + arc ris2t ris3t evert(2, 2, Zt) + arc ris3t ris4t evert(2, 3, Zt) + arc ris4t ris5t evert(2, 4, Zt) + arc ris5t ris6t evert(2, 5, Zt) + arc ris6t ris7t evert(2, 6, Zt) + arc ris7t ris0t evert(2, 7, Zt) + + arc Rb0t Rb1t evert(3, 0, Zt) + arc Rb1t Rb2t evert(3, 1, Zt) + arc Rb2t Rb3t evert(3, 2, Zt) + arc Rb3t Rb4t evert(3, 3, Zt) + arc Rb4t Rb5t evert(3, 4, Zt) + arc Rb5t Rb6t evert(3, 5, Zt) + arc Rb6t Rb7t evert(3, 6, Zt) + arc Rb7t Rb0t evert(3, 7, Zt) + + arc R0t R1st evert(4, 0, Zt) + arc R1t R2t evert(4, 1, Zt) + arc R2t R3st evert(4, 2, Zt) + arc R3t R4t evert(4, 3, Zt) + arc R4t R5st evert(4, 4, Zt) + arc R5t R6t evert(4, 5, Zt) + arc R6t R7st evert(4, 6, Zt) + arc R7t R0t evert(4, 7, Zt) +); + +boundary +( + rotor + { + type wall; + faces + ( + quad2D(r0, r1) + quad2D(r1, r2s) + quad2D(r2, r3) + quad2D(r3, r4s) + quad2D(r4, r5) + quad2D(r5, r6s) + quad2D(r6, r7) + quad2D(r7, r0s) + + quad2D(r0, rb0) + quad2D(r0s, rb0) + + quad2D(r2, rb2) + quad2D(r2s, rb2) + + quad2D(r4, rb4) + quad2D(r4s, rb4) + + quad2D(r6, rb6) + quad2D(r6s, rb6) + ); + } + + stator + { + type wall; + faces + ( + quad2D(R0, R1s) + quad2D(R1, R2) + quad2D(R2, R3s) + quad2D(R3, R4) + quad2D(R4, R5s) + quad2D(R5, R6) + quad2D(R6, R7s) + quad2D(R7, R0) + + quad2D(R1, Rb1) + quad2D(R1s, Rb1) + + quad2D(R3, Rb3) + quad2D(R3s, Rb3) + + quad2D(R5, Rb5) + quad2D(R5s, Rb5) + + quad2D(R7, Rb7) + quad2D(R7s, Rb7) + ); + } + + AMI1 + { + type cyclicAMI; + neighbourPatch AMI2; + ordering noOrdering; +/* optional + surface + { + type searchableCylinder; // none + point1 (0 0 -1); + point2 (0 0 1); + radius 0.5; + } +*/ + faces + ( + quad2D(ri1, ri0) + quad2D(ri2, ri1) + quad2D(ri3, ri2) + quad2D(ri4, ri3) + quad2D(ri5, ri4) + quad2D(ri6, ri5) + quad2D(ri7, ri6) + quad2D(ri0, ri7) + ); + } + + AMI2 + { + type cyclicAMI; + neighbourPatch AMI1; + ordering noOrdering; +/* optional + surface + { + type searchableCylinder; // none + point1 (0 0 -1); + point2 (0 0 1); + radius 0.5; + } +*/ + faces + ( + quad2D(ris1, ris0) + quad2D(ris2, ris1) + quad2D(ris3, ris2) + quad2D(ris4, ris3) + quad2D(ris5, ris4) + quad2D(ris6, ris5) + quad2D(ris7, ris6) + quad2D(ris0, ris7) + ); + } + + front + { + type empty; + faces + ( + frontQuad(r0, r1, rb1, rb0) + frontQuad(r1, r2s, rb2, rb1) + frontQuad(r2, r3, rb3, rb2) + frontQuad(r3, r4s, rb4, rb3) + frontQuad(r4, r5, rb5, rb4) + frontQuad(r5, r6s, rb6, rb5) + frontQuad(r6, r7, rb7, rb6) + frontQuad(r7, r0s, rb0, rb7) + frontQuad(rb0, rb1, ri1, ri0) + frontQuad(rb1, rb2, ri2, ri1) + frontQuad(rb2, rb3, ri3, ri2) + frontQuad(rb3, rb4, ri4, ri3) + frontQuad(rb4, rb5, ri5, ri4) + frontQuad(rb5, rb6, ri6, ri5) + frontQuad(rb6, rb7, ri7, ri6) + frontQuad(rb7, rb0, ri0, ri7) + frontQuad(ris0, ris1, Rb1, Rb0) + frontQuad(ris1, ris2, Rb2, Rb1) + frontQuad(ris2, ris3, Rb3, Rb2) + frontQuad(ris3, ris4, Rb4, Rb3) + frontQuad(ris4, ris5, Rb5, Rb4) + frontQuad(ris5, ris6, Rb6, Rb5) + frontQuad(ris6, ris7, Rb7, Rb6) + frontQuad(ris7, ris0, Rb0, Rb7) + frontQuad(Rb0, Rb1, R1s, R0) + frontQuad(Rb1, Rb2, R2, R1) + frontQuad(Rb2, Rb3, R3s, R2) + frontQuad(Rb3, Rb4, R4, R3) + frontQuad(Rb4, Rb5, R5s, R4) + frontQuad(Rb5, Rb6, R6, R5) + frontQuad(Rb6, Rb7, R7s, R6) + frontQuad(Rb7, Rb0, R0, R7) + ); + } + + back + { + type empty; + faces + ( + backQuad(r0, r1, rb1, rb0) + backQuad(r1, r2s, rb2, rb1) + backQuad(r2, r3, rb3, rb2) + backQuad(r3, r4s, rb4, rb3) + backQuad(r4, r5, rb5, rb4) + backQuad(r5, r6s, rb6, rb5) + backQuad(r6, r7, rb7, rb6) + backQuad(r7, r0s, rb0, rb7) + backQuad(rb0, rb1, ri1, ri0) + backQuad(rb1, rb2, ri2, ri1) + backQuad(rb2, rb3, ri3, ri2) + backQuad(rb3, rb4, ri4, ri3) + backQuad(rb4, rb5, ri5, ri4) + backQuad(rb5, rb6, ri6, ri5) + backQuad(rb6, rb7, ri7, ri6) + backQuad(rb7, rb0, ri0, ri7) + backQuad(ris0, ris1, Rb1, Rb0) + backQuad(ris1, ris2, Rb2, Rb1) + backQuad(ris2, ris3, Rb3, Rb2) + backQuad(ris3, ris4, Rb4, Rb3) + backQuad(ris4, ris5, Rb5, Rb4) + backQuad(ris5, ris6, Rb6, Rb5) + backQuad(ris6, ris7, Rb7, Rb6) + backQuad(ris7, ris0, Rb0, Rb7) + backQuad(Rb0, Rb1, R1s, R0) + backQuad(Rb1, Rb2, R2, R1) + backQuad(Rb2, Rb3, R3s, R2) + backQuad(Rb3, Rb4, R4, R3) + backQuad(Rb4, Rb5, R5s, R4) + backQuad(Rb5, Rb6, R6, R5) + backQuad(Rb6, Rb7, R7s, R6) + backQuad(Rb7, Rb0, R0, R7) + ); + } +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/system/controlDict b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/system/controlDict new file mode 100644 index 0000000000..bbe6713184 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/system/controlDict @@ -0,0 +1,59 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application multiphaseEulerFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 5; + +deltaT 1e-4; + +writeControl adjustableRunTime; + +writeInterval 0.1; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + +adjustTimeStep yes; + +maxCo 0.5; + +maxDeltaT 1; + +functions +{ + #includeFunc phaseMap +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/system/fvSchemes b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/system/fvSchemes new file mode 100644 index 0000000000..09e53669d0 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/system/fvSchemes @@ -0,0 +1,58 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ 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\(phir,alpha.*,alpha.*\)" Gauss vanLeer; + + "div\(alphaRhoPhi.*,U.*\)" Gauss limitedLinearV 1; + "div\(phi.*,U.*\)" Gauss limitedLinearV 1; + + "div\(alphaRhoPhi.*,(h|e).*\)" Gauss limitedLinear 1; + "div\(alphaRhoPhi.*,K.*\)" Gauss limitedLinear 1; + "div\(alphaPhi.*,p\)" Gauss limitedLinear 1; + + "div\(\(\(\(alpha.*\*thermo:rho.*\)*nuEff.*\)\*dev2\(T\(grad\(U.*\)\)\)\)\)" Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/system/fvSolution b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/system/fvSolution new file mode 100644 index 0000000000..8e05038646 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/system/fvSolution @@ -0,0 +1,96 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + "alpha.*" + { + nAlphaCorr 1; + nAlphaSubCycles 2; + } + + p_rgh + { + solver GAMG; + tolerance 1e-7; + relTol 0.01; + smoother GaussSeidel; + } + + p_rghFinal + { + solver PCG; + preconditioner + { + preconditioner GAMG; + tolerance 1e-7; + relTol 0; + nVcycles 2; + smoother GaussSeidel; + } + tolerance 1e-7; + relTol 0; + maxIter 30; + } + + "pcorr.*" + { + $p_rghFinal; + tolerance 1e-5; + relTol 0; + } + + "U.*" + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-5; + relTol 0; + minIter 1; + } + + "e.*" + { + solver smoothSolver; + smoother symGaussSeidel; + tolerance 1e-8; + relTol 0; + minIter 1; + maxIter 10; + } +} + +PIMPLE +{ + nOuterCorrectors 1; + nCorrectors 3; + nNonOrthogonalCorrectors 0; + + pRefCell 0; + pRefValue 0; +} + +relaxationFactors +{ + equations + { + ".*" 1; + } +} + + +// ************************************************************************* // diff --git a/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/system/topoSetDict b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/system/topoSetDict new file mode 100644 index 0000000000..f1f39e6588 --- /dev/null +++ b/tutorials/multiphase/multiphaseEulerFoam/laminar/mixerVesselAMI2D/system/topoSetDict @@ -0,0 +1,32 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | Website: https://openfoam.org + \\ / A nd | Version: dev + \\/ M anipulation | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object topoSetDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name rotor; + type cellSet; + action new; + source zoneToCell; + sourceInfo + { + name rotor; + } + } +); + +// ************************************************************************* //