My Project
Loading...
Searching...
No Matches
discretefractureprimaryvariables.hh
Go to the documentation of this file.
1// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2// vi: set et ts=4 sw=4 sts=4:
3/*
4 This file is part of the Open Porous Media project (OPM).
5
6 OPM is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 2 of the License, or
9 (at your option) any later version.
10
11 OPM is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with OPM. If not, see <http://www.gnu.org/licenses/>.
18
19 Consult the COPYING file in the top-level source directory of this
20 module for the precise wording of the license and the list of
21 copyright holders.
22*/
28#ifndef EWOMS_DISCRETE_FRACTURE_PRIMARY_VARIABLES_HH
29#define EWOMS_DISCRETE_FRACTURE_PRIMARY_VARIABLES_HH
30
32
34
35namespace Opm {
42template <class TypeTag>
44 : public ImmisciblePrimaryVariables<TypeTag>
45{
47
51
53
54public:
60
68
69 using ParentType::operator=;
70
83 template <class FluidState>
84 void assignNaiveFromFracture(const FluidState& fractureFluidState,
85 const MaterialLawParams& matParams)
86 {
87 FluidState matrixFluidState;
88 fractureToMatrixFluidState_(matrixFluidState, fractureFluidState,
89 matParams);
90
92 }
93
94private:
95 template <class FluidState>
96 void fractureToMatrixFluidState_(FluidState& matrixFluidState,
97 const FluidState& fractureFluidState,
98 const MaterialLawParams& matParams) const
99 {
100 // start with the same fluid state as in the fracture
101 matrixFluidState.assign(fractureFluidState);
102
103 // the condition for the equilibrium is that the pressures are
104 // the same in the fracture and in the matrix. This means that
105 // we have to find saturations for the matrix which result in
106 // the same pressures as in the fracture. this can be done by
107 // inverting the capillary pressure-saturation curve.
108 Scalar saturations[numPhases];
109 MaterialLaw::saturations(saturations, matParams, matrixFluidState);
110
111 for (unsigned phaseIdx = 0; phaseIdx < numPhases; ++phaseIdx)
113 }
114};
115
116} // namespace Opm
117
118#endif
Represents the primary variables used by the discrete fracture multi-phase model.
Definition discretefractureprimaryvariables.hh:45
DiscreteFracturePrimaryVariables()
Default constructor.
Definition discretefractureprimaryvariables.hh:58
DiscreteFracturePrimaryVariables(const DiscreteFracturePrimaryVariables &value)=default
Copy constructor.
void assignNaiveFromFracture(const FluidState &fractureFluidState, const MaterialLawParams &matParams)
< Import base class assignment operators.
Definition discretefractureprimaryvariables.hh:84
Represents the primary variables used by the immiscible multi-phase, model.
Definition immiscibleprimaryvariables.hh:54
void assignNaive(const FluidState &fluidState)
Directly retrieve the primary variables from an arbitrary fluid state.
Definition immiscibleprimaryvariables.hh:189
Defines the properties required for the immiscible multi-phase model which considers discrete fractur...
Represents the primary variables used by the immiscible multi-phase, model.
This file contains a set of helper functions used by VFPProd / VFPInj.
Definition blackoilboundaryratevector.hh:37
constexpr auto getPropValue()
get the value data member of a property
Definition propertysystem.hh:242
typename Properties::Detail::GetPropImpl< TypeTag, Property >::type::type GetPropType
get the type alias defined in the property (equivalent to old macro GET_PROP_TYPE(....
Definition propertysystem.hh:235