Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations pierreick on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to add murphree efficiency to Column Inside-Outside method?

Long Cloud

Computer
Mar 19, 2024
1
To add murphree efficiency to column IO method, I modify the triangle dialog matrix, and calculate K in outside by bubble point, not by TPXY. when I converged the outside and re-calculate the the inner variable, such as Sb, I found the Sb is changed. So the column results is not stable. Anyone can give any suggestion?


C#:
private void CalcLvByV_MurphreeEff()
 {
     double[,] Vij = new double[info.NumComp, info.NumStage];
     double[] Rl = (double[])info.Rl.Clone();
     double[] Rv = (double[])info.Rv.Clone();

     for (int i = 0; i < info.NumComp; i++)
     {
         if (info.Zm[i] < info.MinZ || (info.IsWaterColumn && i == info.WaterIndex))
             continue;

         double[,] matrix = new double[info.NumStage, info.NumStage];
         double[] arrFi = new double[info.NumStage];
         double[] alphaSj = new double[info.NumStage];
         double[] effTerm = new double[info.NumStage];

         for (int j = 0; j < info.NumStage; j++)
         {
             alphaSj[j] = 1 / (info.Eff[i, j] * info.Alpha[i, j] * info.Sb * info.Sr[j]);
             effTerm[j] = (1 - info.Eff[i, j]) * alphaSj[j] / Rv[j];
         }

         for (int j = 0; j < info.NumMainStage; j++)
         {

             if (j > 0 && !info.TotalPaFromTray[j - 1])
                 matrix[j, j - 1] += alphaSj[j - 1];

             if (j == 0 && info.IsTotalCondenser) 
                 matrix[j, j] += -Rl[j] * alphaSj[j] - Rv[j];
             else
             {
                 matrix[j, j] += -Rl[j] * alphaSj[j] - Rv[j];
                 if (j > 0)
                     matrix[j, j] += -effTerm[j - 1];
             }

             if (j < info.NumMainStage - 1)
                 matrix[j, j + 1] += 1 + Rl[j] * effTerm[j];

             arrFi[j] = -info.F[j] * info.Z[i, j];
         }
         if (info.WaterIndex == i)
         {
             for (int j = 0; j < info.NumMainStage; j++)
             {
                 arrFi[j] += info.Water[j];
             }
         }

         double[] Vi = matrixCalc.Calc(matrix, arrFi);
         for (int j = 0; j < info.NumStage; j++)
         {
             if (Vi[j] < 0)
                 Vi[j] = 0;
         }
         clip(Vi);
         Vij.SetRow(i, Vi);

         double[] Li = new double[info.NumStage];
         for (int j = 0; j < info.NumStage; j++)
         {
             if (j < info.NumStage - 1)
                 Li[j] = Vi[j] * alphaSj[j] - effTerm[j] * Vi[j + 1];
             else
                 Li[j] = Vi[j] * alphaSj[j];

         }
         for (int j = 0; j < info.NumStage; j++)
         {
             if (Li[j] < 0)
                 Li[j] = 0;
         }
         info.Li.SetRow(i, Li);
     }

     for (int i = 0; i < info.NumComp; i++)
     {
         for (int j = 0; j < info.NumStage; j++)
         {
             if (Vij[i, j] < 0)
             {
                 info.LstMessage.Add($"comp {i} in tray {j} is negative");
                 return;
             }

             if (double.IsNaN(Vij[i, j]) || double.IsInfinity(Vij[i, j]))
                 return;
         }
     }
     info.Vi = Vij;
     for (int j = 0; j < info.NumStage; j++)
     {
         info.V[j] = 0;
         for (int i = 0; i < info.NumComp; i++)
         {
             info.V[j] += info.Vi[i, j];
         }
     }
  
     for (int j = 0; j < info.NumStage; j++)
     {
         info.L[j] = 0;
         for (int i = 0; i < info.NumComp; i++)
         {
             info.L[j] += info.Li[i, j];
         }
     }

     for (int i = 0; i < info.NumComp; i++)
     {
         for (int j = 0; j < info.NumStage; j++)
         {
             if (info.Li[i, j] < 0)
             {
                 info.Li[i, j] = 0;
             }
             if (info.Vi[i, j] < 0)
             {
                 info.Vi[i, j] = 0;
             }
         }
     }

 }
 
Replies continue below

Recommended for you

The procedure for the use of the I/O method and worked examples and references are well narrated on page 13-49 onwards in Perry Chem Engg Handbook 7th ed. See if this helps. I have used this method only on Pro-II from Simsci, so I cant comment only specific details.
 
you may consider this old thread


it's about the version proposed by Richard (Dick) Russell which (as far as I know) has been the standard procedure in most simulators and thermo libraries,
there are different ways to modify the amount of liquid condensed on each tray depending from tray efficiency, those depend from the simplified model you adopt to describe vapor/liquid equilibria...

Paolo
 

Part and Inventory Search

Sponsor