version 3.9
porenetwork/2pnc/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_NC_VOLUME_VARIABLES_HH
14#define DUMUX_PNM_2P_NC_VOLUME_VARIABLES_HH
15
17
18namespace Dumux::PoreNetwork {
19
25template <class Traits>
27: public Dumux::TwoPNCVolumeVariables<Traits>
28{
30 using Scalar = typename Traits::PrimaryVariables::value_type;
31
32public:
34 using FluidSystem = typename Traits::FluidSystem;
36 using FluidState = typename Traits::FluidState;
38 using SolidState = typename Traits::SolidState;
40 using SolidSystem = typename Traits::SolidSystem;
41
51 template<class ElemSol, class Problem, class Element, class Scv>
52 void update(const ElemSol &elemSol,
53 const Problem &problem,
54 const Element &element,
55 const Scv& scv)
56 {
57 ParentType::update(elemSol, problem, element, scv);
58 poreInscribedRadius_ = problem.spatialParams().poreInscribedRadius(element, scv, elemSol);
59 poreVolume_ = problem.gridGeometry().poreVolume(scv.dofIndex()) * this->porosity();
60 surfaceTension_ = problem.spatialParams().surfaceTension(element, scv, elemSol);
61 }
62
66 Scalar poreInscribedRadius() const
67 { return poreInscribedRadius_; }
68
72 Scalar poreVolume() const
73 { return poreVolume_; }
74
78 Scalar surfaceTension() const
79 { return surfaceTension_; }
80
81protected:
85};
86
87} // end namespace Dumux::PoreNetwork
88
89#endif
Contains the quantities which are constant within a finite volume in the two-phase n-components model...
Definition: porenetwork/2pnc/volumevariables.hh:28
typename Traits::FluidSystem FluidSystem
Export type of fluid system.
Definition: porenetwork/2pnc/volumevariables.hh:34
void update(const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv)
Updates all quantities for a given control volume.
Definition: porenetwork/2pnc/volumevariables.hh:52
typename Traits::SolidState SolidState
Export type of solid state.
Definition: porenetwork/2pnc/volumevariables.hh:38
Scalar surfaceTension_
Definition: porenetwork/2pnc/volumevariables.hh:84
Scalar surfaceTension() const
Returns the surface tension.
Definition: porenetwork/2pnc/volumevariables.hh:78
Scalar poreVolume() const
Returns the pore volume. // TODO should this be a fraction only?
Definition: porenetwork/2pnc/volumevariables.hh:72
Scalar poreInscribedRadius() const
Returns the pore's inscribed radius.
Definition: porenetwork/2pnc/volumevariables.hh:66
typename Traits::FluidState FluidState
Export type of fluid state.
Definition: porenetwork/2pnc/volumevariables.hh:36
typename Traits::SolidSystem SolidSystem
Export type of solid system.
Definition: porenetwork/2pnc/volumevariables.hh:40
Scalar poreVolume_
Definition: porenetwork/2pnc/volumevariables.hh:83
Scalar poreInscribedRadius_
Definition: porenetwork/2pnc/volumevariables.hh:82
Contains the quantities which are are constant within a finite volume in the two-phase,...
Definition: porousmediumflow/2pnc/volumevariables.hh:46
Scalar porosity() const
Returns the average porosity within the control volume.
Definition: porousmediumflow/2pnc/volumevariables.hh:414
void update(const ElemSol &elemSol, const Problem &problem, const Element &element, const Scv &scv)
Updates all quantities for a given control volume.
Definition: porousmediumflow/2pnc/volumevariables.hh:118
Definition: discretization/porenetwork/fvelementgeometry.hh:24
Contains the quantities which are constant within a finite volume in the two-phase,...