GCC Code Coverage Report


Directory: ../../../builds/dumux-repositories/
File: /builds/dumux-repositories/dumux/examples/biomineralization/material/components/biofilm.hh
Date: 2024-05-04 19:09:25
Exec Total Coverage
Lines: 4 7 57.1%
Functions: 1 2 50.0%
Branches: 4 12 33.3%

Line Branch Exec Source
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 //
7
8 #ifndef DUMUX_MATERIAL_COMPONENTS_BIOFILM_HH
9 #define DUMUX_MATERIAL_COMPONENTS_BIOFILM_HH
10
11 // ## The biofilm component (`biofilm.hh`)
12 //
13 // This file contains the __solid component class__ which defines the name, molar mass and density of biofilm
14 //
15 // [[content]]
16 //
17 // ### Include files
18 // [[codeblock]]
19 // including the base and the generic solid component
20 #include <dumux/material/components/base.hh>
21 #include <dumux/material/components/solid.hh>
22
23 #include <dumux/common/parameters.hh>
24 // [[/codeblock]]
25
26 // ### The biofilm component
27 // [[codeblock]]
28 namespace Dumux::Components {
29
30 // In Biofilm, we define the properties of the solid component biofilm
31 template <class Scalar>
32 class Biofilm
33 : public Components::Base<Scalar, Biofilm<Scalar> >
34 , public Components::Solid<Scalar, Biofilm<Scalar> >
35 {
36 public:
37 // the name
38 static std::string name()
39 2 { return "Biofilm"; }
40 // [[/codeblock]]
41
42 // ### The biofilm component's properties
43 // [[codeblock]]
44 // The molar mass, which is not really defined for biofilm. Thus, we read it from params.input or use a default of 1.
45 // Based on a cell mass of 2.5e-16, the molar mass of cells would be 1.5e8 kg/mol, but biofilms are more than just cells and such high molar masses would lead to numerical problems.
46 12179328 static Scalar molarMass()
47 {
48
4/6
✓ Branch 0 taken 1 times.
✓ Branch 1 taken 12179327 times.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
✓ Branch 6 taken 1 times.
✗ Branch 7 not taken.
12179328 static Scalar molarMass = getParam<Scalar>("BioCoefficients.BiofilmMolarMass", 1);
49 12179328 return molarMass;
50 }
51
52 // The density, or rather the dry density (dry biomass/wet volume), most of biofilm is water.
53 // It is typically highly variable for different biofilms, thus we read it from params.input or use the default value of 10 kg/m^3
54 static Scalar solidDensity(Scalar temperature)
55 {
56 static Scalar rho = getParam<Scalar>("BioCoefficients.BiofilmDensity", 10);
57 return rho;
58 }
59 };
60
61 } // end namespace Dumux::Components
62 // [[/codeblock]]
63 // [[/content]]
64 #endif
65