/[ascend]/trunk/models/johnpye/fprops/rankine_fprops.a4c
ViewVC logotype

Diff of /trunk/models/johnpye/fprops/rankine_fprops.a4c

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

revision 2691 by jpye, Tue Mar 5 03:13:14 2013 UTC revision 2692 by jpye, Tue Mar 5 04:45:27 2013 UTC
# Line 861  MODEL rankine_reheat_common; Line 861  MODEL rankine_reheat_common;
861      TU2 IS_A turbine_simple;      TU2 IS_A turbine_simple;
862      CO IS_A condenser_simple;      CO IS_A condenser_simple;
863      PU IS_A pump_simple;      PU IS_A pump_simple;
864        cd ALIASES BO1.cd;
865    
866      BO1.outlet, TU1.inlet ARE_THE_SAME;      BO1.outlet, TU1.inlet ARE_THE_SAME;
867      TU1.outlet, BO2.inlet ARE_THE_SAME;      TU1.outlet, BO2.inlet ARE_THE_SAME;
# Line 896  METHOD default_self; Line 897  METHOD default_self;
897      RUN CO.default_self;      RUN CO.default_self;
898      RUN PU.default_self;      RUN PU.default_self;
899  END default_self;  END default_self;
900    METHOD cycle_plot;
901        EXTERNAL cycle_plot_rankine_reheat(SELF);
902    END cycle_plot;
903  END rankine_reheat_common;  END rankine_reheat_common;
904    
905  (*  (*
906      A model for Rankine cycle with water as the working fluid      A model for a reheat Rankine cycle with water as the working fluid.
907  *)  *)
908  MODEL rankine_reheat_water REFINES rankine_reheat_common;  MODEL rankine_reheat_water REFINES rankine_reheat_common;
909      BO1.cd.component :== 'water';      cd.component :== 'water';
910        cd.type :== 'helmholtz';
911  METHODS  METHODS
912  METHOD on_load;  METHOD on_load;
913      RUN default_self;      RUN default_self;
914      RUN cengel_ex_10_4;      RUN cengel_ex_10_4;
915        (* make the default case slightly more realistic than the Cengel example *)
916        FIX TU1.eta := 0.9;
917        FIX TU2.eta := 0.9;
918        FIX PU.eta := 0.8;
919        FIX TU1.inlet.T := 500 {K} + 273.15 {K};
920        FIX BO2.outlet.T := TU1.inlet.T;
921  END on_load;  END on_load;
922  METHOD cengel_ex_10_4;  METHOD cengel_ex_10_4;
923      (* This example 10.4 from Cengel & Boles, 2011, 'Thermodynamics: An      (* This example 10.4 from Cengel & Boles, 2011, 'Thermodynamics: An
924      Engineering Approach', 7th Ed., McGraw-Hill. *)      Engineering Approach', 7th Ed., McGraw-Hill. *)
925      RUN ClearAll;      RUN ClearAll;
926      RUN default_self;      RUN default_self;
927      FIX BO1.eta; BO1.eta := 1.0;      FIX BO1.eta := 1.0;
928      FIX TU1.eta; TU1.eta := 1.0;      FIX TU1.eta := 1.0;
929      FIX TU2.eta; TU2.eta := 1.0;      FIX TU2.eta := 1.0;
930      FIX PU.eta; PU.eta := 1.0;      FIX PU.eta := 1.0;
931    
932      FIX TU1.inlet.p; TU1.inlet.p := 15 {MPa};      FIX TU1.inlet.p := 15 {MPa};
933      FIX TU1.inlet.T; TU1.inlet.T := (600 {K} + 273.15 {K});      FIX TU1.inlet.T := (600 {K} + 273.15 {K});
934      FIX BO2.outlet.T; BO2.outlet.T := TU1.inlet.T;      FIX BO2.outlet.T := TU1.inlet.T;
935      FIX TU2.outlet.x; TU2.outlet.x := 0.896;      FIX TU2.outlet.x := 0.896;
936      FIX CO.inlet.p; CO.inlet.p := 10 {kPa};      FIX CO.inlet.p := 10 {kPa};
937      FIX CO.outlet.x; CO.outlet.x := 1e-6;      FIX CO.outlet.x := 1e-6;
938      FIX mdot; mdot := 1 {kg/s};      FIX mdot := 1 {kg/s};
939  END cengel_ex_10_4;  END cengel_ex_10_4;
940  METHOD self_test_cengel;  METHOD self_test_cengel;
941      ASSERT abs(TU2.outlet.s -7.3688 {kJ/kg/K}) < 0.0001 {kJ/kg/K};      ASSERT abs(TU2.outlet.s -7.3688 {kJ/kg/K}) < 0.0001 {kJ/kg/K};

Legend:
Removed from v.2691  
changed lines
  Added in v.2692

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