Extracts unit system from VFP data file

Modifies the VFP table extraction process to retrieve the unit system defined in the data file.

Convert ALQ values from SI to raw values
This commit is contained in:
Magne Sjaastad committed 2025-08-19 14:06:33 +02:00
1 parent 0d738013c4
commit acb582ab07
5 files changed
+93 -43

No files matched your search

@@ -24,6 +24,8 @@
#include "RimVfpTable.h"
#include <opm/input/eclipse/Units/UnitSystem.hpp>
#include "cafCmdFeatureMenuBuilder.h"
#include <QFileInfo>
@@ -74,7 +76,11 @@ void RimVfpTableData::ensureDataIsImported()
m_vfpTables = std::make_unique<RigVfpTables>();
const auto [vfpProdTables, vfpInjTables] = RiaOpmParserTools::extractVfpTablesFromDataFile( m_filePath().path().toStdString() );
const auto& [unitSystem, vfpProdTables, vfpInjTables] =
RiaOpmParserTools::extractVfpTablesFromDataFile( m_filePath().path().toStdString() );
m_vfpTables->setUnitSystem( unitSystem );
for ( const auto& prod : vfpProdTables )
{
m_vfpTables->addProductionTable( prod );