Cantera  2.1.2
LiquidTransportParams.cpp
Go to the documentation of this file.
1 /**
2  * @file LiquidTransportParams.cpp
3  * Source code for liquid mixture transport property evaluations.
4  */
5 
9 using namespace std;
10 
11 namespace Cantera
12 {
13 //! Exception thrown if an error is encountered while reading the transport database.
14 class LTPmodelError : public CanteraError
15 {
16 public:
17  explicit LTPmodelError(const std::string& msg) :
18  CanteraError("LTPspecies", "error parsing transport data: " + msg + "\n") {
19  }
20 };
21 
22 LiquidTransportParams::LiquidTransportParams() :
23  TransportParams(),
24  LTData(0),
25  viscosity(0),
26  ionConductivity(0),
27  mobilityRatio(0),
28  selfDiffusion(0),
29  thermalCond(0),
30  speciesDiffusivity(0),
31  electCond(0),
32  hydroRadius(0),
33  model_viscosity(LTI_MODEL_NOTSET),
34  model_speciesDiffusivity(LTI_MODEL_NOTSET),
35  model_hydroradius(LTI_MODEL_NOTSET)
36 {
37 }
38 
39 LiquidTransportParams::~LiquidTransportParams()
40 {
41  delete viscosity;
42  delete ionConductivity;
43  delete thermalCond;
44  delete speciesDiffusivity;
45  delete electCond;
46  delete hydroRadius;
47 }
48 
49 LiquidTransportParams::LiquidTransportParams(const LiquidTransportParams& right) :
50  TransportParams(),
51  LTData(0),
52  viscosity(0),
53  thermalCond(0),
54  speciesDiffusivity(0),
55  electCond(0),
56  hydroRadius(0),
57  model_viscosity(LTI_MODEL_NOTSET),
58  model_speciesDiffusivity(LTI_MODEL_NOTSET),
59  model_hydroradius(LTI_MODEL_NOTSET)
60 {
61  operator=(right);
62 }
63 
64 LiquidTransportParams& LiquidTransportParams::operator=(const LiquidTransportParams& right)
65 {
66  if (&right != this) {
67  return *this;
68  }
69 
70  LTData = right.LTData;
71 
72  delete viscosity;
73  if (right.viscosity) {
74  viscosity = new LiquidTranInteraction(*(right.viscosity));
75  }
76  delete ionConductivity;
77  if (right.ionConductivity) {
78  ionConductivity = new LiquidTranInteraction(*(right.ionConductivity));
79  }
80  deepStdVectorPointerCopy<LiquidTranInteraction>(right.mobilityRatio, mobilityRatio);
81  deepStdVectorPointerCopy<LiquidTranInteraction>(right.selfDiffusion, selfDiffusion);
82 
83  delete thermalCond;
84  if (right.thermalCond) {
85  thermalCond = new LiquidTranInteraction(*(right.thermalCond));
86  }
87  delete speciesDiffusivity;
88  if (right.speciesDiffusivity) {
89  speciesDiffusivity = new LiquidTranInteraction(*(right.speciesDiffusivity));
90  }
91 
92  delete electCond;
93  if (right.electCond) {
94  electCond = new LiquidTranInteraction(*(right.electCond));
95  }
96  delete hydroRadius;
97  if (right.hydroRadius) {
98  hydroRadius = new LiquidTranInteraction(*(right.hydroRadius));
99  }
100  model_viscosity = right.model_viscosity;
101  model_ionConductivity = right.model_ionConductivity;
102  deepStdVectorPointerCopy<LiquidTranMixingModel>(right.model_mobilityRatio, model_mobilityRatio);
103  deepStdVectorPointerCopy<LiquidTranMixingModel>(right.model_selfDiffusion, model_selfDiffusion);
104  thermalCond_Aij = right.thermalCond_Aij;
105  model_speciesDiffusivity = right.model_speciesDiffusivity;
106  diff_Dij = right.diff_Dij;
107  model_hydroradius = right.model_hydroradius;
108  radius_Aij = right.radius_Aij;
109 
110  throw CanteraError("LiquidTransportParams(const LiquidTransportParams &right)", "not tested");
111 
112  return *this;
113 }
114 
115 } //namespace Cantera
LiquidTranMixingModel model_ionConductivity
Model for species interaction effects for ionic conductivity Takes enum LiquidTranMixingModel.
DenseMatrix radius_Aij
Interaction associated with hydrodynamic radius.
std::vector< LiquidTranInteraction * > mobilityRatio
Vector of pointer to the LiquidTranInteraction object which handles the calculation of each species' ...
LiquidTranMixingModel model_hydroradius
Model for species interaction effects for hydrodynamic radius Takes enum LiquidTranMixingModel.
Header for intermediate ThermoPhase object for phases which employ gibbs excess free energy based for...
Header for intermediate ThermoPhase object for phases which consist of ions whose thermodynamics is c...
LiquidTranInteraction * viscosity
Object that specifies the viscosity interaction for the mixture.
LiquidTranMixingModel model_speciesDiffusivity
Model for species interaction effects for mass diffusivity Takes enum LiquidTranMixingModel.
std::vector< LiquidTranInteraction * > selfDiffusion
Vector of pointer to the LiquidTranInteraction object which handles the calculation of each species' ...
Header file defining class LiquidTransportParams.
LiquidTranInteraction * ionConductivity
Object that specifes the ionic Conductivity of the mixture.
DenseMatrix thermalCond_Aij
Interaction associated with linear weighting of thermal conductivity.
LiquidTranInteraction * speciesDiffusivity
Pointer to the LiquidTranInteraction object which handles the calculation of the species diffusivity ...
std::vector< Cantera::LiquidTransportData > LTData
Species transport parameters.
std::vector< LiquidTranMixingModel * > model_selfDiffusion
Model for species interaction effects for mobility ratio Takes enum LiquidTranMixingModel.
std::vector< LiquidTranMixingModel * > model_mobilityRatio
Model for species interaction effects for mobility ratio Takes enum LiquidTranMixingModel.
DenseMatrix diff_Dij
Interaction associated with linear weighting of thermal conductivity.
LiquidTranInteraction * hydroRadius
Pointer to the LiquidTranInteraction object which handles the calculation of the hydrodynamic radius ...
LiquidTranMixingModel model_viscosity
Model for species interaction effects for viscosity Takes enum LiquidTranMixingModel.
LiquidTranInteraction * thermalCond
Pointer to the LiquidTranInteraction object which handles the calculation of the mixture thermal cond...
LiquidTranInteraction * electCond
Pointer to the LiquidTranInteraction object which handles the calculation of the electrical conductiv...