REVIsotropicCompressionDemo.cpp File Reference

Classes

class  StressStrainControl
 [REV_ISO:headers] More...
 

Functions

int main (int argc UNUSED, char *argv[] UNUSED)
 [REV_ISO:class] More...
 

Function Documentation

◆ main()

int main ( int argc  UNUSED,
char *argv[]  UNUSED 
)

[REV_ISO:class]

[REV_ISO:main]

96 {
97  //We want strainrate control, so here we set the target Stress to free, all to zero
98  Matrix3D stressGoal;
99  stressGoal.XX = 0.0;
100  stressGoal.YY = 0.0;
101  stressGoal.ZZ = 0.0;
102  stressGoal.XY = 0.0;
103 
104  //Here we set the isotropic strainrate tensor, negative sign means compression
105  Matrix3D strainRate;
106  strainRate.XX = -0.02;
107  strainRate.YY = -0.02;
108  strainRate.ZZ = -0.02;
109  strainRate.XY = 0.0;
110 
111  //This is default gainFactor, if you choose to use stress control, you might want to tune this one
112  Matrix3D gainFactor;
113  gainFactor.XY = 0.0001;
114  gainFactor.XX = 0.0001;
115  gainFactor.YY = 0.0001;
116  gainFactor.ZZ = 0.0001;
117 
118  //This is by default set to true, so particles are controlled by affine movement.
119  //If set it to false, then the particles will only follow the boundary movement.
120  bool isStrainRateControlled = true;
121 
122  //Define the object and problem to solve
123  StressStrainControl dpm(stressGoal, strainRate, gainFactor, isStrainRateControlled);
124 
125  //Set name
126  dpm.setName("Tutorial_IsotropicCompression");
127  //Set output and time stepping properties
128  dpm.setTimeMax(10);
129  //Set the SaveCount, i.e. 100 timesteps saving one snapshot
130  dpm.setSaveCount(100);
131  //Currently all the normal file outputs are switched off, simply switch it on by replacing NO_FILE to ONE_FILE
132 // dpm.dataFile.setFileType(FileType::NO_FILE);
133 // dpm.restartFile.setFileType(FileType::NO_FILE);
134 // dpm.fStatFile.setFileType(FileType::NO_FILE);
135 // dpm.eneFile.setFileType(FileType::NO_FILE);
136  //Set output the particle information in VTK for ParaView Visualisation
137  dpm.setParticlesWriteVTK(true);
138  //Because of periodic boundary, out put wall files is not necessary in this case
139  //dpm.wallHandler.setWriteVTK(true);
140  //Solve the problem
141  dpm.solve();
142 }
Implementation of a 3D matrix.
Definition: Kernel/Math/Matrix.h:17
Mdouble XY
Definition: Kernel/Math/Matrix.h:22
Mdouble YY
Definition: Kernel/Math/Matrix.h:22
Mdouble ZZ
Definition: Kernel/Math/Matrix.h:22
Mdouble XX
all nine matrix elements
Definition: Kernel/Math/Matrix.h:22
[REV_ISO:headers]
Definition: REVIsotropicCompressionDemo.cpp:20

References DPMBase::setName(), DPMBase::setParticlesWriteVTK(), DPMBase::setSaveCount(), DPMBase::setTimeMax(), DPMBase::solve(), Matrix3D::XX, Matrix3D::XY, Matrix3D::YY, and Matrix3D::ZZ.