Changeset 177 for branches/newlanguage


Ignore:
Timestamp:
Mar 4, 2007, 2:08:36 AM (17 years ago)
Author:
Argimiro Resende Secchi
Message:

Fix some new language syntaxes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/newlanguage/sample/stage_separators/sample_column.mso

    r134 r177  
    339339        EQUATIONS
    340340   "Temperature Controller"
    341         TCcond.Parameters.tau = 0*"s"
    342         TCcond.Parameters.tauSet = 0*"s";       
     341        TCcond.Parameters.tau = 0*'s'
     342        TCcond.Parameters.tauSet = 0*'s';       
    343343        TCcond.Parameters.alpha = 0.3;
    344344        TCcond.Parameters.bias = 0.5;   
     
    348348        TCcond.Options.clip = 1;
    349349        TCcond.Options.autoMan = 0;
    350         TCcond.Parameters.intTime = 60*"s";
     350        TCcond.Parameters.intTime = 60*'s';
    351351        TCcond.Parameters.gain = 0.6;
    352         TCcond.Parameters.derivTime = 1*"s";
    353         TCcond.Ports.setPoint = ((15+273.15) * "K" - Tmin)/(Tmax-Tmin);
     352        TCcond.Parameters.derivTime = 1*'s';
     353        TCcond.Ports.setPoint = ((15+273.15) * 'K' - Tmin)/(Tmax-Tmin);
    354354        TCcond.Ports.input = Tad;
    355355        Tad = (col.cond.OutletL.T-Tmin)/(Tmax-Tmin);
     
    357357
    358358        "Pressure Controller"
    359         PC.Parameters.tau = 0*"s";     
    360         PC.Parameters.tauSet = 0*"s";   
     359        PC.Parameters.tau = 0*'s';     
     360        PC.Parameters.tauSet = 0*'s';   
    361361        PC.Parameters.alpha = 0.3;
    362362        PC.Parameters.bias = 0;
     
    366366        PC.Options.clip = 1;
    367367        PC.Options.autoMan = 0;
    368         PC.Parameters.intTime = 50*"s";
     368        PC.Parameters.intTime = 50*'s';
    369369        PC.Parameters.gain = 0.5;
    370         PC.Parameters.derivTime = 1*"s";
    371         PC.Ports.setPoint = (2.0*"bar"-Pmin)/(Pmax-Pmin);
     370        PC.Parameters.derivTime = 1*'s';
     371        PC.Ports.setPoint = (2.0*'bar'-Pmin)/(Pmax-Pmin);
    372372        PC.Ports.input = Pad;
    373373        Pad = (col.cond.OutletV.P-Pmin)/(Pmax-Pmin);
     
    375375       
    376376        "Ttop Level Controller"
    377         LCtop.Parameters.tau = 0*"s";   
    378         LCtop.Parameters.tauSet = 0*"s";       
     377        LCtop.Parameters.tau = 0*'s';   
     378        LCtop.Parameters.tauSet = 0*'s';       
    379379        LCtop.Parameters.alpha = 0.3;
    380380        LCtop.Parameters.bias = 0.5;   
     
    384384        LCtop.Options.clip = 1;
    385385        LCtop.Options.autoMan = 0;
    386         LCtop.Parameters.intTime = 10*"s";
     386        LCtop.Parameters.intTime = 10*'s';
    387387        LCtop.Parameters.gain = 1;
    388         LCtop.Parameters.derivTime = 1*"s";
    389         LCtop.Ports.setPoint = (1.0 * "m" - Hmint)/(Hmaxt-Hmint);
     388        LCtop.Parameters.derivTime = 1*'s';
     389        LCtop.Ports.setPoint = (1.0 * 'm' - Hmint)/(Hmaxt-Hmint);
    390390        LCtop.Ports.input = Had_top;
    391391        Had_top = (col.cond.Level-Hmint)/(Hmaxt-Hmint);
     
    393393
    394394        "Tbottom Level Controller"
    395         LCbot.Parameters.tau = 0*"s";   
    396         LCbot.Parameters.tauSet = 0*"s";       
     395        LCbot.Parameters.tau = 0*'s';   
     396        LCbot.Parameters.tauSet = 0*'s';       
    397397        LCbot.Parameters.alpha = 0.3;
    398398        LCbot.Parameters.bias = 0.5;   
     
    402402        LCbot.Options.clip = 1;
    403403        LCbot.Options.autoMan = 0;
    404         LCbot.Parameters.intTime = 100*"s";
     404        LCbot.Parameters.intTime = 100*'s';
    405405        LCbot.Parameters.gain = 1;
    406         LCbot.Parameters.derivTime = 1*"s";
    407         LCbot.Ports.setPoint = (1.0 * "m" - Hminb)/(Hmaxb-Hminb);
     406        LCbot.Parameters.derivTime = 1*'s';
     407        LCbot.Ports.setPoint = (1.0 * 'm' - Hminb)/(Hmaxb-Hminb);
    408408        LCbot.Ports.input = Had_bot;
    409409        Had_bot = (col.reb.Level-Hminb)/(Hmaxb-Hminb);
     
    412412        RR * (col.cond.OutletV.F + col.sptop.Outlet1.F) = col.sptop.Outlet2.F;
    413413       
    414         if time < 1 * "h" then
    415                 col.sptop.Outlet2.F = 70 * "kmol/h"; # reflux
     414        if time < 1 * 'h' then
     415                col.sptop.Outlet2.F = 70 * 'kmol/h'; # reflux
    416416        else
    417                 col.sptop.Outlet2.F = 85 * "kmol/h"; # reflux
     417                col.sptop.Outlet2.F = 85 * 'kmol/h'; # reflux
    418418        end
    419419
    420420        SPECIFY
    421         feed.Outlet.F = 113.4 * "kmol/h";
    422         feed.Outlet.T = 291 * "K";
    423         feed.Outlet.P = 168.3 * "kPa";
     421        feed.Outlet.F = 113.4 * 'kmol/h';
     422        feed.Outlet.T = 291 * 'K';
     423        feed.Outlet.P = 168.3 * 'kPa';
    424424        feed.Outlet.z = 1/NComp;
    425425       
    426         zero.F = 0 * "kmol/h";
    427         zero.T = 300 * "K";
    428         zero.P = 1 * "atm";
     426        zero.F = 0 * 'kmol/h';
     427        zero.T = 300 * 'K';
     428        zero.P = 1 * 'atm';
    429429        zero.z = 1/NComp;
    430430        zero.v = 0;
    431         zero.h = 0 * "J/mol";
    432        
    433         Qr = 3e6 * "kJ/h";
    434         col.pump1.dP = 16 * "kPa";
     431        zero.h = 0 * 'J/mol';
     432       
     433        Qr = 3e6 * 'kJ/h';
     434        col.pump1.dP = 16 * 'kPa';
    435435        col.trays.Emv = 1;
    436436
    437437        SET
    438438        col.NTrays = 8;
    439         col.cond.V = 2 * "m^3";
    440         col.cond.Across = 1 * "m^2";
    441         col.trays.V = 4 * "ft^3";
    442         col.trays.Ah = 0.394 * "ft^2";
    443         col.trays.lw = 20.94 * "in";
    444         col.trays.hw = 0.125 * "ft";
    445         col.trays.Q = 0 * "kW";
     439        col.cond.V = 2 * 'm^3';
     440        col.cond.Across = 1 * 'm^2';
     441        col.trays.V = 4 * 'ft^3';
     442        col.trays.Ah = 0.394 * 'ft^2';
     443        col.trays.lw = 20.94 * 'in';
     444        col.trays.hw = 0.125 * 'ft';
     445        col.trays.Q = 0 * 'kW';
    446446        col.trays.beta = 0.6;
    447447        col.trays.alfa = 4;
    448         col.trays.Ap = 3.94 * "ft^2";
    449         col.reb.V = 2 * "m^3";
    450         col.reb.Across = 1 * "m^2";
    451 
    452         Qrmax = 5e6 * "kJ/h";
    453         Qrmin = 1e6 * "kJ/h";
    454         Frmin = 0 * "kmol/h";
    455         Frmax = 60 * "kmol/h";
    456         Fcmin = 0 * "kmol/h";
    457         Fcmax = 120 * "kmol/h";
    458         Hmint = 0 * "m";
    459         Hmaxt = 2 * "m";
    460         Hminb = 0 * "m";
    461         Hmaxb = 2 * "m";
    462         Pmin = 0.5 * "bar";
    463         Pmax = 4 * "bar";
    464         Qcmax = -5e5 * "kJ/h";
    465         Qcmin = -5e6 * "kJ/h";
    466         Tmax = (30+273.15) * "K";
    467         Tmin = (-20+273.15) * "K";
     448        col.trays.Ap = 3.94 * 'ft^2';
     449        col.reb.V = 2 * 'm^3';
     450        col.reb.Across = 1 * 'm^2';
     451
     452        Qrmax = 5e6 * 'kJ/h';
     453        Qrmin = 1e6 * 'kJ/h';
     454        Frmin = 0 * 'kmol/h';
     455        Frmax = 60 * 'kmol/h';
     456        Fcmin = 0 * 'kmol/h';
     457        Fcmax = 120 * 'kmol/h';
     458        Hmint = 0 * 'm';
     459        Hmaxt = 2 * 'm';
     460        Hminb = 0 * 'm';
     461        Hmaxb = 2 * 'm';
     462        Pmin = 0.5 * 'bar';
     463        Pmax = 4 * 'bar';
     464        Qcmax = -5e5 * 'kJ/h';
     465        Qcmin = -5e6 * 'kJ/h';
     466        Tmax = (30+273.15) * 'K';
     467        Tmin = (-20+273.15) * 'K';
    468468       
    469469        INITIAL
    470470        # condenser
    471         col.cond.OutletL.T = 260 *"K";
    472         col.cond.Level = 1 * "m";
     471        col.cond.OutletL.T = 260 *'K';
     472        col.cond.Level = 1 * 'm';
    473473        col.cond.OutletL.z([1:4]) = [0.2, 0.2, 0.4, 0.05];
    474474
    475475        # reboiler
    476         col.reb.OutletL.T = 350 *"K";
    477         col.reb.Level = 1 * "m";
     476        col.reb.OutletL.T = 350 *'K';
     477        col.reb.Level = 1 * 'm';
    478478        col.reb.OutletL.z([1:4]) = [0.1, 0.4, 0.1, 0.3];
    479479       
    480480        # column trays
    481         col.trays.OutletL.T = [290:(330-290)/(col.NTrays-1):330] * "K";
     481        col.trays.OutletL.T = [290:(330-290)/(col.NTrays-1):330] * 'K';
    482482        col.trays.Level = 1.2 * col.trays.hw;
    483483        col.trays.OutletL.z([1:4]) = [0.15, 0.3, 0.25, 0.2];
     
    487487        TimeStep = 0.01;
    488488        TimeEnd = 2;
    489         TimeUnit = "h";
     489        TimeUnit = 'h';
    490490        #time = [0:0.01:0.1, 0.11:0.01:2]*"h";
    491491        #initialFile = "Column_ctrl.rlt";
Note: See TracChangeset for help on using the changeset viewer.