#14958 Sim Events: Move PRESSURE_COMPONENTS to WELSPECS

Move Pressure Drop and Length and Depth from the segment collection to
the well path completion settings. PRESSURE_COMPONENTS is now a dated
WELSPECS attribute used for the WELSEGS header at export, and is
rejected on SEGMENT events.
This commit is contained in:
Kristian Bendiksen committed 2026-10-19 09:28:29 +02:00
1 parent 2f86d4c210
commit c56e921160
21 files changed
+326 -186

No files matched your search

@@ -7,6 +7,7 @@
#include "RimSegmentCollection.h"
#include "RimSegmentInterval.h"
#include "RimWellPath.h"
#include "RimWellPathCompletionSettings.h"
#include "RimWellPathCompletions.h"
#include "cafPdmDefaultObjectFactory.h"
@@ -178,6 +179,8 @@ TEST( RimWellPathCompletions, LegacyMigrationPreservesDisabledSettings )
RimSegmentCollection segments;
segments.importLegacyData( &legacyParameters );
RimWellPathCompletionSettings completionSettings;
completionSettings.importLegacyMswData( &legacyParameters );
EXPECT_EQ( RimSegmentCollection::ReferenceMDType::AUTO_REFERENCE_MD, segments.referenceMDType() );
auto* migratedMaxLength = dynamic_cast<caf::PdmField<double>*>( segments.findField( "MaxSegmentLength" ) );
@@ -189,8 +192,8 @@ TEST( RimWellPathCompletions, LegacyMigrationPreservesDisabledSettings )
EXPECT_DOUBLE_EQ( 345.0, migratedMaxLength->value() );
EXPECT_TRUE( migratedCustomValues->value() );
EXPECT_FALSE( enforceMaxLength->value() );
EXPECT_EQ( RimSegmentCollection::PressureDropType::HYDROSTATIC_FRICTION_ACCELERATION, segments.pressureDrop() );
EXPECT_EQ( RimSegmentCollection::LengthAndDepthType::INC, segments.lengthAndDepth() );
EXPECT_EQ( RimWellPathCompletionSettings::PressureDropType::HYDROSTATIC_FRICTION_ACCELERATION, completionSettings.pressureDrop() );
EXPECT_EQ( RimWellPathCompletionSettings::LengthAndDepthType::INC, completionSettings.lengthAndDepth() );
segments.setReferenceMDType( RimSegmentCollection::ReferenceMDType::MANUAL_REFERENCE_MD );
EXPECT_DOUBLE_EQ( 123.0, segments.manualReferenceMD() );