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.
120 lines
3.8 KiB
C++
120 lines
3.8 KiB
C++
#pragma once
|
|
|
|
#include "nmData_global.h"
|
|
#include "ZxDataObjectDbl.h"
|
|
#include "nmDataBase.h"
|
|
#include "nmDefines.h"
|
|
#include "nmDataAttribute.h"
|
|
|
|
class NM_DATA_EXPORT nmDataReservoir : public nmDataBase {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
nmDataReservoir();
|
|
nmDataReservoir(const nmDataReservoir& other);
|
|
nmDataReservoir& operator=(const nmDataReservoir& other);
|
|
virtual ~nmDataReservoir();
|
|
|
|
// 实现 nmDataBase 的抽象方法:将当前 C++ 对象序列化为 RapidJSON Value
|
|
virtual rapidjson::Value ToJsonValue(rapidjson::Document::AllocatorType& allocator) const override;
|
|
// 实现 nmDataBase 的抽象方法:从 RapidJSON Value 反序列化数据到当前 C++ 对象
|
|
virtual void FromJsonValue(const rapidjson::Value& jsonValue) override;
|
|
|
|
// 单例模式
|
|
static nmDataReservoir* getInstance();
|
|
|
|
public:
|
|
// 表名
|
|
virtual QString getTableName();
|
|
|
|
// 接口
|
|
//virtual ZxDataObject* clone();
|
|
virtual QString type() const;
|
|
|
|
// 加载保存(数据库部分)
|
|
virtual bool _parseData(VecVariant vec, int& n);
|
|
virtual bool _sumUpData(VecVariant& vec);
|
|
|
|
// 序列化(统一序列化为大字段时的处理)
|
|
virtual void onSerialize(ZxSerializer* ser);
|
|
virtual void onDeserialize(ZxSerializer* ser);
|
|
|
|
// Icon
|
|
virtual QIcon getIcon(bool expanded) const;
|
|
|
|
public:
|
|
// 属性的 set 和 get 方法
|
|
void setInitialPressure(const nmDataAttribute& attr);
|
|
nmDataAttribute& getInitialPressure();
|
|
|
|
void setReservoirType(const nmDataAttribute& attr);
|
|
nmDataAttribute& getReservoirType();
|
|
|
|
void setBo(const nmDataAttribute& attr);
|
|
nmDataAttribute& getBo();
|
|
|
|
void setPermeability(const nmDataAttribute& attr);
|
|
nmDataAttribute& getPermeability();
|
|
|
|
void setThickness(const nmDataAttribute& attr);
|
|
nmDataAttribute& getThickness();
|
|
|
|
void setPorosity(const nmDataAttribute& attr);
|
|
nmDataAttribute& getPorosity();
|
|
|
|
void setCt(const nmDataAttribute& attr);
|
|
nmDataAttribute& getCt();
|
|
|
|
void setKxKy(const nmDataAttribute& attr);
|
|
nmDataAttribute& getKxKy();
|
|
|
|
void setCf(const nmDataAttribute& attr);
|
|
nmDataAttribute& getCf();
|
|
|
|
void setMiuo(const nmDataAttribute& attr);
|
|
nmDataAttribute& getMiuo();
|
|
|
|
void setTempGasRe(double temp);
|
|
double getTempGasRe() const;
|
|
|
|
void setPhaseType(NM_PHASE_TYPE phaseType);
|
|
NM_PHASE_TYPE getPhaseType() const;
|
|
|
|
void setTransmissibility(const nmDataAttribute& attr);
|
|
nmDataAttribute& getTransmissibility();
|
|
|
|
void setSoi(const nmDataAttribute& attr);
|
|
nmDataAttribute& getSoi();
|
|
|
|
void setSgi(const nmDataAttribute& attr);
|
|
nmDataAttribute& getSgi();
|
|
|
|
void setSwi(const nmDataAttribute& attr);
|
|
nmDataAttribute& getSwi();
|
|
|
|
void resetToDefaults(); // 重置所有参数为构造函数默认值
|
|
|
|
protected:
|
|
nmDataAttribute m_initialPressure; // 初始地层压力
|
|
nmDataAttribute m_permeability; // 渗透率
|
|
nmDataAttribute m_thickness; // 储层厚度
|
|
nmDataAttribute m_Miuo; // 流体粘度 (pvt参数中有)
|
|
nmDataAttribute m_Bo; // 体积系数 (pvt参数中有)
|
|
nmDataAttribute m_porosity; // 孔隙度
|
|
nmDataAttribute m_Ct; // 综合压缩系数
|
|
nmDataAttribute m_kxKy; // 各项性系数 (求解器中没有用到)
|
|
nmDataAttribute m_Cf; // 岩石压缩系数
|
|
|
|
nmDataAttribute m_reservoirType; // 储层类型 (求解器中没有用到)
|
|
nmDataAttribute m_transmissibility; // 传导率 (求解器中没有用到)
|
|
|
|
nmDataAttribute m_Soi; // 初始含油饱和度
|
|
nmDataAttribute m_Sgi; // 初始含气饱和度
|
|
nmDataAttribute m_Swi; // 初始含水饱和度
|
|
|
|
double m_dTempGasRe; //气藏温度 (求解器中没有用到)
|
|
NM_PHASE_TYPE m_ePhaseType; //多相流类型
|
|
|
|
static nmDataReservoir* s_instance;
|
|
};
|