diff --git a/applications/solvers/modules/VoFSolver/VoFSolver.C b/applications/solvers/modules/VoFSolver/VoFSolver.C index fcdf95f9f8..90a101e220 100644 --- a/applications/solvers/modules/VoFSolver/VoFSolver.C +++ b/applications/solvers/modules/VoFSolver/VoFSolver.C @@ -88,8 +88,8 @@ Foam::solvers::VoFSolver::VoFSolver : fluidSolver(mesh), - mixture_(mixturePtr), - mixture(mixture_()), + mixturePtr_(mixturePtr), + mixture_(mixturePtr_()), divAlphaName("div(phi,alpha)"), @@ -106,7 +106,7 @@ Foam::solvers::VoFSolver::VoFSolver mesh ), - phi + phi_ ( IOobject ( @@ -123,7 +123,7 @@ Foam::solvers::VoFSolver::VoFSolver p_rgh(buoyancy.p_rgh), - rho(mixture.rho()), + rho(mixture_.rho()), rhoPhi ( @@ -140,7 +140,9 @@ Foam::solvers::VoFSolver::VoFSolver MRF(mesh), - U(U_) + mixture(mixture_), + U(U_), + phi(phi_) { mesh.schemes().setFluxRequired(p_rgh.name()); diff --git a/applications/solvers/modules/VoFSolver/VoFSolver.H b/applications/solvers/modules/VoFSolver/VoFSolver.H index 8bad78daf8..46b1f4441d 100644 --- a/applications/solvers/modules/VoFSolver/VoFSolver.H +++ b/applications/solvers/modules/VoFSolver/VoFSolver.H @@ -78,9 +78,9 @@ protected: // Phase properties //- The compressible two-phase mixture - autoPtr mixture_; + autoPtr mixturePtr_; - VoFMixture& mixture; + VoFMixture& mixture_; //- Name of the alpha convection scheme const word divAlphaName; @@ -95,7 +95,7 @@ protected: volVectorField U_; //- Volumetric flux field - surfaceScalarField phi; + surfaceScalarField phi_; // Thermophysical properties @@ -201,13 +201,17 @@ protected: public: - // Access to the physical state + // Public Data - //- Velocity field + //- Reference to the VoF mixture + const VoFMixture& mixture; + + //- Reference to the velocity field const volVectorField& U; + //- Reference to the mass-flux field + const surfaceScalarField& phi; -public: //- Runtime type information TypeName("VoFSolver"); diff --git a/applications/solvers/modules/VoFSolver/moveMesh.C b/applications/solvers/modules/VoFSolver/moveMesh.C index 0d3e7beb8e..ec26ac7b07 100644 --- a/applications/solvers/modules/VoFSolver/moveMesh.C +++ b/applications/solvers/modules/VoFSolver/moveMesh.C @@ -62,15 +62,15 @@ void Foam::solvers::VoFSolver::moveMesh() { // Calculate absolute flux // from the mapped surface velocity - phi = mesh.Sf() & Uf(); + phi_ = mesh.Sf() & Uf(); - correctUphiBCs(U_, phi, true); + correctUphiBCs(U_, phi_, true); if (incompressible()) { fv::correctPhi ( - phi, + phi_, U, p_rgh, rAU, @@ -83,7 +83,7 @@ void Foam::solvers::VoFSolver::moveMesh() { fv::correctPhi ( - phi, + phi_, p_rgh, psiByRho(), rAU, @@ -93,7 +93,7 @@ void Foam::solvers::VoFSolver::moveMesh() } // Make the fluxes relative to the mesh motion - fvc::makeRelative(phi, U); + fvc::makeRelative(phi_, U); } meshCourantNo(); diff --git a/applications/solvers/modules/compressibleMultiphaseVoF/pressureCorrector.C b/applications/solvers/modules/compressibleMultiphaseVoF/pressureCorrector.C index 6c58ce6a00..d928824c18 100644 --- a/applications/solvers/modules/compressibleMultiphaseVoF/pressureCorrector.C +++ b/applications/solvers/modules/compressibleMultiphaseVoF/pressureCorrector.C @@ -42,6 +42,7 @@ License void Foam::solvers::compressibleMultiphaseVoF::pressureCorrector() { volVectorField& U = U_; + surfaceScalarField& phi(phi_); fvVectorMatrix& UEqn = tUEqn.ref(); setrAU(UEqn); diff --git a/applications/solvers/modules/compressibleVoF/pressureCorrector.C b/applications/solvers/modules/compressibleVoF/pressureCorrector.C index 476384d17c..18289f08ae 100644 --- a/applications/solvers/modules/compressibleVoF/pressureCorrector.C +++ b/applications/solvers/modules/compressibleVoF/pressureCorrector.C @@ -41,6 +41,7 @@ License void Foam::solvers::compressibleVoF::pressureCorrector() { volVectorField& U = U_; + surfaceScalarField& phi(phi_); const volScalarField& rho1 = mixture.rho1(); const volScalarField& rho2 = mixture.rho2(); diff --git a/applications/solvers/modules/incompressibleMultiphaseVoF/incompressibleMultiphaseVoF.C b/applications/solvers/modules/incompressibleMultiphaseVoF/incompressibleMultiphaseVoF.C index 90de88f01e..f82cd6c066 100644 --- a/applications/solvers/modules/incompressibleMultiphaseVoF/incompressibleMultiphaseVoF.C +++ b/applications/solvers/modules/incompressibleMultiphaseVoF/incompressibleMultiphaseVoF.C @@ -121,11 +121,11 @@ Foam::solvers::incompressibleMultiphaseVoF::incompressibleMultiphaseVoF if (!runTime.restart() || !divergent()) { - correctUphiBCs(U_, phi, true); + correctUphiBCs(U_, phi_, true); fv::correctPhi ( - phi, + phi_, U, p_rgh, rAU, diff --git a/applications/solvers/modules/incompressibleMultiphaseVoF/pressureCorrector.C b/applications/solvers/modules/incompressibleMultiphaseVoF/pressureCorrector.C index d8bfc27227..afa9be527e 100644 --- a/applications/solvers/modules/incompressibleMultiphaseVoF/pressureCorrector.C +++ b/applications/solvers/modules/incompressibleMultiphaseVoF/pressureCorrector.C @@ -41,6 +41,7 @@ License void Foam::solvers::incompressibleMultiphaseVoF::pressureCorrector() { volVectorField& U = U_; + surfaceScalarField& phi(phi_); fvVectorMatrix& UEqn = tUEqn.ref(); setrAU(UEqn); diff --git a/applications/solvers/modules/incompressibleVoF/incompressibleVoF.C b/applications/solvers/modules/incompressibleVoF/incompressibleVoF.C index ee64ee2091..aedd8ad85e 100644 --- a/applications/solvers/modules/incompressibleVoF/incompressibleVoF.C +++ b/applications/solvers/modules/incompressibleVoF/incompressibleVoF.C @@ -106,11 +106,11 @@ Foam::solvers::incompressibleVoF::incompressibleVoF(fvMesh& mesh) if (!runTime.restart() || !divergent()) { - correctUphiBCs(U_, phi, true); + correctUphiBCs(U_, phi_, true); fv::correctPhi ( - phi, + phi_, U, p_rgh, rAU, diff --git a/applications/solvers/modules/incompressibleVoF/pressureCorrector.C b/applications/solvers/modules/incompressibleVoF/pressureCorrector.C index 29f0c3bbe6..ff6b9b2fd5 100644 --- a/applications/solvers/modules/incompressibleVoF/pressureCorrector.C +++ b/applications/solvers/modules/incompressibleVoF/pressureCorrector.C @@ -41,6 +41,7 @@ License void Foam::solvers::incompressibleVoF::pressureCorrector() { volVectorField& U = U_; + surfaceScalarField& phi(phi_); fvVectorMatrix& UEqn = tUEqn.ref(); setrAU(UEqn); diff --git a/applications/solvers/modules/multiphaseEuler/multiphaseEuler/cellPressureCorrector.C b/applications/solvers/modules/multiphaseEuler/multiphaseEuler/cellPressureCorrector.C index c72c82c678..5f6a11137d 100644 --- a/applications/solvers/modules/multiphaseEuler/multiphaseEuler/cellPressureCorrector.C +++ b/applications/solvers/modules/multiphaseEuler/multiphaseEuler/cellPressureCorrector.C @@ -43,6 +43,8 @@ License void Foam::solvers::multiphaseEuler::cellPressureCorrector() { + volScalarField& p(p_); + // Face volume fractions PtrList alphafs(phases.size()); forAll(phases, phasei) @@ -132,7 +134,7 @@ void Foam::solvers::multiphaseEuler::cellPressureCorrector() p_rgh = p - rho*buoyancy.gh; // Correct fixed-flux BCs to be consistent with the velocity BCs - fluid.correctBoundaryFlux(); + fluid_.correctBoundaryFlux(); // Combined buoyancy and force fluxes PtrList phigFs(phases.size()); @@ -334,13 +336,13 @@ void Foam::solvers::multiphaseEuler::cellPressureCorrector() // Correct fluxes and velocities on last non-orthogonal iteration if (pimple.finalNonOrthogonalIter()) { - phi = phiHbyA + pEqnIncomp.flux(); + phi_ = phiHbyA + pEqnIncomp.flux(); surfaceScalarField mSfGradp("mSfGradp", pEqnIncomp.flux()/rAUf); forAll(fluid.movingPhases(), movingPhasei) { - phaseModel& phase = fluid.movingPhases()[movingPhasei]; + phaseModel& phase = fluid_.movingPhases()[movingPhasei]; phase.phiRef() = phiHbyAs[phase.index()] @@ -359,7 +361,7 @@ void Foam::solvers::multiphaseEuler::cellPressureCorrector() { forAll(fluid.movingPhases(), movingPhasei) { - phaseModel& phase = fluid.movingPhases()[movingPhasei]; + phaseModel& phase = fluid_.movingPhases()[movingPhasei]; const label phasei = phase.index(); phase.URef() = @@ -379,7 +381,7 @@ void Foam::solvers::multiphaseEuler::cellPressureCorrector() forAll(fluid.movingPhases(), movingPhasei) { - phaseModel& phase = fluid.movingPhases()[movingPhasei]; + phaseModel& phase = fluid_.movingPhases()[movingPhasei]; const label phasei = phase.index(); phase.URef() = @@ -395,7 +397,7 @@ void Foam::solvers::multiphaseEuler::cellPressureCorrector() if (partialElimination) { - fluid.partialElimination + fluid_.partialElimination ( rAUs, KdUs, @@ -408,7 +410,7 @@ void Foam::solvers::multiphaseEuler::cellPressureCorrector() { forAll(fluid.movingPhases(), movingPhasei) { - phaseModel& phase = fluid.movingPhases()[movingPhasei]; + phaseModel& phase = fluid_.movingPhases()[movingPhasei]; MRF.makeRelative(phase.phiRef()); fvc::makeRelative(phase.phiRef(), phase.U()); @@ -417,7 +419,7 @@ void Foam::solvers::multiphaseEuler::cellPressureCorrector() forAll(fluid.movingPhases(), movingPhasei) { - phaseModel& phase = fluid.movingPhases()[movingPhasei]; + phaseModel& phase = fluid_.movingPhases()[movingPhasei]; phase.URef().correctBoundaryConditions(); phase.correctUf(); @@ -427,8 +429,8 @@ void Foam::solvers::multiphaseEuler::cellPressureCorrector() } // Update and limit the static pressure - p = p_rgh + rho*buoyancy.gh; - fvConstraints().constrain(p); + p_ = p_rgh + rho*buoyancy.gh; + fvConstraints().constrain(p_); // Account for static pressure reference if (p_rgh.needReference() && fluid.incompressible()) @@ -448,7 +450,7 @@ void Foam::solvers::multiphaseEuler::cellPressureCorrector() // Update densities from change in p_rgh forAll(phases, phasei) { - phaseModel& phase = phases[phasei]; + phaseModel& phase = phases_[phasei]; phase.thermoRef().rho() += phase.thermo().psi()*(p_rgh - p_rgh_0); } diff --git a/applications/solvers/modules/multiphaseEuler/multiphaseEuler/compressibilityEqns.C b/applications/solvers/modules/multiphaseEuler/multiphaseEuler/compressibilityEqns.C index 68e730ed63..9a20630746 100644 --- a/applications/solvers/modules/multiphaseEuler/multiphaseEuler/compressibilityEqns.C +++ b/applications/solvers/modules/multiphaseEuler/multiphaseEuler/compressibilityEqns.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -42,9 +42,9 @@ Foam::solvers::multiphaseEuler::compressibilityEqns { PtrList pEqnComps(phases.size()); - forAll(phases, phasei) + forAll(phases_, phasei) { - phaseModel& phase = phases[phasei]; + phaseModel& phase = phases_[phasei]; const volScalarField& alpha = phase; volScalarField& rho = phase.thermoRef().rho(); diff --git a/applications/solvers/modules/multiphaseEuler/multiphaseEuler/facePressureCorrector.C b/applications/solvers/modules/multiphaseEuler/multiphaseEuler/facePressureCorrector.C index 8067a4eca3..e70bb9c816 100644 --- a/applications/solvers/modules/multiphaseEuler/multiphaseEuler/facePressureCorrector.C +++ b/applications/solvers/modules/multiphaseEuler/multiphaseEuler/facePressureCorrector.C @@ -43,12 +43,14 @@ License void Foam::solvers::multiphaseEuler::facePressureCorrector() { + volScalarField& p(p_); + // Face volume fractions PtrList alphafs(phases.size()); PtrList alphaRho0fs(phases.size()); forAll(phases, phasei) { - phaseModel& phase = phases[phasei]; + const phaseModel& phase = phases[phasei]; const volScalarField& alpha = phase; alphafs.set(phasei, fvc::interpolate(alpha).ptr()); @@ -75,7 +77,7 @@ void Foam::solvers::multiphaseEuler::facePressureCorrector() forAll(fluid.movingPhases(), movingPhasei) { - phaseModel& phase = fluid.movingPhases()[movingPhasei]; + const phaseModel& phase = fluid.movingPhases()[movingPhasei]; rAUfs.set ( @@ -99,7 +101,7 @@ void Foam::solvers::multiphaseEuler::facePressureCorrector() PtrList alpharAUfs(phases.size()); forAll(phases, phasei) { - phaseModel& phase = phases[phasei]; + const phaseModel& phase = phases[phasei]; alpharAUfs.set ( phase.index(), @@ -126,7 +128,7 @@ void Foam::solvers::multiphaseEuler::facePressureCorrector() p_rgh = p - rho*buoyancy.gh; // Correct fixed-flux BCs to be consistent with the velocity BCs - fluid.correctBoundaryFlux(); + fluid_.correctBoundaryFlux(); // Combined buoyancy and force fluxes PtrList phigFs(phases.size()); @@ -139,7 +141,7 @@ void Foam::solvers::multiphaseEuler::facePressureCorrector() forAll(phases, phasei) { - phaseModel& phase = phases[phasei]; + const phaseModel& phase = phases[phasei]; phigFs.set ( @@ -166,7 +168,7 @@ void Foam::solvers::multiphaseEuler::facePressureCorrector() PtrList phiHbyAs(phases.size()); forAll(fluid.movingPhases(), movingPhasei) { - phaseModel& phase = fluid.movingPhases()[movingPhasei]; + const phaseModel& phase = fluid.movingPhases()[movingPhasei]; phiHbyAs.set ( @@ -257,7 +259,7 @@ void Foam::solvers::multiphaseEuler::facePressureCorrector() forAll(phases, phasei) { - phaseModel& phase = phases[phasei]; + const phaseModel& phase = phases[phasei]; phib += alphafs[phasei].boundaryField() *phase.phi()().boundaryField(); @@ -312,13 +314,13 @@ void Foam::solvers::multiphaseEuler::facePressureCorrector() // Correct fluxes and velocities on last non-orthogonal iteration if (pimple.finalNonOrthogonalIter()) { - phi = phiHbyA + pEqnIncomp.flux(); + phi_ = phiHbyA + pEqnIncomp.flux(); surfaceScalarField mSfGradp("mSfGradp", pEqnIncomp.flux()/rAUf); forAll(fluid.movingPhases(), movingPhasei) { - phaseModel& phase = fluid.movingPhases()[movingPhasei]; + phaseModel& phase = fluid_.movingPhases()[movingPhasei]; phase.phiRef() = phiHbyAs[phase.index()] @@ -330,13 +332,13 @@ void Foam::solvers::multiphaseEuler::facePressureCorrector() if (partialElimination) { - fluid.partialEliminationf(rAUfs, alphafs, KdPhifs); + fluid_.partialEliminationf(rAUfs, alphafs, KdPhifs); } else { forAll(fluid.movingPhases(), movingPhasei) { - phaseModel& phase = fluid.movingPhases()[movingPhasei]; + phaseModel& phase = fluid_.movingPhases()[movingPhasei]; MRF.makeRelative(phase.phiRef()); fvc::makeRelative(phase.phiRef(), phase.U()); @@ -345,7 +347,7 @@ void Foam::solvers::multiphaseEuler::facePressureCorrector() forAll(fluid.movingPhases(), movingPhasei) { - phaseModel& phase = fluid.movingPhases()[movingPhasei]; + phaseModel& phase = fluid_.movingPhases()[movingPhasei]; phase.URef() = fvc::reconstruct ( @@ -381,7 +383,7 @@ void Foam::solvers::multiphaseEuler::facePressureCorrector() // Update densities from change in p_rgh forAll(phases, phasei) { - phaseModel& phase = phases[phasei]; + phaseModel& phase = phases_[phasei]; phase.thermoRef().rho() += phase.thermo().psi()*(p_rgh - p_rgh_0); } diff --git a/applications/solvers/modules/multiphaseEuler/multiphaseEuler/momentumPredictor.C b/applications/solvers/modules/multiphaseEuler/multiphaseEuler/momentumPredictor.C index a59e1b47f3..c7deefbb46 100644 --- a/applications/solvers/modules/multiphaseEuler/multiphaseEuler/momentumPredictor.C +++ b/applications/solvers/modules/multiphaseEuler/multiphaseEuler/momentumPredictor.C @@ -32,6 +32,8 @@ void Foam::solvers::multiphaseEuler::cellMomentumPredictor() { Info<< "Constructing momentum equations" << endl; + phaseSystem& fluid(fluid_); + autoPtr momentumTransferPtr(fluid.momentumTransfer()); @@ -73,6 +75,8 @@ void Foam::solvers::multiphaseEuler::faceMomentumPredictor() { Info<< "Constructing face momentum equations" << endl; + phaseSystem& fluid(fluid_); + autoPtr momentumTransferPtr(fluid.momentumTransferf()); diff --git a/applications/solvers/modules/multiphaseEuler/multiphaseEuler/moveMesh.C b/applications/solvers/modules/multiphaseEuler/multiphaseEuler/moveMesh.C index 589c276d7e..0919b28e94 100644 --- a/applications/solvers/modules/multiphaseEuler/multiphaseEuler/moveMesh.C +++ b/applications/solvers/modules/multiphaseEuler/multiphaseEuler/moveMesh.C @@ -64,9 +64,9 @@ void Foam::solvers::multiphaseEuler::moveMesh() if (correctPhi || mesh.topoChanged()) { - fluid.meshUpdate(); + fluid_.meshUpdate(); - fluid.correctPhi + fluid_.correctPhi ( p_rgh, divU, diff --git a/applications/solvers/modules/multiphaseEuler/multiphaseEuler/multiphaseEuler.C b/applications/solvers/modules/multiphaseEuler/multiphaseEuler/multiphaseEuler.C index 1b1e0fb408..47327d6486 100644 --- a/applications/solvers/modules/multiphaseEuler/multiphaseEuler/multiphaseEuler.C +++ b/applications/solvers/modules/multiphaseEuler/multiphaseEuler/multiphaseEuler.C @@ -156,27 +156,32 @@ Foam::solvers::multiphaseEuler::multiphaseEuler(fvMesh& mesh) buoyancy(mesh), - fluidPtr(phaseSystem::New(mesh)), + fluidPtr_(phaseSystem::New(mesh)), - fluid(fluidPtr()), + fluid_(fluidPtr_()), - phases(fluid.phases()), + phases_(fluid_.phases()), - phi(fluid.phi()), + phi_(fluid_.phi()), - p(phases[0].thermoRef().p()), + p_(phases_[0].thermoRef().p()), p_rgh(buoyancy.p_rgh), pressureReference ( - p, + p_, p_rgh, pimple.dict(), - fluid.incompressible() + fluid_.incompressible() ), - MRF(fluid.MRF()) + MRF(fluid_.MRF()), + + fluid(fluid_), + phases(phases_), + p(p_), + phi(phi_) { // Read the controls readControls(); @@ -244,14 +249,14 @@ void Foam::solvers::multiphaseEuler::prePredictor() if (pimple.thermophysics() || pimple.flow()) { - fluid.solve(rAUs, rAUfs); - fluid.correct(); - fluid.correctContinuityError(); + fluid_.solve(rAUs, rAUfs); + fluid_.correct(); + fluid_.correctContinuityError(); } if (pimple.flow() && pimple.predictTransport()) { - fluid.predictMomentumTransport(); + fluid_.predictMomentumTransport(); } } @@ -260,8 +265,8 @@ void Foam::solvers::multiphaseEuler::postCorrector() { if (pimple.flow() && pimple.correctTransport()) { - fluid.correctMomentumTransport(); - fluid.correctThermophysicalTransport(); + fluid_.correctMomentumTransport(); + fluid_.correctThermophysicalTransport(); } } diff --git a/applications/solvers/modules/multiphaseEuler/multiphaseEuler/multiphaseEuler.H b/applications/solvers/modules/multiphaseEuler/multiphaseEuler/multiphaseEuler.H index ea857b582e..1bed6ce246 100644 --- a/applications/solvers/modules/multiphaseEuler/multiphaseEuler/multiphaseEuler.H +++ b/applications/solvers/modules/multiphaseEuler/multiphaseEuler/multiphaseEuler.H @@ -107,18 +107,18 @@ protected: // Phase properties - autoPtr fluidPtr; + autoPtr fluidPtr_; - phaseSystem& fluid; + phaseSystem& fluid_; - phaseSystem::phaseModelList& phases; + phaseSystem::phaseModelList& phases_; - surfaceScalarField& phi; + surfaceScalarField& phi_; // Thermophysical properties - volScalarField& p; + volScalarField& p_; //- Reference to the buoyant pressure for buoyant cases // otherwise to the pressure @@ -198,6 +198,21 @@ private: public: + // Public Data + + //- Reference to the multiphase fluid + const phaseSystem& fluid; + + //- Reference to the phases + const phaseSystem::phaseModelList& phases; + + //- Reference to the pressure field + const volScalarField& p; + + //- Reference to the mass-flux field + const surfaceScalarField& phi; + + //- Runtime type information TypeName("multiphaseEuler"); diff --git a/applications/solvers/modules/multiphaseEuler/multiphaseEuler/pressureCorrector.C b/applications/solvers/modules/multiphaseEuler/multiphaseEuler/pressureCorrector.C index 71ac2fe2f1..50b7c5fad0 100644 --- a/applications/solvers/modules/multiphaseEuler/multiphaseEuler/pressureCorrector.C +++ b/applications/solvers/modules/multiphaseEuler/multiphaseEuler/pressureCorrector.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2022 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -40,7 +40,7 @@ void Foam::solvers::multiphaseEuler::pressureCorrector() cellPressureCorrector(); } - fluid.correctKinematics(); + fluid_.correctKinematics(); } else { @@ -49,9 +49,9 @@ void Foam::solvers::multiphaseEuler::pressureCorrector() compressibilityEqns(fluid.dmdts(), fluid.d2mdtdps()) ); - forAll(phases, phasei) + forAll(phases_, phasei) { - phases[phasei].divU(-pEqnComps[phasei] & p_rgh); + phases_[phasei].divU(-pEqnComps[phasei] & p_rgh); } } } diff --git a/applications/solvers/modules/multiphaseEuler/multiphaseEuler/thermophysicalPredictor.C b/applications/solvers/modules/multiphaseEuler/multiphaseEuler/thermophysicalPredictor.C index 0389c451de..16596a8770 100644 --- a/applications/solvers/modules/multiphaseEuler/multiphaseEuler/thermophysicalPredictor.C +++ b/applications/solvers/modules/multiphaseEuler/multiphaseEuler/thermophysicalPredictor.C @@ -41,11 +41,11 @@ void Foam::solvers::multiphaseEuler::compositionPredictor() phaseSystem::specieTransferTable& specieTransfer(specieTransferPtr()); - fluid.correctReactions(); + fluid_.correctReactions(); forAll(fluid.multicomponentPhases(), multicomponentPhasei) { - phaseModel& phase = fluid.multicomponentPhases()[multicomponentPhasei]; + phaseModel& phase = fluid_.multicomponentPhases()[multicomponentPhasei]; UPtrList& Y = phase.YActiveRef(); const volScalarField& alpha = phase; @@ -68,7 +68,7 @@ void Foam::solvers::multiphaseEuler::compositionPredictor() } } - fluid.correctSpecies(); + fluid_.correctSpecies(); } @@ -81,7 +81,7 @@ void Foam::solvers::multiphaseEuler::energyPredictor() forAll(fluid.anisothermalPhases(), anisothermalPhasei) { - phaseModel& phase = fluid.anisothermalPhases()[anisothermalPhasei]; + phaseModel& phase = fluid_.anisothermalPhases()[anisothermalPhasei]; const volScalarField& alpha = phase; tmp tRho = phase.rho(); @@ -104,8 +104,8 @@ void Foam::solvers::multiphaseEuler::energyPredictor() fvConstraints().constrain(phase.thermoRef().he()); } - fluid.correctThermo(); - fluid.correctContinuityError(); + fluid_.correctThermo(); + fluid_.correctContinuityError(); } @@ -117,13 +117,13 @@ void Foam::solvers::multiphaseEuler::thermophysicalPredictor() { for (int Ecorr=0; Ecorr::KdVmfs() const template Foam::PtrList -Foam::MomentumTransferPhaseSystem::Fs() +Foam::MomentumTransferPhaseSystem::Fs() const { PtrList Fs(this->phaseModels_.size()); @@ -659,7 +659,7 @@ Foam::MomentumTransferPhaseSystem::Fs() template Foam::PtrList -Foam::MomentumTransferPhaseSystem::Ffs() +Foam::MomentumTransferPhaseSystem::Ffs() const { PtrList Ffs(this->phaseModels_.size()); diff --git a/applications/solvers/modules/multiphaseEuler/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.H b/applications/solvers/modules/multiphaseEuler/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.H index 648fd21c89..e33b5854d6 100644 --- a/applications/solvers/modules/multiphaseEuler/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.H +++ b/applications/solvers/modules/multiphaseEuler/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.H @@ -200,10 +200,10 @@ public: // do not depend on phase mass/volume fluxes, and can therefore be // evaluated outside the corrector loop. This includes things like // lift, turbulent dispersion, and wall lubrication. - virtual PtrList Fs(); + virtual PtrList Fs() const; //- As Fs, but for the face-based algorithm - virtual PtrList Ffs(); + virtual PtrList Ffs() const; //- Return the explicit drag force fluxes for the cell-based algorithm. // These depend on phase mass/volume fluxes, and must therefore be diff --git a/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseSystem/phaseSystem.H b/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseSystem/phaseSystem.H index 14406766fd..dc3ac0bf39 100644 --- a/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseSystem/phaseSystem.H +++ b/applications/solvers/modules/multiphaseEuler/phaseSystems/phaseSystem/phaseSystem.H @@ -526,10 +526,10 @@ public: virtual PtrList KdVmfs() const = 0; //- Return the force fluxes for the cell-based algorithm - virtual PtrList Fs() = 0; + virtual PtrList Fs() const = 0; //- Return the force fluxes for the face-based algorithm - virtual PtrList Ffs() = 0; + virtual PtrList Ffs() const = 0; //- Return the force fluxes for the cell-based algorithm virtual PtrList KdPhis() const = 0; diff --git a/applications/solvers/modules/multiphaseVoFSolver/multiphaseVoFSolver.C b/applications/solvers/modules/multiphaseVoFSolver/multiphaseVoFSolver.C index 6abce0c831..db22e23815 100644 --- a/applications/solvers/modules/multiphaseVoFSolver/multiphaseVoFSolver.C +++ b/applications/solvers/modules/multiphaseVoFSolver/multiphaseVoFSolver.C @@ -83,7 +83,7 @@ Foam::solvers::multiphaseVoFSolver::multiphaseVoFSolver : VoFSolver(mesh, autoPtr(mixturePtr.ptr())), - mixture(refCast(VoFSolver::mixture)), + mixture(refCast(VoFSolver::mixture_)), phases(mixture.phases()) { diff --git a/applications/solvers/modules/twoPhaseVoFSolver/twoPhaseVoFSolver.C b/applications/solvers/modules/twoPhaseVoFSolver/twoPhaseVoFSolver.C index 69f0bd7461..102779b007 100644 --- a/applications/solvers/modules/twoPhaseVoFSolver/twoPhaseVoFSolver.C +++ b/applications/solvers/modules/twoPhaseVoFSolver/twoPhaseVoFSolver.C @@ -85,7 +85,7 @@ Foam::solvers::twoPhaseVoFSolver::twoPhaseVoFSolver : VoFSolver(mesh, autoPtr(mixturePtr.ptr())), - mixture(refCast(VoFSolver::mixture)), + mixture(refCast(VoFSolver::mixture_)), alpha1(mixture.alpha1()), alpha2(mixture.alpha2()),