00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 #include "specie.H"
00032
00033
00034
00035 namespace Foam
00036 {
00037
00038
00039
00040 template<class thermo>
00041 inline void sutherlandTransport<thermo>::calcCoeffs
00042 (
00043 const scalar mu1, const scalar T1,
00044 const scalar mu2, const scalar T2
00045 )
00046 {
00047 scalar rootT1 = sqrt(T1);
00048 scalar mu1rootT2 = mu1*sqrt(T2);
00049 scalar mu2rootT1 = mu2*rootT1;
00050
00051 Ts = (mu2rootT1 - mu1rootT2)/(mu1rootT2/T1 - mu2rootT1/T2);
00052
00053 As = mu1*(1.0 + Ts/T1)/rootT1;
00054 }
00055
00056
00057
00058
00059
00060 template<class thermo>
00061 inline sutherlandTransport<thermo>::sutherlandTransport
00062 (
00063 const thermo& t,
00064 const scalar as,
00065 const scalar ts
00066 )
00067 :
00068 thermo(t),
00069 As(as),
00070 Ts(ts)
00071 {}
00072
00073
00074
00075 template<class thermo>
00076 inline sutherlandTransport<thermo>::sutherlandTransport
00077 (
00078 const thermo& t,
00079 const scalar mu1, const scalar T1,
00080 const scalar mu2, const scalar T2
00081 )
00082 :
00083 thermo(t)
00084 {
00085 calcCoeffs(mu1, T1, mu2, T2);
00086 }
00087
00088
00089
00090 template<class thermo>
00091 inline sutherlandTransport<thermo>::sutherlandTransport
00092 (
00093 const word& name,
00094 const sutherlandTransport& st
00095 )
00096 :
00097 thermo(name, st),
00098 As(st.As),
00099 Ts(st.Ts)
00100 {}
00101
00102
00103
00104 template<class thermo>
00105 inline autoPtr<sutherlandTransport<thermo> > sutherlandTransport<thermo>::clone
00106 () const
00107 {
00108 return autoPtr<sutherlandTransport<thermo> >
00109 (
00110 new sutherlandTransport<thermo>(*this)
00111 );
00112 }
00113
00114
00115
00116 template<class thermo>
00117 inline autoPtr<sutherlandTransport<thermo> > sutherlandTransport<thermo>::New
00118 (
00119 Istream& is
00120 )
00121 {
00122 return autoPtr<sutherlandTransport<thermo> >
00123 (
00124 new sutherlandTransport<thermo>(is)
00125 );
00126 }
00127
00128
00129
00130
00131
00132 template<class thermo>
00133 inline scalar sutherlandTransport<thermo>::mu(const scalar T) const
00134 {
00135 return As*::sqrt(T)/(1.0 + Ts/T);
00136 }
00137
00138
00139
00140 template<class thermo>
00141 inline scalar sutherlandTransport<thermo>::kappa(const scalar T) const
00142 {
00143 scalar Cv_ = this->Cv(T);
00144 return mu(T)*Cv_*(1.32 + 1.77*this->R()/Cv_);
00145 }
00146
00147
00148
00149 template<class thermo>
00150 inline scalar sutherlandTransport<thermo>::alpha(const scalar T) const
00151 {
00152 scalar Cv_ = this->Cv(T);
00153 scalar R_ = this->R();
00154 scalar Cp_ = Cv_ + R_;
00155
00156 scalar deltaT = T - specie::Tstd;
00157 scalar CpBar =
00158 (deltaT*(this->H(T) - this->H(specie::Tstd)) + Cp_)/(sqr(deltaT) + 1);
00159
00160 return mu(T)*Cv_*(1.32 + 1.77*this->R()/Cv_)/CpBar;
00161 }
00162
00163
00164
00165
00166 template<class thermo>
00167 inline sutherlandTransport<thermo>& sutherlandTransport<thermo>::operator=
00168 (
00169 const sutherlandTransport<thermo>& st
00170 )
00171 {
00172 thermo::operator=(st);
00173
00174 As = st.As;
00175 Ts = st.Ts;
00176
00177 return *this;
00178 }
00179
00180
00181
00182
00183 template<class thermo>
00184 inline sutherlandTransport<thermo> operator+
00185 (
00186 const sutherlandTransport<thermo>& st1,
00187 const sutherlandTransport<thermo>& st2
00188 )
00189 {
00190 thermo t
00191 (
00192 static_cast<const thermo&>(st1) + static_cast<const thermo&>(st2)
00193 );
00194
00195 scalar molr1 = st1.nMoles()/t.nMoles();
00196 scalar molr2 = st2.nMoles()/t.nMoles();
00197
00198 return sutherlandTransport<thermo>
00199 (
00200 t,
00201 molr1*st1.As + molr2*st2.As,
00202 molr1*st1.Ts + molr2*st2.Ts
00203 );
00204 }
00205
00206
00207 template<class thermo>
00208 inline sutherlandTransport<thermo> operator-
00209 (
00210 const sutherlandTransport<thermo>& st1,
00211 const sutherlandTransport<thermo>& st2
00212 )
00213 {
00214 thermo t
00215 (
00216 static_cast<const thermo&>(st1) - static_cast<const thermo&>(st2)
00217 );
00218
00219 scalar molr1 = st1.nMoles()/t.nMoles();
00220 scalar molr2 = st2.nMoles()/t.nMoles();
00221
00222 return sutherlandTransport<thermo>
00223 (
00224 t,
00225 molr1*st1.As - molr2*st2.As,
00226 molr1*st1.Ts - molr2*st2.Ts
00227 );
00228 }
00229
00230
00231 template<class thermo>
00232 inline sutherlandTransport<thermo> operator*
00233 (
00234 const scalar s,
00235 const sutherlandTransport<thermo>& st
00236 )
00237 {
00238 return sutherlandTransport<thermo>
00239 (
00240 s*static_cast<const thermo&>(st),
00241 st.As,
00242 st.Ts
00243 );
00244 }
00245
00246
00247 template<class thermo>
00248 inline sutherlandTransport<thermo> operator==
00249 (
00250 const sutherlandTransport<thermo>& st1,
00251 const sutherlandTransport<thermo>& st2
00252 )
00253 {
00254 return st2 - st1;
00255 }
00256
00257
00258
00259
00260 }
00261
00262