/[ascend]/trunk/models/johnpye/iapws95.a4c
ViewVC logotype

Diff of /trunk/models/johnpye/iapws95.a4c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 111 by johnpye, Wed Dec 14 00:34:09 2005 UTC revision 112 by johnpye, Wed Dec 14 06:25:28 2005 UTC
# Line 1  Line 1 
1  REQUIRE "system.a4l";  REQUIRE "system.a4l";
2  REQUIRE "atoms.a4l";  REQUIRE "atoms.a4l";
3  REQUIRE "johnpye/thermo_types.a4c";  REQUIRE "johnpye/thermo_types.a4c";
4    REQUIRE "johnpye/iapws_sat_curves.a4c";
5    
6  (*************************************************************************  (*************************************************************************
7    
# Line 53  Software Foundation, Inc., 59 Temple Pla Line 54  Software Foundation, Inc., 59 Temple Pla
54  Boston, MA 02111-1307  USA  Boston, MA 02111-1307  USA
55    
56  *)  *)
   
 MODEL thermo_state;  
     T IS_A temperature;  
     rho IS_A mass_density;  
     p IS_A pressure;  
     u IS_A specific_energy;  
     h IS_A specific_enthalpy;  
     s IS_A specific_entropy;  
     cp IS_A specific_heat_capacity;  
     cv IS_A specific_heat_capacity;  
     w IS_A speed;  
 END thermo_state;  
57            
58  MODEL iapws95_1phase REFINES thermo_state;  MODEL iapws95_1phase REFINES thermo_state;
59    
# Line 499  END values; Line 488  END values;
488    
489  END iapws95_1phase;  END iapws95_1phase;
490    
 MODEL iapws_sat_curves;  
   
     rhof IS_A mass_density;  
     rhog IS_A mass_density;  
     rhoc IS_A mass_density_constant;  
     Tc IS_A temperature_constant;  
     T IS_A temperature;  
       
     rhoc :== 322 {kg/m^3};  
     Tc :== 647.096 {K};  
   
     tau IS_A factor;  
   
     tau = 1 - T/Tc;  
   
     rhof / rhoc =  1 + b[1]*tau^(1/3) + b[2]*tau^(2/3) + b[3]*tau^(5/3) + b[4]*tau^(16/3) + b[5] * tau^(43/3) + b[6]*tau^(110/3);  
   
     rhog / rhoc = exp( c[1]*tau^(2/6) + c[2] * tau^(4/6) +c[3]*tau^(8/6) + c[4] *tau^(18/6) + c[5]*tau^(37/6) + c[6]*tau^(71/6) );  
   
     b[1..6] IS_A real_constant;  
     b[1] :== 1.99274064;  
     b[2] :== 1.09965342;  
     b[3] :== -0.510839303;  
     b[4] :== -1.75493479;  
     b[5] :== -45.5170352;  
     b[6] :== -6.74694450e5;  
   
     c[1..6] IS_A real_constant;  
     c[1] :== -2.03150240;  
     c[2] :== -2.68302940;  
     c[3] :== -5.38626492;  
     c[4] :== -17.2991605;  
     c[5] :== -44.7586581;  
     c[6] :== -63.9201063;  
   
 METHODS  
   
 METHOD default_self;  
     RUN test_1;  
 END default_self;  
   
 METHOD specify;  
     T.fixed := TRUE;  
 END specify;  
   
 METHOD values;  
     T := 273.16 {K};  
 END values;  
   
 (* the following methods implement the reference data points from the IAPWS supsat.pdf release. *)  
   
 METHOD test_1;  
     RUN ClearAll;  
     RUN specify;  
     RUN values;  
 END test_1;  
   
 METHOD test_2;  
     RUN ClearAll;  
     RUN specify;  
     T := 373.1243 {K};  
 END test_2;  
   
 METHOD test_3;  
     RUN ClearAll;  
     RUN specify;  
     T := 647.096 {K};  
 END test_3;  
   
 END iapws_sat_curves;  
   
491  MODEL iapws95_2phase REFINES thermo_state;  MODEL iapws95_2phase REFINES thermo_state;
492      Sf IS_A iapws95_1phase;      Sf IS_A iapws95_1phase;
493      Sg IS_A iapws95_1phase;      Sg IS_A iapws95_1phase;

Legend:
Removed from v.111  
changed lines
  Added in v.112

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22