From bb65911c45cb3f9d0a937bf539794dd887de9cd7 Mon Sep 17 00:00:00 2001 From: henry Date: Wed, 18 Nov 2009 23:10:26 +0000 Subject: [PATCH] Added a correction to the boundary velocity and flux to make them consistent with the boundary motion before the fluxes are corrected for continuity by pcorr. --- .../incompressible/pimpleDyMFoam/correctPhi.H | 22 +++++++++++++++++++ .../compressibleInterDyMFoam/correctPhi.H | 22 +++++++++++++++++++ .../multiphase/interDyMFoam/correctPhi.H | 22 +++++++++++++++++++ 3 files changed, 66 insertions(+) diff --git a/applications/solvers/incompressible/pimpleDyMFoam/correctPhi.H b/applications/solvers/incompressible/pimpleDyMFoam/correctPhi.H index 023ecc6d5a..394b1cbd3e 100644 --- a/applications/solvers/incompressible/pimpleDyMFoam/correctPhi.H +++ b/applications/solvers/incompressible/pimpleDyMFoam/correctPhi.H @@ -1,4 +1,26 @@ { + if (mesh.changing()) + { + forAll(U.boundaryField(), patchi) + { + if (U.boundaryField()[patchi].fixesValue()) + { + U.boundaryField()[patchi].initEvaluate(); + } + } + + forAll(U.boundaryField(), patchi) + { + if (U.boundaryField()[patchi].fixesValue()) + { + U.boundaryField()[patchi].evaluate(); + + phi.boundaryField()[patchi] = + U.boundaryField()[patchi] & mesh.Sf().boundaryField()[patchi]; + } + } + } + wordList pcorrTypes ( p.boundaryField().size(), diff --git a/applications/solvers/multiphase/compressibleInterDyMFoam/correctPhi.H b/applications/solvers/multiphase/compressibleInterDyMFoam/correctPhi.H index d82a03edb5..f681ba6594 100644 --- a/applications/solvers/multiphase/compressibleInterDyMFoam/correctPhi.H +++ b/applications/solvers/multiphase/compressibleInterDyMFoam/correctPhi.H @@ -1,4 +1,26 @@ { + if (mesh.changing()) + { + forAll(U.boundaryField(), patchi) + { + if (U.boundaryField()[patchi].fixesValue()) + { + U.boundaryField()[patchi].initEvaluate(); + } + } + + forAll(U.boundaryField(), patchi) + { + if (U.boundaryField()[patchi].fixesValue()) + { + U.boundaryField()[patchi].evaluate(); + + phi.boundaryField()[patchi] = + U.boundaryField()[patchi] & mesh.Sf().boundaryField()[patchi]; + } + } + } + #include "continuityErrs.H" volScalarField pcorr diff --git a/applications/solvers/multiphase/interDyMFoam/correctPhi.H b/applications/solvers/multiphase/interDyMFoam/correctPhi.H index 0854a68b8e..43b13c2b89 100644 --- a/applications/solvers/multiphase/interDyMFoam/correctPhi.H +++ b/applications/solvers/multiphase/interDyMFoam/correctPhi.H @@ -1,4 +1,26 @@ { + if (mesh.changing()) + { + forAll(U.boundaryField(), patchi) + { + if (U.boundaryField()[patchi].fixesValue()) + { + U.boundaryField()[patchi].initEvaluate(); + } + } + + forAll(U.boundaryField(), patchi) + { + if (U.boundaryField()[patchi].fixesValue()) + { + U.boundaryField()[patchi].evaluate(); + + phi.boundaryField()[patchi] = + U.boundaryField()[patchi] & mesh.Sf().boundaryField()[patchi]; + } + } + } + #include "continuityErrs.H" volScalarField pcorr