mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#9102 Thermal Fracture: handle field units.
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
|
||||
#include "RigThermalFractureResultUtil.h"
|
||||
|
||||
#include "RiaEclipseUnitTools.h"
|
||||
#include "RiaLogging.h"
|
||||
|
||||
#include "RiaWeightedMeanCalculator.h"
|
||||
@@ -256,6 +257,30 @@ cvf::cref<RigFractureGrid>
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Check that the data is in the required unit system.
|
||||
// Convert if not the case.
|
||||
if ( requiredUnitSet != fractureDefinition->unitSystem() )
|
||||
{
|
||||
// Convert to the conductivity unit system used by the fracture template
|
||||
// The conductivity value is used in the computations of transmissibility when exporting COMPDAT, and has unit
|
||||
// md-m or md-ft This unit must match the unit used to represent coordinates of the grid used for export
|
||||
|
||||
for ( auto& yValues : conductivityValues )
|
||||
{
|
||||
for ( auto& xVal : yValues )
|
||||
{
|
||||
if ( requiredUnitSet == RiaDefines::EclipseUnitSystem::UNITS_FIELD )
|
||||
{
|
||||
xVal = RiaEclipseUnitTools::convertToFeet( xVal, conductivityUnitTextOnFile, false );
|
||||
}
|
||||
else if ( requiredUnitSet == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
||||
{
|
||||
xVal = RiaEclipseUnitTools::convertToMeter( xVal, conductivityUnitTextOnFile, false );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Create bounding box
|
||||
cvf::BoundingBox boundingBox;
|
||||
for ( auto p : points )
|
||||
|
||||
Reference in New Issue
Block a user