ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/applications/hydrodynamics/HydrodynamicsModel.cpp
(Generate patch)

Comparing trunk/OOPSE-4/src/applications/hydrodynamics/HydrodynamicsModel.cpp (file contents):
Revision 2626 by tim, Wed Mar 15 20:58:47 2006 UTC vs.
Revision 2632 by tim, Thu Mar 16 22:50:48 2006 UTC

# Line 175 | Line 175 | void HydrodynamicsModel::calcDiffusionTensor() {
175      tmp = Xitt - Xitr.transpose() * XirrInv * Xitr;
176      tmpInv = tmp.inverse();
177  
178 <    Dott = kt*tmpInv;
179 <    Dotr = -kt*XirrInv * Xitr * tmpInv;
178 >    Dott = tmpInv;
179 >    Dotr = -XirrInv * Xitr * tmpInv;
180      
181      tmp = Xirr - Xitr * XittInv * Xitr.transpose();    
182      tmpInv = tmp.inverse();
183      
184 <    Dorr = kt * tmpInv;
184 >    Dorr = tmpInv;
185  
186      //calculate center of diffusion
187      tmp(0, 0) = Dorr(1, 1) + Dorr(2, 2);
# Line 215 | Line 215 | void HydrodynamicsModel::calcDiffusionTensor() {
215      Ddrr = Dorr;
216      Ddtr = Dotr + Dorr * Uod;
217  
218    props_.diffCenter = rod;
219    props_.Ddtt = Ddtt;
220    props_.Ddtr = Ddtr;
221    props_.Ddrr = Ddrr;
222
218      SquareMatrix<double, 6> Dd;
219      Dd.setSubMatrix(0, 0, Ddtt);
220      Dd.setSubMatrix(0, 3, Ddtr.transpose());
221      Dd.setSubMatrix(3, 0, Ddtr);
222      Dd.setSubMatrix(3, 3, Ddrr);    
223      SquareMatrix<double, 6> Xid;
224 +    Ddtt *= kt;
225 +    Ddtr *=kt;
226 +    Ddrr *= kt;
227      invertMatrix(Dd, Xid);
228  
231    //Xidtt in units of kcal*fs*mol^-1*Ang^-2
232    Xid *= OOPSEConstant::kb*temperature_;
229  
230 +
231 +    //Xidtt in units of kcal*fs*mol^-1*Ang^-2
232 +    //Xid /= OOPSEConstant::energyConvert;
233 +    Xid *= OOPSEConstant::kb * temperature_;
234 +    props_.diffCenter = rod;
235 +    props_.Ddtt = Ddtt;
236 +    props_.Ddtr = Ddtr;
237 +    props_.Ddrr = Ddrr;
238      Xid.getSubMatrix(0, 0, props_.Xidtt);
239      Xid.getSubMatrix(0, 3, props_.Xidrt);
240      Xid.getSubMatrix(3, 0, props_.Xidtr);
241      Xid.getSubMatrix(3, 3, props_.Xidrr);
242  
243  
244 +    std::cout << "viscosity = " << viscosity_ << std::endl;
245 +    std::cout << "temperature = " << temperature_ << std::endl;
246      std::cout << "center of diffusion :" << std::endl;
247      std::cout << rod << std::endl;
248      std::cout << "diffusion tensor at center of diffusion " << std::endl;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines