mirror of
https://github.com/OPM/ResInsight.git
synced 2025-01-01 03:37:15 -06:00
18c29d5fc7
The "absolute" filter cake adjustment should only be used for cells when filter cake is present (i.e filtrate thickness is not zero).
131 lines
5.1 KiB
C++
131 lines
5.1 KiB
C++
/////////////////////////////////////////////////////////////////////////////////
|
|
//
|
|
// Copyright (C) 2022- Equinor ASA
|
|
//
|
|
// ResInsight is free software: you can redistribute it and/or modify
|
|
// it under the terms of the GNU General Public License as published by
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
// (at your option) any later version.
|
|
//
|
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
|
//
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
|
// for more details.
|
|
//
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
#include "RiaThermalFractureDefines.h"
|
|
#include "RiaFractureDefines.h"
|
|
|
|
#include "cafAssert.h"
|
|
|
|
#include <map>
|
|
|
|
namespace RiaDefines
|
|
{
|
|
//--------------------------------------------------------------------------------------------------
|
|
///
|
|
//--------------------------------------------------------------------------------------------------
|
|
QString leakoffPressureDropResultName()
|
|
{
|
|
return "LeakoffPressureDrop";
|
|
}
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
///
|
|
//--------------------------------------------------------------------------------------------------
|
|
QString filtratePressureDropResultName()
|
|
{
|
|
return "FiltratePressureDrop";
|
|
}
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
///
|
|
//--------------------------------------------------------------------------------------------------
|
|
QString leakoffMobilityResultName()
|
|
{
|
|
return "LeakoffMobility";
|
|
};
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
///
|
|
//--------------------------------------------------------------------------------------------------
|
|
QString filterCakeMobilityResultName()
|
|
{
|
|
return "FilterCakeMobility";
|
|
};
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
///
|
|
//--------------------------------------------------------------------------------------------------
|
|
QString injectivityFactorResultName()
|
|
{
|
|
return "InjectivityFactor";
|
|
}
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
///
|
|
//--------------------------------------------------------------------------------------------------
|
|
QString viscosityResultName()
|
|
{
|
|
return "Viscosity";
|
|
}
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
///
|
|
//--------------------------------------------------------------------------------------------------
|
|
QString filtrateThicknessResultName()
|
|
{
|
|
return "FiltrateThickness";
|
|
}
|
|
|
|
//--------------------------------------------------------------------------------------------------
|
|
///
|
|
//--------------------------------------------------------------------------------------------------
|
|
QString getExpectedThermalFractureUnit( const QString& name, RiaDefines::EclipseUnitSystem unitSystem )
|
|
{
|
|
CAF_ASSERT( unitSystem == RiaDefines::EclipseUnitSystem::UNITS_METRIC || unitSystem == RiaDefines::EclipseUnitSystem::UNITS_FIELD );
|
|
|
|
// parameter name --> { metric unit, field unit }
|
|
std::map<QString, std::pair<QString, QString>> mapping =
|
|
{ { "XCoord", { "m", "feet" } },
|
|
{ "YCoord", { "m", "feet" } },
|
|
{ "ZCoord", { "m", "feet" } },
|
|
{ "Width", { "cm", "inches" } },
|
|
{ "Pressure", { "BARa", "psia" } },
|
|
{ "Temperature", { "deg C", "deg F" } },
|
|
{ "Stress", { "BARa", "psia" } },
|
|
{ "Density", { "Kg/m3", "lb/ft3" } },
|
|
{ RiaDefines::viscosityResultName(), { "mPa.s", "centipoise" } },
|
|
{ RiaDefines::leakoffMobilityResultName(), { "m/day/bar", "ft/day/psi" } },
|
|
{ "Conductivity",
|
|
{ RiaDefines::unitStringConductivity( RiaDefines::EclipseUnitSystem::UNITS_METRIC ),
|
|
RiaDefines::unitStringConductivity( RiaDefines::EclipseUnitSystem::UNITS_FIELD ) } },
|
|
{ "Velocity", { "m/sec", "ft/sec" } },
|
|
{ "ResPressure", { "BARa", "psia" } },
|
|
{ "ResTemperature", { "deg C", "deg F" } },
|
|
{ RiaDefines::filtrateThicknessResultName(), { "cm", "inches" } },
|
|
{ RiaDefines::filtratePressureDropResultName(), { "bar", "psi" } },
|
|
{ "EffectiveResStress", { "bar", "psi" } },
|
|
{ "EffectiveFracStress", { "bar", "psi" } },
|
|
{ RiaDefines::leakoffPressureDropResultName(), { "bar", "psi" } },
|
|
{ RiaDefines::injectivityFactorResultName(), { "factor", "factor" } },
|
|
{ RiaDefines::filterCakeMobilityResultName(), { "m/day/bar", "ft/day/psi" } } };
|
|
|
|
auto res = std::find_if( mapping.begin(), mapping.end(), [&]( const auto& val ) { return val.first == name; } );
|
|
|
|
if ( res != mapping.end() )
|
|
{
|
|
if ( unitSystem == RiaDefines::EclipseUnitSystem::UNITS_METRIC )
|
|
return res->second.first;
|
|
else
|
|
return res->second.second;
|
|
}
|
|
|
|
return "";
|
|
}
|
|
|
|
}; // namespace RiaDefines
|