61 lines
1.5 KiB
C
61 lines
1.5 KiB
C
/*************************************************************************
|
||
* <20>ļ<EFBFBD>: therm.h
|
||
* <20><><EFBFBD><EFBFBD>: Therm<72><6D><EFBFBD>ͷ<EFBFBD>ļ<EFBFBD>
|
||
**************************************************************************/
|
||
|
||
#ifndef _THERM_H
|
||
#define _THERM_H
|
||
|
||
#include "NGCal.h"
|
||
#include "Detail.h"
|
||
|
||
typedef struct Therm {
|
||
double CAL_TH;
|
||
int coefA;
|
||
int coefB;
|
||
int coefC;
|
||
int coefD;
|
||
int coefE;
|
||
int coefF;
|
||
int coefG;
|
||
int coefH;
|
||
int coefI;
|
||
int coefJ;
|
||
int coefK;
|
||
|
||
double dPdD; // partial deriv of P wrt D
|
||
double dPdT; // partial deriv of P wrt T
|
||
double dSi; // ideal gas specific entropy, kJ/kg.K
|
||
double dTold; // temperature previously used
|
||
double dMrxold; // mixture molar mass previously used
|
||
|
||
int GK_points; // set the number of points for quadrature
|
||
double GK_root[5];
|
||
double GK_weight[5];
|
||
|
||
double ThermConstants[21][11];
|
||
} Therm;
|
||
|
||
// 函数声明
|
||
void Therm_Init(Therm *therm);
|
||
|
||
void Therm_Run(Therm *therm, NGParSTRUCT *ptNGPar, Detail *detail);
|
||
|
||
double Therm_CpiMolar(Therm *therm, NGParSTRUCT *ptNGPar);
|
||
|
||
double Therm_coth(double x);
|
||
|
||
double Therm_Ho(Therm *therm, NGParSTRUCT *ptNGPar);
|
||
|
||
double Therm_So(Therm *therm, NGParSTRUCT *ptNGPar);
|
||
|
||
void Therm_CprCvrHS(Therm *therm, NGParSTRUCT *ptNGPar, Detail *detail);
|
||
|
||
void Therm_HS_Mode(Therm *therm, NGParSTRUCT *ptNGPar, Detail *detail, double H, double S, bool bGuess);
|
||
|
||
double Therm_H(Therm *therm, NGParSTRUCT *ptNGPar, Detail *detail);
|
||
|
||
double Therm_S(Therm *therm, NGParSTRUCT *ptNGPar, Detail *detail);
|
||
|
||
#endif // THERM__H
|