Loading...
Searching...
No Matches
EclThcLaw.hpp
Go to the documentation of this file.
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*
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 2 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/>.
Consult the COPYING file in the top-level source directory of this
module for the precise wording of the license and the list of
copyright holders.
*/
#ifndef OPM_ECL_THC_LAW_HPP
#define OPM_ECL_THC_LAW_HPP
#include "EclThcLawParams.hpp"
namespace Opm
{
template <class ScalarT,
class ParamsT = EclThcLawParams<ScalarT>>
class EclThcLaw
{
public:
using Params = ParamsT;
using Scalar = typename Params::Scalar;
template <class FluidState, class Evaluation = typename FluidState::Scalar>
static Evaluation thermalConductivity(const Params& params,
const FluidState&)
{
// The thermal conductivity approach based on the THC* keywords.
// let's assume that the porosity of the rock at standard condition is meant
Scalar poro = params.porosity(); // NB! Effective porosity, here meaning poro*ntg
// IMO this approach is very questionable because the total thermal conductivity
// should at least depend on the current solution's phase saturation. Since ECL
// is king, let's follow their lead and throw ourselfs down the cliff of obvious
// incorrectness.
//
// TODO: also follow their fine leadership in the twophase case.
constexpr const Scalar numPhases = 3.0;
Scalar thconAvg =
poro*(params.thcoil() + params.thcgas() + params.thcwater()) / numPhases
+ (1.0 - poro)*params.thcrock();
return thconAvg;
}
};
} // namespace Opm
#endif
EclThcLawParams.hpp
The default implementation of a parameter object for the thermal conduction law based on the THC* key...
Opm::EclThcLawParams
The default implementation of a parameter object for the thermal conduction law based on the THC* key...
Definition EclThcLawParams.hpp:40
Opm::EclThcLaw
Implements the total thermal conductivity and rock enthalpy relations used by ECL.
Definition EclThcLaw.hpp:46
Opm::EclThcLaw::thermalConductivity
static Evaluation thermalConductivity(const Params &params, const FluidState &)
Given a fluid state, return the total thermal conductivity [W/m^2 / (K/m)] of the porous medium.
Definition EclThcLaw.hpp:56
Opm
This class implements a small container which holds the transmissibility mulitpliers for all the face...
Definition Exceptions.hpp:30