# Changeset 574 for branches/gui/sample

Ignore:
Timestamp:
Jul 25, 2008, 11:18:50 AM (15 years ago)
Message:

Updated the models to work with some language constraints

Location:
branches/gui/sample
Files:
22 edited

Unmodified
Removed
• ## branches/gui/sample/miscellaneous/sample_arrays.mso

 r176 EQUATIONS for i in [1 : Dimension] for i in [1 : Dimension] do diff(Var1(1,i)) = Var2(1,i)/'s'; end
• ## branches/gui/sample/miscellaneous/sample_arrays2.mso

 r176 diff(Var1(1,1))*'s' = Var2(1,2); for i in [2 : Dimension-1] for i in [2 : Dimension-1] do diff(Var1(1,i))*'s' = Var2(1,i-1)+Var2(1,i+1); end
• ## branches/gui/sample/miscellaneous/sample_galvanic.mso

 r535 *--------------------------------------------------------------------*# include "types"; using "types"; FlowSheet cell
• ## branches/gui/sample/miscellaneous/sample_tanks.mso

 r313 SPECIFY "Vazao de entrada" Fin = 10 * 'm^3/h'; SPECIFY "Vazao de entrada" Fin = 10 * 'm^3/h';
• ## branches/gui/sample/miscellaneous/tenprobs/prob07.mso

 r228 dz = (z(N+2) - z(1))/(N+1); for i in [2:(N+1)] for i in [2:(N+1)] do "Concentration of reactant" (C(i+1) - 2*C(i)+ C(i-1))/(z(i) - z(i-1))^2 SPECIFY "Lower boundary" reac.z(1) = 0*'m'; "Upper boundary" reac.z(N+2) = reac.L; OPTIONS SPECIFY "Lower boundary" reac.z(1) = 0*'m'; "Upper boundary" reac.z(N+2) = reac.L; OPTIONS
• ## branches/gui/sample/optimization/ammonia.mso

 r313 Outlet.F = Inlet.F * (1 - sum(Outletz)); for i in [1:NComp] for i in [1:NComp] do "Component Molar Balance" Outletz(i) = Inlet.z(i) + sum(stoic(i,:)*X*Inlet.z(comp)); F102.OutletV.P = 10 * 'atm'; F102.InletQ.Q = 0 * 'kJ/h'; F102.InletQ = 0 * 'kJ/h'; # We can choose between one of the following specs
• ## branches/gui/sample/processes/Sample_Process.mso

 r564 EQUATIONS for z in [1:Reac.NDisc] for z in [1:Reac.NDisc] do "Reaction Rate = k*C(1)" INITIAL for z in [2:Reac.NDisc+1] for z in [2:Reac.NDisc+1] do Reac.str(z).T = Reac.Inlet.T;
• ## branches/gui/sample/reactors/fogler/chap2/series_reactors.mso

 r446 V(1) = 0.0*'l'; for i in [2:N] for i in [2:N] do "Molar balance" V(i) - V(i-1) = -0.5*Inlet.F*dx*(1/r(i-1) + 1/r(i)); # second order Outlet.F = Inlet.F; for i in [1:N] for i in [1:N] do "Rate of reaction" (-r(i)) = sum(a*X(i)^[0:(NT-1)]); SPECIFY "Inlet conversion" Inlet.X = 0.0; "Required conversion" R1.Outlet.X = 0.8; SPECIFY "Inlet molar flow" Inlet.F = 0.866541*'mol/s'; "Inlet conversion" Inlet.X = 0.0; SPECIFY "Inlet molar flow" Inlet.F = 0.866541*'mol/s'; "Inlet conversion" Inlet.X = 0.0; "Required conversion" R1.Outlet.X     = 0.8; SPECIFY "Inlet molar flow" Inlet.F = 5.0*'mol/s'; "Inlet conversion" Inlet.X = 0.0; "Required CSTR conversion" CSTR.Outlet.X = 0.6; "Required PFR conversion" PFR.Outlet.X = 0.6; SPECIFY "Inlet molar flow" Inlet.F = 0.866541*'mol/s'; "Inlet conversion" Inlet.X = 0.0; "Required 1st reactor conversion" R1.Outlet.X = 0.4; "Required 2nd reactor conversion" R2.Outlet.X = 0.8; SPECIFY "Inlet molar flow" Inlet.F = 0.866541*'mol/s'; "Inlet conversion" Inlet.X = 0.0; "Required 1st reactor conversion" R1.Outlet.X = 0.4; "Required 2nd reactor conversion" R2.Outlet.X = 0.8; SPECIFY "Inlet molar flow" Inlet.F = 0.866541*'mol/s'; "Inlet conversion" Inlet.X = 0.0; "Required 1st reactor conversion" R1.Outlet.X = 0.5; "Required 2nd reactor conversion" R2.Outlet.X = 0.8; SPECIFY "Inlet molar flow" Inlet.F = 0.866541*'mol/s'; "Inlet conversion" Inlet.X = 0.0; "Required 1st reactor conversion" R1.Outlet.X = 0.5; "Required 2nd reactor conversion" R2.Outlet.X = 0.8;
