mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Thermal Fracture: convert conductivity from darcy to milliDarcy.
This commit is contained in:
parent
453fe2dcd6
commit
d0b961871a
@ -19,6 +19,7 @@
|
|||||||
#include "RifThermalFractureReader.h"
|
#include "RifThermalFractureReader.h"
|
||||||
|
|
||||||
#include "RiaDefines.h"
|
#include "RiaDefines.h"
|
||||||
|
#include "RiaFractureDefines.h"
|
||||||
#include "RiaTextStringTools.h"
|
#include "RiaTextStringTools.h"
|
||||||
|
|
||||||
#include "RigThermalFractureDefinition.h"
|
#include "RigThermalFractureDefinition.h"
|
||||||
@ -57,6 +58,13 @@ std::pair<std::shared_ptr<RigThermalFractureDefinition>, QString>
|
|||||||
if ( isOk )
|
if ( isOk )
|
||||||
{
|
{
|
||||||
int propertyIndex = i - valueOffset;
|
int propertyIndex = i - valueOffset;
|
||||||
|
|
||||||
|
// Convert conductivity from Darcy to milliDarcy
|
||||||
|
if ( definition->getPropertyIndex( "Conductivity" ) == propertyIndex )
|
||||||
|
{
|
||||||
|
value *= 1.0e3;
|
||||||
|
}
|
||||||
|
|
||||||
definition->appendPropertyValue( propertyIndex, nodeIndex, value );
|
definition->appendPropertyValue( propertyIndex, nodeIndex, value );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -87,7 +95,16 @@ std::pair<std::shared_ptr<RigThermalFractureDefinition>, QString>
|
|||||||
for ( int i = valueOffset; i < headerValues.size(); i++ )
|
for ( int i = valueOffset; i < headerValues.size(); i++ )
|
||||||
{
|
{
|
||||||
auto [name, unit] = parseNameAndUnit( headerValues[i] );
|
auto [name, unit] = parseNameAndUnit( headerValues[i] );
|
||||||
if ( !name.isEmpty() && !unit.isEmpty() ) definition->addProperty( name, unit );
|
if ( !name.isEmpty() && !unit.isEmpty() )
|
||||||
|
{
|
||||||
|
// Special handling for Conductivity: change unit from Darcy to Milli
|
||||||
|
if ( name.contains( RiaDefines::conductivityResultName(), Qt::CaseInsensitive ) )
|
||||||
|
{
|
||||||
|
unit = RiaDefines::unitStringConductivity( detectUnitSystem( definition ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
definition->addProperty( name, unit );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Detect unit system
|
// Detect unit system
|
||||||
@ -269,25 +286,28 @@ QString RifThermalFractureReader::getExpectedUnit( const QString& name, RiaDefin
|
|||||||
unitSystem == RiaDefines::EclipseUnitSystem::UNITS_FIELD );
|
unitSystem == RiaDefines::EclipseUnitSystem::UNITS_FIELD );
|
||||||
|
|
||||||
// parameter name --> { metric unit, field unit }
|
// parameter name --> { metric unit, field unit }
|
||||||
std::map<QString, std::pair<QString, QString>> mapping = { { "XCoord", { "m", "feet" } },
|
std::map<QString, std::pair<QString, QString>> mapping =
|
||||||
{ "YCoord", { "m", "feet" } },
|
{ { "XCoord", { "m", "feet" } },
|
||||||
{ "ZCoord", { "m", "feet" } },
|
{ "YCoord", { "m", "feet" } },
|
||||||
{ "Width", { "cm", "inches" } },
|
{ "ZCoord", { "m", "feet" } },
|
||||||
{ "Pressure", { "BARa", "psia" } },
|
{ "Width", { "cm", "inches" } },
|
||||||
{ "Temperature", { "deg C", "deg F" } },
|
{ "Pressure", { "BARa", "psia" } },
|
||||||
{ "Stress", { "BARa", "psia" } },
|
{ "Temperature", { "deg C", "deg F" } },
|
||||||
{ "Density", { "Kg/m3", "lb/ft3" } },
|
{ "Stress", { "BARa", "psia" } },
|
||||||
{ "Viscosity", { "mPa.s", "centipoise" } },
|
{ "Density", { "Kg/m3", "lb/ft3" } },
|
||||||
{ "LeakoffMobility", { "m/day/bar", "ft/day/psi" } },
|
{ "Viscosity", { "mPa.s", "centipoise" } },
|
||||||
{ "Conductivity", { "D.m", "D.ft" } },
|
{ "LeakoffMobility", { "m/day/bar", "ft/day/psi" } },
|
||||||
{ "Velocity", { "m/sec", "ft/sec" } },
|
{ "Conductivity",
|
||||||
{ "ResPressure", { "BARa", "psia" } },
|
{ RiaDefines::unitStringConductivity( RiaDefines::EclipseUnitSystem::UNITS_METRIC ),
|
||||||
{ "ResTemperature", { "deg C", "deg F" } },
|
RiaDefines::unitStringConductivity( RiaDefines::EclipseUnitSystem::UNITS_FIELD ) } },
|
||||||
{ "FiltrateThickness", { "cm", "inches" } },
|
{ "Velocity", { "m/sec", "ft/sec" } },
|
||||||
{ "FiltratePressureDrop", { "bar", "psi" } },
|
{ "ResPressure", { "BARa", "psia" } },
|
||||||
{ "EffectiveResStress", { "bar", "psi" } },
|
{ "ResTemperature", { "deg C", "deg F" } },
|
||||||
{ "EffectiveFracStress", { "bar", "psi" } },
|
{ "FiltrateThickness", { "cm", "inches" } },
|
||||||
{ "LeakoffPressureDrop", { "bar", "psi" } } };
|
{ "FiltratePressureDrop", { "bar", "psi" } },
|
||||||
|
{ "EffectiveResStress", { "bar", "psi" } },
|
||||||
|
{ "EffectiveFracStress", { "bar", "psi" } },
|
||||||
|
{ "LeakoffPressureDrop", { "bar", "psi" } } };
|
||||||
|
|
||||||
auto res = std::find_if( mapping.begin(), mapping.end(), [&]( const auto& val ) { return val.first == name; } );
|
auto res = std::find_if( mapping.begin(), mapping.end(), [&]( const auto& val ) { return val.first == name; } );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user