| 45 |
|
|
| 46 |
|
namespace oopse { |
| 47 |
|
|
| 48 |
< |
Sphere::Sphere(Vector3d origin, double radius) : origin_(origin), radius_(radius){ |
| 48 |
> |
Sphere::Sphere(Vector3d origin, RealType radius) : origin_(origin), radius_(radius){ |
| 49 |
|
|
| 50 |
|
} |
| 51 |
|
|
| 69 |
|
return boundary; |
| 70 |
|
} |
| 71 |
|
|
| 72 |
< |
HydroProps Sphere::getHydroProps(double viscosity, double temperature) { |
| 72 |
> |
HydroProps Sphere::getHydroProps(RealType viscosity, RealType temperature) { |
| 73 |
|
HydroProps props; |
| 74 |
|
props.center =V3Zero; |
| 75 |
< |
double Xitt = 6.0 * NumericConstant::PI * viscosity * radius_; |
| 76 |
< |
double Xirr = 8.0 * NumericConstant::PI * viscosity * radius_ * radius_ * radius_; |
| 75 |
> |
RealType Xitt = 6.0 * NumericConstant::PI * viscosity * radius_; |
| 76 |
> |
RealType Xirr = 8.0 * NumericConstant::PI * viscosity * radius_ * radius_ * radius_; |
| 77 |
|
props.Xi(0, 0) = Xitt; |
| 78 |
|
props.Xi(1, 1) = Xitt; |
| 79 |
|
props.Xi(2, 2) = Xitt; |
| 81 |
|
props.Xi(4, 4) = Xirr; |
| 82 |
|
props.Xi(5, 5) = Xirr; |
| 83 |
|
|
| 84 |
< |
const double convertConstant = 6.023; //convert poise.angstrom to amu/fs |
| 84 |
> |
const RealType convertConstant = 6.023; //convert poise.angstrom to amu/fs |
| 85 |
|
props.Xi *= convertConstant; |
| 86 |
|
Mat6x6d XiCopy = props.Xi; |
| 87 |
|
invertMatrix(XiCopy, props.D); |
| 88 |
< |
double kt = OOPSEConstant::kB * temperature; |
| 88 |
> |
RealType kt = OOPSEConstant::kB * temperature; |
| 89 |
|
props.D *= kt; |
| 90 |
|
props.Xi *= OOPSEConstant::kb * temperature; |
| 91 |
|
|