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

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

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

revision 747 by johnpye, Fri Jul 7 04:01:49 2006 UTC revision 748 by johnpye, Tue Jul 11 05:54:26 2006 UTC
# Line 8  IMPORT "dsg"; Line 8  IMPORT "dsg";
8      You must compile it with the 'ASCEND_CONFIG=`which ascend-config`' flag      You must compile it with the 'ASCEND_CONFIG=`which ascend-config`' flag
9      to ensure that the required external library is installed where ASCEND      to ensure that the required external library is installed where ASCEND
10      can find it. Alternatively, you can specify the location by adding to the      can find it. Alternatively, you can specify the location by adding to the
11      ASCENDLIBRARY path variable      ASCENDLIBRARY path variable. See http://freesteam.sf.net/
12    
13      This model also requires the 'dsg' library for Direct Steam Generation      This model also requires the 'dsg' library for Direct Steam Generation
14      calculations, available on request from http://pye.dyndns.org/      calculations, available on request from http://pye.dyndns.org/
# Line 54  MODEL dsg; Line 54  MODEL dsg;
54      mu IS_A viscosity;      mu IS_A viscosity;
55      v IS_A specific_volume;      v IS_A specific_volume;
56      T1,Tw,T2,Tamb IS_A temperature;      T1,Tw,T2,Tamb IS_A temperature;
   
57      rho * v = 1;      rho * v = 1;
58    
59      thermo_props: iapws97_uvmux_ph(      thermo_props: iapws97_uvmux_ph(
# Line 96  MODEL dsg; Line 95  MODEL dsg;
95    
96      Tw = (T1 + T2)/2;      Tw = (T1 + T2)/2;
97    
98        mdoth IS_A solver_var;
99        mdoth = mdot * h;
100    
101        rhovel2 IS_A solver_var;
102        rhovel2 = rho * vel^2;
103    
104  METHODS  METHODS
105    
106  METHOD specify;  METHOD specify;
107        (* states *)
108        FIX T1, T2, p, h, mdot;
109        RUN fix_design;
110        RUN fix_temporals;
111    END specify;
112    
113    METHOD fix_design;
114      (* design parameters, geometry, materials of construction *)      (* design parameters, geometry, materials of construction *)
115      FIX rhow,D2,cw,hw;      FIX rhow,D2,cw,hw;
116      FIX D, eps;      FIX D, eps;
117      FIX qdots;      FIX qdots;
118      FIX Tamb;      FIX Tamb;
119    END specify;
120    
121      (* states *)  METHOD fix_spatials;
122      FIX T1, T2, p, h, mdot;      (* for use when tinkering about with a single node only *)
   
     (* spatial derivs are all fixed -- because we would know what's next door *)  
123      FIX dmdot_dz, dmdoth_dz, dekdot_dz, dp_dz, drhovel2_dz;      FIX dmdot_dz, dmdoth_dz, dekdot_dz, dp_dz, drhovel2_dz;
124    END fix_spatials;
125    
126    METHOD fix_temporals;
127        (* for steady-state solution *)
128        FIX drho_dt;
129        FIX dmdot_dt;
130        FIX drhou_dt;
131      FIX dTw_dt;      FIX dTw_dt;
132  END specify;  END fix_temporals;
133    
134  METHOD values;  METHOD values;
135      (* design parameters *)      (* design parameters *)

Legend:
Removed from v.747  
changed lines
  Added in v.748

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