Go to the documentation of this file.
37 " number of elements in grain diameters in "<<
globalName()<<
" is not consistent"<<
endl;
44 " number of elements in sphere diameters in "<<
globalName()<<
" is not consistent"<<
endl;
66 shape(fileName, owner, prop)
69 if(!readFromDictionary3())
78 return max(grainDiameters_);
83 return min(grainDiameters_);
88 if( indexValid(index))
90 bDiam = grainDiameters_[index];
100 return grainDiameters_[index];
110 return grainDiameters_;
115 if(indexValid(index))
117 return coarseGrainFactor_[index];
128 return coarseGrainFactor_;
133 if(indexValid(index))
135 return sphereDiameters_[index];
147 return sphereDiameters_;
152 if( indexValid(index) )
154 real d = grainDiameters_[index];
155 real rho = indexToDensity(index);
164 if(
real m; mass(index,
m))
180 auto pids = shapePropertyIds();
184 rho[i] = properties().density(pids[i]);
191 if( indexValid(index) )
193 I = 0.4 * mass(index) *
pow(grainDiameters_[index]/2.0,2.0);
201 if(
real I; Inertia(index, I))
216 return Inertia(index,Ixx);
221 return Inertia(index);
226 return Inertia(index,Iyy);
231 return Inertia(index);
236 return Inertia(index,Izz);
241 return Inertia(index);
Vector< real > realVector
bool writeToDict(dictionary &dict) const override
#define fatalExit
Fatal exit.
Vector< T, Allocator > pow(const Vector< T, Allocator > &v1, const Vector< T, Allocator > &v2)
realVector mass() const override
real Inertial_zz(uint32 index) const override
real Inertial_yy(uint32 index) const override
T max(const internalField< T, MemorySpace > &iField)
realVector coarseGrainFactor() const
virtual word globalName() const
global name of entry, separated with dots
bool Inertia_xx(uint32 index, real &Ixx) const override
auto size() const
Size of the vector.
iOstream & endl(iOstream &os)
Add newline and flush stream.
realVector orginalDiameter() const
bool writeToDict(dictionary &dict) const override
grainShape(const word &fileName, repository *owner, const property &prop)
realVector density() const override
realVector sphereDiameters_
bool readFromDictionary3()
#define fatalErrorInFunction
Report a fatal error and function name and exit the application.
real Inertial_xx(uint32 index) const override
realVector grainDiameters_
real minBoundingSphere() const override
bool Inertia_zz(uint32 index, real &Izz) const override
#define ForAll(i, container)
T min(const internalField< T, MemorySpace > &iField)
property holds the pure properties of materials.
realVector boundingDiameter() const override
realVector Inertia() const override
real maxBoundingSphere() const override
bool Inertia_yy(uint32 index, real &Iyy) const override
realVector coarseGrainFactor_
Dictionary holds a set of data entries or sub-dictionaries that are enclosed in a curely braces or ar...