From 15bade148dd0bd28c480244712922b51613d68f5 Mon Sep 17 00:00:00 2001
From: henry <Henry Weller h.weller@opencfd.co.uk>
Date: Tue, 26 Aug 2008 18:20:20 +0100
Subject: [PATCH] Yet more updates to the transonic formulation.

---
 applications/solvers/compressible/rhoSimpleFoam/pEqn.H | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/applications/solvers/compressible/rhoSimpleFoam/pEqn.H b/applications/solvers/compressible/rhoSimpleFoam/pEqn.H
index fc918ab9bfb..e4fbe15aa48 100644
--- a/applications/solvers/compressible/rhoSimpleFoam/pEqn.H
+++ b/applications/solvers/compressible/rhoSimpleFoam/pEqn.H
@@ -16,12 +16,13 @@ if (transonic)
 
     for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
     {
-        fvScalarMatrix pEqn0
+        fvScalarMatrix pEqn
         (
             fvm::div(phid, p)
           - fvm::laplacian(rho*rUA, p)
         );
-        fvScalarMatrix pEqn = pEqn0;
+
+        // Relax the pressure equation to ensure diagonal-dominance
         pEqn.relax(mesh.relaxationFactor("pEqn"));
 
         pEqn.setReference(pRefCell, pRefValue);
@@ -39,14 +40,13 @@ if (transonic)
 
         if (nonOrth == nNonOrthCorr)
         {
-            phi == pEqn0.flux();
+            phi == pEqn.flux();
         }
     }
 }
 else
 {
     phi = fvc::interpolate(rho)*(fvc::interpolate(U) & mesh.Sf());
-    //phi = fvc::interpolate(rho*U) & mesh.Sf();
     closedVolume = adjustPhi(phi, U, p);
 
     for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++)
@@ -58,7 +58,7 @@ else
 
         pEqn.setReference(pRefCell, pRefValue);
 
-        // retain the residual from the first iteration
+        // Retain the residual from the first iteration
         if (nonOrth == 0)
         {
             eqnResidual = pEqn.solve().initialResidual();
-- 
GitLab