⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 iprcal.h

📁 这是本人两年前兼职为某个公司做的石油钻进设计软件
💻 H
字号:
#if !defined(AFX_IPRCAL_H)
#define AFX_IPRCAL_H
  
#if _MSC_VER >= 1000
#pragma once
#endif // _MSC_VER >= 1000

#define ERROR_NON              0
#define ERROR_RESPRESSURE      1
#define ERROR_A                2
#define ERROR_B                3

#define BO_DEFINE                       0
#define BO_STANDING                     1
#define BO_VASQUEZ_BEGGS                2

#define RSO_STANDING                    0
#define RSO_VASQUEZ_BEGGS               1
#define RSO_GLASO                       2

#define BOSAT_STANDING                  0
#define BOSAT_GLASO                     1
#define BOSAT_MARHOUN                   2
#define BOSAT_AHMED                     3
#define BOSAT_VASQUEZ_BEGGS             4
#define BOSAT_DEFINITE                  5

#define BOUNSAT_DEFINITE                0
#define BOUNSAT_VASQUEZ_BEGGS           1
#define BOUNSAT_AHMED                   2

#define BOT_DEFINITE                    0
#define BOT_GLASO                       1
#define BOT_MARHOUN                     2

#define UODEGAS_STANDING                0
#define UODEGAS_BEGGS_ROBINSON          1
#define UODEGAS_GLASO                   2

#define UOSAT_STANDING                  0
#define UOSAT_BEGGS_ROBINSON            1
#define UOSAT_KHAN                      2

#define UOUNSAT_STANDING                0
#define UOUNSAT_VASQUEZ_BEGGS           1
#define UOUNSAT_KHAN                    2

#define COUNSAT_VASQUEZ_BEGGS           0
#define COUNSAT_AHMED                   1

#define ZG_DEFAULT                      0
#define ZG_HALL_YARBOUGH                1
#define ZG_DRANCHUK_PURVIS_ROBINSON     2

#define CG_DEFAULT                      0
#define CG_HALL_YARBOUGH                1
#define CG_MATTAR_BRAR_AZIZ             2

#define UG_DEFAULT                      1
#define UG_LEE_GONZALEA_EAKIN           1
#define UG_STANDING                     2


#define FLOW_GAS                        1
#define FLOW_LIQUID                     2
#define FLOW_LAYER                      3
#define FLOW_SLUG                       4
#define FLOW_DISPERSE                   5
#define FLOW_TRANSITION                 6

#define AB_PRESSURE                     0
#define AB_SQUAREPRESSURE               1
#define AB_PSEUDOPRESSURE               2
#define AB_TWOPSEUDOPRESSURE            3
#define CN_PRESSURE                     4
#define CN_SQUAREPRESSURE               5
#define CN_PSEUDOPRESSURE               6


#define PRESSURE_Ave_T_Zg               0
#define PRESSURE_Cullender_Smith        1
#define PRESSURE_Cullender_Smith_PSP    2
#define PRESSURE_Hagedorn_Brown         3
#define PRESSURE_Beggs_Brill            4

#define COM_C1                          0
#define COM_C2                          1
#define COM_C3                          2
#define COM_iC4                         3
#define COM_nC4                         4
#define COM_iC5                         5
#define COM_nC5                         6
#define COM_C6                          7
#define COM_C7p                         8
#define COM_H2                          9
#define COM_H2O                         10
#define COM_H2S                         11
#define COM_N2                          12
#define COM_O2                          13
#define COM_CO                          14
#define COM_CO2                         15
#define COM_He                          16
#define COM_Air                         17

#define ANA_WHPRESSURE                  0
#define ANA_TUBESIZE                    1
#define ANA_WBPRESSURE                  2
#define ANA_GOR                         3


float InsertValue_Linear( int   num,        //理论点数
						  float *TheoryP,//插值对象
						  float *TheoryMp,
 						  float RealP );   //被插之值

