2018-12-05 05:52:36 -06:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
2019-01-09 08:21:38 -06:00
|
|
|
// Copyright (C) 2018- Equinor ASA
|
2018-12-05 05:52:36 -06:00
|
|
|
//
|
|
|
|
// ResInsight is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
// (at your option) any later version.
|
|
|
|
//
|
|
|
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "cafPdmBase.h"
|
|
|
|
#include "cafPdmField.h"
|
2019-09-06 03:40:57 -05:00
|
|
|
#include "cafPdmObject.h"
|
2018-12-05 05:52:36 -06:00
|
|
|
|
2018-12-07 08:48:11 -06:00
|
|
|
#include <array>
|
|
|
|
|
|
|
|
enum AICDParameters
|
|
|
|
{
|
|
|
|
AICD_STRENGTH = 0,
|
|
|
|
AICD_DENSITY_CALIB_FLUID,
|
|
|
|
AICD_VISCOSITY_CALIB_FLUID,
|
|
|
|
AICD_VOL_FLOW_EXP,
|
|
|
|
AICD_VISOSITY_FUNC_EXP,
|
|
|
|
AICD_NUM_REQ_PARAMS,
|
2018-12-11 09:21:17 -06:00
|
|
|
AICD_CRITICAL_WATER_IN_LIQUID_FRAC = AICD_NUM_REQ_PARAMS,
|
2018-12-07 08:48:11 -06:00
|
|
|
AICD_EMULSION_VISC_TRANS_REGION,
|
|
|
|
AICD_MAX_RATIO_EMULSION_VISC,
|
|
|
|
AICD_MAX_FLOW_RATE,
|
|
|
|
AICD_EXP_OIL_FRAC_DENSITY,
|
|
|
|
AICD_EXP_WATER_FRAC_DENSITY,
|
|
|
|
AICD_EXP_GAS_FRAC_DENSITY,
|
|
|
|
AICD_EXP_OIL_FRAC_VISCOSITY,
|
|
|
|
AICD_EXP_WATER_FRAC_VISCOSITY,
|
|
|
|
AICD_EXP_GAS_FRAC_VISCOSITY,
|
|
|
|
AICD_NUM_PARAMS
|
|
|
|
};
|
|
|
|
|
2018-12-05 05:52:36 -06:00
|
|
|
class RimWellPathAicdParameters : public caf::PdmObject
|
|
|
|
{
|
|
|
|
CAF_PDM_HEADER_INIT;
|
2019-09-06 03:40:57 -05:00
|
|
|
|
2018-12-05 05:52:36 -06:00
|
|
|
public:
|
|
|
|
RimWellPathAicdParameters();
|
2019-01-10 08:34:14 -06:00
|
|
|
~RimWellPathAicdParameters() override;
|
2018-12-05 05:52:36 -06:00
|
|
|
bool isValid() const;
|
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
bool isOpen() const;
|
2018-12-07 08:48:11 -06:00
|
|
|
std::array<double, AICD_NUM_PARAMS> doubleValues() const;
|
2018-12-11 09:21:17 -06:00
|
|
|
|
2018-12-05 05:52:36 -06:00
|
|
|
protected:
|
2019-09-06 03:40:57 -05:00
|
|
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
2023-02-26 03:48:40 -06:00
|
|
|
void defineEditorAttribute( const caf::PdmFieldHandle* field, QString uiConfigName, caf::PdmUiEditorAttribute* attribute ) override;
|
2018-12-05 05:52:36 -06:00
|
|
|
|
|
|
|
private:
|
|
|
|
std::set<const caf::PdmField<QString>*> stringFieldsWithNoValidDefault() const;
|
2019-09-06 03:40:57 -05:00
|
|
|
void setUnitLabels();
|
|
|
|
bool isMetric() const;
|
|
|
|
|
2018-12-05 05:52:36 -06:00
|
|
|
private:
|
2018-12-07 08:48:11 -06:00
|
|
|
caf::PdmField<bool> m_deviceOpen;
|
2018-12-05 05:52:36 -06:00
|
|
|
|
2018-12-07 08:48:11 -06:00
|
|
|
std::array<caf::PdmField<QString>, AICD_NUM_PARAMS> m_aicdParameterFields;
|
2018-12-05 05:52:36 -06:00
|
|
|
};
|