Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dumux
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dumux-repositories
dumux
Commits
5a36e312
Commit
5a36e312
authored
4 years ago
by
Kilian Weishaupt
Browse files
Options
Downloads
Patches
Plain Diff
[3p] Add ThreePNAPLAdsorption class
parent
d8c896a9
No related branches found
No related tags found
1 merge request
!1607
Feature/new materiallaw 2p
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dumux/material/fluidmatrixinteractions/3p/napladsorption.hh
+88
-0
88 additions, 0 deletions
dumux/material/fluidmatrixinteractions/3p/napladsorption.hh
with
88 additions
and
0 deletions
dumux/material/fluidmatrixinteractions/3p/napladsorption.hh
0 → 100644
+
88
−
0
View file @
5a36e312
// -*- mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
// vi: set et ts=4 sw=4 sts=4:
/*****************************************************************************
* See the file COPYING for full copying permissions. *
* *
* This program 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. *
* *
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>. *
*****************************************************************************/
/*!
* \file
* \ingroup Fluidmatrixinteractions
* \brief Implementation of a NAPL adsorption model.
*/
#ifndef DUMUX_MATERIAL_FLUIDMATRIX_INTERACTIONS_3P_NAPL_ADSORPTION
#define DUMUX_MATERIAL_FLUIDMATRIX_INTERACTIONS_3P_NAPL_ADSORPTION
#include
<algorithm>
#include
<dune/common/float_cmp.hh>
namespace
Dumux
::
FluidMatrix
{
template
<
class
Scalar
>
class
ThreePNAPLAdsorption
:
Adapter
<
ThreePNAPLAdsorption
<
Scalar
>
,
Adsorption
>
{
public:
struct
Params
{
Params
(
const
Scalar
rhoBulk
,
const
Scalar
kdNAPL
)
:
rhoBulk_
(
rhoBulk
),
kdNAPL_
(
kdNAPL
)
{}
Scalar
rhoBulk
()
const
{
return
rhoBulk_
;
}
void
setRhoBulk
(
const
Scalar
rhoBulk
)
{
rhoBulk_
=
rhoBulk
;
}
Scalar
kdNAPL
()
const
{
return
kdNAPL_
;
}
void
setKdNAPL
(
const
Scalar
kdNAPL
)
{
kdNAPL_
=
kdNAPL
;
}
bool
operator
==
(
const
Params
&
p
)
const
{
return
Dune
::
FloatCmp
::
eq
(
kdNAPL
(),
p
.
kdNAPL
(),
1e-6
)
&&
Dune
::
FloatCmp
::
eq
(
rhoBulk
(),
p
.
rhoBulk
(),
1e-6
);
}
private
:
Scalar
rhoBulk_
,
kdNAPL_
;
};
/*!
* \brief Construct from a subgroup from the global parameter tree
* \note This will give you nice error messages if a mandatory parameter is missing
*/
static
Params
makeParams
(
const
std
::
string
&
paramGroup
)
{
const
auto
rhoBulk
=
getParamFromGroup
<
Scalar
>
(
paramGroup
,
"ThreePNAPLAdsorptionRhoBulk"
);
const
auto
kdNAPL
=
getParamFromGroup
<
Scalar
>
(
paramGroup
,
"ThreePNAPLAdsorptionKdNAPL"
);
return
{
rhoBulk
,
kdNAPL
};
}
ThreePNAPLAdsorption
(
const
Params
&
params
)
:
params_
(
params
)
{}
ThreePNAPLAdsorption
(
const
std
::
string
&
paramGroup
)
:
params_
(
makeParams
(
paramGroup
))
{}
/*!
* \brief the basis for calculating adsorbed NAPL in storage term
* \param params Array of parameters
*/
Scalar
bulkDensTimesAdsorpCoeff
()
const
{
return
params_
.
rhoBulk
()
*
params_
.
kdNAPL
();
}
private
:
Params
params_
;
};
}
// end namespace Dumux::FluidMatrix
#endif
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment