diff options
Diffstat (limited to 'src/main/Simulator/Flowsheet_14lnz.c')
-rw-r--r-- | src/main/Simulator/Flowsheet_14lnz.c | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/src/main/Simulator/Flowsheet_14lnz.c b/src/main/Simulator/Flowsheet_14lnz.c deleted file mode 100644 index 0e38b92..0000000 --- a/src/main/Simulator/Flowsheet_14lnz.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Linearization */ -#include "Flowsheet_model.h" -#if defined(__cplusplus) -extern "C" { -#endif - -const char *Flowsheet_linear_model_frame() -{ - return "model linear_Flowsheet\n parameter Integer n = 0; // states\n parameter Integer k = 0; // top-level inputs\n parameter Integer l = 0; // top-level outputs\n" - " parameter Real x0[0] = {%s};\n" - " parameter Real u0[0] = {%s};\n" - " parameter Real A[0,0] = zeros(0,0);%s\n" - " parameter Real B[0,0] = zeros(0,0);%s\n" - " parameter Real C[0,0] = zeros(0,0);%s\n" - " parameter Real D[0,0] = zeros(0,0);%s\n" - " Real x[0];\n" - " input Real u[0];\n" - " output Real y[0];\n" - "\n \n" - "equation\n der(x) = A * x + B * u;\n y = C * x + D * u;\nend linear_Flowsheet;\n"; -} -const char *Flowsheet_linear_model_datarecovery_frame() -{ - return "model linear_Flowsheet\n parameter Integer n = 0; // states\n parameter Integer k = 0; // top-level inputs\n parameter Integer l = 0; // top-level outputs\n parameter Integer nz = 278; // data recovery variables\n" - " parameter Real x0[0] = {%s};\n" - " parameter Real u0[0] = {%s};\n" - " parameter Real z0[278] = {%s};\n" - " parameter Real A[0,0] = zeros(0,0);%s\n" - " parameter Real B[0,0] = zeros(0,0);%s\n" - " parameter Real C[0,0] = zeros(0,0);%s\n" - " parameter Real D[0,0] = zeros(0,0);%s\n" - " parameter Real Cz[278,0] = zeros(278,0);%s\n" - " parameter Real Dz[278,0] = zeros(278,0);%s\n" - " Real x[0];\n" - " input Real u[0];\n" - " output Real y[0];\n" - " output Real z[278];\n" - "\nReal 'z_$cse1' = z[1];\nReal 'z_$cse2' = z[2];\nReal 'z_$cse3' = z[3];\nReal 'z_$cse4' = z[4];\nReal 'z_$cse5' = z[5];\nReal 'z_MaterialStream1.Cp_p[1]' = z[6];\nReal 'z_MaterialStream1.Cp_p[2]' = z[7];\nReal 'z_MaterialStream1.Cp_p[3]' = z[8];\nReal 'z_MaterialStream1.Cp_pc[1,1]' = z[9];\nReal 'z_MaterialStream1.Cp_pc[1,2]' = z[10];\nReal 'z_MaterialStream1.Cp_pc[2,1]' = z[11];\nReal 'z_MaterialStream1.Cp_pc[2,2]' = z[12];\nReal 'z_MaterialStream1.Cp_pc[3,1]' = z[13];\nReal 'z_MaterialStream1.Cp_pc[3,2]' = z[14];\nReal 'z_MaterialStream1.Cpres_p[1]' = z[15];\nReal 'z_MaterialStream1.Cpres_p[2]' = z[16];\nReal 'z_MaterialStream1.Cpres_p[3]' = z[17];\nReal 'z_MaterialStream1.F_p[1]' = z[18];\nReal 'z_MaterialStream1.F_p[2]' = z[19];\nReal 'z_MaterialStream1.F_p[3]' = z[20];\nReal 'z_MaterialStream1.F_pc[1,1]' = z[21];\nReal 'z_MaterialStream1.F_pc[1,2]' = z[22];\nReal 'z_MaterialStream1.F_pc[2,1]' = z[23];\nReal 'z_MaterialStream1.F_pc[2,2]' = z[24];\nReal 'z_MaterialStream1.F_pc[3,1]' = z[25];\nReal 'z_MaterialStream1.F_pc[3,2]' = z[26];\nReal 'z_MaterialStream1.Fm_p[1]' = z[27];\nReal 'z_MaterialStream1.Fm_p[2]' = z[28];\nReal 'z_MaterialStream1.Fm_p[3]' = z[29];\nReal 'z_MaterialStream1.Fm_pc[1,1]' = z[30];\nReal 'z_MaterialStream1.Fm_pc[1,2]' = z[31];\nReal 'z_MaterialStream1.Fm_pc[2,1]' = z[32];\nReal 'z_MaterialStream1.Fm_pc[2,2]' = z[33];\nReal 'z_MaterialStream1.Fm_pc[3,1]' = z[34];\nReal 'z_MaterialStream1.Fm_pc[3,2]' = z[35];\nReal 'z_MaterialStream1.H_p[1]' = z[36];\nReal 'z_MaterialStream1.H_p[2]' = z[37];\nReal 'z_MaterialStream1.H_p[3]' = z[38];\nReal 'z_MaterialStream1.H_pc[1,1]' = z[39];\nReal 'z_MaterialStream1.H_pc[1,2]' = z[40];\nReal 'z_MaterialStream1.H_pc[2,1]' = z[41];\nReal 'z_MaterialStream1.H_pc[2,2]' = z[42];\nReal 'z_MaterialStream1.H_pc[3,1]' = z[43];\nReal 'z_MaterialStream1.H_pc[3,2]' = z[44];\nReal 'z_MaterialStream1.Hres_p[1]' = z[45];\nReal 'z_MaterialStream1.Hres_p[2]' = z[46];\nReal 'z_MaterialStream1.Hres_p[3]' = z[47];\nReal 'z_MaterialStream1.K_c[1]' = z[48];\nReal 'z_MaterialStream1.K_c[2]' = z[49];\nReal 'z_MaterialStream1.MW_p[1]' = z[50];\nReal 'z_MaterialStream1.MW_p[2]' = z[51];\nReal 'z_MaterialStream1.MW_p[3]' = z[52];\nReal 'z_MaterialStream1.P' = z[53];\nReal 'z_MaterialStream1.Pbubl' = z[54];\nReal 'z_MaterialStream1.Pdew' = z[55];\nReal 'z_MaterialStream1.Pvap_c[1]' = z[56];\nReal 'z_MaterialStream1.Pvap_c[2]' = z[57];\nReal 'z_MaterialStream1.S_p[1]' = z[58];\nReal 'z_MaterialStream1.S_p[2]' = z[59];\nReal 'z_MaterialStream1.S_p[3]' = z[60];\nReal 'z_MaterialStream1.S_pc[1,1]' = z[61];\nReal 'z_MaterialStream1.S_pc[1,2]' = z[62];\nReal 'z_MaterialStream1.S_pc[2,1]' = z[63];\nReal 'z_MaterialStream1.S_pc[2,2]' = z[64];\nReal 'z_MaterialStream1.S_pc[3,1]' = z[65];\nReal 'z_MaterialStream1.S_pc[3,2]' = z[66];\nReal 'z_MaterialStream1.Sres_p[1]' = z[67];\nReal 'z_MaterialStream1.Sres_p[2]' = z[68];\nReal 'z_MaterialStream1.Sres_p[3]' = z[69];\nReal 'z_MaterialStream1.T' = z[70];\nReal 'z_MaterialStream1.gma_c[1]' = z[71];\nReal 'z_MaterialStream1.gma_c[2]' = z[72];\nReal 'z_MaterialStream1.gmabubl_c[1]' = z[73];\nReal 'z_MaterialStream1.gmabubl_c[2]' = z[74];\nReal 'z_MaterialStream1.gmadew_c[1]' = z[75];\nReal 'z_MaterialStream1.gmadew_c[2]' = z[76];\nReal 'z_MaterialStream1.philiqbubl_c[1]' = z[77];\nReal 'z_MaterialStream1.philiqbubl_c[2]' = z[78];\nReal 'z_MaterialStream1.phivapdew_c[1]' = z[79];\nReal 'z_MaterialStream1.phivapdew_c[2]' = z[80];\nReal 'z_MaterialStream1.x_pc[1,1]' = z[81];\nReal 'z_MaterialStream1.x_pc[1,2]' = z[82];\nReal 'z_MaterialStream1.x_pc[2,1]' = z[83];\nReal 'z_MaterialStream1.x_pc[2,2]' = z[84];\nReal 'z_MaterialStream1.x_pc[3,1]' = z[85];\nReal 'z_MaterialStream1.x_pc[3,2]' = z[86];\nReal 'z_MaterialStream1.xliq' = z[87];\nReal 'z_MaterialStream1.xm_pc[1,1]' = z[88];\nReal 'z_MaterialStream1.xm_pc[1,2]' = z[89];\nReal 'z_MaterialStream1.xm_pc[2,1]' = z[90];\nReal 'z_MaterialStream1.xm_pc[2,2]' = z[91];\nReal 'z_MaterialStream1.xm_pc[3,1]' = z[92];\nReal 'z_MaterialStream1.xm_pc[3,2]' = z[93];\nReal 'z_MaterialStream1.xmliq' = z[94];\nReal 'z_MaterialStream1.xmvap' = z[95];\nReal 'z_MaterialStream2.Cp_p[1]' = z[96];\nReal 'z_MaterialStream2.Cp_p[2]' = z[97];\nReal 'z_MaterialStream2.Cp_p[3]' = z[98];\nReal 'z_MaterialStream2.Cp_pc[1,1]' = z[99];\nReal 'z_MaterialStream2.Cp_pc[1,2]' = z[100];\nReal 'z_MaterialStream2.Cp_pc[2,1]' = z[101];\nReal 'z_MaterialStream2.Cp_pc[2,2]' = z[102];\nReal 'z_MaterialStream2.Cp_pc[3,1]' = z[103];\nReal 'z_MaterialStream2.Cp_pc[3,2]' = z[104];\nReal 'z_MaterialStream2.Cpres_p[1]' = z[105];\nReal 'z_MaterialStream2.Cpres_p[2]' = z[106];\nReal 'z_MaterialStream2.Cpres_p[3]' = z[107];\nReal 'z_MaterialStream2.F_p[1]' = z[108];\nReal 'z_MaterialStream2.F_p[2]' = z[109];\nReal 'z_MaterialStream2.F_p[3]' = z[110];\nReal 'z_MaterialStream2.F_pc[1,1]' = z[111];\nReal 'z_MaterialStream2.F_pc[1,2]' = z[112];\nReal 'z_MaterialStream2.F_pc[2,1]' = z[113];\nReal 'z_MaterialStream2.F_pc[2,2]' = z[114];\nReal 'z_MaterialStream2.F_pc[3,1]' = z[115];\nReal 'z_MaterialStream2.F_pc[3,2]' = z[116];\nReal 'z_MaterialStream2.Fm_p[1]' = z[117];\nReal 'z_MaterialStream2.Fm_p[2]' = z[118];\nReal 'z_MaterialStream2.Fm_p[3]' = z[119];\nReal 'z_MaterialStream2.Fm_pc[1,1]' = z[120];\nReal 'z_MaterialStream2.Fm_pc[1,2]' = z[121];\nReal 'z_MaterialStream2.Fm_pc[2,1]' = z[122];\nReal 'z_MaterialStream2.Fm_pc[2,2]' = z[123];\nReal 'z_MaterialStream2.Fm_pc[3,1]' = z[124];\nReal 'z_MaterialStream2.Fm_pc[3,2]' = z[125];\nReal 'z_MaterialStream2.H_p[1]' = z[126];\nReal 'z_MaterialStream2.H_p[2]' = z[127];\nReal 'z_MaterialStream2.H_p[3]' = z[128];\nReal 'z_MaterialStream2.H_pc[1,1]' = z[129];\nReal 'z_MaterialStream2.H_pc[1,2]' = z[130];\nReal 'z_MaterialStream2.H_pc[2,1]' = z[131];\nReal 'z_MaterialStream2.H_pc[2,2]' = z[132];\nReal 'z_MaterialStream2.H_pc[3,1]' = z[133];\nReal 'z_MaterialStream2.H_pc[3,2]' = z[134];\nReal 'z_MaterialStream2.Hres_p[1]' = z[135];\nReal 'z_MaterialStream2.Hres_p[2]' = z[136];\nReal 'z_MaterialStream2.Hres_p[3]' = z[137];\nReal 'z_MaterialStream2.K_c[1]' = z[138];\nReal 'z_MaterialStream2.K_c[2]' = z[139];\nReal 'z_MaterialStream2.MW_p[1]' = z[140];\nReal 'z_MaterialStream2.MW_p[2]' = z[141];\nReal 'z_MaterialStream2.MW_p[3]' = z[142];\nReal 'z_MaterialStream2.P' = z[143];\nReal 'z_MaterialStream2.Pbubl' = z[144];\nReal 'z_MaterialStream2.Pdew' = z[145];\nReal 'z_MaterialStream2.Pvap_c[1]' = z[146];\nReal 'z_MaterialStream2.Pvap_c[2]' = z[147];\nReal 'z_MaterialStream2.S_p[1]' = z[148];\nReal 'z_MaterialStream2.S_p[2]' = z[149];\nReal 'z_MaterialStream2.S_p[3]' = z[150];\nReal 'z_MaterialStream2.S_pc[1,1]' = z[151];\nReal 'z_MaterialStream2.S_pc[1,2]' = z[152];\nReal 'z_MaterialStream2.S_pc[2,1]' = z[153];\nReal 'z_MaterialStream2.S_pc[2,2]' = z[154];\nReal 'z_MaterialStream2.S_pc[3,1]' = z[155];\nReal 'z_MaterialStream2.S_pc[3,2]' = z[156];\nReal 'z_MaterialStream2.Sres_p[1]' = z[157];\nReal 'z_MaterialStream2.Sres_p[2]' = z[158];\nReal 'z_MaterialStream2.Sres_p[3]' = z[159];\nReal 'z_MaterialStream2.T' = z[160];\nReal 'z_MaterialStream2.gma_c[1]' = z[161];\nReal 'z_MaterialStream2.gma_c[2]' = z[162];\nReal 'z_MaterialStream2.gmabubl_c[1]' = z[163];\nReal 'z_MaterialStream2.gmabubl_c[2]' = z[164];\nReal 'z_MaterialStream2.gmadew_c[1]' = z[165];\nReal 'z_MaterialStream2.gmadew_c[2]' = z[166];\nReal 'z_MaterialStream2.philiqbubl_c[1]' = z[167];\nReal 'z_MaterialStream2.philiqbubl_c[2]' = z[168];\nReal 'z_MaterialStream2.phivapdew_c[1]' = z[169];\nReal 'z_MaterialStream2.phivapdew_c[2]' = z[170];\nReal 'z_MaterialStream2.x_pc[1,1]' = z[171];\nReal 'z_MaterialStream2.x_pc[1,2]' = z[172];\nReal 'z_MaterialStream2.x_pc[2,1]' = z[173];\nReal 'z_MaterialStream2.x_pc[2,2]' = z[174];\nReal 'z_MaterialStream2.x_pc[3,1]' = z[175];\nReal 'z_MaterialStream2.x_pc[3,2]' = z[176];\nReal 'z_MaterialStream2.xliq' = z[177];\nReal 'z_MaterialStream2.xm_pc[1,1]' = z[178];\nReal 'z_MaterialStream2.xm_pc[1,2]' = z[179];\nReal 'z_MaterialStream2.xm_pc[2,1]' = z[180];\nReal 'z_MaterialStream2.xm_pc[2,2]' = z[181];\nReal 'z_MaterialStream2.xm_pc[3,1]' = z[182];\nReal 'z_MaterialStream2.xm_pc[3,2]' = z[183];\nReal 'z_MaterialStream2.xmliq' = z[184];\nReal 'z_MaterialStream2.xmvap' = z[185];\nReal 'z_MaterialStream3.Cp_p[1]' = z[186];\nReal 'z_MaterialStream3.Cp_p[2]' = z[187];\nReal 'z_MaterialStream3.Cp_p[3]' = z[188];\nReal 'z_MaterialStream3.Cp_pc[1,1]' = z[189];\nReal 'z_MaterialStream3.Cp_pc[1,2]' = z[190];\nReal 'z_MaterialStream3.Cp_pc[2,1]' = z[191];\nReal 'z_MaterialStream3.Cp_pc[2,2]' = z[192];\nReal 'z_MaterialStream3.Cp_pc[3,1]' = z[193];\nReal 'z_MaterialStream3.Cp_pc[3,2]' = z[194];\nReal 'z_MaterialStream3.Cpres_p[1]' = z[195];\nReal 'z_MaterialStream3.Cpres_p[2]' = z[196];\nReal 'z_MaterialStream3.Cpres_p[3]' = z[197];\nReal 'z_MaterialStream3.F_p[1]' = z[198];\nReal 'z_MaterialStream3.F_p[2]' = z[199];\nReal 'z_MaterialStream3.F_p[3]' = z[200];\nReal 'z_MaterialStream3.F_pc[1,1]' = z[201];\nReal 'z_MaterialStream3.F_pc[1,2]' = z[202];\nReal 'z_MaterialStream3.F_pc[2,1]' = z[203];\nReal 'z_MaterialStream3.F_pc[2,2]' = z[204];\nReal 'z_MaterialStream3.F_pc[3,1]' = z[205];\nReal 'z_MaterialStream3.F_pc[3,2]' = z[206];\nReal 'z_MaterialStream3.Fm_p[1]' = z[207];\nReal 'z_MaterialStream3.Fm_p[2]' = z[208];\nReal 'z_MaterialStream3.Fm_p[3]' = z[209];\nReal 'z_MaterialStream3.Fm_pc[1,1]' = z[210];\nReal 'z_MaterialStream3.Fm_pc[1,2]' = z[211];\nReal 'z_MaterialStream3.Fm_pc[2,1]' = z[212];\nReal 'z_MaterialStream3.Fm_pc[2,2]' = z[213];\nReal 'z_MaterialStream3.Fm_pc[3,1]' = z[214];\nReal 'z_MaterialStream3.Fm_pc[3,2]' = z[215];\nReal 'z_MaterialStream3.H_p[1]' = z[216];\nReal 'z_MaterialStream3.H_p[2]' = z[217];\nReal 'z_MaterialStream3.H_p[3]' = z[218];\nReal 'z_MaterialStream3.H_pc[1,1]' = z[219];\nReal 'z_MaterialStream3.H_pc[1,2]' = z[220];\nReal 'z_MaterialStream3.H_pc[2,1]' = z[221];\nReal 'z_MaterialStream3.H_pc[2,2]' = z[222];\nReal 'z_MaterialStream3.H_pc[3,1]' = z[223];\nReal 'z_MaterialStream3.H_pc[3,2]' = z[224];\nReal 'z_MaterialStream3.Hres_p[1]' = z[225];\nReal 'z_MaterialStream3.Hres_p[2]' = z[226];\nReal 'z_MaterialStream3.Hres_p[3]' = z[227];\nReal 'z_MaterialStream3.K_c[1]' = z[228];\nReal 'z_MaterialStream3.K_c[2]' = z[229];\nReal 'z_MaterialStream3.MW_p[1]' = z[230];\nReal 'z_MaterialStream3.MW_p[2]' = z[231];\nReal 'z_MaterialStream3.MW_p[3]' = z[232];\nReal 'z_MaterialStream3.P' = z[233];\nReal 'z_MaterialStream3.Pbubl' = z[234];\nReal 'z_MaterialStream3.Pdew' = z[235];\nReal 'z_MaterialStream3.Pvap_c[1]' = z[236];\nReal 'z_MaterialStream3.Pvap_c[2]' = z[237];\nReal 'z_MaterialStream3.S_p[1]' = z[238];\nReal 'z_MaterialStream3.S_p[2]' = z[239];\nReal 'z_MaterialStream3.S_p[3]' = z[240];\nReal 'z_MaterialStream3.S_pc[1,1]' = z[241];\nReal 'z_MaterialStream3.S_pc[1,2]' = z[242];\nReal 'z_MaterialStream3.S_pc[2,1]' = z[243];\nReal 'z_MaterialStream3.S_pc[2,2]' = z[244];\nReal 'z_MaterialStream3.S_pc[3,1]' = z[245];\nReal 'z_MaterialStream3.S_pc[3,2]' = z[246];\nReal 'z_MaterialStream3.Sres_p[1]' = z[247];\nReal 'z_MaterialStream3.Sres_p[2]' = z[248];\nReal 'z_MaterialStream3.Sres_p[3]' = z[249];\nReal 'z_MaterialStream3.T' = z[250];\nReal 'z_MaterialStream3.gma_c[1]' = z[251];\nReal 'z_MaterialStream3.gma_c[2]' = z[252];\nReal 'z_MaterialStream3.gmabubl_c[1]' = z[253];\nReal 'z_MaterialStream3.gmabubl_c[2]' = z[254];\nReal 'z_MaterialStream3.gmadew_c[1]' = z[255];\nReal 'z_MaterialStream3.gmadew_c[2]' = z[256];\nReal 'z_MaterialStream3.philiqbubl_c[1]' = z[257];\nReal 'z_MaterialStream3.philiqbubl_c[2]' = z[258];\nReal 'z_MaterialStream3.phivapdew_c[1]' = z[259];\nReal 'z_MaterialStream3.phivapdew_c[2]' = z[260];\nReal 'z_MaterialStream3.x_pc[1,1]' = z[261];\nReal 'z_MaterialStream3.x_pc[1,2]' = z[262];\nReal 'z_MaterialStream3.x_pc[2,1]' = z[263];\nReal 'z_MaterialStream3.x_pc[2,2]' = z[264];\nReal 'z_MaterialStream3.x_pc[3,1]' = z[265];\nReal 'z_MaterialStream3.x_pc[3,2]' = z[266];\nReal 'z_MaterialStream3.xliq' = z[267];\nReal 'z_MaterialStream3.xm_pc[1,1]' = z[268];\nReal 'z_MaterialStream3.xm_pc[1,2]' = z[269];\nReal 'z_MaterialStream3.xm_pc[2,1]' = z[270];\nReal 'z_MaterialStream3.xm_pc[2,2]' = z[271];\nReal 'z_MaterialStream3.xm_pc[3,1]' = z[272];\nReal 'z_MaterialStream3.xm_pc[3,2]' = z[273];\nReal 'z_MaterialStream3.xmliq' = z[274];\nReal 'z_MaterialStream3.xmvap' = z[275];\nReal 'z_MaterialStream3.xvap' = z[276];\nReal 'z_Mixer1.xvapin_s[1]' = z[277];\nReal 'z_Mixer1.xvapin_s[2]' = z[278];\n\n" - "equation\n der(x) = A * x + B * u;\n y = C * x + D * u;\n z = Cz * x + Dz * u;\nend linear_Flowsheet;\n"; -} -#if defined(__cplusplus) -} -#endif - |