float Rsw_Mineralized( float fPress, float fTemp, float fS );
float Bw_Mineralized( float fPress, float fTemp, float fS );
float Cw_Saturated( float fPress, float fTemp, float fS, float fRsw );
float Uw_Mineralized( float fTemp );

float Rso_Calculate( float fPress, float fTemp, float frg, float fro, float frgs, int iMethod );
float BoSat_Calculate( float fPress, float fTemp,   float frg,  float fro,
                       float fRs,    float fDoTank, float frgs, int iBosatMethod );
float BoUnsat_Calculate( float fPress, float fPb, float fTemp, float frg, float fro, float fRs, float fBosat, float fCoUnsat, int iBoUnsatMethod );
float Bot_Calculate( float fPress, float fTemp, float frg, float fro, float fRs, int iBotMethod );
float UoDegas_Calculate( float fTemp, float fro, int iUoDegasMethod );
float UoSat_Calculate( float fTemp, float frg, float fro, float fRs, float fUod, int iUosatMethod );
float UoUnsat_Calculate( float fPress, float fPb, float fUob, int iUoUnsatMethod );
float CoUnsat_Calculate( float fPress, float fTemp, float frgs, float fro, float fRs, int iCoUnsatMethod );


float Zg_Calculate( float fPseudoTc, float fPseudoPc, float fTemp, float fPress, int iZgMethod );
float Cg_Calculate( float fPseudoTc, float fPseudoPc, float fTemp, float fPress, float fZ, int   iCgMethod );
float Bg_Calculate( float fTemp, float fPress, float fZ );
float Ug_Calculate( float fTc,  float fPc,  float fTemp, float fPress, float fZ,
	 			    float frg,  float fN2,  float fCO2,  float fH2S,   int iUgMethod);

float Ug_Lee_Gonzalez_Eakin( float fPress, float fTemp, float frg, float fZ );



float WBPressure_Average_T_Zg( float  fPseudoTc, float  fPseudoPc, float fTwb, float fTwh,
							   float  fGamag,    float  fh,        float fPress,
							   int    iNum,		 int    iZgMethod );
float WHPressure_Average_T_Zg( float  fPseudoTc, float  fPseudoPc, float fTwb, float fTwh,
							   float  fGamag,    float  fh,        float fPress,
							   int    iNum,		 int    iZgMethod );
float WBPressure_Average_T_Zg( float  fPseudoTc, float  fPseudoPc, float fTwb,        float fTwh,
							   float  fGamag,    float  fh,        float fL,          float  fRoughness, 
							   float  fd1,       float  fd2,       float fRate,       float fPress,
							   float  fN2,       float fCO2,       float fH2S,   
							   int    iNum,		 int    iZgMethod, int   iUgMethod );
float WHPressure_Average_T_Zg( float  fPseudoTc, float  fPseudoPc, float fTwb,        float fTwh,
							   float  fGamag,    float  fh,        float fL,          float  fRoughness, 
							   float  fd1,       float  fd2,       float fRate,       float fPress,
							   float  fN2,       float fCO2,       float fH2S,   
							   int    iNum,		 int    iZgMethod, int   iUgMethod );
float WBPressure_Cullender_Smith( float  fPseudoTc, float  fPseudoPc, float fTwb, float fTwh,
							      float  fGamag,    float  fh,        float fPress,
							      int    iNum,		 int    iZgMethod );
float WHPressure_Cullender_Smith( float  fPseudoTc, float  fPseudoPc, float fTwb, float fTwh,
							      float  fGamag,    float  fh,        float fPress,
							      int    iNum,		 int    iZgMethod );
float WBPressure_Cullender_Smith( float  fPseudoTc, float  fPseudoPc, float fTwb,  float fTwh,
							      float  fGamag,    float  fh,        float fL,    float  fRoughness, 
								  float  fd1,       float  fd2,       float fRate, float fPress,
								  float  fN2,       float fCO2,       float fH2S,   
								  int    iNum,		int    iZgMethod, int   iUgMethod );
