(* calculation of residual enthalpy and entropy for isobutane using the Pitzer model for vapor (non ideal) - in the text book, they have used compressibility data and calculated the integrals - page 213 *) REQUIRE "thermodynamics.a4l"; MODEL example63; component IS_A symbol_constant; component :== 'isobutane'; cd IS_A components_data([component],component); pvc IS_A Pitzer_vapor_component(P,T,cd.data[component]); ivc IS_A ideal_vapor_component(P,T,cd.data[component]); P IS_A pressure; T IS_A temperature; vivc, vpvc IS_A molar_volume; vresidual IS_A factor; hivc, hpvc, hresidual IS_A molar_energy; givc, gpvc, gresidual IS_A molar_energy; sivc, spvc, sresidual IS_A molar_entropy; vresidual = (pvc.v - ivc.v)/1.0{m^3/mole}; hresidual = pvc.h - ivc.h; gresidual = pvc.g - ivc.g; sresidual = (hresidual - gresidual)/T; METHODS METHOD values; P.fixed := TRUE; P := 15.41 {bar}; T.fixed := TRUE; T := 360.0 {K}; END values; METHOD all; RUN default_all; RUN values; END all; END example63;