Parent Directory | Revision Log

Revision **1849** -
(**show annotations**)
(**download**)
(**as text**)

*Mon Sep 1 14:48:55 2008 UTC*
(14 years, 9 months ago)
by *jpye*

File MIME type: text/x-chdr

File size: 2467 byte(s)

File MIME type: text/x-chdr

File size: 2467 byte(s)

Working on fixing the ideal component curves so that they calculate directly from the cp0(T) form. Currently broken.

1 | /* ASCEND modelling environment |

2 | Copyright (C) 2008 Carnegie Mellon University |

3 | |

4 | This program is free software; you can redistribute it and/or modify |

5 | it under the terms of the GNU General Public License as published by |

6 | the Free Software Foundation; either version 2, or (at your option) |

7 | any later version. |

8 | |

9 | This program is distributed in the hope that it will be useful, |

10 | but WITHOUT ANY WARRANTY; without even the implied warranty of |

11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |

12 | GNU General Public License for more details. |

13 | |

14 | You should have received a copy of the GNU General Public License |

15 | along with this program; if not, write to the Free Software |

16 | Foundation, Inc., 59 Temple Place - Suite 330, |

17 | Boston, MA 02111-1307, USA. |

18 | */ |

19 | #ifndef FPROPS_IDEAL_H |

20 | #define FPROPS_IDEAL_H |

21 | |

22 | /* |

23 | Data types for declaration of ideal fluid components of property |

24 | correlations. Frequently property correlations for 'real' fluids are |

25 | given in terms of ideal gas components plus 'residual' or 'real' |

26 | components. For these cases, this file defines the data structures |

27 | used to declare those ideal component curves. |

28 | */ |

29 | |

30 | /* |

31 | Terms containing powers of 'tau', like |

32 | |

33 | a0 * tau^t0 |

34 | */ |

35 | typedef struct IdealPowTerm_struct{ |

36 | double a0; |

37 | double t0; |

38 | } IdealPowTerm; |

39 | |

40 | /* |

41 | Terms containing exponential expressions with tau, like |

42 | |

43 | b x^2 exp(-x) / [1-exp(-x)]^2 |

44 | |

45 | where x = beta / T. Instead of representing in terms of beta, we ask the |

46 | user to provide (b,beta) in the form of |

47 | |

48 | b,B |

49 | |

50 | where B = beta / T*, with T* being the normalisation temperature used |

51 | to calculate tau in the main 'residual' correlation. |

52 | |

53 | See J R Cooper 'Representation of the Ideal-Gas Thermaldynamic |

54 | Properties of Water', Int J Thermophys v 3 no 1, 1982 and also |

55 | Span, Lemmon, Jacobsen & Wagner 'A Reference Quality Equation of State |

56 | for Nitrogen' 1998. |

57 | |

58 | From the above expression, the term appearing in the reduced |

59 | Helmholtz function equation becomes |

60 | |

61 | b_i ln [ 1 - exp( -B_i tau ) ] |

62 | |

63 | This is the component in tau, there is also a constant term added, |

64 | |

65 | - b_i ln [ 1 - exp( -B_i tau0 ) ] |

66 | |

67 | */ |

68 | typedef struct IdealExpTerm_struct{ |

69 | double b; |

70 | double B; |

71 | } IdealExpTerm; |

72 | |

73 | typedef struct IdealData_struct{ |

74 | double c; |

75 | double m; |

76 | unsigned np; /* number of power terms */ |

77 | const IdealPowTerm *pt; /* power term data, may be NULL if np == 0 */ |

78 | unsigned ne; /* number of 'exponential' terms */ |

79 | const IdealExpTerm *et; /* exponential term data, maybe NULL if ne == 0 */ |

80 | } IdealData; |

81 | |

82 | #endif |

83 |

john.pye@anu.edu.au | ViewVC Help |

Powered by ViewVC 1.1.22 |