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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2802 - (show annotations) (download) (as text)
Fri Jul 18 08:22:02 2014 UTC (4 years, 2 months ago) by jpye
File MIME type: text/x-ascend
File size: 2349 byte(s)
cleaning up airprops2
1 REQUIRE "johnpye/thermo_types.a4c";
2
3 (*
4 Base model for various fluids that will be used in solar-thermal receiver
5 modelling.
6 *)
7 MODEL thermophysical_fluid_base;
8 T IS_A temperature;
9 p IS_A pressure; (* not sure if we should have this here; makes it easier to switch from other fluid models *)
10 h IS_A specific_enthalpy;
11 cp IS_A specific_heat_capacity;
12 rho IS_A mass_density;
13 s IS_A specific_entropy;
14 v IS_A specific_volume;
15 v_eq: v = 1. / rho;
16
17 u IS_A specific_energy;
18 u_eq: u = T - p*v;
19
20 mu IS_A viscosity;
21 k IS_A thermal_conductivity;
22 END thermophysical_fluid_base;
23
24
25 (*
26 Model of 60% NaNO3 + 40% KNO3 as specified in Sandia National
27 Laboratories document SAND2001-2100 rev 0.
28
29 http://prod.sandia.gov/techlib/access-control.cgi/2001/012100.pdf
30
31 The source data is density and specific heat capacity as functions of
32 temperature, with no pressure dependence specified. Enthalpy is calculated
33 by simple integration integ(cp dT) as a secondary expression.
34
35 What is the source of the entropy expression? -- TODO We need to check this!
36 *)
37 MODEL moltensalt_fluid REFINES thermophysical_fluid_base;
38 cp_eq: cp = 1396.0182 {J/kg/K} + 0.172 {J/kg/K^2} * T;
39 rho_eq: rho = 2263.7234 {kg/m^3} - 0.636 {kg/m^3/K} * T;
40
41 (* constant set to give h = 0 at 0 °C *)
42 h_eq: h = (1396.0182 {J/kg/K}) * T + 0.5 * (0.172 {J/kg/K^2}) * T^2 - 387.738910665 {kJ/kg};
43
44 s_eq: s = 1396.0182 {J/kg/K} * ln(T) + 0.172 {J/kg/K^2} * T
45 - p*(((- 0.636 {kg/m^3/K})/(2263.7234 {kg/m^3})^2) *ln(T/rho)
46 + (- 0.636 {kg/m^3/K})/(2263.7234 {kg/m^3} * rho)
47 );
48
49 mu_eq: mu = 22.714 {milli*Pa*s}- 0.12 {milli*Pa*s/K} * (T - 273.15)+ 2.281e-4 {milli*Pa*s/K^2} * ((T - 273.15)^2) - 1.474e-7 {milli*Pa*s/K^3} * ((T - 273.15)^3);
50 k_eq: k = 0.443 {W/m/K} + 6.26984e-5 * (T -273.15);
51 METHODS
52 METHOD default_self;
53 T := 400 {K};
54 p := 1 {bar};
55 END default_self;
56 METHOD solve;
57 EXTERNAL do_solve(SELF);
58 END solve;
59 METHOD bound_self;
60 T.upper_bound := 621 {K} + 273.15 {K};
61 T.lower_bound := 221 {K} + 273.15 {K};
62 END bound_self;
63 METHOD on_load;
64 RUN ClearAll;
65 RUN bound_self;
66 FIX T; T := 371.111 {K} + 273.15 {K}; (* 700 °F *)
67 FIX p; p := 1 {bar};
68 END on_load;
69 METHOD self_test;
70 ASSERT abs(rho - 115.65 {lbm/ft^3}) < 0.1 {lbm/ft^3};
71 END self_test;
72 END moltensalt_fluid;

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