Skip to content
Snippets Groups Projects
Commit b16e0582 authored by Henry's avatar Henry
Browse files

MRFZoneTemplates: Call internalField on phi to ensure the old-time value is stored for ddtPhiCorr

parent 4993e94f
No related merge requests found
......@@ -44,11 +44,15 @@ void Foam::MRFZone::relativeRhoFlux
const vector& origin = origin_.value();
const vector& Omega = Omega_.value();
const vectorField& Cfi = Cf.internalField();
const vectorField& Sfi = Sf.internalField();
scalarField& phii = phi.internalField();
// Internal faces
forAll(internalFaces_, i)
{
label facei = internalFaces_[i];
phi[facei] -= rho[facei]*(Omega ^ (Cf[facei] - origin)) & Sf[facei];
phii[facei] -= rho[facei]*(Omega ^ (Cfi[facei] - origin)) & Sfi[facei];
}
// Included patches
......@@ -91,11 +95,15 @@ void Foam::MRFZone::absoluteRhoFlux
const vector& origin = origin_.value();
const vector& Omega = Omega_.value();
const vectorField& Cfi = Cf.internalField();
const vectorField& Sfi = Sf.internalField();
scalarField& phii = phi.internalField();
// Internal faces
forAll(internalFaces_, i)
{
label facei = internalFaces_[i];
phi[facei] += rho[facei]*(Omega ^ (Cf[facei] - origin)) & Sf[facei];
phii[facei] += rho[facei]*(Omega ^ (Cfi[facei] - origin)) & Sfi[facei];
}
// Included patches
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment