Parent Directory | Revision Log

Revision **3111** -
(**hide annotations**)
(**download**)
(**as text**)

*Mon Jun 6 02:22:43 2016 UTC*
(3 years, 9 months ago)
by *jpye*

File MIME type: text/x-chdr

File size: 2236 byte(s)

File MIME type: text/x-chdr

File size: 2236 byte(s)

Creating new branch for Vishnu [[User:Vishnu]] from trunk r3110.

1 | jpye | 2654 | /* 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 | jpye | 2661 | along with this program. If not, see <http://www.gnu.org/licenses/>. |

16 | jpye | 2654 | */ |

17 | #ifndef FPROPS_CP0_H | ||

18 | #define FPROPS_CP0_H | ||

19 | |||

20 | #include "rundata.h" | ||

21 | |||

22 | jpye | 2738 | /* FIXME rename this to phi0_prepare, along with the filename */ |

23 | /** | ||

24 | Prepare the runtime data required for calculation of the ideal component of | ||

25 | the reduced Helmholtz function, \f$\phi = \frac{a}{R T}\f$ and its | ||

26 | derivatives \f$\phi_\tau\f$ and \f$\phi_{\tau\tau}\f$. Note that even | ||

27 | though this is called 'cp0_prepare', it is unable on its own to calculate | ||

28 | \f$c_p^o\f$ because the values of Tstar (needed for \f$\tau = \frac{T^{*}}{T}\f$) and R are stored at higher-level in | ||

29 | the FluidData object. | ||

30 | */ | ||

31 | jpye | 2654 | Phi0RunData *cp0_prepare(const IdealData *I, double R, double Tstar); |

32 | jpye | 2738 | |

33 | |||

34 | jpye | 2681 | void cp0_destroy(Phi0RunData *cp0); |

35 | jpye | 2654 | |

36 | jpye | 2736 | /** |

37 | Ideal-gas component of the reduced Helmholtz function | ||

38 | \f$\phi = \frac{a}{R T}\f$ | ||

39 | */ | ||

40 | jpye | 2654 | double ideal_phi(double tau, double delta, const Phi0RunData *data); |

41 | jpye | 2736 | |

42 | /** | ||

43 | Ideal-gas component of the reduced Helmholtz function: first partial derivative wrt reduced temperature | ||

44 | \f$\phi_\tau = \left(\frac{\partial \phi}{\partial \tau}\right)_\delta = \frac{1}{R T} \frac{\partial T}{\partial \tau} \frac{\partial a}{\partial T} \f$ | ||

45 | */ | ||

46 | jpye | 2654 | double ideal_phi_tau(double tau, double delta, const Phi0RunData *data); |

47 | jpye | 2736 | |

48 | /** | ||

49 | Ideal-gas component of the reduced Helmholtz function: second partial derivative wrt reduced temperature | ||

50 | \f$\phi_{\tau\tau} | ||

51 | = \left(\frac{\partial^2 \phi}{\partial \tau^2}\right)_\delta | ||

52 | = \frac{1}{R T} \left(\frac{d T}{d \tau}\right)^2 \frac{\partial^2 a}{\partial T^2} | ||

53 | \f$ | ||

54 | */ | ||

55 | jpye | 2654 | double ideal_phi_tautau(double tau, const Phi0RunData *data); |

56 | |||

57 | #endif | ||

58 |

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

Powered by ViewVC 1.1.22 |