2018-08-21 03:34:29 -05:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
//
|
|
|
|
// Copyright (C) 2018 Equinor ASA
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2018-08-21 03:34:29 -05: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.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
2018-08-21 03:34:29 -05:00
|
|
|
// 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.
|
2019-09-06 03:40:57 -05:00
|
|
|
//
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2018-08-21 03:34:29 -05:00
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
#pragma once
|
|
|
|
|
2021-01-21 05:58:46 -06:00
|
|
|
#include "RiaDefines.h"
|
2018-08-21 03:34:29 -05:00
|
|
|
|
|
|
|
#include "cafPdmField.h"
|
|
|
|
#include "cafPdmObject.h"
|
|
|
|
#include "cafPdmUiGroup.h"
|
|
|
|
|
|
|
|
class RimMswCompletionParameters : public caf::PdmObject
|
|
|
|
{
|
|
|
|
CAF_PDM_HEADER_INIT;
|
2019-09-06 03:40:57 -05:00
|
|
|
|
2018-08-21 03:34:29 -05:00
|
|
|
public:
|
2021-04-20 08:35:20 -05:00
|
|
|
enum class ReferenceMDType
|
2018-12-18 06:43:21 -06:00
|
|
|
{
|
|
|
|
AUTO_REFERENCE_MD = 0,
|
|
|
|
MANUAL_REFERENCE_MD
|
|
|
|
};
|
|
|
|
|
2021-04-20 08:35:20 -05:00
|
|
|
enum class PressureDropType
|
2019-09-06 03:40:57 -05:00
|
|
|
{
|
2018-08-21 03:34:29 -05:00
|
|
|
HYDROSTATIC,
|
|
|
|
HYDROSTATIC_FRICTION,
|
|
|
|
HYDROSTATIC_FRICTION_ACCELERATION
|
|
|
|
};
|
|
|
|
|
2021-04-20 08:35:20 -05:00
|
|
|
enum class LengthAndDepthType
|
2019-09-06 03:40:57 -05:00
|
|
|
{
|
2018-08-21 03:34:29 -05:00
|
|
|
ABS,
|
|
|
|
INC
|
|
|
|
};
|
|
|
|
|
2021-04-20 08:35:20 -05:00
|
|
|
using ReferenceMDEnum = caf::AppEnum<ReferenceMDType>;
|
|
|
|
using PressureDropEnum = caf::AppEnum<PressureDropType>;
|
|
|
|
using LengthAndDepthEnum = caf::AppEnum<LengthAndDepthType>;
|
2018-08-21 03:34:29 -05:00
|
|
|
|
2021-04-20 08:35:20 -05:00
|
|
|
RimMswCompletionParameters();
|
2018-10-18 12:45:57 -05:00
|
|
|
~RimMswCompletionParameters() override;
|
2018-08-21 03:34:29 -05:00
|
|
|
|
2021-02-26 07:27:59 -06:00
|
|
|
bool isDefault() const;
|
|
|
|
RimMswCompletionParameters& operator=( const RimMswCompletionParameters& rhs );
|
|
|
|
|
2018-12-18 06:43:21 -06:00
|
|
|
ReferenceMDType referenceMDType() const;
|
|
|
|
double manualReferenceMD() const;
|
2021-01-21 05:58:46 -06:00
|
|
|
double linerDiameter( RiaDefines::EclipseUnitSystem unitSystem ) const;
|
|
|
|
static double defaultLinerDiameter( RiaDefines::EclipseUnitSystem unitSystem );
|
|
|
|
double roughnessFactor( RiaDefines::EclipseUnitSystem unitSystem ) const;
|
|
|
|
static double defaultRoughnessFactor( RiaDefines::EclipseUnitSystem unitSystem );
|
2018-08-21 03:34:29 -05:00
|
|
|
PressureDropEnum pressureDrop() const;
|
|
|
|
LengthAndDepthEnum lengthAndDepth() const;
|
2018-09-11 03:41:20 -05:00
|
|
|
double maxSegmentLength() const;
|
2018-12-18 06:43:21 -06:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void setReferenceMDType( ReferenceMDType refType );
|
|
|
|
void setManualReferenceMD( double manualRefMD );
|
|
|
|
void setLinerDiameter( double diameter );
|
|
|
|
void setRoughnessFactor( double roughnessFactor );
|
|
|
|
void setPressureDrop( PressureDropType pressureDropType );
|
|
|
|
void setLengthAndDepth( LengthAndDepthType lengthAndDepthType );
|
2018-08-21 03:34:29 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
void setUnitSystemSpecificDefaults();
|
2018-08-21 03:34:29 -05:00
|
|
|
|
2021-04-20 08:35:20 -05:00
|
|
|
void updateFromTopLevelWell( const RimMswCompletionParameters* topLevelWellParameters );
|
|
|
|
|
2020-02-12 04:43:15 -06:00
|
|
|
void fieldChangedByUi( const caf::PdmFieldHandle* changedField, const QVariant& oldValue, const QVariant& newValue ) override;
|
2021-04-20 08:35:20 -05:00
|
|
|
|
|
|
|
protected:
|
2019-09-06 03:40:57 -05:00
|
|
|
void defineUiOrdering( QString uiConfigName, caf::PdmUiOrdering& uiOrdering ) override;
|
|
|
|
void initAfterRead() override;
|
2018-08-21 03:34:29 -05:00
|
|
|
|
|
|
|
private:
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmField<ReferenceMDEnum> m_refMDType;
|
|
|
|
caf::PdmField<double> m_refMD;
|
2018-12-18 06:43:21 -06:00
|
|
|
|
2021-04-20 08:35:20 -05:00
|
|
|
caf::PdmField<bool> m_customValuesForLateral;
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmField<double> m_linerDiameter;
|
|
|
|
caf::PdmField<double> m_roughnessFactor;
|
2018-08-21 03:34:29 -05:00
|
|
|
|
|
|
|
caf::PdmField<PressureDropEnum> m_pressureDrop;
|
|
|
|
caf::PdmField<LengthAndDepthEnum> m_lengthAndDepth;
|
2018-09-11 03:41:20 -05:00
|
|
|
|
2019-09-06 03:40:57 -05:00
|
|
|
caf::PdmField<bool> m_enforceMaxSegmentLength;
|
|
|
|
caf::PdmField<double> m_maxSegmentLength;
|
2018-08-21 03:34:29 -05:00
|
|
|
};
|