From e10a214c6b94a4e472fb8dcd9364e11c4682bce7 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Fri, 28 Feb 2020 17:06:24 +0000 Subject: [PATCH] buoyantPimpleFoam: Added correction of rhoUf and dpdt for moving meshes --- .../solvers/heatTransfer/buoyantPimpleFoam/pEqn.H | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H index ddfdc26ce9..7fbe21906f 100644 --- a/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H +++ b/applications/solvers/heatTransfer/buoyantPimpleFoam/pEqn.H @@ -93,7 +93,15 @@ if (pimple.simpleRho()) rho = thermo.rho(); } +// Correct rhoUf if the mesh is moving +fvc::correctRhoUf(rhoUf, rho, U, phi); + if (thermo.dpdt()) { dpdt = fvc::ddt(p); + + if (mesh.moving()) + { + dpdt -= fvc::div(fvc::meshPhi(rho, U), p); + } }