/*************************************************************************
* �ļ�:    detail.h  
**************************************************************************/

#ifndef _DETAIL_H
#define _DETAIL_H

#include "NGCal.h"


typedef struct Detail {

    int iNCC;

    int aiCID[21];

    double dOldMixID;
    double dOldPb;
    double dOldTb;
    double dOldPf;
    double dOldTf;


    double adAn[58];
    double adUn[58];


    double dMri[21];
    double dEi[21];
    double dKi[21];
    double dGi[21];
    double dQi[21];
    double dFi[21];
    double dSi[21];
    double dWi[21];

    double dEij[21][21];
    double dUij[21][21];
    double dKij[21][21];
    double dGij[21][21];

    double adTable6Eij[21][21];
    double adTable6Uij[21][21];
    double adTable6Kij[21][21];
    double adTable6Gij[21][21];

    double adTable5Qi[21];
    double adTable5Fi[21];
    double adTable5Si[21];
    double adTable5Wi[21];

    double dXi[21];
    double dPCalc;
    double dT;
    double dP;
    double dRhoTP;
    double dB;
    double adBcoef[18];
    double adFn[58];
    double fx[58];
    double dU;
    double dKp3;
    double dW;
    double dQp2;
    double dF;
    double dRho;
    double dRhoL;
    double dRhoH;
    double dPRhoL;
    double dPRhoH;


    double dZ;
    double ddZdT;
    double dd2ZdT2;
    double ddZdD;
    double ddBdT;
    double dd2BdT2;
} Detail;


Detail *Detail_Construct(void);

void Detail_Destroy(Detail *pDetail);


int Detail_compositionchange(Detail *pDetail, const NGParSTRUCT *pAGA10);

int Detail_table(Detail *pDetail);

void Detail_paramdl(Detail *pDetail);

void Detail_chardl(Detail *pDetail, NGParSTRUCT *pAGA10);

void Detail_dhvMol(Detail *pDetail, NGParSTRUCT *pAGA10);

void Detail_bvir(Detail *pDetail);

void Detail_temp(Detail *pDetail);

void Detail_braket(Detail *pDetail, NGParSTRUCT *pAGA10);

void Detail_pdetail(Detail *pDetail, double dRho);

void Detail_ddetail(Detail *pDetail, NGParSTRUCT *pAGA10);

void Detail_relativedensity(const Detail *pDetail, NGParSTRUCT *pAGA10);


double Detail_zdetail(Detail *pDetail, double dRho);

double Detail_dZdT(Detail *pDetail, double dRho);

double Detail_d2ZdT2(Detail *pDetail, double dRho);

double Detail_dZdD(Detail *pDetail, double dRho);

void Detail_Run(Detail *pDetail, NGParSTRUCT *ptNGPar);

#endif
