Loading...
Searching...
No Matches
VFPInjProperties.hpp
/*
Copyright 2015 SINTEF ICT, Applied Mathematics.
This file is part of the Open Porous Media project (OPM).
OPM 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.
OPM 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 for more details.
You should have received a copy of the GNU General Public License
along with OPM. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef OPM_AUTODIFF_VFPINJPROPERTIES_HPP_
#define OPM_AUTODIFF_VFPINJPROPERTIES_HPP_
#include <functional>
#include <map>
#include <vector>
namespace Opm {
class VFPInjTable;
template<class Scalar>
class VFPInjProperties {
public:
void addTable(const VFPInjTable& new_table);
template <class EvalWell>
EvalWell bhp(const int table_id,
const EvalWell& aqua,
const EvalWell& liquid,
const EvalWell& vapour,
const Scalar thp) const;
const VFPInjTable& getTable(const int table_id) const;
bool hasTable(const int table_id) const;
bool empty() const
{
return m_tables.empty();
}
Scalar bhp(const int table_id,
const Scalar aqua,
const Scalar liquid,
const Scalar vapour,
const Scalar thp) const;
Scalar thp(const int table_id,
const Scalar aqua,
const Scalar liquid,
const Scalar vapour,
const Scalar bhp) const;
protected:
// Map which connects the table number with the table itself
std::map<int, std::reference_wrapper<const VFPInjTable>> m_tables;
};
} //namespace
#endif /* OPM_AUTODIFF_VFPINJPROPERTIES_HPP_ */
Opm::VFPInjProperties
Definition VFPInjProperties.hpp:34
Opm::VFPInjProperties::getTable
const VFPInjTable & getTable(const int table_id) const
Returns the table associated with the ID, or throws an exception if the table does not exist.
Definition VFPInjProperties.cpp:84
Opm::VFPInjProperties::hasTable
bool hasTable(const int table_id) const
Check whether there is table associated with ID.
Definition VFPInjProperties.cpp:90
Opm::VFPInjProperties::addTable
void addTable(const VFPInjTable &new_table)
Takes no ownership of data.
Definition VFPInjProperties.cpp:96
Opm::VFPInjProperties::bhp
EvalWell bhp(const int table_id, const EvalWell &aqua, const EvalWell &liquid, const EvalWell &vapour, const Scalar thp) const
Linear interpolation of bhp as a function of the input parameters given as Evaluation Each entry corr...
Definition VFPInjProperties.cpp:103
Opm::VFPInjProperties::thp
Scalar thp(const int table_id, const Scalar aqua, const Scalar liquid, const Scalar vapour, const Scalar bhp) const
Linear interpolation of thp as a function of the input parameters.
Definition VFPInjProperties.cpp:50
Opm::VFPInjProperties::empty
bool empty() const
Returns true if no vfp tables are in the current map.
Definition VFPInjProperties.hpp:78
Opm
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilbioeffectsmodules.hh:43