REVPureShearDemo.cpp File Reference

Classes

class  StressStrainControl
 [REV_ISO:headers] More...
 

Functions

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

Function Documentation

◆ main()

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

[REV_PUR:class]

[REV_PUR:main]

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