mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-30 17:10:19 -05:00
Add support for SICD valves (#13496)
* Add SICD parameters * Add wsegsicd valves to completion export * Add python method to read template info from valve * Update tests
This commit is contained in:
44 files changed
+1193
-109
No files matched your search
@@ -36,6 +36,7 @@ set(SOURCE_GROUP_HEADER_FILES
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimcPerforationInterval.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimcValveTemplateCollection.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimcWellPathCompletionSettings.h
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimcWellPathValve.h
|
||||
)
|
||||
|
||||
set(SOURCE_GROUP_SOURCE_FILES
|
||||
@@ -76,6 +77,7 @@ set(SOURCE_GROUP_SOURCE_FILES
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimcPerforationInterval.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimcValveTemplateCollection.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimcWellPathCompletionSettings.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/RimcWellPathValve.cpp
|
||||
)
|
||||
|
||||
list(APPEND CODE_HEADER_FILES ${SOURCE_GROUP_HEADER_FILES})
|
||||
|
||||
@@ -30,6 +30,7 @@ void caf::AppEnum<RimcValveTemplateCollection_add_template::ValveTemplateType>::
|
||||
addItem( RimcValveTemplateCollection_add_template::ValveTemplateType::ICD, "ICD", "Inflow Control Device" );
|
||||
addItem( RimcValveTemplateCollection_add_template::ValveTemplateType::ICV, "ICV", "Inflow Control Valve" );
|
||||
addItem( RimcValveTemplateCollection_add_template::ValveTemplateType::AICD, "AICD", "Adaptive Inflow Control Device" );
|
||||
addItem( RimcValveTemplateCollection_add_template::ValveTemplateType::SICD, "SICD", "Spiral Inflow Control Device" );
|
||||
addItem( RimcValveTemplateCollection_add_template::ValveTemplateType::UNDEFINED, "UNDEFINED", "Undefined Valve Template" );
|
||||
|
||||
setDefault( RimcValveTemplateCollection_add_template::ValveTemplateType::UNDEFINED );
|
||||
@@ -51,7 +52,7 @@ RimcValveTemplateCollection_add_template::RimcValveTemplateCollection_add_templa
|
||||
"",
|
||||
"",
|
||||
"",
|
||||
"Completion type (ICD, ICV, or AICD)" );
|
||||
"Completion type (ICD, ICV, AICD or SICD)" );
|
||||
CAF_PDM_InitScriptableField( &m_orificeDiameter, "OrificeDiameter", RimValveTemplate::defaultOrificeDiameter(), "", "", "", "Orifice diameter" );
|
||||
CAF_PDM_InitScriptableField( &m_flowCoefficient, "FlowCoefficient", RimValveTemplate::defaultFlowCoefficient(), "", "", "", "Flow coefficient" );
|
||||
CAF_PDM_InitScriptableField( &m_userLabel, "UserLabel", QString( "" ), "", "", "", "User-defined label for the template" );
|
||||
@@ -81,6 +82,9 @@ std::expected<caf::PdmObjectHandle*, QString> RimcValveTemplateCollection_add_te
|
||||
case ValveTemplateType::AICD:
|
||||
completionType = RiaDefines::WellPathComponentType::AICD;
|
||||
break;
|
||||
case ValveTemplateType::SICD:
|
||||
completionType = RiaDefines::WellPathComponentType::SICD;
|
||||
break;
|
||||
default:
|
||||
return std::unexpected( QString( "Unknown completion type" ) );
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ public:
|
||||
ICD,
|
||||
ICV,
|
||||
AICD,
|
||||
SICD,
|
||||
UNDEFINED
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2021- Equinor ASA
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include "RimcWellPathValve.h"
|
||||
|
||||
#include "RiaApplication.h"
|
||||
|
||||
#include "RimValveTemplate.h"
|
||||
#include "RimWellPathValve.h"
|
||||
|
||||
#include "cafPdmAbstractFieldScriptingCapability.h"
|
||||
#include "cafPdmFieldScriptingCapability.h"
|
||||
|
||||
CAF_PDM_OBJECT_METHOD_SOURCE_INIT( RimWellPathValve, RimcWellPathValve_template, "template" );
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
RimcWellPathValve_template::RimcWellPathValve_template( caf::PdmObjectHandle* self )
|
||||
: PdmObjectMethod( self, PdmObjectMethod::NullPointerType::NULL_IS_VALID, PdmObjectMethod::ResultType::PERSISTENT_TRUE )
|
||||
{
|
||||
CAF_PDM_InitObject( "Valve Template", "", "", "Valve Template" );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
std::expected<caf::PdmObjectHandle*, QString> RimcWellPathValve_template::execute()
|
||||
{
|
||||
if ( auto valve = self<RimWellPathValve>() )
|
||||
{
|
||||
return valve->valveTemplate();
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
QString RimcWellPathValve_template::classKeywordReturnedType() const
|
||||
{
|
||||
return RimValveTemplate::classKeywordStatic();
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2026 Equinor ASA
|
||||
//
|
||||
// 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 "cafPdmField.h"
|
||||
#include "cafPdmObjectHandle.h"
|
||||
#include "cafPdmObjectMethod.h"
|
||||
#include "cafPdmPtrField.h"
|
||||
|
||||
#include <QString>
|
||||
|
||||
class RimWellPathValve;
|
||||
class RimValveTemplate;
|
||||
|
||||
//==================================================================================================
|
||||
///
|
||||
//==================================================================================================
|
||||
class RimcWellPathValve_template : public caf::PdmObjectMethod
|
||||
{
|
||||
CAF_PDM_HEADER_INIT;
|
||||
|
||||
public:
|
||||
RimcWellPathValve_template( caf::PdmObjectHandle* self );
|
||||
|
||||
std::expected<caf::PdmObjectHandle*, QString> execute() override;
|
||||
QString classKeywordReturnedType() const override;
|
||||
};
|
||||
Reference in new issue
Block a user