/[ascend]/trunk/models/johnpye/fprops/ideal.mac
ViewVC logotype

Contents of /trunk/models/johnpye/fprops/ideal.mac

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1884 - (show annotations) (download)
Thu Sep 18 13:51:59 2008 UTC (15 years, 9 months ago) by jpye
File size: 1836 byte(s)
Add missing term for phi0 for nitrogen.
1 # You can copy lines from this file into wxMaxima
2 # http://wxmaxima.sourceforge.net/wiki/index.php/Main_Page
3 # http://maxima.sourceforge.net/
4 #
5 # These equations give the results that determine the terms in the
6 # ideal part of the residual function corresponding to terms of different
7 # types in the cp0(T) function.
8 #
9 # We treat terms of these types:
10 #
11 # constant a
12 # power a*T^t, t!=0, t!=-1
13 # exponential b*x^2*exp(-x) / (1-exp(-x))^2, x=beta/T
14 #
15 # We then assume our nondimensionalised ideal helmholtz component
16 # is of the form
17 #
18 # alpha(delta,tau)
19 #
20 # where tau = Tc/T (although tau can be normalised with any temperature, in fact)
21 #
22 # See Tillner-Roth et al, or Span et al, or Cooper 1982 for more details
23 # (these are cited in the ideal.c, nitrogen.c and ammonia.c code)
24
25 #------------------------------------------------
26 # STEP 1: paste the following lines into wxMaxima
27
28 assume(
29 R>0
30 ,tau>0
31 ,tau+tau>0
32 ,tau0>0
33 ,tau0 < tau
34 ,notequal(t, 0)
35 ,notequal(t, -1)
36 ,notequal(t, -2)
37 ,beta>0
38 ,Tc>0
39 ,T>0
40 );
41
42 cp0_const(tau) := R * a;
43 cp0_recip(tau) := R * subst(Tc/tau, T, a / T);
44 cp0_pow(tau) := R * subst(Tc/tau, T, a * T^t);
45 cp0_exp(tau) := R * subst(beta*tau/Tc,x, b*x^2*exp(-x)/(1-exp(-x))^2);
46
47 term(tau,cp0) := -tau/R*integrate(cp0(tau)/tau^2,tau,tau0,tau) + 1/R*integrate(cp0(tau)/tau,tau,tau0,tau);
48
49 # expression for nitrogen...
50 phi0(tau,del) := log(del) + 2.5*log(tau) - 12.76953 - 0.007841630*tau - 1.934819e-4/tau - 1.247742e-5/tau^2 + 6.678326e-8/tau^3 + 1.012941*log(1-exp(-26.65788*tau));
51
52
53 #------------------------------------------------
54 # STEP 2: paste one of the following lines, and answer the prompts about
55 # positive/negative terms:
56
57 isolate( term(tau,cp0_const), tau);
58
59 isolate( term(tau,cp0_pow), tau);
60
61 isolate( term(tau,cp0_recip), tau);
62
63 isolate( term(tau,cp0_exp), tau);

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