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]

115 {
116  //We want strainrate control, so here we set the target Stress to free, all to zero
117  Matrix3D stressGoal;
118  stressGoal.XX = 0.0;
119  stressGoal.YY = 0.0;
120  stressGoal.ZZ = 0.0;
121  stressGoal.XY = 0.0;
122 
123  //Here we set the pure shear strainrate tensor, negative sign means compression
124  Matrix3D strainRate;
125  strainRate.XX = 0.4;
126  strainRate.YY = -0.4;
127  strainRate.ZZ = 0.0;
128  strainRate.XY = 0.0;
129 
130  //This is default gainFactor, if you choose to use stress control, you might want to tune this one
131  Matrix3D gainFactor;
132  gainFactor.XY = 0.0001;
133  gainFactor.XX = 0.0001;
134  gainFactor.YY = 0.0001;
135  gainFactor.ZZ = 0.0001;
136 
137  //This is by default set to true, so particles are controlled by affine movement.
138  //If set it to false, then the particles will only follow the boundary movement.
139  bool isStrainRateControlled = true;
140 
141  //Define the object and problem to solve
142  StressStrainControl dpm(stressGoal, strainRate, gainFactor, isStrainRateControlled);
143 
144  //Set name
145  dpm.setName("Tutorial_PureShear");
146  //Set output and time stepping properties
147  dpm.setTimeMax(1);
148  //Set the SaveCount, i.e. 100 timesteps saving one snapshot
149  dpm.setSaveCount(10);
150  //Currently all the normal file outputs are switched off, simply switch it on by replacing NO_FILE to ONE_FILE
151  dpm.dataFile.setFileType(FileType::NO_FILE);
152  dpm.restartFile.setFileType(FileType::NO_FILE);
153  dpm.fStatFile.setFileType(FileType::NO_FILE);
154  dpm.eneFile.setFileType(FileType::NO_FILE);
155  //Set output the particle information in VTK for ParaView Visualisation
156  dpm.setParticlesWriteVTK(true);
157  //Because of periodic boundary, out put wall files is not necessary in this case
158  //dpm.wallHandler.setWriteVTK(true);
159  //Solve the problem
160  dpm.solve();
161 }
@ NO_FILE
file will not be created/read
Implementation of a 3D matrix.
Definition: Matrix.h:38
Mdouble XY
Definition: Matrix.h:43
Mdouble YY
Definition: Matrix.h:43
Mdouble ZZ
Definition: Matrix.h:43
Mdouble XX
all nine matrix elements
Definition: Matrix.h:43
[REV_ISO:headers]
Definition: REVIsotropicCompressionDemo.cpp:40

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.