Last active
October 11, 2020 21:46
-
-
Save santiago-salas-v/307ecc35ed3c5d8db2d7cfd86de9f5e5 to your computer and use it in GitHub Desktop.
Higher and lower heating values of alkanes series C1-C20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from numpy import float,array,arange,ones,mean,linspace,linalg | |
from matplotlib import pyplot as plt | |
# source data: Poling, B. E., Prausnitz, J. M., & O'connell, J. P. (2001). The properties of gases and liquids (Vol. 5). New York: Mcgraw-hill. | |
data_source="""z_i;cas_no;phase;formula;formula_name_structure;ant_name;poling_no;poling_formula;poling_name;poling_molwt [g/mol] ;poling_tfp [K] ;poling_tb [K] ;poling_tc [K] ;poling_pc [bar] ;poling_vc [cm3/mol] ;poling_zc;poling_omega;poling_delhf0 [kJ/mol] ;poling_delgf0 [kJ/mol] ;poling_delhb [kJ/mol] ;poling_delhm [kJ/mol] ;poling_v_liq [cm3/mol] ;poling_t_liq [K] ;poling_dipole [Debye] ;p_ant_a;p_ant_b [K] ;p_ant_c [K] ;p_ant_tmin [K] ;p_ant_tmax [K] ;p_ant_pvpmin [bar] ;p_ant_pvpmax [bar] ;eant_to [K] ;eant_n;eant_e;eant_f;eant_tmin [K] ;eant_tmax [K] ;eant_pvpmin [bar] ;eant_pvpmax [bar] ;wagn_a;wagn_b;wagn_c;wagn_d;wagn_tmin [K] ;wagn_tmax [K] ;wagn_pvpmin [bar] ;wagn_pvpmax [bar] ;range_tmin_to_1000 [K] ;range_1000_to_tmax [K] ;molecular_weight [g/mol] ;hf298_div_r;a1_low;a2_low [K^-1] ;a3_low [K^-2] ;a4_low [K^-3] ;a5_low [K^-4] ;a6_low [K^-1] ;a7_low;a1_high;a2_high [K^-1] ;a3_high [K^-2] ;a4_high [K^-3] ;a5_high [K^-4] ;a6_high [K^-1] ;a7_high;reference;source;date;ant_no;ant_formula;ant_name;ant_a;ant_b;ant_c;ant_tmin [°C] ;ant_tmax [°C] ;ant_code | |
0;74-82-8;G;CH4 RRHO;CH4 METHANE SAME AS THE ANHARMONIC BUT CALCULATED USING THE RRHO METHOD RATHER THAN THE NRRAO2.;methane;26;CH4;methane;16,043;90,69;111,66;190,56;45,992;98,6;0,286;0,011;-74,52;-50,45;8,17;0,94;35,54;90,68;0;3,7687;395,744;266,681;92,64;120,59;0,15;2;;;;;;;;;-6,02242;1,26652;-0,5707;-1,366;;190,55;;45,99;200;6000;16,04246;-8972,26656;5,14825732;-0,013700241;4,93749414e-05;-4,91952339e-08;1,70097299e-11;-10245,3222;-4,63322726;1,911786;0,0096026796;-3,38387841e-06;5,3879724e-10;-3,19306807e-14;-10099,2136;8,48241861;;g;8/99;137;CH4;methane;6,84377;435,4534;271,361;-196,85;-82,59;1,2 | |
0;74-84-0;G;C2H6;C2H6 ETHANE;ethane;65;C2H6;ethane;30,07;90,35;184,55;305,32;48,71;145,5;0,279;0,099;-83,82;-31,86;14,7;2,86;46,15;90,36;0;3,95405;663,72;256,681;133,8;198,16;0,02;2;;;;;;;;;-6,475;1,41071;-1,144;-1,859;;305,33;;48,71;200;6000;30,06904;-10084,9652;4,29142572;-0,00550154901;5,99438458e-05;-7,08466469e-08;2,68685836e-11;-11522,2056;2,66678994;4,04666411;0,0153538802;-5,47039485e-06;8,77826544e-10;-5,23167531e-14;-12447,3499;-0,968698313;CHAO WILHOIT & ZWOLINSKI JPCRD 2,(1973), 427;g;8/88;491;C2H6;ethane;6,95185;698,9298;260,264;-142,83;32,17;1,2 | |
0;74-98-6;G;C3H8;C3H8 PROPANE CH3CH2CH3;propane;95;C3H8;propane;44,097;91,45;231,02;369,83;42,47;200;0,276;0,152;-104,68;-24,29;19,04;3,53;74,87;233,15;0;3,92828;803,997;247,04;168,9;247,76;0,02;2;;;;;;;;;-6,76368;1,55481;-1,5872;-2,024;;369,85;;42,47;200;6000;44,09562;-12590,0384;4,21093013;0,00170886504;7,06530164e-05;-9,20060565e-08;3,64618453e-11;-14381,0883;5,61004451;6,6691976;0,0206108751;-7,36512349e-06;1,18434262e-09;-7,0691463e-14;-16275,4066;-13,1943379;CHAO WILHOIT & ZWOLINSKI JPCRD 2, (1973),427;g;2/00;959;C3H8;propane;7,02022;889,8642;257,084;-109,27;96,74;1,2 | |
0;106-97-8;G;C4H10 n-butane;N-C4H10 N-BUTANE ***THIS IS AN EQUILIBRIUM MIXTURE OF 1/3 TRANS AND 2/3 GAUCHE THROUGH STATWT.;butane;127;C4H19;butane;58,123;134,79;272,66;425,12;37,92;255;0,274;0,2;-125,79;-16,57;22,44;4,66;100,48;298,15;0;3,93266;935,773;238,789;200,5;292,03;0,02;2;;;;;;;;;-7,01763;1,6777;-1,9739;-2,172;;425,25;;37,92;200;6000;58,1222;-15128,9733;6,14474013;0,000164500242;9,67848789e-05;-1,25486208e-07;4,97846257e-11;-17598,9467;-1,08058878;9,44547835;0,025785662;-9,23613194e-06;1,48631762e-09;-8,87891206e-14;-20138,3773;-26,3477585;CHEN, WILHOIT & ZWOLINSKI JPCRD 4,(1975),859;g;12/00;1526;C4H10;butane;7,00908;1022,3862;248,145;-78;18,99;1,2 | |
0;109-66-0;G;C5H12 n-pentane;C5H12 N-PENTANE;pentane;166;CsH!2;pentane;72,15;143,43;309,22;469,7;33,75;311;0,268;0,252;-146,76;-8,65;25,79;8,4;115,22;298,15;0;3,97786;1064,84;232,014;228,71;330,75;0,02;2;;;;;;;;;-7,30698;1,75845;-2,1629;-2,913;;469,8;;33,75;200;6000;72,14878;-18318,5963;10,0497596;-0,0193518827;0,000147547505;-1,69025747e-07;6,2897026e-11;-21454,0416;-12,1225373;8,65672621;0,0335941679;-1,19261233e-05;1,90508655e-09;-1,13196179e-13;-23506,8212;-16,9334289;BURCAT G3B3;T;4/10;2220;C5H12;pentane;7,00892;1134,1488;238,678;-49,93;57,67;1,2 | |
0;110-54-3;G;C6H14,n-hexane;C6H14 N-HEXANE;hexane;216;c6hm;hexane;86,177;177,84;341,88;507,6;30,35;368;0,264;0,3;-166,92;0,15;28,85;13,07;131,59;298,15;0;4,00139;1170,875;224,317;254,24;365,25;0,02;2;;;;;;;;;-7,53998;1,83759;-2,5438;-3,163;;507,9;;30,35;200;6000;86,17536;-20075,7471;9,87121167;-0,00936699002;0,000169887865;-2,1501952e-07;8,45407091e-11;-23718,5495;-12,4999353;19,5158086;0,0267753942;-7,49783741e-06;1,19510646e-09;-7,51957473e-14;-29436,2466;-77,4895497;;g;6/01;3139;C6H14;hexane;6,98978;1216,9154;227,451;-24,29;92,12;1,2 | |
0;142-82-5;C;C7H16(L) n-hept;C7H16 LIQUID N-HEPTANE;heptane;259;C7H16;heptane;100,204;182,59;371,57;540,2;27,35;428;0,261;0,35;-187,8;8,2;31,77;14,03;147,47;298,15;0;4,02023;1263,909;216,432;277,71;396,53;0,02;2;;;;;;;;;-7,77404;1,85614;-2,8298;-3,507;;540,15;;27,35;182,58;380;100,20194;-26982,9491;69,8058594;-0,630275879;0,00308862295;-6,40121661e-06;5,09570496e-09;-36823,8127;-261,086466;0;0;0;0;0;0;0;TRC 10/75;P;10/75;4297;C7H16;heptane;7,0467;1341,8887;223,733;-1,81;123,47;1,2 | |
0;111-65-9;C;C8H18(L),n-octan;N-OCTANE LIQUID, DATA TAKEN FROM TRC 10/84;octane;296;C8H18;octane;114,231;216,39;398,82;568,7;24,9;492;0,259;0,399;-208,75;16,27;34,41;20,65;163,53;298,15;0;4,05075;1356,36;209,635;299,42;425,23;0,02;2;;;;;;;;;8,04937;2,03865;-3,312;-3,648;;568,95;;24,9;216,37;400;114,22852;-30099,188;93,7687938;-0,858272117;0,00394831328;-7,58573055e-06;5,41151011e-09;-42354,6607;-354,100158;0;0;0;0;0;0;0;;P;10/84;5703;C8H18;octane;7,14535;1498,9589;225,874;18,04;152,32;1,2 | |
0;111-84-2;L;C9H20(L);C9H20 LIQ NONANE;nonane;334;C9H20;nonane;128,258;219,66;423,97;594,6;22,9;555;0,257;0,445;-228,86;25;36,91;15,5;179,7;298,15;0;4,07356;1438,03;202,694;319,57;451,64;0,02;2;;;;;;;;;-8,32886;2,25707;-3,8257;-3,732;;594,9;;22,9;298,15;423,43;128,2578;-33131,8382;34,1721095;0,000258204426;-6,96987194e-07;6,20423745e-10;0;-43326,7971;-147,402676;0;0;0;0;0;0;0;I.BARIN 1987 HF298LIQ;B;01/00;7139;C9H20;nonane;7,18909;1607,7359;222,414;37,36;178,79;1,2 | |
0;124-18-5;G;N-C10H22 DECANE;N-C10H22 N-DECANE BUREAU OF MINES BULL 666 1974 DATA TO 1500. K EXTRAPOLATED USING WILHOIT'S POLYNOMIALS;decane;360;;decane;142,285;243,49;447,3;617,7;21,05;624;0,256;0,49;-249,53;33,3;38,75;28,78;195,95;298,15;0;4,06853;1495,17;193,858;338,53;476,15;0,02;2;;;;;;;;;-8,60643;2,44659;-4,2925;-3,908;;617,65;;21,05;200;6000;142,28468;-30011,8419;15,4328173;-0,0132979232;0,000282480581;-3,65923298e-07;1,45372117e-10;-35863,2831;-27,9454341;29,4782956;0,0490518943;-1,70317179e-05;2,729193e-09;-1,63370772e-13;-44302,2624;-124,062121;;T;5/99;8711;C10H22;decane;7,22035;1694,6279;216,459;55,97;203,16;1,2 | |
0;1120-21-4;G;N-UNDECANE;N-C11H24 UNDECANE;undecane;369;C11H24;undecane;156,312;247,57;469,08;639;19,55;689;0,257;0,537;-270,16;41,25;41,2;22,32;212,24;298,15;0;4,0971;1569,57;187,7;356,25;499;0,02;2;;;;;;;;;-8,85076;2,60205;-4,7305;-4,081;;638,85;;19,55;200;6000;156,31156;-32507,7966;16,7589055;-0,0135771822;0,000308216871;-4,00562662e-07;1,59274225e-10;-38907,6869;-31,5628516;34,1070654;0,0507865991;-1,73797396e-05;2,76048145e-09;-1,64248726e-13;-48848,625;-147,5466;TRC11/75 TO 1000 K. EXTRAPOLATED USING WILHOIT'S POLYNOMIALS.;T;5/99;10224;C11H24;undecane;7,18058;1706,2645;200,897;75,17;225,8;1,2 | |
0;112-40-3;G;N-DODECANE;N-C12H26 DODECANE;dodecane;377;C12H26;dodecane;170,338;263,57;489,48;658;18,3;754;0,251;0,576;-290,79;49,53;43,4;36,58;228,59;298,15;0;4,12285;1639,27;181,84;372,89;520,24;0,02;2;;;;;;;;;-9,08593;2,77846;-5,1985;-4,173;;658,65;;18,3;200;6000;170,33844;-34983,6226;21,326448;-0,0386394002;0,000399476113;-5,06681097e-07;2,00697878e-10;-42247,5053;-48,58483;37,0187925;0,0554721488;-1,92079548e-05;3,08175574e-09;-1,84800617e-13;-52698,4458;-161,453501;TRC11/75 TO 1000 K. EXTRAPOLATED USING WILHOIT'S POLYNOMIALS.;T;5/99;11897;C12H26;dodecane;7,24104;1810,4995;199,381;90,72;246,64;1,2 | |
0;629-50-5;G;C13H28 TriDecane;C13H28 N-TRIDECANE;tridecane;380;C13H28;tridecane;184,365;267,76;508,63;675;17,1;823;0,246;0,618;-311,42;57,81;45,65;28,5;244,94;298,15;0;4,13246;1690,67;174,22;388,85;540,19;0,02;2;;;;;;;;;-9,32959;2,89925;-5,555;-4,47;;676;;17,1;298,15;5000;184,36142;-37464,6251;3,45572089;0,111282579;2,80831695e-05;-1,17430924e-07;5,80777932e-11;-43484,5746;26,3598264;35,0551301;0,0698462297;-2,56347486e-05;4,43792889e-09;-2,930932e-13;-55252,8723;-149,65608;NIST 94 EXTRAPOLATED USING WILHOIT'S POLYNOMIALS FROM 1600-5000 K.;T;8/06;13812;C13H28;tridecane;7,342;1958,0087;203,429;105,31;267,23;1,2 | |
0;629-59-4;G;n-C14H30 Tetrade;C14H30 N-TETRADECANE CALCULATED FROM TRC/10/75 VALUES TO 1000 K, EXTRAPOLATED USING WILHOIT'S POLYNOMIALS TO 5000. K;tetradecane;385;C14H30;tetradecane;198,392;279,01;526,76;693;16,1;894;0,244;0,644;-332,05;66,09;47,61;45,61;261,32;298,15;0;4,1379;1740,88;167,72;403,69;559,15;0,02;2;;;;;;;;;-9,5447;3,06637;-6,007;-4,53;;693;;16,1;200;5000;198,388;-39942,2215;21,5069837;-0,0214808301;0,000407300016;-5,30537029e-07;2,114818e-10;-48049,6471;-45,47742;40,4003173;0,0708444774;-2,77400669e-05;5,1232612e-09;-3,57048031e-13;-59639,5764;-176,386929;PROSEN & ROSSINI J RES NBS (1945),263;T;2/10;15599;C14H30;tetradecane;7,38975;1954,0312;183,519;122,29;280,85;1,2 | |
0;629-62-9;G;C15H32 n-PentaDe;C15H32 N-PENTADECANE FROM TRC TABLES 10/75;pentadecane;387;C15H32;pentadecane;212,419;283,08;543,83;708;15,15;966;0,243;0,685;-352,68;74,37;49,45;34,8;277,71;298,15;0;4,14849;1789,95;161,38;417,8;576,9;0,02;2;;;;;;;;;-9,80239;3,29217;-6,5317;-4,584;;708;;15,15;200;5000;212,41458;-42672,3884;23,0078383;-0,0250591511;0,000448515847;-5,90443253e-07;2,38352918e-10;-51326,6878;-49,5873206;42,2048667;0,0767209788;-2,95720517e-05;5,39289272e-09;-3,72487743e-13;-63265,1036;-183,862573;PROSEN & ROSSINI J RES NBS (1945),263 HF298(LIQ);T;2/10;17482;C15H32;pentadecane;7,42974;2026,6694;178,677;136,53;298,42;1,2 | |
0;544-76-3;G;C16H34 Hexadecan;C16H34 N-HEXADECANE (CETANE);hexadecane;389;C16H34;hexadecane;226,446;291,32;559,98;723;14,35;1034;0,241;0,718;-373,31;82,65;51,21;51,84;294,11;298,15;0;4,15357;1830,51;154,45;431,47;593,8;0,02;2;;;;;;;;;-10,03664;3,41426;-6,8627;-4,863;;722;;14,35;298,15;5000;226,44596;-45042,9238;-2,281474;0,185127971;-9,91782207e-05;1,43398377e-08;3,73230542e-12;-51744,9265;56,0024917;39,3197519;0,0911470601;-3,3972114e-05;5,94437262e-09;-3,95796331e-13;-65166,5791;-166,160224;NIST 94 + THERGAS + THERM 1500 K 0.36;S;5/01;18600;C16H34;hexadecane;7,56621;2161,1732;180,407;148,73;312,52;1,2 | |
0;629-78-7;;;;heptadecane;392;C17H36;heptadecane;240,473;295,13;574,56;736;13,7;1103;0,242;0,753;-393,94;90,93;52,89;40,5;310,45;298,15;0;4,1392;1865,1;149,2;443,5;610;0,02;2;;;;;;;;;-10,236;3,54177;-7,1898;-5;;735;;13,7;;;;;;;;;;;;;;;;;;;;;;19734;C17H36;heptadecane;7,25896;2028,1139;161,086;162,95;336,35;1,2 | |
0;593-45-3;G;C18H38 n-Octadeca;C18H38 N-OCTADECANE;octadecane;397;;octadecane;254,5;301,32;588,3;747;13;1189;0,247;0,8;-414,57;99,21;54,46;61,39;326,66;298,15;0;4,1271;1894,3;143,3;455;625;0,02;2;;;;;;;;;-10,4723;3,69655;-7,5779;-5,109;;746;;13;200;5000;254,49432;-49858,7072;26,7546979;-0,0228050981;0,000512378584;-6,72132856e-07;2,6826799e-10;-60147,2323;-59,5926489;53,3793539;0,0873248162;-3,41007724e-05;6,29918051e-09;-4,39260715e-13;-75543,619;-239,366693;TRC-10/75 TABLES TO 1000 K EXTRAPOLATED USING WILHOIT'S POLYNOMIALS. HF298(LIQ);T;4/07;20943;C18H38;octadecane;7,41111;2195,8987;168,564;173,95;350,65;1,2 | |
0;629-92-5;G;n-C19H40 NanoDec;C19H40 N-NANODECANE CALCULATED FROM TRC 10/75 TABLES TO 1000 K AND EXTRAPOLATED TO 5000 K USING WILHOIT'S POLYNOMIALS.;nonadecane;399;C19H40;nonadecane;268,527;305,25;602,34;755;12,3;;;0,845;-435,2;107,49;56,02;45,82;343,25;298,15;0;4,1402;1932,8;137,6;466,5;639;0,02;2;;;;;;;;;-10,68217;3,98054;-8,303;-4,995;;758;;12,3;200;5000;268,5209;-52330,2035;28,133399;-0,0240709001;0,000542583111;-7,13371639e-07;2,85241269e-10;-63166,9003;-63,4023153;56,1326279;0,0923125523;-3,61586729e-05;6,696658e-09;-4,67925768e-13;-79319,1628;-252,422165;PROSEN & ROSSONI J RES NBS (1945),263;T;2/10;22186;C19H40;nonadecane;7,28977;2173,5162;163,227;182,34;365,88;1,2 | |
0;112-95-8;G;n-C20H42 Eicosan;C20H42 N-EICOSANE FROM TRC 10/75 TABLES TO 1000 K EXTRAPOLATED USING WILHOIT'S POLYNOMIALS TO 5000 K;eicosane;401;;eicosane;282,554;309,95;616,84;768;11,6;;;0,865;-455,83;115,77;57,49;69,87;361,18;298,15;0;4,2771;2032,7;132,1;481,1;652;0,02;2;;;;;;;;;-10,97958;4,25588;-8,9573;-5,043;;769;;11,6;200;5000;282,54748;-54819,827;29,662641;-0,0261773931;0,000573787447;-7,54415937e-07;3,01710335e-10;-66221,1929;-67,8138901;59,516725;0,0961907426;-3,76148482e-05;6,96058151e-09;-4,86107583e-13;-83363,4207;-268,948647;PROSEN & ROSSINI J RES NBS 1945 263-267;T;7/07;23507;C20H42;eicosane;7,27683;2208,5238;158,612;193,24;380,71;1,2 | |
""" | |
data=[x.split(';') for x in data_source.split('\n') if len(x)>0] | |
index_delta_f_H0=[j for j,x in enumerate(data[0]) if 'poling_delhf0' in x] | |
delta_f_H0=[float(x[index_delta_f_H0[0]].replace(',','.')) for j,x in enumerate(data) if j>0] # formation enthalpy | |
n_max=len(delta_f_H0) | |
n_series=arange(1,n_max+1) | |
# lin_reg | |
h=array([[1,x] for x in n_series]); # design matrix H for parameters: y=[b,m] | |
hT_h=h.T.dot(h) | |
hT_h_inv_hT=linalg.inv(hT_h).dot(h.T) # pseudoinverse | |
y=hT_h_inv_hT.dot(delta_f_H0) # estimated parameters | |
# goodness of fit | |
x_est=h.dot(y) | |
e=delta_f_H0-x_est | |
sse=e.T.dot(e) | |
ssr=(x_est-mean(delta_f_H0)).T.dot(x_est-mean(delta_f_H0)) | |
sst=(delta_f_H0-mean(delta_f_H0)).T.dot(delta_f_H0-mean(delta_f_H0)) | |
r_sq=1-sse/sst | |
# calculate hhv and lhv | |
# hhv: higher heating value, Brennwert, oberer Heizwert, combustion enthalpy | |
# lhv: lower heating value, Heizwert, unterer Heizwert | |
lhv=abs(n_series*-393.51+(n_series+1)*(-241.81)-h.dot(y)) # LHV according to: C_{n}H_{2n+2}+\frac{3n+1}{2}O_2 \Rightleftharpoons n CO_2 + (n+1) H_2O_{(l)} | |
hhv=abs(n_series*-393.51+(n_series+1)*(-241.81-40.66)-h.dot(y)) # HHV according to: C_{n}H_{2n+2}+\frac{3n+1}{2}O_2 \Rightleftharpoons n CO_2 + (n+1) H_2O_{(l)} | |
# also regress hhv | |
h=array([[1,x] for x in n_series]); # design matrix H for parameters: y=[b,m] | |
hT_h=h.T.dot(h) | |
hT_h_inv_hT=linalg.inv(hT_h).dot(h.T) # pseudoinverse | |
y2=hT_h_inv_hT.dot(hhv) # estimated parameters | |
# goodness of fit | |
x_est2=h.dot(y2) | |
e=hhv-x_est2 | |
sse=e.T.dot(e) | |
ssr=(x_est-mean(hhv)).T.dot(x_est-mean(hhv)) | |
sst=(delta_f_H0-mean(hhv)).T.dot(hhv-mean(hhv)) | |
r_sq2=1-sse/sst | |
plt.subplot(121) | |
plt.plot(n_series,delta_f_H0,'.',n_series,x_est,'--') | |
xticks=plt.xticks() | |
plt.xlabel('n') | |
plt.xticks(xticks[0],['{:d}'.format(int(x)) for x in xticks[0]]) | |
plt.ylabel(r'$\frac{\Delta_F{H}^\circ(298,15~K)}{kJ~/~mol}$') | |
plt.title( | |
'$C_nH_{2n+2}$ Alkanes enthalpy of formation\n'+ | |
r'${:0.4g}\cdot n +{:0.4g}$'.format(y[1],y[0])+'\n'+ | |
r' $R^2={:0.4g}$'.format(r_sq)) | |
plt.xlim(1,20) | |
plt.subplot(122) | |
plt.plot(n_series,lhv,'.',n_series,hhv,'x',n_series,x_est2,'--') | |
plt.xlabel('n') | |
plt.xticks(xticks[0],['{:d}'.format(int(x)) for x in xticks[0]]) | |
plt.ylabel(r'$\frac{|\Delta_R{H}^\circ(298,15~K)|}{kJ~/~mol}$') | |
plt.title(r'$C_{n}H_{2n+2}+\frac{3n+1}{2}O_2$'+'\n'+r'$\rightleftharpoons n CO_2 + (n+1) H_2O_{(l~or~v)}$'+'\n' | |
r'${:0.4g}\cdot n +{:0.4g}$'.format(y2[1],y2[0])+'\n'+ | |
r' $R^2={:0.4g}$'.format(r_sq2)) | |
plt.xlim(1,20) | |
plt.legend(['LLV - $H_2O_{(l)}$', 'HHV - $H_2O_{(v)}$']) | |
plt.tight_layout() | |
n_series=arange(1,20+1) | |
plt.figure() | |
plt.plot(n_series,0.044*1000/abs((1+1/n_series)*(-241.81-40.66)-393.51+20.49+1/n_series*45.27),'.',[1,20],[0.067125,0.067125],'--',linspace(0,1.025,2),0.044*1000*linspace(0,1.025,2)/abs((-241.81-40.66)+45.27),'-.') | |
xticks=plt.xticks() | |
plt.xlabel('n') | |
plt.xticks(xticks[0],['{:d}'.format(int(x)) for x in xticks[0]]) | |
plt.ylabel(r'$\frac{n \cdot \tilde{M}_{CO_2}}{HHV}~[=]\frac{g_{CO_2}}{kJ}$') | |
plt.xlim(0,20) | |
plt.legend(['n=1..20',r'$n\rightarrow \inf$',r'$n\rightarrow 0$']) | |
plt.tight_layout() | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment