Cantera  2.3.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 
6 // This file is part of Cantera. See License.txt in the top-level directory or
7 // at http://www.cantera.org/license.txt for license and copyright information.
8 
10 using namespace std;
11 
12 namespace Cantera
13 {
14 
15 LiquidTransportParams::LiquidTransportParams() :
16  viscosity(0),
17  ionConductivity(0),
18  thermalCond(0),
19  speciesDiffusivity(0),
20  electCond(0),
21  hydroRadius(0),
22  model_viscosity(LTI_MODEL_NOTSET),
23  model_speciesDiffusivity(LTI_MODEL_NOTSET),
24  model_hydroradius(LTI_MODEL_NOTSET),
25  compositionDepTypeDefault_(LTI_MODEL_NOTSET)
26 {
27 }
28 
29 LiquidTransportParams::~LiquidTransportParams()
30 {
31  delete viscosity;
32  delete ionConductivity;
33  delete thermalCond;
34  delete speciesDiffusivity;
35  delete electCond;
36  delete hydroRadius;
37 }
38 
39 LiquidTransportParams::LiquidTransportParams(const LiquidTransportParams& right) :
40  viscosity(0),
41  thermalCond(0),
42  speciesDiffusivity(0),
43  electCond(0),
44  hydroRadius(0),
45  model_viscosity(LTI_MODEL_NOTSET),
46  model_speciesDiffusivity(LTI_MODEL_NOTSET),
47  model_hydroradius(LTI_MODEL_NOTSET),
48  compositionDepTypeDefault_(LTI_MODEL_NOTSET)
49 {
50  operator=(right);
51 }
52 
53 LiquidTransportParams& LiquidTransportParams::operator=(const LiquidTransportParams& right)
54 {
55  if (&right != this) {
56  return *this;
57  }
58 
59  LTData = right.LTData;
60 
61  delete viscosity;
62  if (right.viscosity) {
63  viscosity = new LiquidTranInteraction(*(right.viscosity));
64  }
65  delete ionConductivity;
66  if (right.ionConductivity) {
67  ionConductivity = new LiquidTranInteraction(*(right.ionConductivity));
68  }
69  deepStdVectorPointerCopy<LiquidTranInteraction>(right.mobilityRatio, mobilityRatio);
70  deepStdVectorPointerCopy<LiquidTranInteraction>(right.selfDiffusion, selfDiffusion);
71 
72  delete thermalCond;
73  if (right.thermalCond) {
74  thermalCond = new LiquidTranInteraction(*(right.thermalCond));
75  }
76  delete speciesDiffusivity;
77  if (right.speciesDiffusivity) {
78  speciesDiffusivity = new LiquidTranInteraction(*(right.speciesDiffusivity));
79  }
80 
81  delete electCond;
82  if (right.electCond) {
83  electCond = new LiquidTranInteraction(*(right.electCond));
84  }
85  delete hydroRadius;
86  if (right.hydroRadius) {
87  hydroRadius = new LiquidTranInteraction(*(right.hydroRadius));
88  }
89  model_viscosity = right.model_viscosity;
90  model_ionConductivity = right.model_ionConductivity;
91  deepStdVectorPointerCopy<LiquidTranMixingModel>(right.model_mobilityRatio, model_mobilityRatio);
92  deepStdVectorPointerCopy<LiquidTranMixingModel>(right.model_selfDiffusion, model_selfDiffusion);
93  thermalCond_Aij = right.thermalCond_Aij;
94  model_speciesDiffusivity = right.model_speciesDiffusivity;
95  diff_Dij = right.diff_Dij;
96  model_hydroradius = right.model_hydroradius;
97  radius_Aij = right.radius_Aij;
98  compositionDepTypeDefault_ = right.compositionDepTypeDefault_;
99 
100  throw CanteraError("LiquidTransportParams(const LiquidTransportParams &right)", "not tested");
101  return *this;
102 }
103 
104 } //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 the mobility r...
LiquidTranMixingModel model_hydroradius
Model for species interaction effects for hydrodynamic radius Takes enum LiquidTranMixingModel.
STL namespace.
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< LiquidTransportData > LTData
Species transport parameters.
std::vector< LiquidTranInteraction * > selfDiffusion
Vector of pointer to the LiquidTranInteraction object which handles the calculation of each species&#39; ...
Header file defining class LiquidTransportParams.
LiquidTranInteraction * ionConductivity
Object that specifies the ionic Conductivity of the mixture.
DenseMatrix thermalCond_Aij
Interaction associated with linear weighting of thermal conductivity.
LiquidTranMixingModel compositionDepTypeDefault_
Default composition dependence of the transport properties.
LiquidTranInteraction * speciesDiffusivity
Pointer to the LiquidTranInteraction object which handles the calculation of the species diffusivity ...
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.
Namespace for the Cantera kernel.
Definition: application.cpp:29
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...