NuTo
Numerics Tool
GeometryConcrete.h
Go to the documentation of this file.
1 /*
2  * GeometryConcrete.h
3  *
4  * Created on: 4 Sep 2015
5  * Author: ttitsche
6  */
7 
8 #pragma once
9 
10 #include <string>
11 #include <Eigen/Core>
12 
13 namespace NuTo
14 {
15 
16 class Specimen;
17 class ParticleHandler;
18 
20 {
21 public:
23  {
24  A16,
25  B16,
27  };
28 
30 
31  virtual ~GeometryConcrete();
32 
33 
37  void MaximizeParticleDistance(double rParticleDistance);
38 
39 
43  void MaximizeParticleVolumeFraction(double rShrinkage);
44 
45 
51  void ExportGmshGeo2D(std::string rGmshFile, double rMeshSize, double rZSlice, double rMinRadius);
52 
53 
57  void ExportGmshGeo3D(std::string rGmshFile, double rMeshSize);
58 
59 
60  void SetSpecimenBox(double rXs, double rXe, double rYs, double rYe, double rZs, double rZe);
61  void SetSpecimenCylinder(double rXs, double rXe, double rYs, double rYe, double rZs, double rZe);
62  void SetSpecimenCylinder(double radius, double height);
63 
67  void SetGradingCurve(eGradingCurve rGradingCurveEnum, int rNumClasses);
68 
71  void SetGradingCurve(const Eigen::MatrixXd& rGradingCurve);
72 
73 
74  Eigen::MatrixXd GetParticles(bool rBeforeEDMD);
75 
76  void SetParticles(Eigen::MatrixXd);
77 
79  void SetAbsoluteGrowthRate(double rAbsoluteGrowthRate);
80 
82  void SetRelativeGrowthRate(double rRelativeGrowthRate);
83 
84  void SetGmshBinary(const std::string& rGmshBinary);
85 
86  void SetInitialTimeBarrier(double rInitialTimeBarrier);
87 
88  void SetNumEventsMax(double rNumEventsMax);
89 
90  void SetParticleVolumeFraction(double rParticleVolumeFraction);
91 
92  void SetRandomVelocityRange(double rRandomVelocityRange);
93 
94  void SetSecondsPrint(double rSecondsPrint);
95 
96  void SetSecondsWallTimeMax(double rSecondsWallTimeMax);
97 
98  void SetSeed(double rSeed);
99 
100  bool ContinueOnException() const;
101 
102  void SetContinueOnException(bool rContinueOnException);
103 
104 private:
105  void CheckParameters();
106 
107  Specimen* mSpecimen = nullptr;
108  ParticleHandler* mParticleHandler = nullptr;
109  Eigen::MatrixXd mGradingCurve;
110 
111  double mSeed = 42;
112  double mParticleVolumeFraction = 0.5;
113 
114  double mNumEventsMax = 2.e6;
115  double mSecondsWallTimeMax = 60.;
116  double mSecondsPrint = 5.;
117  double mInitialTimeBarrier = 10;
118 
119  double mRandomVelocityRange = 1.;
120  double mRelativeGrowthRate = 0.0;
121  double mAbsoluteGrowthRate = 0.0;
122 
123  bool mContinueOnException = false;
124 };
125 
126 } /* namespace NuTo */
Definition: GeometryConcrete.h:24
class for Specimen
Definition: Specimen.h:16
void SetSecondsPrint(double rSecondsPrint)
Definition: GeometryConcrete.cpp:244
void SetGmshBinary(const std::string &rGmshBinary)
Definition: GeometryConcrete.h:25
void SetNumEventsMax(double rNumEventsMax)
Definition: GeometryConcrete.cpp:229
void SetAbsoluteGrowthRate(double rAbsoluteGrowthRate)
sets the absolute grow rate, removes the relative growth rate
Definition: GeometryConcrete.cpp:212
void SetGradingCurve(eGradingCurve rGradingCurveEnum, int rNumClasses)
sets the grading curve - DIN
Definition: GeometryConcrete.cpp:156
handles the particle list
Definition: ParticleHandler.h:25
void SetSeed(double rSeed)
Definition: GeometryConcrete.cpp:254
void SetParticleVolumeFraction(double rParticleVolumeFraction)
Definition: GeometryConcrete.cpp:234
void ExportGmshGeo2D(std::string rGmshFile, double rMeshSize, double rZSlice, double rMinRadius)
exports the geometry to a 2D mesh file
Definition: GeometryConcrete.cpp:109
bool ContinueOnException() const
Definition: GeometryConcrete.cpp:259
GeometryConcrete()
Definition: GeometryConcrete.cpp:20
Definition: GeometryConcrete.h:26
void SetSecondsWallTimeMax(double rSecondsWallTimeMax)
Definition: GeometryConcrete.cpp:249
void MaximizeParticleVolumeFraction(double rShrinkage)
runs a RSA simulation with smaller spheres afterwards, runs a EDMD simulation to reach the original s...
Definition: GeometryConcrete.cpp:72
eGradingCurve
Definition: GeometryConcrete.h:22
void SetRandomVelocityRange(double rRandomVelocityRange)
Definition: GeometryConcrete.cpp:239
Definition: GeometryConcrete.h:19
void SetSpecimenCylinder(double rXs, double rXe, double rYs, double rYe, double rZs, double rZe)
Definition: GeometryConcrete.cpp:144
void SetRelativeGrowthRate(double rRelativeGrowthRate)
sets the relative grow rate, removes the absolute growth rate
Definition: GeometryConcrete.cpp:218
void SetParticles(Eigen::MatrixXd)
Definition: GeometryConcrete.cpp:205
virtual ~GeometryConcrete()
Definition: GeometryConcrete.cpp:24
Definition: Exception.h:6
void SetSpecimenBox(double rXs, double rXe, double rYs, double rYe, double rZs, double rZe)
Definition: GeometryConcrete.cpp:134
Eigen::MatrixXd GetParticles(bool rBeforeEDMD)
Definition: GeometryConcrete.cpp:197
void MaximizeParticleDistance(double rParticleDistance)
runs a RSA simulation with the desired phi afterwards, runs a EDMD simulation to maximize the particl...
Definition: GeometryConcrete.cpp:30
void SetInitialTimeBarrier(double rInitialTimeBarrier)
Definition: GeometryConcrete.cpp:224
void ExportGmshGeo3D(std::string rGmshFile, double rMeshSize)
exports the geometry to a 3D mesh file
Definition: GeometryConcrete.cpp:126
void SetContinueOnException(bool rContinueOnException)
Definition: GeometryConcrete.cpp:264