Commit 06c03717 by Thomas Fetzer

### [ implicit ]

added cc-method is usable for implicit model
corrected component balances, that mole fraction gradients are used
unified equations between the models, made K a tensor everywhere, D a
scalar

git-svn-id: svn://svn.iws.uni-stuttgart.de/DUMUX/dumux/trunk@10353 2fb0f335-1f38-0410-981e-8018bf24f1b0
parent 320c5813
 ... ... @@ -35,14 +35,21 @@ namespace Dumux * \ingroup OnePBoxModel * \brief A single-phase, isothermal flow model using the fully implicit scheme. * * Single-phase, isothermal flow model, which solves the mass * continuity equation * Single-phase, isothermal flow model, which uses a standard Darcy approach as the * equation for the conservation of momentum: * \f[ \phi \frac{\partial \varrho}{\partial t} + \text{div} (- \varrho \frac{\textbf K}{\mu} ( \textbf{grad}\, p -\varrho {\textbf g})) = q, v = - \frac{\textbf K}{\mu} \left(\textbf{grad}\, p - \varrho {\textbf g} \right) * \f] * discretized using a vertex-centered finite volume (box) scheme as * spatial and the implicit Euler method as time discretization. The * model supports compressible as well as incompressible fluids. * * and solves the mass continuity equation: * \f[ \phi \frac{\partial \varrho}{\partial t} + \text{div} \left\lbrace - \varrho \frac{\textbf K}{\mu} \left( \textbf{grad}\, p -\varrho {\textbf g} \right) \right\rbrace = q, * \f] * All equations are discretized using a vertex-centered finite volume (box) * or cell-centered finite volume scheme as spatial * and the implicit Euler method as time discretization. * The model supports compressible as well as incompressible fluids. */ template class OnePBoxModel : public GET_PROP_TYPE(TypeTag, BaseModel) ... ...
 ... ... @@ -40,27 +40,29 @@ namespace Dumux * using a standard Darcy * approach as the equation for the conservation of momentum: \f[ v_{D} = - \frac{\textbf K}{\mu} \left(\text{grad} p - \varrho {\textbf g} \right) v = - \frac{\textbf K}{\mu} \left(\textbf{grad}\, p - \varrho {\textbf g} \right) \f] * * Gravity can be enabled or disabled via the property system. * By inserting this into the continuity equation, one gets \f[ \Phi \frac{\partial \varrho}{\partial t} - \text{div} \left\{ \varrho \frac{\textbf K}{\mu} \left(\text{grad}\, p - \varrho {\textbf g} \right) \phi\frac{\partial \varrho}{\partial t} - \text{div} \left\{ \varrho \frac{\textbf K}{\mu} \left(\textbf{grad}\, p - \varrho {\textbf g} \right) \right\} = q \;, \f] * * The transport of the components is described by the following equation: * The transport of the components \f$\kappa \in \{ w, a \}\f$ is described by the following equation: \f[ \Phi \frac{ \partial \varrho x}{\partial t} - \text{div} \left( \varrho \frac{{\textbf K} x}{\mu} \left( \text{grad}\, p - \varrho {\textbf g} \right) + \varrho \tau \Phi D \text{grad} x \right) = q. \phi \frac{ \partial \varrho X^\kappa}{\partial t} - \text{div} \left\lbrace \varrho X^\kappa \frac{{\textbf K}}{\mu} \left( \textbf{grad}\, p - \varrho {\textbf g} \right) + \varrho D^\kappa_\text{pm} \frac{M^\kappa}{M_\alpha} \textbf{grad} x^\kappa \right\rbrace = q. \f] * * All equations are discretized using a fully-coupled vertex-centered * finite volume (box) scheme as spatial and * the implicit Euler method as time discretization. * All equations are discretized using a vertex-centered finite volume (box) * or cell-centered finite volume scheme as spatial * and the implicit Euler method as time discretization. * * The primary variables are the pressure \f$p\f$ and the mole or mass fraction of dissolved component \f$x\f$. */ ... ...
 ... ... @@ -53,9 +53,9 @@ namespace Dumux \right\} - q_\alpha = 0 \;, \f] * * These equations are discretized by a fully-coupled vertex centered finite volume * (box) scheme as spatial and the implicit Euler method as time * discretization. * All equations are discretized using a vertex-centered finite volume (box) * or cell-centered finite volume scheme as spatial * and the implicit Euler method as time discretization. * * By using constitutive relations for the capillary pressure \f$p_c = * p_n - p_w\f$ and relative permeability \f$k_{r\alpha}\f$ and taking ... ...
 ... ... @@ -39,7 +39,7 @@ namespace Dumux * approach is used as the equation for the conservation of momentum: * \f[ v_\alpha = - \frac{k_{r\alpha}}{\mu_\alpha} \mbox{\bf K} \left(\text{grad}\, p_\alpha - \varrho_{\alpha} \mbox{\bf g} \right) \left(\textbf{grad}\, p_\alpha - \varrho_{\alpha} \mbox{\bf g} \right) * \f] * * By inserting this into the equations for the conservation of the ... ... @@ -49,16 +49,17 @@ namespace Dumux {\partial t} - \sum_\alpha \text{div} \left\{ \varrho_\alpha X_\alpha^\kappa \frac{k_{r\alpha}}{\mu_\alpha} \mbox{\bf K} (\text{grad}\, p_\alpha - \varrho_{\alpha} \mbox{\bf g}) \right\} (\textbf{grad}\, p_\alpha - \varrho_{\alpha} \mbox{\bf g}) \right\} \nonumber \\ \nonumber \\ &-& \sum_\alpha \text{div} \left\{{\bf D}_{\alpha, pm}^\kappa \varrho_{\alpha} \text{grad}\, X^\kappa_{\alpha} \right\} &-& \sum_\alpha \text{div} \left\{ D_{\alpha,\text{pm}}^\kappa \varrho_{\alpha} \frac{M^\kappa}{M_\alpha} \textbf{grad} x^\kappa_{\alpha} \right\} - \sum_\alpha q_\alpha^\kappa = 0 \qquad \kappa \in \{w, a\} \, , \alpha \in \{w, g\} \f} * * This is discretized using a fully-coupled vertex * centered finite volume (box) scheme as spatial and * the implicit Euler method as temporal discretization. * All equations are discretized using a vertex-centered finite volume (box) * or cell-centered finite volume scheme as spatial * and the implicit Euler method as time discretization. * * By using constitutive relations for the capillary pressure \f$p_c = * p_n - p_w\f$ and relative permeability \f$k_{r\alpha}\f$ and taking ... ...
 ... ... @@ -32,7 +32,7 @@ namespace Dumux { * \brief Adaption of the fully implicit scheme to the non-isothermal two-phase two-component flow model. * * This model implements a non-isothermal two-phase flow of two compressible and partly miscible fluids * \f$\alpha \in \{ w, n \}\f$. Thus each component \f$\kappa \{ w, a \}\f$ can be present in * \f$\alpha \in \{ w, n \}\f$. Thus each component \f$\kappa \in \{ w, a \}\f$ can be present in * each phase. * Using the standard multiphase Darcy approach a mass balance equation is * solved: ... ... @@ -40,8 +40,9 @@ namespace Dumux { && \phi \frac{\partial (\sum_\alpha \varrho_\alpha X_\alpha^\kappa S_\alpha )}{\partial t} - \sum_\alpha \text{div} \left\{ \varrho_\alpha X_\alpha^\kappa \frac{k_{r\alpha}}{\mu_\alpha} \mbox{\bf K} (\text{grad}\, p_\alpha - \varrho_{\alpha} \mbox{\bf g}) \right\}\\ &-& \sum_\alpha \text{div} \left\{{\bf D}_{\alpha, pm}^\kappa \varrho_{\alpha} \text{grad}\, X^\kappa_{\alpha} \right\} (\textbf{grad}\, p_\alpha - \varrho_{\alpha} \mbox{\bf g}) \right\}\\ &-& \sum_\alpha \text{div} \left\{ D_{\alpha,\text{pm}}^\kappa \varrho_{\alpha} \frac{M^\kappa}{M_\alpha} \textbf{grad} x^\kappa_{\alpha} \right\} - \sum_\alpha q_\alpha^\kappa = 0 \qquad \kappa \in \{w, a\} \, , \alpha \in \{w, n\} * \f} ... ... @@ -51,16 +52,16 @@ namespace Dumux { && \phi \frac{\partial \left( \sum_\alpha \varrho_\alpha u_\alpha S_\alpha \right)}{\partial t} + \left( 1 - \phi \right) \frac{\partial (\varrho_s c_s T)}{\partial t} - \sum_\alpha \text{div} \left\{ \varrho_\alpha h_\alpha \frac{k_{r\alpha}}{\mu_\alpha} \mathbf{K} \left( \text{grad}\, \frac{k_{r\alpha}}{\mu_\alpha} \mathbf{K} \left( \textbf{grad}\, p_\alpha - \varrho_\alpha \mathbf{g} \right) \right\} \\ &-& \text{div} \left( \lambda_{pm} \text{grad} \, T \right) &-& \text{div} \left( \lambda_\text{pm} \textbf{grad} \, T \right) - q^h = 0 \qquad \alpha \in \{w, n\} \f} * * This is discretized using a fully-coupled vertex * centered finite volume (box) scheme as spatial and * the implicit Euler method as temporal discretization. * All equations are discretized using a vertex-centered finite volume (box) * or cell-centered finite volume scheme as spatial * and the implicit Euler method as time discretization. * * By using constitutive relations for the capillary pressure \f$p_c = * p_n - p_w\f$ and relative permeability \f$k_{r\alpha}\f$ and taking ... ...
 ... ... @@ -38,12 +38,12 @@ namespace Dumux { * multiphase Darcy approach, the mass conservation equations for both * phases can be described as follows: * \f[ \phi \frac{\partial \phi \varrho_\alpha S_\alpha}{\partial t} \phi \frac{\partial \varrho_\alpha S_\alpha}{\partial t} - \text{div} \left\{ \varrho_\alpha \frac{k_{r\alpha}}{\mu_\alpha} \mathrm{K} \left( \textrm{grad}\, p_\alpha - \varrho_{\alpha} \mathbf{g} \right) \varrho_\alpha \frac{k_{r\alpha}}{\mu_\alpha} \textbf{K} \left( \textbf{grad}\, p_\alpha - \varrho_{\alpha} \mathbf{g} \right) \right\} - q_\alpha = 0 \qquad \alpha \in \{w, n\} ... ... @@ -54,7 +54,7 @@ namespace Dumux { * matrix and the fluids: \f{align*}{ \frac{\partial \phi \sum_\alpha \varrho_\alpha u_\alpha S_\alpha}{\partial t} \phi \frac{\partial \sum_\alpha \varrho_\alpha u_\alpha S_\alpha}{\partial t} & + \left( 1 - \phi \right) \frac{\partial (\varrho_s c_s T)}{\partial t} - ... ... @@ -72,9 +72,9 @@ namespace Dumux { * p_\alpha/\varrho_\alpha\f$is the specific internal energy of the * phase. * * The equations are discretized using a fully-coupled vertex centered * finite volume (box) scheme as spatial and the implicit Euler method * as time discretization. * All equations are discretized using a vertex-centered finite volume (box) * or cell-centered finite volume scheme as spatial * and the implicit Euler method as time discretization. * * Currently the model supports choosing either \f$p_w\f$, \f$S_n\f$* and \f$T\f$or \f$p_n\f$, \f$S_w\f$and \f$T\f$as primary ... ...  ... ... @@ -41,29 +41,29 @@ namespace Dumux * approach is used as the equation for the conservation of momentum: * \f[ v_\alpha = - \frac{k_{r\alpha}}{\mu_\alpha} \mbox{\bf K} \left(\text{grad}\, p_\alpha - \varrho_{\alpha} \mbox{\bf g} \right) \left(\textbf{grad}\, p_\alpha - \varrho_{\alpha} \mbox{\bf g} \right) * \f] * * By inserting this into the equations for the conservation of the * components, one transport equation for each component is obtained as * \f{eqnarray*} && \phi \frac{\partial (\sum_\alpha \varrho_{\text{mol}, \alpha} x_\alpha^\kappa && \phi \frac{\partial (\sum_\alpha \varrho_\alpha X_\alpha^\kappa S_\alpha )}{\partial t} - \sum\limits_\alpha \text{div} \left\{ \frac{k_{r\alpha}}{\mu_\alpha} \varrho_{\text{mol}, \alpha} x_\alpha^\kappa \mbox{\bf K} (\text{grad}\, p_\alpha - \varrho_{\text{mass}, \alpha} \mbox{\bf g}) \right\} \varrho_\alpha x_\alpha^\kappa \mbox{\bf K} (\textbf{grad}\, p_\alpha - \varrho_\alpha \mbox{\bf g}) \right\} \nonumber \\ \nonumber \\ && - \sum\limits_\alpha \text{div} \left\{ D_{pm}^\kappa \varrho_{\text{mol}, \alpha } \text{grad}\, x_\alpha^\kappa \right\} && - \sum\limits_\alpha \text{div} \left\{ D_\text{pm}^\kappa \varrho_\alpha \frac{M^\kappa}{M_\alpha} \textbf{grad} x^\kappa_{\alpha} \right\} - q^\kappa = 0 \qquad \forall \kappa , \; \forall \alpha \f} * * Note that these balance equations are molar. * * The equations are discretized using a fully-coupled vertex * centered finite volume (BOX) scheme as spatial scheme and * the implicit Euler method as temporal discretization. * All equations are discretized using a vertex-centered finite volume (box) * or cell-centered finite volume scheme as spatial * and the implicit Euler method as time discretization. * * The model uses commonly applied auxiliary conditions like * \f$S_w + S_n + S_g = 1\f$for the saturations and ... ...  ... ... @@ -33,26 +33,26 @@ namespace Dumux { * \brief Adaption of the fully implicit scheme to the non-isothermal three-phase three-component flow model. * * This model implements three-phase three-component flow of three fluid phases * \f$\alpha \in \{ water, gas, NAPL \}\f$each composed of up to three components * \f$\kappa \in \{ water, air, contaminant \}\f$. The standard multiphase Darcy * \f$\alpha \in \{ \text{water, gas, NAPL} \}\f$each composed of up to three components * \f$\kappa \in \{ \text{water, air, contaminant} \}\f$. The standard multiphase Darcy * approach is used as the equation for the conservation of momentum: * \f[ v_\alpha = - \frac{k_{r\alpha}}{\mu_\alpha} \mbox{\bf K} \left(\text{grad}\, p_\alpha - \varrho_{\alpha} \mbox{\bf g} \right) \left(\textbf{grad}\, p_\alpha - \varrho_{\alpha} \mbox{\bf g} \right) * \f] * * By inserting this into the equations for the conservation of the * components, one transport equation for each component is obtained as * \f{eqnarray*} && \phi \frac{\partial (\sum_\alpha \varrho_{\text{mol}, \alpha} x_\alpha^\kappa && \phi \frac{\partial (\sum_\alpha \varrho_\alpha X_\alpha^\kappa S_\alpha )}{\partial t} - \sum\limits_\alpha \text{div} \left\{ \frac{k_{r\alpha}}{\mu_\alpha} \varrho_{\text{mol}, \alpha} x_\alpha^\kappa \mbox{\bf K} (\text{grad}\; p_\alpha - \varrho_{\text{mass}, \alpha} \mbox{\bf g}) \right\} \varrho_\alpha X_\alpha^\kappa \mbox{\bf K} (\textbf{grad}\; p_\alpha - \varrho_\alpha \mbox{\bf g}) \right\} \nonumber \\ \nonumber \\ && - \sum\limits_\alpha \text{div} \left\{ D_{pm}^\kappa \varrho_{\text{mol}, \alpha } \text{grad} \; x_\alpha^\kappa \right\} && - \sum\limits_\alpha \text{div} \left\{ D_{\alpha,\text{pm}}^\kappa \varrho_\alpha \frac{M^\kappa}{M_\alpha} \textbf{grad} x^\kappa_{\alpha} \right\} - q^\kappa = 0 \qquad \forall \kappa , \; \forall \alpha \f} * ... ... @@ -64,18 +64,16 @@ namespace Dumux { && \phi \frac{\partial \left( \sum_\alpha \varrho_\alpha u_\alpha S_\alpha \right)}{\partial t} + \left( 1 - \phi \right) \frac{\partial (\varrho_s c_s T)}{\partial t} - \sum_\alpha \text{div} \left\{ \varrho_\alpha h_\alpha \frac{k_{r\alpha}}{\mu_\alpha} \mathbf{K} \left( \text{grad}\, \frac{k_{r\alpha}}{\mu_\alpha} \mathbf{K} \left( \textbf{grad}\, p_\alpha - \varrho_\alpha \mathbf{g} \right) \right\} \\ &-& \text{div} \left( \lambda_{pm} \text{grad} \, T \right) &-& \text{div} \left( \lambda_{pm} \textbf{grad} \, T \right) - q^h = 0 \qquad \alpha \in \{w, n, g\} \f} * * * The equations are discretized using a fully-coupled vertex * centered finite volume (BOX) scheme as spatial scheme and * the implicit Euler method as temporal discretization. * All equations are discretized using a vertex-centered finite volume (box) * or cell-centered finite volume scheme as spatial * and the implicit Euler method as time discretization. * * The model uses commonly applied auxiliary conditions like * \f$S_w + S_n + S_g = 1\f$for the saturations and ... ...  ... ... @@ -41,7 +41,7 @@ namespace Dumux template class ThreePThreeCNIVolumeVariables : public ThreePThreeCVolumeVariables { //! \cond 0 //! \cond false typedef ThreePThreeCVolumeVariables ParentType; typedef typename GET_PROP_TYPE(TypeTag, Scalar) Scalar; ... ...  ... ... @@ -20,7 +20,7 @@ * \file * * \brief This file contains the diffusion module for the vertex data * of the fully coupled two-phase N-component model * of the fully coupled MpNc model */ #ifndef DUMUX_MPNC_DIFFUSION_VOLUME_VARIABLES_HH #define DUMUX_MPNC_DIFFUSION_VOLUME_VARIABLES_HH ... ... @@ -30,6 +30,10 @@ namespace Dumux { /*! * \brief Variables for the diffusive fluxes in the MpNc model within * a finite volume. */ template class MPNCVolumeVariablesDiffusion { ... ...  ... ... @@ -40,14 +40,14 @@ namespace Dumux * * In the unsaturated zone, Richards' equation \f[ \frac{\partial\;\phi S_w \rho_w}{\partial t} \frac{\partial\;\phi S_w \varrho_w}{\partial t} - \text{div} \left( \rho_w \frac{k_{rw}}{\mu_w} \; \mathbf{K} \; \text{\textbf{grad}}\left( p_w - g\rho_w \right) \text{div} \left\lbrace \varrho_w \frac{k_{rw}}{\mu_w} \; \mathbf{K} \; \left( \text{\textbf{grad}} p_w - \varrho_w \textbf{g} \right) \right\rbrace = q_w, \f] ... ... @@ -56,18 +56,19 @@ namespace Dumux * * It can be derived from the two-phase equations, i.e. \f[ \frac{\partial\;\phi S_\alpha \rho_\alpha}{\partial t} \phi\frac{\partial S_\alpha \varrho_\alpha}{\partial t} - \text{div} \left( \rho_\alpha \frac{k_{r\alpha}}{\mu_\alpha}\; \mathbf{K} \; \text{\textbf{grad}}\left( p_\alpha - g\rho_\alpha \right) \text{div} \left\lbrace \varrho_\alpha \frac{k_{r\alpha}}{\mu_\alpha}\; \mathbf{K} \; \left( \text{\textbf{grad}} p_\alpha - \varrho_\alpha \textbf{g} \right) \right\rbrace = q_\alpha, \f] * where \f$\alpha \in \{w, n\}\f$is the fluid phase, * \f$\kappa \in \{ w, a \}\f$are the components, * \f$\rho_\alpha\f$is the fluid density, \f$S_\alpha\f$is the fluid * saturation, \f$\phi\f$is the porosity of the soil, * \f$k_{r\alpha}\f\$ is the relative permeability for the fluid, ... ...
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!