• ## branches/gui/sample/reactors/fogler/chap3/equilibrium_conversion.mso

 r202 SPECIFY "Inlet molar fraction" Inlet.z = [1.0, 0.0]; "Inlet pressure" P = 2.0*'atm'; "Inlet temperature" T = 340*'K'; "Equilibrium constant" Kc = 0.1*'mol/l'; SPECIFY "Inlet molar fraction" Inlet.z = [1.0, 0.0]; "Inlet pressure" P = 2.0*'atm'; "Inlet temperature" T = 340*'K'; "Equilibrium constant" Kc = 0.1*'mol/l';
• ## branches/gui/sample/reactors/fogler/chap3/oxidation_of_so2.mso

 r202 SPECIFY "Inlet molar fraction" Inlet.z = [0.28, 0.1512, 0.0, 0.5688]; "Inlet pressure" P = 1485*'kPa'; "Inlet temperature" T = (227 + 273.15)*'K';
• ## branches/gui/sample/reactors/fogler/chap4/membrane_reactor.mso

 r188 SPECIFY "Pressure" P = 8.2*'atm';  # Isobaric system "Temperature" T = 500*'K';    # Isotermic system "Specific rate of reaction" k = 0.7*'1/min';
• ## branches/gui/sample/reactors/fogler/chap4/molarflow_pfr.mso

 r188 SPECIFY "Input total molar concentration" Cto = 0.1*'mol/l'; "Input molar flow" Fo = [10, 0]*'mol/min';
• ## branches/gui/sample/reactors/fogler/chap4/semibatch_reactor.mso

 r202 SPECIFY "Specific rate of reaction" k = 2.2*'l/mol/s'; "Inlet concentration" Co = [0.0, 0.025, 0.0, 0.0]*'mol/l';
• ## branches/gui/sample/reactors/fogler/chap4/spheric_reactor.mso

 r188 SPECIFY "Input molar concentration of A" Ca0 = 320*'mol/m^3'; "Input molar flow of A" Fa0 = 440*'mol/s'; "Initial pressure" P0      = 2000*'kPa'; "Input mass flow" m       = 44*'kg/s';
• ## branches/gui/sample/reactors/fogler/chap8/acetic_anhydride.mso

 r202 SPECIFY "Inlet molar flow" R.Fao = (8000/58)*'kmol/h'; SPECIFY "Inlet molar flow" R.Fao = (18.8*2e-3)*'mol/s';
• ## branches/gui/sample/reactors/fogler/chap8/series_reactions.mso

 r383 SPECIFY "Inlet temperature" To = 283*'K'; "Inlet concentration of A" Co= 0.3*'mol/m^3';
• ## branches/gui/sample/reactors/fogler/chap9/cstr_startup.mso

 r383 SPECIFY "Inlet molar flow" CSTR.Fo = [80, 1000, 0, 100]*'lbmol/h'; "Inlet reactor temperature" CSTR.To = (75 + 460)*'degR'; "Molar flow of cooling water" CSTR.mc = 1e3*'lbmol/h'; SPECIFY "Inlet molar flow" CSTR.Fo = [80, 1000, 0, 100]*'lbmol/h'; "Inlet reactor temperature" CSTR.To = (70 + 460)*'degR'; # Reduction of temperature: 75°F to 70°F "Molar flow of cooling water" CSTR.mc = 1e3*'lbmol/h'; SPECIFY "Inlet molar flow" CSTR.Fo = [80, 1000, 0, 100]*'lbmol/h'; "Inlet reactor temperature" CSTR.To = (70 + 460)*'degR';
