45#include "hydrodynamics/Sphere.hpp"
48#include "utils/Constants.hpp"
52 Sphere::Sphere(Vector3d origin, RealType radius) :
53 origin_(origin), radius_(radius) {}
55 bool Sphere::isInterior(Vector3d pos) {
56 Vector3d r = pos - origin_;
59 if (r.length() < radius_)
67 std::pair<Vector3d, Vector3d> Sphere::getBoundingBox() {
68 std::pair<Vector3d, Vector3d> boundary;
69 Vector3d r(radius_, radius_, radius_);
70 boundary.first = origin_ - r;
71 boundary.second = origin_ + r;
75 HydroProp* Sphere::getHydroProp(RealType viscosity) {
76 RealType Xitt = 6.0 * Constants::PI * viscosity * radius_;
77 RealType Xirr = 8.0 * Constants::PI * viscosity * pow(radius_, 3);
88 Xi *= Constants::viscoConvert;
90 HydroProp* hprop =
new HydroProp(V3Zero, Xi);
91 hprop->setName(getName());
This basic Periodic Table class was originally taken from the data.cpp file in OpenBabel.