version 3.10.0
Loading...
Searching...
No Matches
h2on2kinetic.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-FileCopyrightText: Copyright © DuMux Project contributors, see AUTHORS.md in root folder
5// SPDX-License-Identifier: GPL-3.0-or-later
6//
12#ifndef DUMUX_H2O_N2_FLUID_SYSTEM_KINETIC_HH
13#define DUMUX_H2O_N2_FLUID_SYSTEM_KINETIC_HH
14
20
22
25
26namespace Dumux::FluidSystems {
27
33template <class Scalar, class Policy = H2ON2DefaultPolicy<>>
35 public FluidSystems::H2ON2<Scalar, Policy>
36{
37private:
38 using ParentType = FluidSystems::H2ON2<Scalar, Policy>;
39
40 using IdealGas = Dumux::IdealGas<Scalar>;
41public:
44
51 template <class FluidState>
52 static Scalar componentEnthalpy(FluidState &fluidState,
53 const int phaseIdx,
54 const int compIdx)
55 {
56 const Scalar T = fluidState.temperature(phaseIdx);
57 const Scalar p = fluidState.pressure(phaseIdx);
58
59 switch (phaseIdx) {
61 switch(compIdx) {
63 return ParentType::H2O::liquidEnthalpy(T, p);
65 return ParentType::N2::gasEnthalpy(T, p); // TODO: should be liquid enthalpy
66 default:
67 DUNE_THROW(Dune::NotImplemented, "wrong index");
68 }
70 switch(compIdx) {
72 return ParentType::H2O::gasEnthalpy(T, p);
74 return ParentType::N2::gasEnthalpy(T, p);
75 default:
76 DUNE_THROW(Dune::NotImplemented, "wrong index");
77 }
78 default:
79 DUNE_THROW(Dune::NotImplemented, "wrong index");
80 }
81 }
82
87 static Scalar henry(Scalar temperature)
88 {
89 return BinaryCoeff::H2O_N2::henry(temperature);
90 }
91
96 static Scalar vaporPressure(Scalar temperature)
97 {
98 return ParentType::H2O::vaporPressure(temperature);
99 }
100};
101
102} // end namespace Dumux::FluidSystems
103
104#endif
static Scalar henry(Scalar temperature)
Henry coefficient for molecular nitrogen in liquid water.
Definition h2o_n2.hh:35
Scalar Scalar
Definition fluidsystems/base.hh:35
A two-phase fluid system with two components water Nitrogen for non-equilibrium models.
Definition h2on2.hh:56
static constexpr int liquidPhaseIdx
Definition h2on2.hh:71
static constexpr int N2Idx
Definition h2on2.hh:77
static constexpr int gasPhaseIdx
Definition h2on2.hh:72
static constexpr int H2OIdx
Definition h2on2.hh:76
A two-phase fluid system with two components water Nitrogen for non-equilibrium models....
Definition h2on2kinetic.hh:36
NullParameterCache ParameterCache
The type of parameter cache objects.
Definition h2on2kinetic.hh:43
static Scalar vaporPressure(Scalar temperature)
Return the vapor pressure of a component above one phase. .
Definition h2on2kinetic.hh:96
static Scalar henry(Scalar temperature)
Return the Henry constant for a component in a phase. .
Definition h2on2kinetic.hh:87
static Scalar componentEnthalpy(FluidState &fluidState, const int phaseIdx, const int compIdx)
Return the enthalpy of a component in a phase.
Definition h2on2kinetic.hh:52
Relations valid for an ideal gas.
Definition idealgas.hh:25
The a parameter cache which does nothing.
Definition nullparametercache.hh:22
Fluid system base class.
Material properties of pure water .
Binary coefficients for water and nitrogen.
A two-phase fluid system with two components water Nitrogen for non-equilibrium models.
Relations valid for an ideal gas.
Properties of pure molecular nitrogen .
Definition h2o.hh:901
A simple implementation of pure water.
Tabulates all thermodynamic properties of a given untabulated chemical species.