float WHPressure_Cullender_Smith( float  fPseudoTc, float  fPseudoPc, float fTwb,  float fTwh,
							      float  fGamag,    float  fh,        float fL,    float  fRoughness, 
								  float  fd1,       float  fd2,       float fRate, float fPress,
								  float  fN2,       float fCO2,       float fH2S,   
								  int    iNum,		int    iZgMethod, int   iUgMethod );
float WBPressure_Cullender_Smith_PSP(float  fPseudoTc, float  fPseudoPc, float fTwb,  float fTwh,
							         float  fGamag,    float  fGamao,    float fGamaw,float  fh,   
									 float  fL,        float  fRoughness,float fd1,   float  fd2,
									 float  fQo,       float  fQg,       float fQw,   float fPress,
								     float  fN2,       float  fCO2,      float fH2S,   
								     int    iNum,	  int     iZgMethod, int   iUgMethod );
float WHPressure_Cullender_Smith_PSP(float  fPseudoTc, float  fPseudoPc, float fTwb,  float fTwh,
							         float  fGamag,    float  fGamao,    float fGamaw,float  fh,   
									 float  fL,        float  fRoughness,float fd1,   float  fd2,
									 float  fQo,       float  fQg,       float fQw,   float fPress,
								     float  fN2,       float  fCO2,      float fH2S,   
								     int    iNum,	  int     iZgMethod, int   iUgMethod );

float WBPressure_Hagedorn_Brown(float  fPseudoTc, float  fPseudoPc, float fTwb,  float  fTwh,
							    float  fGamag,    float  fGamao,    float fGamaw,float  fh,   
								float  fL,        float  fRoughness,float fd1,   float  fd2,
								float  fQo,       float  fQg,       float fQw,   float  fPress,
								float  fN2,       float  fCO2,      float fH2S,  float  fDelta,
								int    iNum,	  int    iZgMethod, int   iUgMethod );
float WHPressure_Hagedorn_Brown(float  fPseudoTc, float  fPseudoPc, float fTwb,  float  fTwh,
							    float  fGamag,    float  fGamao,    float fGamaw,float  fh,   
								float  fL,        float  fRoughness,float fd1,   float  fd2,
								float  fQo,       float  fQg,       float fQw,   float  fPress,
								float  fN2,       float  fCO2,      float fH2S,  float  fDelta,
								int    iNum,	  int    iZgMethod, int   iUgMethod );

float WBPressure_Beggs_Brill(float  fPseudoTc, float  fPseudoPc, float fTwb,  float  fTwh,
							 float  fGamag,    float  fGamao,    float fGamaw,float  fh,   
							 float  fL,        float  fRoughness,float fd1,   float  fd2,
							 float  fQo,       float  fQg,       float fQw,   float  fPress,
							 float  fN2,       float  fCO2,      float fH2S,  float  fDelta,
							 int    iNum,	  int    iZgMethod,  int   iUgMethod );
float WHPressure_Beggs_Brill(float  fPseudoTc, float  fPseudoPc, float fTwb,  float  fTwh,
							 float  fGamag,    float  fGamao,    float fGamaw,float  fh,   
							 float  fL,        float  fRoughness,float fd1,   float  fd2,
							 float  fQo,       float  fQg,       float fQw,   float  fPress,
							 float  fN2,       float  fCO2,      float fH2S,  float  fDelta,
							 int    iNum,	  int    iZgMethod,  int   iUgMethod );

float GasRate_Choke(float fd, float fGamag, float fT1, float fZ1, float fK, float fP1, float fP2);
float OutPress_Choke(float fd, float fGamag, float fT1, float fZ1, float fK, float fRate, float fP1);
float InPress_Choke(float fd, float fGamag, float fT1, float fZ1, float fK, float fRate, float fP2);

int GCWACalculate( float *pfComposition, float *pfBasePara, BOOL*  pbAnalSelect, float* pfIPRCoeff,
				   int    iSatNum,       float* pfSg,       float* pfKro, float* pfKrg, 
				   int    iIPRSelect,    int    iTPRSelect, float *pfAnalPara );

#endif //AFX_IPRCAL_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -