diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000000000000000000000000000000000..68a09e5c3ac5683175b86064eb5c7bf87935081f --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,54 @@ +{ + "files.associations": { + "allocator": "cpp", + "array": "cpp", + "limits": "cpp", + "cctype": "cpp", + "clocale": "cpp", + "cmath": "cpp", + "cstdarg": "cpp", + "cstddef": "cpp", + "cstdio": "cpp", + "cstdlib": "cpp", + "cwchar": "cpp", + "cwctype": "cpp", + "atomic": "cpp", + "bit": "cpp", + "*.tcc": "cpp", + "compare": "cpp", + "concepts": "cpp", + "cstdint": "cpp", + "unordered_map": "cpp", + "vector": "cpp", + "exception": "cpp", + "algorithm": "cpp", + "functional": "cpp", + "iterator": "cpp", + "memory": "cpp", + "memory_resource": "cpp", + "numeric": "cpp", + "optional": "cpp", + "random": "cpp", + "ratio": "cpp", + "string": "cpp", + "string_view": "cpp", + "system_error": "cpp", + "tuple": "cpp", + "type_traits": "cpp", + "utility": "cpp", + "initializer_list": "cpp", + "iosfwd": "cpp", + "iostream": "cpp", + "istream": "cpp", + "new": "cpp", + "numbers": "cpp", + "ostream": "cpp", + "ranges": "cpp", + "span": "cpp", + "sstream": "cpp", + "stdexcept": "cpp", + "streambuf": "cpp", + "cinttypes": "cpp", + "typeinfo": "cpp" + } +} \ No newline at end of file diff --git a/exercises/exercise-fluidsystem/2p2cproblem.hh b/exercises/exercise-fluidsystem/2p2cproblem.hh index 4e85ce272ba177bde489c7d4204f72828e588e10..97d74dbc02414360c7937d3a034ee9d99b0e1fb9 100644 --- a/exercises/exercise-fluidsystem/2p2cproblem.hh +++ b/exercises/exercise-fluidsystem/2p2cproblem.hh @@ -64,7 +64,6 @@ public: : ParentType(gridGeometry) , eps_(3e-6) { - // initialize the fluid system FluidSystem::init(); @@ -77,6 +76,7 @@ public: * \brief Specifies which kind of boundary condition should be * used for which equation on a given boundary segment. * + * \param bcTypes The boundary types for the conservation equations * \param globalPos The position for which the bc type should be evaluated */ BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const @@ -107,7 +107,11 @@ public: * \brief Evaluate the boundary conditions for a neumann * boundary segment. * + * \param values Stores the Neumann values for the conservation equations in + * \f$ [ \textnormal{unit of conserved quantity} / (m^(dim-1) \cdot s )] \f$ * \param globalPos The position of the integration point of the boundary segment. + * For this method, the \a values parameter stores the mass flux + * in normal direction of each phase. Negative values mean influx. */ NumEqVector neumannAtPos(const GlobalPosition &globalPos) const { @@ -135,6 +139,7 @@ public: /*! * \brief Evaluate the initial value for a control volume. + * * \param globalPos The position for which the initial condition should be evaluated * * For this method, the \a values parameter stores primary @@ -160,6 +165,9 @@ public: /*! * \brief Returns the source term + * + * \param values Stores the source values for the conservation equations in + * \f$ [ \textnormal{unit of primary variable} / (m^\textrm{dim} \cdot s )] \f$ * \param globalPos The global position */ NumEqVector sourceAtPos(const GlobalPosition &globalPos) const diff --git a/exercises/exercise-fluidsystem/2pproblem.hh b/exercises/exercise-fluidsystem/2pproblem.hh index c45608c687863c874f1bdd7e6759aa4175279899..1a81df2bdb84d6dfcbcf39207b024790e447809e 100644 --- a/exercises/exercise-fluidsystem/2pproblem.hh +++ b/exercises/exercise-fluidsystem/2pproblem.hh @@ -26,8 +26,8 @@ // The porous media base problem #include <dumux/porousmediumflow/problem.hh> -#include <dumux/common/boundarytypes.hh> #include <dumux/common/properties.hh> +#include <dumux/common/boundarytypes.hh> #include <dumux/common/numeqvector.hh> // The water component @@ -76,8 +76,8 @@ public: : ParentType(gridGeometry) , eps_(3e-6) { - // initialize the tables for the water properties + std::cout << "Initializing the tables for the water properties" << std::endl; Components::TabulatedComponent<Components::H2O<Scalar>>::init(/*tempMin=*/273.15, /*tempMax=*/623.15, /*numTemp=*/100, @@ -98,6 +98,7 @@ public: * \brief Specifies which kind of boundary condition should be * used for which equation on a given boundary segment. * + * \param bcTypes The boundary types for the conservation equations * \param globalPos The position for which the bc type should be evaluated */ BoundaryTypes boundaryTypesAtPos(const GlobalPosition &globalPos) const @@ -128,6 +129,8 @@ public: * \brief Evaluate the boundary conditions for a neumann * boundary segment. * + * \param values Stores the Neumann values for the conservation equations in + * \f$ [ \textnormal{unit of conserved quantity} / (m^(dim-1) \cdot s )] \f$ * \param globalPos The position of the integration point of the boundary segment. * * For this method, the \a values parameter stores the mass flux @@ -181,6 +184,8 @@ public: /*! * \brief Returns the source term * + * \param values Stores the source values for the conservation equations in + * \f$ [ \textnormal{unit of primary variable} / (m^\textrm{dim} \cdot s )] \f$ * \param globalPos The global position */ NumEqVector sourceAtPos(const GlobalPosition& globalPos) const diff --git a/exercises/exercise-fluidsystem/spatialparams.hh b/exercises/exercise-fluidsystem/spatialparams.hh index 9a056895ba4f8c92e38a9e6cc688baabf9dfeeef..4f226cff0578a2701c47ec013c701dbcadbb8f66 100644 --- a/exercises/exercise-fluidsystem/spatialparams.hh +++ b/exercises/exercise-fluidsystem/spatialparams.hh @@ -80,7 +80,6 @@ public: } } - /*! * \brief Define the intrinsic permeability \f$\mathrm{[m^2]}\f$. * @@ -160,6 +159,7 @@ private: Dune::FieldMatrix<Scalar, dim, dim> K_; Dune::FieldMatrix<Scalar, dim, dim> KLens_; + // Object that holds the values/parameters of the selected fluid matrix interaction relationship const PcKrSwCurve pcKrSwCurve_; const PcKrSwCurve lensPcKrSwCurve_; }; diff --git a/exercises/solution/exercise-fluidsystem/2p2cproblem.hh b/exercises/solution/exercise-fluidsystem/2p2cproblem.hh index 5f53e54f14abaafa749bbff45a433a5ffdc5c7c8..97d74dbc02414360c7937d3a034ee9d99b0e1fb9 100644 --- a/exercises/solution/exercise-fluidsystem/2p2cproblem.hh +++ b/exercises/solution/exercise-fluidsystem/2p2cproblem.hh @@ -26,8 +26,8 @@ // The base porous media box problem #include <dumux/porousmediumflow/problem.hh> -#include <dumux/common/properties.hh> #include <dumux/common/boundarytypes.hh> +#include <dumux/common/properties.hh> #include <dumux/common/numeqvector.hh> namespace Dumux { @@ -110,7 +110,6 @@ public: * \param values Stores the Neumann values for the conservation equations in * \f$ [ \textnormal{unit of conserved quantity} / (m^(dim-1) \cdot s )] \f$ * \param globalPos The position of the integration point of the boundary segment. - * * For this method, the \a values parameter stores the mass flux * in normal direction of each phase. Negative values mean influx. */ diff --git a/exercises/solution/exercise-fluidsystem/2pproperties.hh b/exercises/solution/exercise-fluidsystem/2pproperties.hh index d9eb7036d3ee9b867c3db709d23c93ed8bc1cdf6..6795223acf5089f12ce56808ff376ab3cc90fa93 100644 --- a/exercises/solution/exercise-fluidsystem/2pproperties.hh +++ b/exercises/solution/exercise-fluidsystem/2pproperties.hh @@ -46,6 +46,9 @@ // The two-phase immiscible fluid system #include <dumux/material/fluidsystems/2pimmiscible.hh> +// The interface to create plots during simulation +#include <dumux/io/gnuplotinterface.hh> + // The problem file, where setup-specific boundary and initial conditions are defined. #include"2pproblem.hh" @@ -83,7 +86,7 @@ struct FluidSystem<TypeTag, TTag::ExerciseFluidsystemTwoP> private: using Scalar = GetPropType<TypeTag, Properties::Scalar>; using TabulatedH2O = Components::TabulatedComponent<Components::H2O<Scalar>>; - using LiquidWater = typename FluidSystems::OnePLiquid<Scalar, TabulatedH2O>; + using LiquidWaterPhase = typename FluidSystems::OnePLiquid<Scalar, TabulatedH2O>; /*! * Uncomment first line and comment second line for using the incompressible component * Uncomment second line and comment first line for using the compressible component @@ -92,9 +95,9 @@ private: // using LiquidMyComponentPhase = typename FluidSystems::OnePLiquid<Scalar, MyCompressibleComponent<Scalar> >; public: - using type = typename FluidSystems::TwoPImmiscible<Scalar, LiquidWater, LiquidMyComponentPhase>; + using type = typename FluidSystems::TwoPImmiscible<Scalar, LiquidWaterPhase, LiquidMyComponentPhase>; }; -} // end namespace Dumux::Properties +} // end namespace Dumux::Properties #endif diff --git a/slides/index.html b/slides/index.html new file mode 100644 index 0000000000000000000000000000000000000000..69f22c084670e6ee33c59991ec719e9ed4cfe5eb --- /dev/null +++ b/slides/index.html @@ -0,0 +1,729 @@ +<!DOCTYPE html> +<html> +<head> + <meta charset="utf-8"> + <meta name="generator" content="pandoc"> + <title>Material system</title> + <meta name="apple-mobile-web-app-capable" content="yes"> + <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"> + <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui"> + <link rel="stylesheet" href="https://unpkg.com/reveal.js//dist/reset.css"> + <link rel="stylesheet" href="https://unpkg.com/reveal.js//dist/reveal.css"> + <style> + .reveal .sourceCode { /* see #7635 */ + overflow: visible; + } + code{white-space: pre-wrap;} + span.smallcaps{font-variant: small-caps;} + div.columns{display: flex; gap: min(4vw, 1.5em);} + div.column{flex: auto; overflow-x: auto;} + div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;} + ul.task-list{list-style: none;} + ul.task-list li input[type="checkbox"] { + width: 0.8em; + margin: 0 0.8em 0.2em -1.6em; + vertical-align: middle; + } + /* CSS for syntax highlighting */ + pre > code.sourceCode { white-space: pre; position: relative; } + pre > code.sourceCode > span { display: inline-block; line-height: 1.25; } + pre > code.sourceCode > span:empty { height: 1.2em; } + .sourceCode { overflow: visible; } + code.sourceCode > span { color: inherit; text-decoration: inherit; } + div.sourceCode { margin: 1em 0; } + pre.sourceCode { margin: 0; } + @media screen { + div.sourceCode { overflow: auto; } + } + @media print { + pre > code.sourceCode { white-space: pre-wrap; } + pre > code.sourceCode > span { text-indent: -5em; padding-left: 5em; } + } + pre.numberSource code + { counter-reset: source-line 0; } + pre.numberSource code > span + { position: relative; left: -4em; counter-increment: source-line; } + pre.numberSource code > span > a:first-child::before + { content: counter(source-line); + position: relative; left: -1em; text-align: right; vertical-align: baseline; + border: none; display: inline-block; + -webkit-touch-callout: none; -webkit-user-select: none; + -khtml-user-select: none; -moz-user-select: none; + -ms-user-select: none; user-select: none; + padding: 0 4px; width: 4em; + color: #aaaaaa; + } + pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; } + div.sourceCode + { } + @media screen { + pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; } + } + code span.al { color: #ff0000; font-weight: bold; } /* Alert */ + code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */ + code span.at { color: #7d9029; } /* Attribute */ + code span.bn { color: #40a070; } /* BaseN */ + code span.bu { color: #008000; } /* BuiltIn */ + code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */ + code span.ch { color: #4070a0; } /* Char */ + code span.cn { color: #880000; } /* Constant */ + code span.co { color: #60a0b0; font-style: italic; } /* Comment */ + code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */ + code span.do { color: #ba2121; font-style: italic; } /* Documentation */ + code span.dt { color: #902000; } /* DataType */ + code span.dv { color: #40a070; } /* DecVal */ + code span.er { color: #ff0000; font-weight: bold; } /* Error */ + code span.ex { } /* Extension */ + code span.fl { color: #40a070; } /* Float */ + code span.fu { color: #06287e; } /* Function */ + code span.im { color: #008000; font-weight: bold; } /* Import */ + code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */ + code span.kw { color: #007020; font-weight: bold; } /* Keyword */ + code span.op { color: #666666; } /* Operator */ + code span.ot { color: #007020; } /* Other */ + code span.pp { color: #bc7a00; } /* Preprocessor */ + code span.sc { color: #4070a0; } /* SpecialChar */ + code span.ss { color: #bb6688; } /* SpecialString */ + code span.st { color: #4070a0; } /* String */ + code span.va { color: #19177c; } /* Variable */ + code span.vs { color: #4070a0; } /* VerbatimString */ + code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */ + </style> + <link rel="stylesheet" href="https://unpkg.com/reveal.js//dist/theme/serif.css" id="theme"> + <style> + @import url("https://fonts.googleapis.com/css?family=Nanum+Gothic"); + + :root { + --font-family: "Nanum Gothic"; + --font-size: 0.8em; + } + + .reveal { + font-family: var(--font-family), sans-serif; + } + + .reveal a { + color: #34A2EC; + font-family: var(--font-family), sans-serif; + } + + .reveal p { + font-size: var(--font-size); + } + + .reveal ul { + font-size: var(--font-size); + } + + .reveal .sourceCode { + font-size: var(--font-size); + } + + .reveal h1 { + font-size: 2.5em; + font-family: var(--font-family), sans-serif; + text-shadow: 4px 4px 4px #aaa; + } + + .reveal h2 { + font-size: 1.75em; + font-family: var(--font-family), sans-serif; + } + + </style> +</head> +<body> + <div class="reveal"> + <div class="slides"> + +<section id="title-slide"> + <h1 class="title">Material system</h1> +</section> + +<section> +<section id="introduction-to-dumux--material-system" +class="title-slide slide level1"> +<h1>Introduction to DuMuX- Material system</h1> + +</section> +<section id="challenges-in-simulating-porous-media" +class="slide level2"> +<h2>Challenges in simulating porous media:</h2> +<ul> +<li><p>Highly heterogeneous distribution of parameters and complex +nonlinear material laws</p></li> +<li><p>Strong interconnection of properties <strong>—></strong> +difficult to achieve modularity</p></li> +</ul> +</section> +<section id="modular-structure" class="slide level2"> +<h2>Modular structure:</h2> +<ins> +User-defined parameters and relationships: +</ins> +<ul> +<li>Components</li> +<li>Fluid system</li> +<li>Solid system</li> +<li>Binary coefficients</li> +<li>Fluid-matrix interactions</li> +<li>Chemistry</li> +</ul> +</section> +<section id="dumux-specific-containers-and-solvers" +class="slide level2"> +<h2><ins> Dumux-specific containers and solvers </ins></h2> +<ul> +<li>Fluid states</li> +<li>Solid states</li> +<li>Constraint solvers</li> +</ul> +</section></section> +<section> +<section id="material-system-component" +class="title-slide slide level1"> +<h1>Material system: Component</h1> + +</section> +<section id="component" class="slide level2"> +<h2>Component</h2> +<p><img src="img/component.png" width="200"/></p> +</section> +<section id="what-it-does" class="slide level2"> +<h2><ins> What it does: </ins></h2> +<ul> +<li><strong>Thermodynamic relations</strong> (e.g. molar mass, vapor +pressure, density) of a <strong>single chemical species</strong> or a +fixed mixture of species</li> +<li>Provide a convenient way to access these quantities</li> +<li>Not supposed to be used by models directly</li> +</ul> +</section> +<section id="example-implementations" class="slide level2"> +<h2><ins> Example implementations: </ins></h2> +<ul> +<li><p><em>H2O</em> : pure water, properties by IAPWS-97 or +simplified</p></li> +<li><p><em>Brine</em> : water with a given salt concentration</p></li> +</ul> +</section></section> +<section> +<section id="material-system-fluid-system" +class="title-slide slide level1"> +<h1>Material system: Fluid system</h1> + +</section> +<section id="fluid-system" class="slide level2"> +<h2>Fluid system</h2> +<p><img src="img/fluidsystem.png" width="300"/></p> +</section> +<section id="what-it-does-1" class="slide level2"> +<h2><ins> What it does: </ins></h2> +<p>Expresses the <strong>thermodynamic relations between fluid +quantities</strong> (e.g. calculation of density or viscosity based on +composition, fugacity coefficient based on temperature and +pressure…)</p> +</section> +<section id="example-implementations-1" class="slide level2"> +<h2><ins> Example implementations: </ins></h2> +<ul> +<li><p><em>TwoPImmiscible</em> : two immiscible fluid phases</p></li> +<li><p><em>H2OAir</em> : gas and liquid phase with components water and +air</p></li> +</ul> +</section></section> +<section> +<section id="material-system-binary-coefficients" +class="title-slide slide level1"> +<h1>Material system: Binary coefficients</h1> + +</section> +<section id="binary-coefficients" class="slide level2"> +<h2>Binary coefficients</h2> +<p><img src="img/binarycoefficients.png" width="350"/></p> +</section> +<section id="what-it-does-2" class="slide level2"> +<h2><ins> What it does: </ins></h2> +<p><strong>Contains</strong> data and equations required for binary +mixtures (e.g. binary diffusion coefficients, coefficients needed for +constitutive relationships (like Henry coefficient))</p> +</section> +<section id="example-implementations-2" class="slide level2"> +<h2><ins> Example implementations: </ins></h2> +<ul> +<li><em>H2O_Air</em> : Henry coefficient, gas diffusion coefficient, +liquid diffusion coefficent for water and air</li> +</ul> +</section></section> +<section> +<section id="material-system-solid-system" +class="title-slide slide level1"> +<h1>Material system: Solid system</h1> + +</section> +<section id="solid-system" class="slide level2"> +<h2>Solid system</h2> +<p><img src="img/solidsystem.png" width="300"/></p> +</section> +<section id="what-it-does-3" class="slide level2"> +<h2><ins> What it does: </ins></h2> +<p>Expresses the <strong>thermodynamic properties of the solid +matrix</strong> (e.g. calculation of the solid density and solid heat +capacity based on the composition…)</p> +<ins> +Note to solid system +</ins> +<p><em>Specifying a solid system is only necessary if you work with a +non-isothermal or mineralization model. If no solid system is specified +in the problem file, the default is the inert solid phase with the +constant component. For the constant component you can set properties in +the input file.</em></p> +</section> +<section id="implementations" class="slide level2"> +<h2><ins> Implementations: </ins></h2> +<ul> +<li><em>OneCSolid</em> : inert solid matrix of one solid component +(e.g. granite)</li> +<li><em>CompositionalSolidPhase</em> : composed solid matrix of inert or +reactive components (e.g. NaCl and granite)</li> +</ul> +</section></section> +<section> +<section id="material-system-fluid-matrix-interactions" +class="title-slide slide level1"> +<h1>Material system: Fluid-matrix interactions</h1> + +</section> +<section id="fluid-materix-interactions" class="slide level2"> +<h2>Fluid-materix interactions</h2> +<p><img src="img/fluidmatrixinteractions.png" width="250"/></p> +</section> +<section id="what-it-does-4" class="slide level2"> +<h2><ins> What it does: </ins></h2> +<ul> +<li>Description of the <strong>interaction of the fluid phases with the +porous medium</strong> (e.g. capillary pressure-saturation and relative +permeability relationships)</li> +<li>Through modular adapters, regularization schemes can be imposed for +extreme values</li> +</ul> +</section> +<section id="example-implementations-3" class="slide level2"> +<h2><ins> Example implementations: </ins></h2> +<ul> +<li>Available parametrizations for the capillary pressure-saturation +relationship are: +<ul> +<li><em>Van Genuchten</em></li> +<li><em>Brooks Corey</em></li> +</ul></li> +</ul> +</section> +<section id="van-genuchten" class="slide level2"> +<h2>Van-Genuchten</h2> +<p><span class="math inline">\(\begin{equation} p_c = +\frac{1}{\alpha}\left(S_e^{-1/m} -1\right)^{1/n} +\end{equation}\)</span></p> +<p><img src="img/pc-Sw_VanGenuchten.png" width="500"/></p> +<p><strong>—></strong> Necessary are here the empirical parameters +<span class="math inline">\(\alpha\)</span> and <span +class="math inline">\(n\)</span>.</p> +</section> +<section id="brooks-corey" class="slide level2"> +<h2>Brooks-Corey</h2> +<p><span class="math inline">\(\begin{equation} p_c = p_d +S_e^{-1/\lambda} \end{equation}\)</span></p> +<p><img src="img/pc-Sw_BrooksCorey.png" width="500"/></p> +<p><strong>—></strong> Necessary parameters are here the entry +pressure <span class="math inline">\(p_d\)</span> and the shape factor +<span class="math inline">\(\lambda\)</span>.</p> +</section></section> +<section> +<section id="material-system-chemistry" +class="title-slide slide level1"> +<h1>Material system: Chemistry</h1> + +</section> +<section id="chemistry" class="slide level2"> +<h2>Chemistry</h2> +<p><img src="img/chemistry.png" width="200"/></p> +</section> +<section id="what-it-does-5" class="slide level2"> +<h2><ins> What it does: </ins></h2> +<p>Reactions between different components. There are extra models or +they are realized with the introduction of a source term.</p> +<p><strong>Note:</strong> <em>This contains some specific example +implementations. One can implement specific things according to their +need.</em></p> +</section> +<section id="example-implementations-4" class="slide level2"> +<h2><ins> Example implementations: </ins></h2> +<p>Expresses the <strong>electrochemical models for a fuel cell +application</strong>:</p> +<ul> +<li><em>Electrochemistry</em> : for isothermal system</li> +<li><em>Electrochemistryni</em> : for non-isothermal system</li> +</ul> +</section></section> +<section> +<section id="material-system-fluid-state" +class="title-slide slide level1"> +<h1>Material system: Fluid state</h1> + +</section> +<section id="fluid-state" class="slide level2"> +<h2>Fluid state</h2> +<p><img src="img/fluidstate.png" width="800"/></p> +</section> +<section id="what-it-does-6" class="slide level2"> +<h2><ins> What it does: </ins></h2> +<ul> +<li><strong>Stores</strong> the complete thermodynamic configuration of +a system at a given spatial and temporal position (e.g. saturation, mole +fraction, enthalpy)</li> +<li><strong>Provides access</strong> methods to all thermodynamic +quantities (e.g. saturation, mole fraction, enthalpy)</li> +</ul> +</section> +<section id="example-implementations-5" class="slide level2"> +<h2><ins> Example implementations: </ins></h2> +<ul> +<li><em>ImmiscibleFluidState</em> : assumes immiscibility of the fluid +phases. Phase compositions and fugacity coefficients do not need to be +stored explicitly.</li> +<li><em>CompositionalFluidState</em> : assumes thermodynamic +equilibrium, only a single temperature needs to be stored.</li> +</ul> +</section></section> +<section> +<section id="material-system-solid-state" +class="title-slide slide level1"> +<h1>Material system: Solid state</h1> + +</section> +<section id="solid-state" class="slide level2"> +<h2>Solid state</h2> +<p><img src="img/solidstate.png" width="800"/></p> +</section> +<section id="what-it-does-7" class="slide level2"> +<h2><ins> What it does: </ins></h2> +<ul> +<li><strong>Stores</strong> the complete solid configuration of a system +at a given spatial and temporal position (e.g. solid volume fractions, +solid heat capacity)</li> +<li><strong>Provides</strong> access methods to all solid quantities +(e.g. porosity, density, temperature)</li> +</ul> +</section> +<section id="example-implementations-6" class="slide level2"> +<h2><ins> Example implementations: </ins></h2> +<ul> +<li><p><em>InertSolidState</em> : assumes an inert solid phase. Solid +volume fractions do not change. This is the +<strong>default</strong>.</p></li> +<li><p><em>CompositionalSolidState</em> : assumes a solid matrix +composed out of two components. The volume fractions can change and +properties such as heat capacity are adapted.</p></li> +</ul> +</section></section> +<section> +<section id="material-system-constraint-solver" +class="title-slide slide level1"> +<h1>Material system: Constraint Solver</h1> + +</section> +<section id="constraint-solver" class="slide level2"> +<h2>Constraint solver</h2> +<p><img src="img/constraintsolver.png" width="1000"/></p> +</section> +<section id="what-it-does-8" class="slide level2"> +<h2><ins> What it does: </ins></h2> +<p><strong>Connects</strong> the thermodynamic relations expressed by +fluid systems with the thermodynamic quantities stored by fluid states +(e.g. mole fraction, density)</p> +</section> +<section id="example-implementation" class="slide level2"> +<h2><ins> Example implementation: </ins></h2> +<p><em>CompositionFromFugacities</em> : takes all component fugacities, +the temperature and pressure of a phase as input and calculates the +phase composition</p> +</section></section> +<section> +<section id="example-from-component-to-fluid-system" +class="title-slide slide level1"> +<h1>Example: From component to fluid system</h1> + +</section> +<section id="component-fluid-system" class="slide level2"> +<h2>Component <strong>—></strong> fluid system</h2> +<p><img src="img/component-fluidsystem.png" width="500"/></p> +</section> +<section id="example-2-phases-miscible" class="slide level2"> +<h2>Example: 2 phases, miscible</h2> +<ul> +<li>Components: <em>H2O</em>, <em>Air</em></li> +<li>Fluid system: <em>TwoPTwoC</em></li> +</ul> +</section> +<section id="include-headers-in-properties-file-components" +class="slide level2"> +<h2>Include headers in properties file: components</h2> +<div class="sourceCode" id="cb1"><pre +class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="co">// The two-phase fluid system for compents water and air</span></span> +<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="pp">#include </span><span class="im"><dumux/material/fluidsystems/h2oair.hh></span></span> +<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="co">// The water component</span></span> +<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a><span class="pp">#include </span><span class="im"><dumux/material/components/h2o.hh></span></span> +<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a><span class="co">// The air component</span></span> +<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a><span class="pp">#include </span><span class="im"><dumux/material/components/air.hh></span></span></code></pre></div> +</section> +<section id="specify-fluid-system-in-properties-file" +class="slide level2"> +<h2>Specify fluid system in properties file:</h2> +<div class="sourceCode" id="cb2"><pre +class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="kw">template</span><span class="op"><</span><span class="kw">class</span> TypeTag<span class="op">></span></span> +<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="kw">struct</span> FluidSystem<span class="op"><</span>TypeTag<span class="op">,</span> TTag<span class="op">::</span>H2OAir<span class="op">></span></span> +<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a><span class="op">{</span></span> +<span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a><span class="kw">private</span><span class="op">:</span></span> +<span id="cb2-5"><a href="#cb2-5" aria-hidden="true" tabindex="-1"></a> <span class="kw">using</span> Scalar <span class="op">=</span> GetPropType<span class="op"><</span>TypeTag<span class="op">,</span> Properties<span class="op">::</span>Scalar<span class="op">>;</span></span> +<span id="cb2-6"><a href="#cb2-6" aria-hidden="true" tabindex="-1"></a><span class="kw">public</span><span class="op">:</span></span> +<span id="cb2-7"><a href="#cb2-7" aria-hidden="true" tabindex="-1"></a> <span class="kw">using</span> type <span class="op">=</span> FluidSystems<span class="op">::</span>H2OAir<span class="op"><</span>Scalar<span class="op">,</span></span> +<span id="cb2-8"><a href="#cb2-8" aria-hidden="true" tabindex="-1"></a> Components<span class="op">::</span>TabulatedComponent</span> +<span id="cb2-9"><a href="#cb2-9" aria-hidden="true" tabindex="-1"></a> <span class="op"><</span>Components<span class="op">::</span>H2O<span class="op"><</span>Scalar<span class="op">>>,</span></span> +<span id="cb2-10"><a href="#cb2-10" aria-hidden="true" tabindex="-1"></a> FluidSystems<span class="op">::</span>H2OAirDefaultPolicy</span> +<span id="cb2-11"><a href="#cb2-11" aria-hidden="true" tabindex="-1"></a> <span class="op"><</span><span class="co">/*fastButSimplifiedRelations=*/</span><span class="kw">true</span><span class="op">>,</span></span> +<span id="cb2-12"><a href="#cb2-12" aria-hidden="true" tabindex="-1"></a> <span class="kw">true</span> <span class="co">/*useKelvinEquation*/</span><span class="op">>;</span></span> +<span id="cb2-13"><a href="#cb2-13" aria-hidden="true" tabindex="-1"></a><span class="op">};</span></span></code></pre></div> +</section></section> +<section> +<section id="example-from-component-to-solid-system" +class="title-slide slide level1"> +<h1>Example: From component to solid system</h1> + +</section> +<section id="example-2-phases-miscible-1" class="slide level2"> +<h2>Example: 2 phases, miscible</h2> +<ul> +<li>Components: <em>CaO</em>, <em>CaO2H2</em> (slaked lime)</li> +<li>Solid system: <em>OnePNCMin</em></li> +</ul> +</section> +<section id="specify-solid-system-in-properties-file" +class="slide level2"> +<h2>Specify solid system in properties file:</h2> +<div class="sourceCode" id="cb3"><pre +class="sourceCode cpp"><code class="sourceCode cpp"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="co">// The solid system</span></span> +<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="kw">template</span><span class="op"><</span><span class="kw">class</span> TypeTag<span class="op">></span></span> +<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="kw">struct</span> SolidSystem<span class="op"><</span>TypeTag<span class="op">,</span> TTag<span class="op">::</span>ThermoChem<span class="op">></span></span> +<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a><span class="op">{</span></span> +<span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a> <span class="kw">using</span> Scalar <span class="op">=</span> GetPropType<span class="op"><</span>TypeTag<span class="op">,</span> Properties<span class="op">::</span>Scalar<span class="op">>;</span></span> +<span id="cb3-6"><a href="#cb3-6" aria-hidden="true" tabindex="-1"></a> <span class="kw">using</span> ComponentOne <span class="op">=</span> Components<span class="op">::</span>ModifiedCaO<span class="op"><</span>Scalar<span class="op">>;</span></span> +<span id="cb3-7"><a href="#cb3-7" aria-hidden="true" tabindex="-1"></a> <span class="kw">using</span> ComponentTwo <span class="op">=</span> Components<span class="op">::</span>CaO2H2<span class="op"><</span>Scalar<span class="op">>;</span></span> +<span id="cb3-8"><a href="#cb3-8" aria-hidden="true" tabindex="-1"></a> <span class="kw">using</span> type <span class="op">=</span> SolidSystems<span class="op">::</span>CompositionalSolidPhase</span> +<span id="cb3-9"><a href="#cb3-9" aria-hidden="true" tabindex="-1"></a> <span class="op"><</span>Scalar<span class="op">,</span> ComponentOne<span class="op">,</span> ComponentTwo<span class="op">>;</span></span> +<span id="cb3-10"><a href="#cb3-10" aria-hidden="true" tabindex="-1"></a><span class="op">};</span></span></code></pre></div> +</section></section> +<section> +<section id="exercise" class="title-slide slide level1"> +<h1>Exercise</h1> + +</section> +<section id="tasks" class="slide level2"> +<h2><ins> Tasks: </ins></h2> +<ol type="1"> +<li>Get familiar with the code</li> +<li>2p model: Implement a new component (incompressible and +compressible)</li> +<li>2p2c model: Implement a new fluid system</li> +<li>Change wettability of the porous medium</li> +<li>Advanced: Use van Genuchten relationship with parameters: alpha = +0.0037 and alphalense = 0.00045, n = 4.7 and nlense = 7.3</li> +</ol> +<p><strong>First step:</strong> Go to <a +href="https://git.iws.uni-stuttgart.de/dumux-repositories/dumux-course/tree/master/exercises/exercise-fluidsystem" +class="uri">https://git.iws.uni-stuttgart.de/dumux-repositories/dumux-course/tree/master/exercises/exercise-fluidsystem</a> +and check out the README</p> +</section></section> + </div> + </div> + + <script src="https://unpkg.com/reveal.js//dist/reveal.js"></script> + + <!-- reveal.js plugins --> + <script src="https://unpkg.com/reveal.js//plugin/notes/notes.js"></script> + <script src="https://unpkg.com/reveal.js//plugin/search/search.js"></script> + <script src="https://unpkg.com/reveal.js//plugin/zoom/zoom.js"></script> + <script src="https://unpkg.com/reveal.js//plugin/math/math.js"></script> + + <script> + + // Full list of configuration options available at: + // https://revealjs.com/config/ + Reveal.initialize({ + // Display controls in the bottom right corner + controls: true, + + // Help the user learn the controls by providing hints, for example by + // bouncing the down arrow when they first encounter a vertical slide + controlsTutorial: true, + + // Determines where controls appear, "edges" or "bottom-right" + controlsLayout: 'bottom-right', + + // Visibility rule for backwards navigation arrows; "faded", "hidden" + // or "visible" + controlsBackArrows: 'faded', + + // Display a presentation progress bar + progress: true, + + // Display the page number of the current slide + slideNumber: false, + + // 'all', 'print', or 'speaker' + showSlideNumber: 'all', + + // Add the current slide number to the URL hash so that reloading the + // page/copying the URL will return you to the same slide + hash: true, + + // Start with 1 for the hash rather than 0 + hashOneBasedIndex: false, + + // Flags if we should monitor the hash and change slides accordingly + respondToHashChanges: true, + + // Push each slide change to the browser history + history: false, + + // Enable keyboard shortcuts for navigation + keyboard: true, + + // Enable the slide overview mode + overview: true, + + // Disables the default reveal.js slide layout (scaling and centering) + // so that you can use custom CSS layout + disableLayout: false, + + // Vertical centering of slides + center: true, + + // Enables touch navigation on devices with touch input + touch: true, + + // Loop the presentation + loop: false, + + // Change the presentation direction to be RTL + rtl: false, + + // see https://revealjs.com/vertical-slides/#navigation-mode + navigationMode: 'default', + + // Randomizes the order of slides each time the presentation loads + shuffle: false, + + // Turns fragments on and off globally + fragments: true, + + // Flags whether to include the current fragment in the URL, + // so that reloading brings you to the same fragment position + fragmentInURL: true, + + // Flags if the presentation is running in an embedded mode, + // i.e. contained within a limited portion of the screen + embedded: false, + + // Flags if we should show a help overlay when the questionmark + // key is pressed + help: true, + + // Flags if it should be possible to pause the presentation (blackout) + pause: true, + + // Flags if speaker notes should be visible to all viewers + showNotes: false, + + // Global override for autoplaying embedded media (null/true/false) + autoPlayMedia: null, + + // Global override for preloading lazy-loaded iframes (null/true/false) + preloadIframes: null, + + // Number of milliseconds between automatically proceeding to the + // next slide, disabled when set to 0, this value can be overwritten + // by using a data-autoslide attribute on your slides + autoSlide: 0, + + // Stop auto-sliding after user input + autoSlideStoppable: true, + + // Use this method for navigation when auto-sliding + autoSlideMethod: null, + + // Specify the average time in seconds that you think you will spend + // presenting each slide. This is used to show a pacing timer in the + // speaker view + defaultTiming: null, + + // Enable slide navigation via mouse wheel + mouseWheel: false, + + // The display mode that will be used to show slides + display: 'block', + + // Hide cursor if inactive + hideInactiveCursor: true, + + // Time before the cursor is hidden (in ms) + hideCursorTime: 5000, + + // Opens links in an iframe preview overlay + previewLinks: false, + + // Transition style (none/fade/slide/convex/concave/zoom) + transition: 'slide', + + // Transition speed (default/fast/slow) + transitionSpeed: 'default', + + // Transition style for full page slide backgrounds + // (none/fade/slide/convex/concave/zoom) + backgroundTransition: 'fade', + + // Number of slides away from the current that are visible + viewDistance: 3, + + // Number of slides away from the current that are visible on mobile + // devices. It is advisable to set this to a lower number than + // viewDistance in order to save resources. + mobileViewDistance: 2, + + math: { + mathjax: 'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml-full.js', + config: 'TeX-AMS_HTML-full', + tex2jax: { + inlineMath: [['\\(','\\)']], + displayMath: [['\\[','\\]']], + balanceBraces: true, + processEscapes: false, + processRefs: true, + processEnvironments: true, + preview: 'TeX', + skipTags: ['script','noscript','style','textarea','pre','code'], + ignoreClass: 'tex2jax_ignore', + processClass: 'tex2jax_process' + }, + }, + + // reveal.js plugins + plugins: [ + RevealMath, + RevealNotes, + RevealSearch, + RevealZoom + ] + }); + </script> + </body> +</html>