You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nmWTAI-Platform/Include/mAlg/mAlgPvt/gasZg.h

94 lines
2.6 KiB
C++

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#pragma once
#include "iAlgPvtBase.h"
// 气体压缩因子
class M_PVT_EXPORT gasZg : public iAlgPvtBase
{
private:
enum PvtAlgMethod
{
PM_DranchukPurvisRobinson = 0,
PM_BeggsAndBrill = 1,
//////////////////////////////////
// 20210105新增算法提供者wangzhp
PM_HallYarborough = 2,
//////////////////////////////////
//////////////////////////////////
// 20210819新增算法提供者baiwp
PM_DranchkAbuKassem = 3,
PM_Cranmer = 4,
//////////////////////////////////
//////////////////////////////////
// 20210105新增算法提供者wangzhp
PM_LXF = 5,
PM_HTHP = 6
//////////////////////////////////
};
public:
gasZg();
// 虚函数,计算函数,总入口函数
virtual bool cal(VecDouble vecIns, VecDouble& vecOuts);
public:
// 基础函数,公共调用部分
// 绑定成员变量
virtual void bindMembers();
bool getTcAndPc();
// 批量
bool dranchuk(VecDouble vecP, VecDouble& vecZg);
bool beggsAndBrill(VecDouble vecP, VecDouble& vecZg);
bool hallYarborough(VecDouble vecP, VecDouble& vecZg);
bool dranchkAbuKassem(VecDouble vecP, VecDouble& vecZg);
bool cranmer(VecDouble vecP, VecDouble& vecZg);
bool LXF(VecDouble vecP, VecDouble& vecZg);
bool HTHP(VecDouble vecP, VecDouble& vecZg);
// 单个点
double dranchuk(double dPpr);
double beggsAndBrill(double dPpr);
double hallYarborough(double dPpr);
double dranchkAbuKassem(double dPpr);
double cranmer(double dPpr);
double LXF(double dPpr);
double HTHP(double dPpr);
///////////////////////////////////////////////////////////////////////////////
// Match功能尝试1 20210716(借助张凤波经理给的反推算法)
public:
// vecIns:P(in)
// vecOuts:Z(out)
// vecExps:实验数据 (in)
virtual bool match(VecDouble vecIns, VecDouble& vecOuts, VecPointF& vecExps, double* pExtParas = nullptr);
protected:
// 反推Ppc
virtual double inversePpc(VecPointF& vecExps);
// 为了反推时,复用方便,而封装
virtual double calByPpr(double dPpr);
///////////////////////////////////////////////////////////////////////////////
private:
double m_dTc; //tc,临界温度,不同的组分有不同的临界温度值,°C
double m_dPc; //Pc,临界压力单位为psi和临界温度同理
double m_dTpr; //tpr,拟对比温度Tpr=T/Tc温度与临界温度的比值无量纲
// double m_dPpr; //Ppr,拟对比压力,Ppr=P/Pc无量纲
double m_dT; //rt,油藏温度°C
};