Cantera  2.1.2
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 namespace Cantera
17 {
18 //====================================================================================================================
19 static void err(const std::string& r)
20 {
21  throw Cantera::CanteraError("TortuosityBase", "Error calling base class " + r);
22 }
23 //====================================================================================================================
24 // Default constructor
26 {
27 }
28 //====================================================================================================================
29 // Copy Constructor
30 /*
31  * @param right Object to be copied
32  */
34 {
35  *this = right;
36 }
37 //====================================================================================================================
38 // Default destructor for TortuosityBase
40 {
41 
42 }
43 //====================================================================================================================
44 // Assignment operator
45 /*
46  * @param right Object to be copied
47  */
49 {
50  if (&right == this) {
51  return *this;
52  }
53  return *this;
54 }
55 //====================================================================================================================
56 // Duplication operator
57 /*
58  * @return Returns a pointer to a duplicate of the current object given a
59  * base class pointer
60  */
62 {
63  return new TortuosityBase(*this);
64 }
65 //====================================================================================================================
66 // The tortuosity factor models the effective increase in the diffusive transport length.
67 /*
68  * This method returns \f$ 1/\tau^2 \f$ in the description of the flux
69  *
70  * \f$ C_T D_i \nabla X_i / \tau^2 \f$.
71  *
72  *
73  */
74 doublereal TortuosityBase::tortuosityFactor(doublereal porosity)
75 {
76  err("tortuosityFactor");
77  return 0.0;
78 }
79 //====================================================================================================================
80 // The McMillan number is the ratio of the flux-like variable to the value it would have without porous flow.
81 /*
82  * The McMillan number combines the effect of tortuosity
83  * and volume fraction of the transported phase. The net flux
84  * observed is then the product of the McMillan number and the
85  * non-porous transport rate. For a conductivity in a non-porous
86  * media, \f$ \kappa_0 \f$, the conductivity in the porous media
87  * would be \f$ \kappa = (\rm McMillan) \kappa_0 \f$.
88  */
89 doublereal TortuosityBase::McMillanFactor(doublereal porosity)
90 {
91  err("McMillanFactor");
92  return 0.0;
93 }
94 //====================================================================================================================
95 }
virtual ~TortuosityBase()
Default destructor for TortuosityBase.
TortuosityBase & operator=(const TortuosityBase &right)
Assignment operator.
Virtual base class to compute the increase in diffusive path length associated with tortuous path dif...
TortuosityBase()
Default constructor uses Bruggeman exponent of 1.5.
Base case to handle tortuosity corrections for diffusive transport in porous media.
Base class for exceptions thrown by Cantera classes.
Definition: ctexceptions.h:68
virtual doublereal tortuosityFactor(doublereal porosity)
The tortuosity factor models the effective increase in the diffusive transport length.
virtual doublereal McMillanFactor(doublereal porosity)
The McMillan number is the ratio of the flux-like variable to the value it would have without porous ...
virtual TortuosityBase * duplMyselfAsTortuosityBase() const
Duplication operator.
Definitions for the classes that are thrown when Cantera experiences an error condition (also contain...