Cantera  2.0
TortuosityPercolation.cpp
Go to the documentation of this file.
1 /**
2  * @file TortuosityPercolation.cpp
3  * Base class to compute the increase in diffusive path length associated with
4  * tortuous path diffusion through, for example, porous media.
5  */
6 
7 /*
8  * Copyright (2005) Sandia Corporation. Under the terms of
9  * Contract DE-AC04-94AL85000 with Sandia Corporation, the
10  * U.S. Government retains certain rights in this software.
11  */
12 
13 #include "TortuosityPercolation.h"
15 
16 #include <string>
17 
18 namespace Cantera
19 {
20 
21 //====================================================================================================================
22 // Default constructor
23 TortuosityPercolation::TortuosityPercolation(double percolationThreshold, double conductivityExponent) :
25  percolationThreshold_(percolationThreshold),
26  conductivityExponent_(conductivityExponent)
27 {
28 
29 }
30 //====================================================================================================================
31 // Copy Constructor
32 /*
33  * @param right Object to be copied
34  */
37  percolationThreshold_(right.percolationThreshold_),
38  conductivityExponent_(right.conductivityExponent_)
39 {
40  *this = right;
41 }
42 //====================================================================================================================
43 // Default destructor for TortuosityPercolation
45 {
46 
47 }
48 //====================================================================================================================
49 // Assignment operator
50 /*
51  * @param right Object to be copied
52  */
54 {
55  if (&right == this) {
56  return *this;
57  }
59 
62 
63  return *this;
64 }
65 //====================================================================================================================
66 // Duplication operator
67 /*
68  * @return Returns a pointer to a duplicate of the current object given a
69  * base class pointer
70  */
72 {
74  return dynamic_cast<TortuosityBase*>(tb);
75 }
76 //====================================================================================================================
77 // The tortuosity factor models the effective increase in the diffusive transport length.
78 /*
79  * This method returns \f$ 1/\tau^2 \f$ in the description of the flux
80  *
81  * \f$ C_T D_i \nabla X_i / \tau^2 \f$.
82  *
83  */
84 doublereal TortuosityPercolation::tortuosityFactor(doublereal porosity)
85 {
86  return McMillanFactor(porosity) / porosity;
87 }
88 //====================================================================================================================
89 // The McMillan number is the ratio of the flux-like variable to the value it would have without porous flow.
90 /*
91  * The McMillan number combines the effect of tortuosity
92  * and volume fraction of the transported phase. The net flux
93  * observed is then the product of the McMillan number and the
94  * non-porous transport rate. For a conductivity in a non-porous
95  * media, \f$ \kappa_0 \f$, the conductivity in the porous media
96  * would be \f$ \kappa = (\rm McMillan) \kappa_0 \f$.
97  */
98 doublereal TortuosityPercolation::McMillanFactor(doublereal porosity)
99 {
100  doublereal tmp = pow(((porosity - percolationThreshold_)
101  / (1.0 - percolationThreshold_)) ,
103  return tmp;
104 }
105 //====================================================================================================================
106 }