mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-26 15:10:22 -05:00
Orion Events: Generate COMPORD for new wells
This commit is contained in:
1 parent
0b7ce2252c
commit
a362f868c3
4 files changed
+31
No files matched your search
@@ -211,6 +211,9 @@ QString RicScheduleDataGenerator::generateDateSection( const RimWellEventTimelin
|
||||
if ( auto welspecs = generateWelspecsForWell( timeline, eclipseCase, *well, date ) )
|
||||
{
|
||||
mergeKeyword( keywordBlocks, "WELSPECS", std::move( *welspecs ) );
|
||||
mergeKeyword( keywordBlocks,
|
||||
"COMPORD",
|
||||
RimKeywordFactory::compordKeyword( well->completionSettings()->wellNameForExport().toStdString() ) );
|
||||
}
|
||||
|
||||
generateCompletionsForWell( timeline, eclipseCase, *well, date, keywordBlocks );
|
||||
|
||||
@@ -104,6 +104,22 @@ Opm::DeckKeyword welspecsKeyword( const std::string wellGrpName, RimEclipseCase*
|
||||
return kw;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
Opm::DeckKeyword compordKeyword( const std::string& wellName )
|
||||
{
|
||||
using C = Opm::ParserKeywords::COMPORD;
|
||||
|
||||
std::vector<Opm::DeckItem> items;
|
||||
items.push_back( RifOpmDeckTools::item( C::WELL::itemName, wellName ) );
|
||||
items.push_back( RifOpmDeckTools::item( C::ORDER_TYPE::itemName, "INPUT" ) );
|
||||
|
||||
Opm::DeckKeyword kw( ( C() ) );
|
||||
kw.addRecord( Opm::DeckRecord{ std::move( items ) } );
|
||||
return kw;
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -56,6 +56,7 @@ namespace RimKeywordFactory
|
||||
{
|
||||
|
||||
Opm::DeckKeyword welspecsKeyword( const std::string wellGrpName, RimEclipseCase* eCase, RimWellPath* wellPath );
|
||||
Opm::DeckKeyword compordKeyword( const std::string& wellName );
|
||||
Opm::DeckKeyword compdatKeyword( const std::vector<RigCompletionData>& compdata, const std::string wellName );
|
||||
Opm::DeckKeyword wpimultKeyword( const std::vector<RigCompletionData>& compdata, const std::string wellName );
|
||||
Opm::DeckKeyword complumpKeyword( const std::vector<RigCompletionData>& compdata, const std::string wellName );
|
||||
|
||||
@@ -1874,6 +1874,17 @@ class TestScheduleGeneration:
|
||||
f"Well {wp.name!r} missing from grouped WELSPECS block: {welspecs_block!r}"
|
||||
)
|
||||
|
||||
assert schedule_text.count("COMPORD\n") == 1
|
||||
compord_block = schedule_text.split("COMPORD\n", 1)[1].split("\n/\n", 1)[0]
|
||||
assert compord_block.count("INPUT") == 2
|
||||
for wp in well_paths[:2]:
|
||||
assert wp.name.replace(" ", "") in compord_block.replace(" ", ""), (
|
||||
f"Well {wp.name!r} missing from grouped COMPORD block: {compord_block!r}"
|
||||
)
|
||||
|
||||
assert schedule_text.index("WELSPECS\n") < schedule_text.index("COMPORD\n")
|
||||
assert schedule_text.index("COMPORD\n") < schedule_text.index("COMPDAT\n")
|
||||
|
||||
def test_per_well_keywords_sorted_by_well_name(self, project_with_case_and_well):
|
||||
"""Per-well keyword records are emitted in deck-name-sorted well order, so WELSPECS
|
||||
and COMPDAT share the same ascending well order rather than an arbitrary one.
|
||||
|
||||
Reference in new issue
Block a user