• ## branches/gui/sample/reactors/sample_batch.mso

 r313 SPECIFY "Feed conditions" feed.T = 300*'K'; feed.P = 1*'atm'; feed.z = [0,1,0,0,0]; "Reactor volume" reac.Vr = 1 * 'l';
• ## branches/gui/sample/reactors/sample_cstr.mso

 r245 Reac.Outlet.F   = Reac.Inlet.F; "Adiabatic" Reac.q                  = 0     * 'J/s'; Reac.Outlet.P   = 1     * 'atm';
• ## branches/gui/sample/reactors/sample_pfr.mso

 r213 EQUATIONS for z in [1:Reac.NDisc] for z in [1:Reac.NDisc] do "Reaction Rate = k*C(1)" s1.Outlet.z = [1, 0, 0]; "Adiabatic" Reac.q     = 0     * 'J/s'; INITIAL for z in [2:Reac.NDisc+1] for z in [2:Reac.NDisc+1] do Reac.str(z).T = Reac.Inlet.T;
• ## branches/gui/sample/stage_separators/sample_column.mso

 r555 Qr.OutletQ to col.reb.InletQ; EQUATIONS "Temperature Controller" TCcond.Parameters.tau = 0*'s'; TCcond.Parameters.tauSet = 0*'s'; TCcond.Parameters.alpha = 0.3; TCcond.Parameters.bias = 0.5; TCcond.Parameters.gamma = 1; TCcond.Parameters.beta = 1; SET TCcond.tau = 0*'s'; TCcond.tauSet = 0*'s'; TCcond.alpha = 0.3; TCcond.bias = 0.5; TCcond.gamma = 1; TCcond.beta = 1; TCcond.Action = "Direct"; TCcond.Clip = "Clipped"; TCcond.Mode = "Automatic"; TCcond.Parameters.intTime = 60*'s'; TCcond.Parameters.gain = 0.6; TCcond.Parameters.derivTime = 1*'s'; TCcond.intTime = 60*'s'; TCcond.gain = 0.6; TCcond.derivTime = 1*'s'; PC.tau = 0*'s'; PC.tauSet = 0*'s'; PC.alpha = 0.3; PC.bias = 0; PC.gamma = 1; PC.beta = 1; PC.Action = "Reverse"; PC.Clip = "Clipped"; PC.Mode = "Automatic"; PC.intTime = 50*'s'; PC.gain = 0.5; PC.derivTime = 1*'s'; LCtop.tau = 0*'s'; LCtop.tauSet = 0*'s'; LCtop.alpha = 0.3; LCtop.bias = 0.5; LCtop.gamma = 1; LCtop.beta = 1; LCtop.Action = "Reverse"; LCtop.Clip = "Clipped"; LCtop.Mode = "Automatic"; LCtop.intTime = 10*'s'; LCtop.gain = 1; LCtop.derivTime = 0*'s'; LCbot.tau = 0*'s'; LCbot.tauSet = 0*'s'; LCbot.alpha = 0.3; LCbot.bias = 0.5; LCbot.gamma = 1; LCbot.beta = 1; LCbot.Action = "Reverse"; LCbot.Clip = "Clipped"; LCbot.Mode = "Automatic"; LCbot.intTime = 100*'s'; LCbot.gain = 1; LCbot.derivTime = 0*'s'; EQUATIONS TCcond.Ports.setPoint = ((15+273.15) * 'K' - Tmin)/(Tmax-Tmin); TCcond.Ports.input = Tad; Qc.OutletQ = Qcmin+(Qcmax-Qcmin)*TCcond.Ports.output; "Pressure Controller" PC.Parameters.tau = 0*'s'; PC.Parameters.tauSet = 0*'s'; PC.Parameters.alpha = 0.3; PC.Parameters.bias = 0; PC.Parameters.gamma = 1; PC.Parameters.beta = 1; PC.Action = "Reverse"; PC.Clip = "Clipped"; PC.Mode = "Automatic"; PC.Parameters.intTime = 50*'s'; PC.Parameters.gain = 0.5; PC.Parameters.derivTime = 1*'s'; PC.Ports.setPoint = (4.0*'bar'-Pmin)/(Pmax-Pmin); PC.Ports.input = Pad; col.cond.OutletV.F = (Fcmin+(Fcmax-Fcmin)*PC.Ports.output); "Ttop Level Controller" LCtop.Parameters.tau = 0*'s'; LCtop.Parameters.tauSet = 0*'s'; LCtop.Parameters.alpha = 0.3; LCtop.Parameters.bias = 0.5; LCtop.Parameters.gamma = 1; LCtop.Parameters.beta = 1; LCtop.Action = "Reverse"; LCtop.Clip = "Clipped"; LCtop.Mode = "Automatic"; LCtop.Parameters.intTime = 10*'s'; LCtop.Parameters.gain = 1; LCtop.Parameters.derivTime = 0*'s'; LCtop.Ports.setPoint = (1.0 * 'm' - Hmint)/(Hmaxt-Hmint); LCtop.Ports.input = Had_top; col.sptop.Outlet1.F = Fcmin + (Fcmax-Fcmin) * LCtop.Ports.output; "Tbottom Level Controller" LCbot.Parameters.tau = 0*'s'; LCbot.Parameters.tauSet = 0*'s'; LCbot.Parameters.alpha = 0.3; LCbot.Parameters.bias = 0.5; LCbot.Parameters.gamma = 1; LCbot.Parameters.beta = 1; LCbot.Action = "Reverse"; LCbot.Clip = "Clipped"; LCbot.Mode = "Automatic"; LCbot.Parameters.intTime = 100*'s'; LCbot.Parameters.gain = 1; LCbot.Parameters.derivTime = 0*'s'; LCbot.Ports.setPoint = (1.0 * 'm' - Hminb)/(Hmaxb-Hminb); LCbot.Ports.input = Had_bot; TCcond.Clip = "Clipped"; TCcond.Mode = "Automatic"; TCcond.tau = 0*'s'; TCcond.tauSet = 0*'s'; TCcond.alpha = 0.3; TCcond.bias = 0.5; TCcond.gamma = 1; TCcond.beta = 1; TCcond.intTime = 60*'s'; TCcond.gain = 0.6; TCcond.derivTime = 1*'s'; PC.Action = "Reverse"; PC.Clip = "Clipped"; PC.Mode = "Automatic"; PC.tau = 0*'s'; PC.tauSet = 0*'s'; PC.alpha = 0.3; PC.bias = 0; PC.gamma = 1; PC.beta = 1; PC.intTime = 50*'s'; PC.gain = 0.5; PC.derivTime = 1*'s'; LCtop.Action = "Reverse"; LCtop.Clip = "Clipped"; LCtop.Mode = "Automatic"; LCtop.tau = 0*'s'; LCtop.tauSet = 0*'s'; LCtop.alpha = 0.3; LCtop.bias = 0.5; LCtop.gamma = 1; LCtop.beta = 1; LCtop.intTime = 10*'s'; LCtop.gain = 1; LCtop.derivTime = 0*'s'; LCbot.Action = "Reverse"; LCbot.Clip = "Clipped"; LCbot.Mode = "Automatic"; LCbot.tau = 0*'s'; LCbot.tauSet = 0*'s'; LCbot.alpha = 0.3; LCbot.bias = 0.5; LCbot.gamma = 1; LCbot.beta = 1; LCbot.intTime = 100*'s'; LCbot.gain = 1; LCbot.derivTime = 0*'s'; EQUATIONS "Temperature Controller" TCcond.Parameters.tau = 0*'s'; TCcond.Parameters.tauSet = 0*'s'; TCcond.Parameters.alpha = 0.3; TCcond.Parameters.bias = 0.5; TCcond.Parameters.gamma = 1; TCcond.Parameters.beta = 1; TCcond.Parameters.intTime = 60*'s'; TCcond.Parameters.gain = 0.6; TCcond.Parameters.derivTime = 1*'s'; TCcond.Ports.setPoint = ((15+273.15) * 'K' - Tmin)/(Tmax-Tmin); TCcond.Ports.input = Tad; Qc.OutletQ = Qcmin+(Qcmax-Qcmin)*TCcond.Ports.output; "Pressure Controller" PC.Parameters.tau = 0*'s'; PC.Parameters.tauSet = 0*'s'; PC.Parameters.alpha = 0.3; PC.Parameters.bias = 0; PC.Parameters.gamma = 1; PC.Parameters.beta = 1; PC.Parameters.intTime = 50*'s'; PC.Parameters.gain = 0.5; PC.Parameters.derivTime = 1*'s'; PC.Ports.setPoint = (4.0*'bar'-Pmin)/(Pmax-Pmin); PC.Ports.input = Pad; col.cond.OutletV.F = (Fcmin+(Fcmax-Fcmin)*PC.Ports.output); "Ttop Level Controller" LCtop.Parameters.tau = 0*'s'; LCtop.Parameters.tauSet = 0*'s'; LCtop.Parameters.alpha = 0.3; LCtop.Parameters.bias = 0.5; LCtop.Parameters.gamma = 1; LCtop.Parameters.beta = 1; LCtop.Parameters.intTime = 10*'s'; LCtop.Parameters.gain = 1; LCtop.Parameters.derivTime = 0*'s'; LCtop.Ports.setPoint = (1.0 * 'm' - Hmint)/(Hmaxt-Hmint); LCtop.Ports.input = Had_top; col.sptop.Outlet1.F = Fcmin + (Fcmax-Fcmin) * LCtop.Ports.output; "Tbottom Level Controller" LCbot.Parameters.tau = 0*'s'; LCbot.Parameters.tauSet = 0*'s'; LCbot.Parameters.alpha = 0.3; LCbot.Parameters.bias = 0.5; LCbot.Parameters.gamma = 1; LCbot.Parameters.beta = 1; LCbot.Parameters.intTime = 100*'s'; LCbot.Parameters.gain = 1; LCbot.Parameters.derivTime = 0*'s'; LCbot.Ports.setPoint = (1.0 * 'm' - Hminb)/(Hmaxb-Hminb); LCbot.Ports.input = Had_bot;
