Expanding a refinery model

Problems with modeling
Post Reply
gaglians
User
User
Posts: 2
Joined: 4 years ago

Expanding a refinery model

Post by gaglians »

Hello all!

I am currently enjoying learning GAMS in preparation for a job interview. I am currently "playing" with a refinery model, called Marco, which I found here: https://www.gams.com/latest/gamslib_ml/ ... marco.html

What I want to do is to expand the model in order to allow for a new plant operation (a gasoil desulphurization unit). Basically starting from this table:

Code: Select all

Table a(cr,c,p) 'input output coefficients'
                      a-dist  n-reform  cc-dist  cc-gas-oil  hydro
   mid-c.crude        -1.0
   mid-c.sr-gas         .236
   mid-c.sr-naphtha     .223    -1.0
   mid-c.sr-dist        .087              -1.0
   mid-c.sr-gas-oil     .111                          -1.0
   mid-c.sr-res         .315
   mid-c.rf-gas                   .807
   mid-c.fuel-gas       .029      .129      .30         .31
   mid-c.cc-gas                             .59         .59
   mid-c.cc-gas-oil                         .21         .22
   w-tex.crude        -1.0
   w-tex.sr-gas         .180
   w-tex.sr-naphtha     .196    -1.0
   w-tex.sr-dist        .073              -1.0
   w-tex.sr-gas-oil     .091                          -1.0
   w-tex.sr-res         .443                                 -1.0
   w-tex.rf-gas                   .836
   w-tex.fuel-gas       .017      .099      .36         .38
   w-tex.cc-gas                             .58         .60
   w-tex.cc-gas-oil                         .15         .15
   w-tex.hydro-res                                             .97;
I want to add a new plant called gasoil-hds which takes the streams mid-c.st-dist and mid-c.sr-gas-oil and transforms them in desulph-gasoil. I could do it in the same way as the original guy did it for the catalytic cracker: create 2 different units that run together (cc-dist and cc-gas-oil). However, imagine having many more components than this model (a crude can distill in many different cuts). So, I'm thinking this method could work but it's a bit unfeasible. What I wanted to do is create a blend of the two streams, and feed the blend to the plant. So something like:

Code: Select all

   bp(cf,ci) 'blending possibility '
             / (premium, regular).(butane, sr-gas, rf-gas, cc-gas, sr-naphtha)
                distillate.       (sr-dist, sr-naphtha, sr-gas-oil, cc-gas-oil)
                fuel-oil.         (sr-gas-oil, sr-res, cc-gas-oil, hydro-res )
                fuel-gas.         (fuel-gas )  
                hds-feed.      (sr-gas-oil, sr-dist)                          /
and then update the table with:

Code: Select all

Table a(cr,c,p) 'input output coefficients'
                      a-dist  n-reform  cc-dist  cc-gas-oil  hydro  go-hds
   mid-c.crude        -1.0
   mid-c.sr-gas         .236
   mid-c.sr-naphtha     .223    -1.0
   mid-c.sr-dist        .087              -1.0
   mid-c.sr-gas-oil     .111                          -1.0
   mid-c.sr-res         .315
   mid-c.hds-feed                                                          -1.0
   mid-c.desulph-gasoil                                                   1.0
   mid-c.rf-gas                   .807
   mid-c.fuel-gas       .029      .129      .30         .31
   mid-c.cc-gas                             .59         .59
   mid-c.cc-gas-oil                         .21         .22
   w-tex.crude        -1.0
   w-tex.sr-gas         .180
   w-tex.sr-naphtha     .196    -1.0
   w-tex.sr-dist        .073              -1.0
   w-tex.sr-gas-oil     .091                          -1.0
   w-tex.sr-res         .443                                 -1.0
   w-tex.rf-gas                   .836
   w-tex.fuel-gas       .017      .099      .36         .38
   w-tex.cc-gas                             .58         .60
   w-tex.cc-gas-oil                         .15         .15
   w-tex.hydro-res                                             .97;
Can you think of a way in which this could work? Doing it the way I did it doesnt: the bp(cf, ci) parameter is only for final products, so the model doesn't take it as a feed. Thank you!
Post Reply