MRF: Make flux relative following correctPhi

This fixes an incompatibility between MRF and adaptive mesh refinement
This commit is contained in:
Will Bainbridge
2024-05-07 12:43:39 +01:00
parent fb4d7abf42
commit cdef200385
4 changed files with 8 additions and 4 deletions

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation \\ / A nd | Copyright (C) 2022-2024 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -100,6 +100,7 @@ void Foam::solvers::VoFSolver::motionCorrector()
} }
// Make the fluxes relative to the mesh motion // Make the fluxes relative to the mesh motion
MRF.makeRelative(phi_);
fvc::makeRelative(phi_, U); fvc::makeRelative(phi_, U);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation \\ / A nd | Copyright (C) 2022-2024 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -67,6 +67,7 @@ void Foam::solvers::incompressibleFluid::motionCorrector()
); );
// Make the flux relative to the mesh motion // Make the flux relative to the mesh motion
MRF.makeRelative(phi_);
fvc::makeRelative(phi_, U); fvc::makeRelative(phi_, U);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2022-2023 OpenFOAM Foundation \\ / A nd | Copyright (C) 2022-2024 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -74,6 +74,7 @@ void Foam::solvers::isothermalFluid::motionCorrector()
); );
// Make the fluxes relative to the mesh-motion // Make the fluxes relative to the mesh-motion
MRF.makeRelative(phi_);
fvc::makeRelative(phi_, rho, U); fvc::makeRelative(phi_, rho, U);
} }

View File

@ -2,7 +2,7 @@
========= | ========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration | Website: https://openfoam.org \\ / O peration | Website: https://openfoam.org
\\ / A nd | Copyright (C) 2015-2023 OpenFOAM Foundation \\ / A nd | Copyright (C) 2015-2024 OpenFOAM Foundation
\\/ M anipulation | \\/ M anipulation |
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
License License
@ -814,6 +814,7 @@ void Foam::phaseSystem::correctPhi
} }
// Make the flux relative to the mesh motion // Make the flux relative to the mesh motion
MRF_.makeRelative(phi_);
fvc::makeRelative(phi_, movingPhases()[0].U()); fvc::makeRelative(phi_, movingPhases()[0].U());
setMixturePhi(alphafs, phi_); setMixturePhi(alphafs, phi_);