version 3.8
porenetwork/2p/volumevariables.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// SPDX-FileCopyrightInfo: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
13#ifndef DUMUX_PNM_2P_VOLUME_VARIABLES_HH
14#define DUMUX_PNM_2P_VOLUME_VARIABLES_HH
15
18
19namespace Dumux::PoreNetwork {
20
26template <class Traits>
28: public Dumux::TwoPVolumeVariables<Traits>
29{
31 using ModelTraits = typename Traits::ModelTraits;
32 using Scalar = typename Traits::PrimaryVariables::value_type;
33 using FS = typename Traits::FluidSystem;
34 static constexpr int numFluidComps = ParentType::numFluidComponents();
35 static constexpr auto formulation = ModelTraits::priVarFormulation();
36public:
37
39 using FluidSystem = typename Traits::FluidSystem;
41 using FluidState = typename Traits::FluidState;
43 using SolidState = typename Traits::SolidState;
45 using SolidSystem = typename Traits::SolidSystem;
47 using Indices = typename ModelTraits::Indices;
48
58 template<class ElemSol, class Problem, class Element, class Scv>
59 void update(const ElemSol& elemSol,
60 const Problem& problem,
61 const Element& element,
62 const Scv& scv)
63 {
64 ParentType::update(elemSol, problem, element, scv);
65 poreInscribedRadius_ = problem.spatialParams().poreInscribedRadius(element, scv, elemSol);
66 poreVolume_ = problem.gridGeometry().poreVolume(scv.dofIndex()) * this->porosity();
67 surfaceTension_ = problem.spatialParams().surfaceTension(element, scv, elemSol);
68 }
69
73 Scalar poreInscribedRadius() const
74 { return poreInscribedRadius_; }
75
79 Scalar poreVolume() const
80 { return poreVolume_; }
81
85 Scalar surfaceTension() const
86 { return surfaceTension_; }
87
88protected:
92};
93
94} // end namespace Dumux::PoreNetwork
95
96#endif
Contains the quantities which are are constant within a finite volume (the pore body) in the two-phas...
Definition: porenetwork/2p/volumevariables.hh:29
typename ModelTraits::Indices Indices
Export the indices.
Definition: porenetwork/2p/volumevariables.hh:47
typename Traits::FluidSystem FluidSystem
Export type of fluid system.
Definition: porenetwork/2p/volumevariables.hh:39
typename Traits::SolidState SolidState
Export type of solid state.
Definition: porenetwork/2p/volumevariables.hh:43
Scalar surfaceTension_
Definition: porenetwork/2p/volumevariables.hh:91
void update(const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv)
Updates all quantities for a given control volume.
Definition: porenetwork/2p/volumevariables.hh:59
Scalar poreVolume_
Definition: porenetwork/2p/volumevariables.hh:90
Scalar poreVolume() const
Returns the pore volume. // TODO should this be a fraction only?
Definition: porenetwork/2p/volumevariables.hh:79
Scalar poreInscribedRadius() const
Returns the pore's inscribed radius.
Definition: porenetwork/2p/volumevariables.hh:73
Scalar surfaceTension() const
Returns the surface tension.
Definition: porenetwork/2p/volumevariables.hh:85
typename Traits::SolidSystem SolidSystem
Export type of solid system.
Definition: porenetwork/2p/volumevariables.hh:45
typename Traits::FluidState FluidState
Export type of fluid state.
Definition: porenetwork/2p/volumevariables.hh:41
Scalar poreInscribedRadius_
Definition: porenetwork/2p/volumevariables.hh:89
static constexpr int numFluidComponents()
Return number of components considered by the model.
Definition: porousmediumflow/volumevariables.hh:40
Contains the quantities which are are constant within a finite volume in the two-phase model.
Definition: porousmediumflow/2p/volumevariables.hh:33
void update(const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv)
Updates all quantities for a given control volume.
Definition: porousmediumflow/2p/volumevariables.hh:75
Scalar porosity() const
Returns the average porosity within the control volume in .
Definition: porousmediumflow/2p/volumevariables.hh:271
Definition: discretization/porenetwork/fvelementgeometry.hh:24
The infrastructure to retrieve run-time parameters from Dune::ParameterTrees.
Contains the quantities which are constant within a finite volume in the two-phase model.