• ## branches/gui/sample/stage_separators/sample_columnReact.mso

 r530 if col.reb.startup then Qc.OutletQ.Q = 0 * PIDTcond.Ports.output * 'kJ/s'; Qr.OutletQ.Q = 0 * PIDTreb.Ports.output * 'kJ/s'; Qc.OutletQ = 0 * PIDTcond.Ports.output * 'kJ/s'; Qr.OutletQ = 0 * PIDTreb.Ports.output * 'kJ/s'; PIDTreb.Ports.input = PIDTreb.Ports.setPoint; else Qc.OutletQ.Q = Qcmin+(Qcmax-Qcmin)*PIDTcond.Ports.output; Qr.OutletQ.Q = Qrmin+(Qrmax-Qrmin)*PIDTreb.Ports.output; Qc.OutletQ = Qcmin+(Qcmax-Qcmin)*PIDTcond.Ports.output; Qr.OutletQ = Qrmin+(Qrmax-Qrmin)*PIDTreb.Ports.output; PIDTreb.Ports.input=Treb_ad; end SET PIDLreb.tau = 1*'s'; PIDLreb.tauSet=1*'s'; PIDLreb.bias = 0; PIDLreb.alpha=1; PIDLreb.gamma=1; PIDLreb.beta=1; PIDLreb.gain=0.9; PIDLreb.intTime=20*'s'; PIDLreb.derivTime=0*'s'; PIDLreb.Action = "Direct"; PIDLreb.Clip = "Clipped"; PIDLreb.Mode = "Automatic"; PIDLcond.tau = 1*'s'; PIDLcond.tauSet=1*'s'; PIDLcond.bias = 0.5; PIDLcond.alpha=1; PIDLcond.gamma=1; PIDLcond.beta=1; PIDLcond.gain=1; PIDLcond.intTime=10*'s'; PIDLcond.derivTime=1*'s'; PIDLcond.Action = "Direct"; PIDLcond.Clip = "Clipped"; PIDLcond.Mode = "Automatic"; PIDTreb.tau = 1*'s'; PIDTreb.tauSet=1*'s'; PIDTreb.bias = 0.2; PIDTreb.alpha=0.2; PIDTreb.gamma=1; PIDTreb.beta=1; PIDTreb.gain=0.9; PIDTreb.intTime=100*'s'; PIDTreb.derivTime=1*'s'; PIDTreb.Action = "Direct"; PIDTreb.Clip = "Clipped"; PIDTreb.Mode = "Automatic"; PIDTcond.tau = 1*'s'; PIDTcond.tauSet=1*'s'; PIDTcond.bias = 0.5; PIDTcond.alpha=0.2; PIDTcond.gamma=1; PIDTcond.beta=1; PIDTcond.gain=0.9; PIDTcond.intTime=100*'s'; PIDTcond.derivTime=1*'s'; PIDTcond.Action = "Reverse"; PIDTcond.Clip = "Clipped"; PIDTcond.Mode = "Automatic"; SPECIFY col.trays.Emv = 1; EQUATIONS # Variáveis dos PID's especificadas PIDLreb.Parameters.tau = 1*'s'; PIDLreb.Parameters.tauSet=1*'s'; PIDLreb.Parameters.bias = 0; PIDLreb.Parameters.alpha=1; PIDLreb.Parameters.gamma=1; PIDLreb.Parameters.beta=1; PIDLreb.Parameters.gain=0.9; PIDLreb.Parameters.intTime=20*'s'; PIDLreb.Parameters.derivTime=0*'s'; PIDLreb.Options.action=-1; PIDLreb.Options.clip=1; PIDLreb.Options.autoMan=0; PIDLreb.Ports.setPoint=(0.5 * 'm' - Lrebmin)/(Lrebmax-Lrebmin); Lreb_ad*(Lrebmax-Lrebmin)=col.reb.Level-Lrebmin; col.reb.OutletL.F = Frmin + (Frmax-Frmin) * PIDLreb.Ports.output; PIDLcond.Parameters.tau = 1*'s'; PIDLcond.Parameters.tauSet=1*'s'; PIDLcond.Parameters.bias = 0.5; PIDLcond.Parameters.alpha=1; PIDLcond.Parameters.gamma=1; PIDLcond.Parameters.beta=1; PIDLcond.Parameters.gain=1; PIDLcond.Parameters.intTime=10*'s'; PIDLcond.Parameters.derivTime=1*'s'; PIDLcond.Options.action=-1; PIDLcond.Options.clip=1; PIDLcond.Options.autoMan=0; PIDLcond.Ports.setPoint=(0.5 * 'm' - Lcondmin)/(Lcondmax-Lcondmin); Lcond_ad*(Lcondmax-Lcondmin)=col.cond.Level-Lcondmin; col.sp.Outlet1.F = Fmin + (Fmax-Fmin) * PIDLcond.Ports.output; PIDTreb.Parameters.tau = 1*'s'; PIDTreb.Parameters.tauSet=1*'s'; PIDTreb.Parameters.bias = 0.2; PIDTreb.Parameters.alpha=0.2; PIDTreb.Parameters.gamma=1; PIDTreb.Parameters.beta=1; PIDTreb.Parameters.gain=0.9; PIDTreb.Parameters.intTime=100*'s'; PIDTreb.Parameters.derivTime=1*'s'; PIDTreb.Options.action=1; PIDTreb.Options.clip=1; PIDTreb.Options.autoMan=0; PIDTreb.Ports.setPoint= (366 * 'K' - Trebmin)/(Trebmax-Trebmin); Treb_ad*(Trebmax-Trebmin)=col.reb.OutletL.T-Trebmin; PIDTcond.Parameters.tau = 1*'s'; PIDTcond.Parameters.tauSet=1*'s'; PIDTcond.Parameters.bias = 0.5; PIDTcond.Parameters.alpha=0.2; PIDTcond.Parameters.gamma=1; PIDTcond.Parameters.beta=1; PIDTcond.Parameters.gain=0.9; PIDTcond.Parameters.intTime=100*'s'; PIDTcond.Parameters.derivTime=1*'s'; PIDTcond.Options.action=1; PIDTcond.Options.clip=1; PIDTcond.Options.autoMan=0; PIDTcond.Ports.setPoint= (346 * 'K' - Tcondmin)/(Tcondmax-Tcondmin); Tcond_ad*(Tcondmax-Tcondmin)=col.cond.OutletL.T-Tcondmin;
Note: See TracChangeset for help on using the changeset viewer.