Events

India Seminar
Mumbai, India
20-22 Nov, 2019    
 
MUGI 2020
Seville, Spain
19-24 April, 2020    
 
MUG 2020
Chicago, Illinois
27 Sept-Oct 2, 2020    
More
If you see a zero value for some yield or property in a solution report, you will usually be right in assuming that it is actually zero, or so small that it has been rounded to it given the precision displayed.  However, just occasionally, sometimes, if you calculate out the value using your input data and the solution activities, you will find that something should be there.  It might be very small, but it should not actually be zero.  A few months ago, a client sent in a question about a solution which was optimal and converged, but appeared to be out of quality balance.  I’ve made a simplified example to show what went wrong and how the model might be improved.  

Consider a process unit, that yields two small gas streams. 
 
47 UnitModeYields
 
The molecular make up of these gasses needs to be tracked so that they can be processed further.   Both gas streams contain 0.1% methane, 0.5% ethane and the remaining 99.4% is propane.   (In the original problem  more molecular species were tracked and the compositions depended on the feed properties and operating characteristics, but I’m simplifying the unit by using just three and making them constant and identical.).   The composition is tracked as a fraction, tons/ton.  Transfer factors need to be multiplied by yield, since they appear on the process unit vector but the quality applies only to the amount of material that comes out as the target pool.  So, for example, the nc3 factor for GS2 is 0.994 X 0.002 = 0.001988.  This gives the following transfer rows
 
47 UnitModeTransfers
Note that since the properties reflect the complete composition of the gas, the factors for each add up to the yield value.
 
The unit is forced to run so we can see what the gas streams look like. 
 
47 Gas1 MissingProp       47 Gas2 Props
 
The properties for Gas 2 match the given values.  However, something is wrong with Gas 1 as the methane fraction is 0, rather than 0.001.    This could be a problem since the composition doesn’t add up to 1;  if the stream is passed, as gases often are,  into a recovery unit that is modelled by separating out the components there will be a mass imbalance.  It may not look like much, but it could be enough to make the model infeasible if the operation had to be used.

Where has the methane value gone?  Gas 2 works,  why not Gas 1?. The equation for Gas 2’s methane balance has a contribution from the process unit
 
ROW = TRAAGS25#nc1_)Q  TYPE =EQU
    TRAANS2STB_^     =     2.00E-6  TRAAGS25#nc1_)D  =    -1.00000 
 
But the one for Gas 1 does not.

ROW = TRAAGS15#nc1_)Q  TYPE =EQU
    TRAAGS15#nc1_)D  =    -1.00000                                 
 
The problem is that with the smaller yield the transfer factor is lower than the critical threshold of 0.0000005.   Values less than 5E-7  are rounded to zero and not put in the matrix.  Why?  Because very small values can destabilize the simplex algorithm due to numerical inaccuracies introduced in pivot calculations.  (Even with double precision;  we tried removing the threshold when we switched from single to double, some years back, and it did not go well.)   This is happening right under your nose, probably without you noticing it, because most of the time the difference between these numbers and zero is so small it doesn’t matter. 
But here it does, because the rounding has a visible impact on the quality balance.  Fortunately, once the problem has been identified, there are a number of ways to cure it.  Here are some possibilities.

1) Scale the quality.  If you track % ethane, etc. rather than fraction, the transfer factor for Gas 1 methane would be 0.00004 – large enough to stay in the matrix.  Of course you will need to make the whole of the rest of the model consistent with that.
 47 UsePercentComp
 
2) Scale the whole vector.  Instead of scaling the property for the model, you can just write the operation in terms of 100 units of feed.    The solution can stay the same.  Instead of 200,000 X 0.0004, the 80 tonnes of Gas 1 would by produced by 2,000 X 0.04
47 RescaledVector

3) Use PUPs and calculate Yield Quality values instead of transfer factors.  These go on the blend vector that passes the gas from the unit into the gas pool, instead of the unit vector,  and so don’t need to be scaled by yield.
47 YieldQualPups
 
 
Even if you don’t have values that are so small that they are disappearing. If you have unit operations with very small values, you might consider rescaling as a means of improving the structure of the model.  If you are a Haverly client you can find more on scaling in my conference paper “Orders of Magnitude” – available in the on-line Knowledge Base via your technical support account.
  

From Kathy's Hotel Room, Bavaria,  11th December 2018.

Comments and suggestions gratefully received via the usual e-mail addresses or here.
You may also use this form to ask to be added to the distribution list so that you are notified via e-mail when new articles are posted.