--- trunk/src/hydrodynamics/Sphere.cpp 2006/05/17 21:51:42 963 +++ trunk/src/hydrodynamics/Sphere.cpp 2008/11/24 22:01:56 1322 @@ -69,27 +69,30 @@ namespace oopse { return boundary; } - HydroProps Sphere::getHydroProps(RealType viscosity, RealType temperature) { - HydroProps props; - props.center =V3Zero; + HydroProp* Sphere::getHydroProp(RealType viscosity, RealType temperature) { + RealType Xitt = 6.0 * NumericConstant::PI * viscosity * radius_; RealType Xirr = 8.0 * NumericConstant::PI * viscosity * radius_ * radius_ * radius_; - props.Xi(0, 0) = Xitt; - props.Xi(1, 1) = Xitt; - props.Xi(2, 2) = Xitt; - props.Xi(3, 3) = Xirr; - props.Xi(4, 4) = Xirr; - props.Xi(5, 5) = Xirr; + + Mat6x6d Xi, XiCopy, D; + + Xi(0, 0) = Xitt; + Xi(1, 1) = Xitt; + Xi(2, 2) = Xitt; + Xi(3, 3) = Xirr; + Xi(4, 4) = Xirr; + Xi(5, 5) = Xirr; - const RealType convertConstant = 6.023; //convert poise.angstrom to amu/fs - props.Xi *= convertConstant; - Mat6x6d XiCopy = props.Xi; - invertMatrix(XiCopy, props.D); - RealType kt = OOPSEConstant::kB * temperature; - props.D *= kt; - props.Xi *= OOPSEConstant::kb * temperature; + Xi *= OOPSEConstant::viscoConvert; + XiCopy = Xi; + + invertMatrix(XiCopy, D); + RealType kt = OOPSEConstant::kb * temperature; // in kcal mol^-1 + D *= kt; // now in angstroms^2 fs^-1 (at least for Trans-trans) + + HydroProp* hprop = new HydroProp(V3Zero, Xi, D); - return props; + return hprop; } }