mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Stim Plan Model: Handle pressure values in field units.
This commit is contained in:
committed by
Magne Sjaastad
parent
361bf4090a
commit
53f102ee55
@@ -18,6 +18,7 @@
|
||||
#include "RimStimPlanModelPressureCalculator.h"
|
||||
|
||||
#include "RiaDefines.h"
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaInterpolationTools.h"
|
||||
#include "RiaLogging.h"
|
||||
#include "RiaStimPlanModelDefines.h"
|
||||
@@ -173,6 +174,15 @@ bool RimStimPlanModelPressureCalculator::extractValuesForProperty( RiaDefines::C
|
||||
.arg( caf::AppEnum<RiaDefines::CurveProperty>( curveProperty ).uiText() ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
RimEclipseCase* pressureCase = stimPlanModel->eclipseCaseForProperty( pressureCurveProperty );
|
||||
RiaDefines::EclipseUnitSystem eclipseUnitsType = pressureCase->eclipseCaseData()->unitsType();
|
||||
if ( eclipseUnitsType == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
// Pressure must have unit bar.
|
||||
for ( auto& p : values )
|
||||
p = RiaEclipseUnitTools::psiToBar( p );
|
||||
}
|
||||
}
|
||||
|
||||
if ( targetTvds.size() != tvDepthValues.size() )
|
||||
|
||||
Reference in New Issue
Block a user