| 46 |
|
#include "math/SquareMatrix3.hpp" |
| 47 |
|
#include "math/DynamicRectMatrix.hpp" |
| 48 |
|
#include "primitives/Molecule.hpp" |
| 49 |
< |
#include "applications/hydrodynamics/StuntDoubleShape.hpp" |
| 50 |
< |
#include "utils/any.hpp" |
| 49 |
> |
#include "utils/HydroProps.hpp" |
| 50 |
> |
#include "utils/OOPSEConstant.hpp" |
| 51 |
> |
#include "utils/HydroProps.hpp" |
| 52 |
|
namespace oopse { |
| 52 |
– |
struct HydrodynamicProps { |
| 53 |
– |
Vector3d diffCenter; |
| 54 |
– |
Mat3x3d Ddtt; |
| 55 |
– |
Mat3x3d Ddtr; |
| 56 |
– |
Mat3x3d Ddrr; |
| 57 |
– |
Mat3x3d Xidtt; |
| 58 |
– |
Mat3x3d Xidrt; |
| 59 |
– |
Mat3x3d Xidtr; |
| 60 |
– |
Mat3x3d Xidrr; |
| 61 |
– |
}; |
| 53 |
|
|
| 54 |
|
struct BeadParam { |
| 55 |
|
std::string atomName; |
| 57 |
|
double radius; |
| 58 |
|
}; |
| 59 |
|
|
| 60 |
< |
typedef std::map<std::string, boost::any> DynamicProperty; |
| 60 |
> |
class Spheric; |
| 61 |
> |
class Ellipsoid; |
| 62 |
> |
class CompositeShape; |
| 63 |
|
|
| 64 |
|
class HydrodynamicsModel { |
| 65 |
|
public: |
| 66 |
< |
HydrodynamicsModel(StuntDouble* sd, const DynamicProperty& extraParams); |
| 67 |
< |
bool calcHydrodyanmicsProps(); |
| 66 |
> |
HydrodynamicsModel(StuntDouble* sd, SimInfo* info) : sd_(sd), info_(info) {} |
| 67 |
> |
virtual ~HydrodynamicsModel() {} |
| 68 |
> |
virtual bool calcHydroProps(Spheric* spheric, double viscosity, double temperature); |
| 69 |
> |
virtual bool calcHydroProps(Ellipsoid* ellipsoid, double viscosity, double temperature); |
| 70 |
> |
virtual bool calcHydroProps(CompositeShape* compositexShape, double viscosity, double temperature); |
| 71 |
|
|
| 72 |
< |
Vector3d getDiffCenter(); |
| 73 |
< |
Mat3x3d getTransDiff(); |
| 74 |
< |
Mat3x3d getRotDiff(); |
| 75 |
< |
Mat3x3d getTransRotDiff(); |
| 76 |
< |
void writeBeads(std::ostream& os); |
| 77 |
< |
void writeDiffCenterAndDiffTensor(std::ostream& os); |
| 72 |
> |
|
| 73 |
> |
virtual void writeBeads(std::ostream& os) {} |
| 74 |
> |
void writeHydroProps(std::ostream& os); |
| 75 |
> |
HydroProps getHydroPropsAtCR() {return cr_;} |
| 76 |
> |
HydroProps getHydroPropsAtCD() {return cd_;} |
| 77 |
> |
|
| 78 |
> |
void setCR(const HydroProps cr) {cr_ = cr;} |
| 79 |
> |
void setCD(const HydroProps cd) { cd_ = cd;} |
| 80 |
> |
std::string getStuntDoubleName() { return sd_->getType();} |
| 81 |
|
protected: |
| 82 |
|
StuntDouble* sd_; |
| 83 |
+ |
SimInfo* info_; |
| 84 |
|
private: |
| 85 |
< |
virtual bool createBeads(std::vector<BeadParam>& beads) = 0; |
| 86 |
< |
|
| 87 |
< |
void calcResistanceTensor(); |
| 88 |
< |
void calcDiffusionTensor(); |
| 89 |
< |
HydrodynamicProps props_; |
| 85 |
> |
HydroProps cr_; |
| 86 |
> |
HydroProps cd_; |
| 87 |
|
std::vector<BeadParam> beads_; |
| 91 |
– |
double viscosity_; |
| 92 |
– |
double temperature_; |
| 93 |
– |
|
| 88 |
|
}; |
| 89 |
|
|
| 96 |
– |
|
| 90 |
|
} |
| 91 |
|
|
| 92 |
|
#endif |