/[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 185 by aw0a, Tue Jan 10 14:15:18 2006 UTC revision 186 by johnpye, Fri Jan 13 03:36:44 2006 UTC
# Line 477  METHOD default_self; Line 477  METHOD default_self;
477  END default_self;  END default_self;
478    
479  METHOD specify;  METHOD specify;
480      T.fixed := TRUE;      FIX T,rho;
     rho.fixed := TRUE;  
481  END specify;  END specify;
482    
483  METHOD values;  METHOD values;
# Line 505  END self_test; Line 504  END self_test;
504    
505  END iapws95_1phase;  END iapws95_1phase;
506    
507    ATOM density_slack REFINES mass_density;
508        lower_bound := 0.0 {kg/m^3};    
509    END density_slack;
510    
511  MODEL iapws95_2phase REFINES thermo_state;  MODEL iapws95_2phase REFINES thermo_state;
512      (* phase components *)      (* phase components *)
513      Sf IS_A iapws95_1phase;      Sl IS_A iapws95_1phase;
514      Sg IS_A iapws95_1phase;      Sv IS_A iapws95_1phase;
     xf IS_A fraction;  
     xg IS_A fraction;  
     z01: xf + xg = 1.0;  
515    
516      (* saturation conditions *)      (* saturation conditions *)
517      sat IS_A iapws_sat_curves;      sat IS_A iapws_sat_density;
518      Sf.T, Sg.T, sat.T ARE_THE_SAME;  
519        T, Sl.T, Sv.T, sat.T ARE_THE_SAME;
520        p, Sl.p ARE_THE_SAME;
521    
522      rhof ALIASES sat.rhof;      rhof ALIASES sat.rhof;
523      rhog ALIASES sat.rhog;      rhog ALIASES sat.rhog;
524      rhov ALIASES Sg.rho;      rhov ALIASES Sv.rho;
525      rhol ALIASES Sf.rho;      rhol ALIASES Sl.rho;
     T, Sf.T ARE_THE_SAME;  
     p, Sf.p ARE_THE_SAME;  
526    
527      z02: xf * (rhov-rhog) = 0.0 {kg/m^3};      rhofslack, rhogslack IS_A density_slack;
528      z03: xg * (rhol-rhof) = 0.0 {kg/m^3};            z02a: rhogslack = rhog - rhov; (* rhog >= rhov since gas is most dense at saturation*)
529        z03a: rhofslack = rhol - rhof; (* rhol >= rhof since it's compressed liquid. but what about the density anomaly..??? *)
530    
531        xf IS_A fraction;
532        xg IS_A fraction;
533        z01: xf + xg = 1.0;
534        z02: xf * rhogslack = 0.0 {kg/m^3}; (* xf==0 or rhog==rhov *)
535        z03: xg * rhofslack = 0.0 {kg/m^3}; (* xg==0 or rhof==rhol *)
536      x ALIASES xg;      x ALIASES xg;
537    
538      z04: Sf.rho * Sg.rho = rho * ( xf * Sg.rho + xg * Sf.rho);      (* two-phase properties *)
539      z05: u =  xf * Sf.u  + xg * Sg.u;      z04: Sl.rho * Sv.rho = rho * ( xf * Sv.rho + xg * Sl.rho);
540      z06: h  = xf * Sf.h  + xg * Sg.h;      z05: u =  xf * Sl.u  + xg * Sv.u;
541      z07: s  = xf * Sf.s  + xg * Sg.s;      z06: h  = xf * Sl.h  + xg * Sv.h;
542      z08: cp = xf * Sf.cp + xg * Sg.cp;      z07: s  = xf * Sl.s  + xg * Sv.s;
543      z09: cv = xf * Sf.cv + xg * Sg.cv;      z08: cp = xf * Sl.cp + xg * Sv.cp;
544      z10: w  = xf * Sf.w  + xg * Sg.w; (* check this *)      z09: cv = xf * Sl.cv + xg * Sv.cv;
545        z10: w  = xf * Sl.w  + xg * Sv.w; (* check this *)
546  METHODS  METHODS
547    
548  METHOD default_self;  METHOD default_self;
# Line 544  METHOD default_self; Line 552  METHOD default_self;
552  END default_self;  END default_self;
553    
554  METHOD specify;  METHOD specify;
555      T.fixed := TRUE;      FIX T,x;
     x.fixed := TRUE;  
556  END specify;  END specify;
557    
558  METHOD values;  METHOD values;

Legend:
Removed from v.185  
changed lines
  Added in v.186

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