Cantera  2.0
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 
7 #include <iostream>
10 #include <stdlib.h>
11 using namespace std;
12 
13 namespace Cantera
14 {
15 
16 //====================================================================================================================
17 //! Exception thrown if an error is encountered while reading the transport database.
18 class LTPmodelError : public CanteraError
19 {
20 public:
21  LTPmodelError(std::string msg) :
22  CanteraError("LTPspecies", "error parsing transport data: " + msg + "\n") {
23  }
24 };
25 //====================================================================================================================
26 LiquidTransportParams::LiquidTransportParams() :
28  LTData(0),
29  viscosity(0),
30  ionConductivity(0),
31  mobilityRatio(0),
32  selfDiffusion(0),
33  thermalCond(0),
34  speciesDiffusivity(0),
35  electCond(0),
36  hydroRadius(0),
37  model_viscosity(LTI_MODEL_NOTSET),
38  model_speciesDiffusivity(LTI_MODEL_NOTSET),
39  model_hydroradius(LTI_MODEL_NOTSET)
40 {
41 
42 }
43 //====================================================================================================================
45 {
46  delete viscosity;
47  delete ionConductivity;
48  delete thermalCond;
49  delete speciesDiffusivity;
50  delete electCond;
51  delete hydroRadius;
52 }
53 //====================================================================================================================
56  LTData(0),
57  viscosity(0),
58  thermalCond(0),
59  speciesDiffusivity(0),
60  electCond(0),
61  hydroRadius(0),
62  model_viscosity(LTI_MODEL_NOTSET),
63  model_speciesDiffusivity(LTI_MODEL_NOTSET),
64  model_hydroradius(LTI_MODEL_NOTSET)
65 {
66  operator=(right);
67 }
68 //====================================================================================================================
69 
71 {
72  if (&right != this) {
73  return *this;
74  }
75 
76  LTData = right.LTData;
77 
78  delete viscosity;
79  if (right.viscosity) {
81  }
82  delete ionConductivity;
83  if (right.ionConductivity) {
85  }
86  deepStdVectorPointerCopy<LiquidTranInteraction>(right.mobilityRatio, mobilityRatio);
87  deepStdVectorPointerCopy<LiquidTranInteraction>(right.selfDiffusion, selfDiffusion);
88 
89  delete thermalCond;
90  if (right.thermalCond) {
91  thermalCond = new LiquidTranInteraction(*(right.thermalCond));
92  }
93  delete speciesDiffusivity;
94  if (right.speciesDiffusivity) {
96  }
97 
98  delete electCond;
99  if (right.electCond) {
100  electCond = new LiquidTranInteraction(*(right.electCond));
101  }
102  delete hydroRadius;
103  if (right.hydroRadius) {
105  }
108  deepStdVectorPointerCopy<LiquidTranMixingModel>(right.model_mobilityRatio, model_mobilityRatio);
109  deepStdVectorPointerCopy<LiquidTranMixingModel>(right.model_selfDiffusion, model_selfDiffusion);
112  diff_Dij = right.diff_Dij;
114  radius_Aij = right.radius_Aij;
115 
116  throw CanteraError("LiquidTransportParams(const LiquidTransportParams &right)", "not tested");
117 
118  return *this;
119 }
120 //====================================================================================================================
121 
122 } //namespace Cantera