Cantera
2.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
src
transport
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
"
14
#include "
cantera/base/ctexceptions.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
27
TortuosityBase::TortuosityBase
()
28
{
29
}
30
//====================================================================================================================
31
// Copy Constructor
32
/*
33
* @param right Object to be copied
34
*/
35
TortuosityBase::TortuosityBase
(
const
TortuosityBase
& right)
36
{
37
*
this
= right;
38
}
39
//====================================================================================================================
40
// Default destructor for TortuosityBase
41
TortuosityBase::~TortuosityBase
()
42
{
43
44
}
45
//====================================================================================================================
46
// Assignment operator
47
/*
48
* @param right Object to be copied
49
*/
50
TortuosityBase
&
TortuosityBase::operator=
(
const
TortuosityBase
& right)
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
*/
63
TortuosityBase
*
TortuosityBase::duplMyselfAsTortuosityBase
()
const
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
}
Generated by
1.8.2