Cantera  2.0
TortuosityBase.cpp
Go to the documentation of this file.
1 /**
2  * @file TortuosityBase.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 "TortuosityBase.h"
15 
16 #include <string>
17 
18 namespace Cantera
19 {
20 //====================================================================================================================
21 static void err(const std::string r)
22 {
23  throw Cantera::CanteraError("TortuosityBase", "Error calling base class " + r);
24 }
25 //====================================================================================================================
26 // Default constructor
28 {
29 }
30 //====================================================================================================================
31 // Copy Constructor
32 /*
33  * @param right Object to be copied
34  */
36 {
37  *this = right;
38 }
39 //====================================================================================================================
40 // Default destructor for TortuosityBase
42 {
43 
44 }
45 //====================================================================================================================
46 // Assignment operator
47 /*
48  * @param right Object to be copied
49  */
51 {
52  if (&right == this) {
53  return *this;
54  }
55  return *this;
56 }
57 //====================================================================================================================
58 // Duplication operator
59 /*
60  * @return Returns a pointer to a duplicate of the current object given a
61  * base class pointer
62  */
64 {
65  TortuosityBase* tb = new TortuosityBase(*this);
66  return tb;
67 }
68 //====================================================================================================================
69 // The tortuosity factor models the effective increase in the diffusive transport length.
70 /*
71  * This method returns \f$ 1/\tau^2 \f$ in the description of the flux
72  *
73  * \f$ C_T D_i \nabla X_i / \tau^2 \f$.
74  *
75  *
76  */
77 doublereal TortuosityBase::tortuosityFactor(doublereal porosity)
78 {
79  err("tortuosityFactor");
80  return 0.0;
81 }
82 //====================================================================================================================
83 // The McMillan number is the ratio of the flux-like variable to the value it would have without porous flow.
84 /*
85  * The McMillan number combines the effect of tortuosity
86  * and volume fraction of the transported phase. The net flux
87  * observed is then the product of the McMillan number and the
88  * non-porous transport rate. For a conductivity in a non-porous
89  * media, \f$ \kappa_0 \f$, the conductivity in the porous media
90  * would be \f$ \kappa = (\rm McMillan) \kappa_0 \f$.
91  */
92 doublereal TortuosityBase::McMillanFactor(doublereal porosity)
93 {
94  err("McMillanFactor");
95  return 0.0;
96 }
97 //====================================================================================================================
98 }