mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
DyM solvers: correct Uf using phi after construction
This commit is contained in:
@ -91,10 +91,7 @@ K = 0.5*magSqr(U);
|
||||
{
|
||||
rhoUf = fvc::interpolate(rho*U);
|
||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||
rhoUf +=
|
||||
mesh.Sf()
|
||||
*(fvc::absolute(phi, rho, U) - (mesh.Sf() & rhoUf))
|
||||
/sqr(mesh.magSf());
|
||||
rhoUf += n*(fvc::absolute(phi, rho, U)/mesh.magSf() - (n & rhoUf));
|
||||
}
|
||||
|
||||
if (thermo.dpdt())
|
||||
|
||||
@ -107,10 +107,7 @@ K = 0.5*magSqr(U);
|
||||
{
|
||||
rhoUf = fvc::interpolate(rho*U);
|
||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||
rhoUf +=
|
||||
mesh.Sf()
|
||||
*(fvc::absolute(phi, rho, U) - (mesh.Sf() & rhoUf))
|
||||
/sqr(mesh.magSf());
|
||||
rhoUf += n*(fvc::absolute(phi, rho, U)/mesh.magSf() - (n & rhoUf));
|
||||
}
|
||||
|
||||
if (thermo.dpdt())
|
||||
|
||||
@ -42,8 +42,5 @@ U.correctBoundaryConditions();
|
||||
{
|
||||
rhoUf = fvc::interpolate(rho*U);
|
||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||
rhoUf +=
|
||||
mesh.Sf()
|
||||
*(fvc::absolute(phi, rho, U) - (mesh.Sf() & rhoUf))
|
||||
/sqr(mesh.magSf());
|
||||
rhoUf += n*(fvc::absolute(phi, rho, U)/mesh.magSf() - (n & rhoUf));
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ fvOptions.correct(U);
|
||||
{
|
||||
Uf = fvc::interpolate(U);
|
||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||
Uf += mesh.Sf()*(phi - (mesh.Sf() & Uf))/sqr(mesh.magSf());
|
||||
Uf += n*(phi/mesh.magSf() - (n & Uf));
|
||||
}
|
||||
|
||||
// Make the fluxes relative to the mesh motion
|
||||
|
||||
@ -93,10 +93,7 @@ K = 0.5*magSqr(U);
|
||||
{
|
||||
rhoUf = fvc::interpolate(rho*U);
|
||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||
rhoUf +=
|
||||
mesh.Sf()
|
||||
*(fvc::absolute(phi, rho, U) - (mesh.Sf() & rhoUf))
|
||||
/sqr(mesh.magSf());
|
||||
rhoUf += n*(fvc::absolute(phi, rho, U)/mesh.magSf() - (n & rhoUf));
|
||||
}
|
||||
|
||||
if (thermo.dpdt())
|
||||
|
||||
@ -85,6 +85,6 @@
|
||||
{
|
||||
Uf = fvc::interpolate(U);
|
||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||
Uf += mesh.Sf()*(phiv - (mesh.Sf() & Uf))/sqr(mesh.magSf());
|
||||
Uf += n*(phiv/mesh.magSf() - (n & Uf));
|
||||
}
|
||||
}
|
||||
|
||||
@ -114,7 +114,7 @@
|
||||
{
|
||||
Uf = fvc::interpolate(U);
|
||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||
Uf += mesh.Sf()*(phi - (mesh.Sf() & Uf))/sqr(mesh.magSf());
|
||||
Uf += n*(phi/mesh.magSf() - (n & Uf));
|
||||
}
|
||||
|
||||
// Make the fluxes relative to the mesh motion
|
||||
|
||||
@ -55,10 +55,10 @@ int main(int argc, char *argv[])
|
||||
pimpleControl pimple(mesh);
|
||||
|
||||
#include "createFields.H"
|
||||
#include "createUf.H"
|
||||
#include "readTimeControls.H"
|
||||
#include "createPrghCorrTypes.H"
|
||||
#include "correctPhi.H"
|
||||
#include "createUf.H"
|
||||
#include "CourantNo.H"
|
||||
#include "setInitialDeltaT.H"
|
||||
|
||||
|
||||
@ -67,7 +67,7 @@
|
||||
{
|
||||
Uf = fvc::interpolate(U);
|
||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||
Uf += mesh.Sf()*(phi - (mesh.Sf() & Uf))/sqr(mesh.magSf());
|
||||
Uf += n*(phi/mesh.magSf() - (n & Uf));
|
||||
}
|
||||
|
||||
// Make the fluxes relative to the mesh motion
|
||||
|
||||
@ -65,10 +65,10 @@ int main(int argc, char *argv[])
|
||||
pimpleControl pimple(mesh);
|
||||
|
||||
#include "createFields.H"
|
||||
#include "createUf.H"
|
||||
#include "readTimeControls.H"
|
||||
#include "createPcorrTypes.H"
|
||||
#include "../interFoam/interDyMFoam/correctPhi.H"
|
||||
#include "createUf.H"
|
||||
#include "CourantNo.H"
|
||||
#include "setInitialDeltaT.H"
|
||||
|
||||
|
||||
@ -68,7 +68,7 @@
|
||||
{
|
||||
Uf = fvc::interpolate(U);
|
||||
surfaceVectorField n(mesh.Sf()/mesh.magSf());
|
||||
Uf += mesh.Sf()*(phi - (mesh.Sf() & Uf))/sqr(mesh.magSf());
|
||||
Uf += n*(phi/mesh.magSf() - (n & Uf));
|
||||
}
|
||||
|
||||
// Make the fluxes relative to the mesh motion
|
||||
|
||||
Reference in New Issue
Block a user