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

Contents of /trunk/models/johnpye/moltensalt.a4c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2696 - (show annotations) (download) (as text)
Thu Mar 7 00:21:44 2013 UTC (9 years, 3 months ago) by jpye
File MIME type: text/x-ascend
File size: 1937 byte(s)
Attempting to sort out brayton_split_salt model. Bug 472 is causing problems here.
1 REQUIRE "johnpye/thermo_types.a4c";
2 IMPORT "sensitivity/solve";
3
4 (*
5 Model of 60% NaNO3 + 40% KNO3 as specified in Sandia National
6 Laboratories document SAND2001-2100 rev 0.
7
8 http://prod.sandia.gov/techlib/access-control.cgi/2001/012100.pdf
9
10 The source data is density and specific heat capacity as functions of
11 temperature, with no pressure dependence specified. Enthalpy is calculated
12 by simple integration integ(cp dT) as a secondary expression.
13 *)
14 MODEL moltensalt_state;
15 T IS_A temperature;
16 h IS_A specific_enthalpy;
17 p IS_A pressure;
18
19 cp IS_A specific_heat_capacity;
20 cp_eq: cp = 1396.0182 {J/kg/K} + 0.172 {J/kg/K^2} * T;
21
22 rho IS_A mass_density;
23 rho_eq: rho = 2263.7234 {kg/m^3} - 0.636 {kg/m^3/K} * T;
24
25 (* constant set to give h = 0 at 0 °C *)
26 h_eq: h = (1396.0182 {J/kg/K}) * T + 0.5 * (0.172 {J/kg/K^2}) * T^2 - 387.738910665 {kJ/kg};
27
28 s IS_A specific_entropy;
29 s_eq: s = 1396.0182 {J/kg/K} * ln(T) + 0.172 {J/kg/K^2} * T
30 - p*(((- 0.636 {kg/m^3/K})/(2263.7234 {kg/m^3})^2) *ln(T/rho)
31 + (- 0.636 {kg/m^3/K})/(2263.7234 {kg/m^3} * rho)
32 );
33
34 v IS_A specific_volume;
35 v_eq: v = 1. / rho;
36
37 u IS_A specific_energy;
38 u_eq: u = h - p*v;
39 METHODS
40 METHOD default_self;
41 T := 400 {K};
42 p := 1 {bar};
43 END default_self;
44 METHOD solve;
45 EXTERNAL do_solve(SELF);
46 END solve;
47 METHOD bound_self;
48 T.upper_bound := 621 {K} + 273.15 {K};
49 T.lower_bound := 221 {K} + 273.15 {K};
50 END bound_self;
51 METHOD on_load;
52 RUN ClearAll;
53 RUN bound_self;
54 FIX T; T := 371.111 {K} + 273.15 {K}; (* 700 °F *)
55 FIX p; p := 1 {bar};
56 END on_load;
57 METHOD self_test;
58 ASSERT abs(rho - 115.65 {lbm/ft^3}) < 0.1 {lbm/ft^3};
59 END self_test;
60 END moltensalt_state;
61
62 MODEL moltensalt_node;
63 state IS_A moltensalt_state;
64 T ALIASES state.T;
65 h ALIASES state.h;
66 p ALIASES state.p;
67 v ALIASES state.v;
68 cp ALIASES state.cp;
69 mdot IS_A mass_rate;
70 METHODS
71 METHOD solve;
72 EXTERNAL do_solve(SELF);
73 END solve;
74 END moltensalt_node;

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