mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#1596 Move RiaEclipseUnitTools to Application/Tools
This commit is contained in:
@@ -14,7 +14,6 @@ ${CEE_CURRENT_LIST_DIR}RimEclipsePropertyFilterCollection.h
|
||||
${CEE_CURRENT_LIST_DIR}RimCellRangeFilter.h
|
||||
${CEE_CURRENT_LIST_DIR}RimCellRangeFilterCollection.h
|
||||
${CEE_CURRENT_LIST_DIR}RimDefines.h
|
||||
${CEE_CURRENT_LIST_DIR}RiaEclipseUnitTools.h
|
||||
${CEE_CURRENT_LIST_DIR}RimLegendConfig.h
|
||||
${CEE_CURRENT_LIST_DIR}RimOilField.h
|
||||
${CEE_CURRENT_LIST_DIR}RimProject.h
|
||||
@@ -103,7 +102,6 @@ ${CEE_CURRENT_LIST_DIR}RimEclipsePropertyFilterCollection.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimCellRangeFilter.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimCellRangeFilterCollection.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimDefines.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RiaEclipseUnitTools.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimLegendConfig.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimOilField.cpp
|
||||
${CEE_CURRENT_LIST_DIR}RimProject.cpp
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2017- Statoil 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 "RiaEclipseUnitTools.h"
|
||||
|
||||
#include "cafAppEnum.h"
|
||||
|
||||
#include "cvfAssert.h"
|
||||
|
||||
namespace caf
|
||||
{
|
||||
template<>
|
||||
void RiaEclipseUnitTools::UnitSystemType::setUp()
|
||||
{
|
||||
addItem(RiaEclipseUnitTools::UNITS_METRIC, "UNITS_METRIC", "Metric");
|
||||
addItem(RiaEclipseUnitTools::UNITS_FIELD, "UNITS_FIELD", "Field");
|
||||
addItem(RiaEclipseUnitTools::UNITS_UNKNOWN, "UNITS_UNKNOWN", "Unknown");
|
||||
|
||||
setDefault(RiaEclipseUnitTools::UNITS_METRIC);
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RiaEclipseUnitTools::darcysConstant(UnitSystem unitSystem)
|
||||
{
|
||||
// See "Cartesian transmissibility calculations" in the "Eclipse Technical Description"
|
||||
// CDARCY Darcys constant
|
||||
// = 0.00852702 (E300); 0.008527 (ECLIPSE 100) (METRIC)
|
||||
// = 0.00112712 (E300); 0.001127 (ECLIPSE 100) (FIELD)
|
||||
// = 3.6 (LAB)
|
||||
// = 0.00864 (PVT - M)
|
||||
switch (unitSystem)
|
||||
{
|
||||
case UNITS_FIELD:
|
||||
return 0.001127;
|
||||
case UNITS_METRIC:
|
||||
return 0.008527;
|
||||
default:
|
||||
CVF_ASSERT(false);
|
||||
return 0.0;
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2017- Statoil 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.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "cafAppEnum.h"
|
||||
|
||||
class RiaEclipseUnitTools
|
||||
{
|
||||
|
||||
public:
|
||||
enum UnitSystem
|
||||
{
|
||||
UNITS_METRIC,
|
||||
UNITS_FIELD,
|
||||
UNITS_UNKNOWN,
|
||||
//UNITS_LAB
|
||||
};
|
||||
|
||||
typedef caf::AppEnum< RiaEclipseUnitTools::UnitSystem > UnitSystemType;
|
||||
|
||||
static double feetPerMeter() { return 3.2808399; }
|
||||
static double meterPerFeet() { return 0.3048000; }
|
||||
|
||||
static double meterToFeet(double meter) { return meter*feetPerMeter(); }
|
||||
static double feetToMeter(double feet) { return feet*meterPerFeet();}
|
||||
static double meterToInch(double meter) { return meter*feetPerMeter()*12; }
|
||||
static double inchToMeter(double inch) { return (inch / 12)*meterPerFeet(); }
|
||||
|
||||
static double darcysConstant(UnitSystem unitSystem);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user