REVSimpleShearDemo.cpp File Reference

Classes

class  StressStrainControl
 [REV_ISO:headers] More...
 

Functions

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

Function Documentation

◆ main()

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

[REV_SIM:class]

[REV_SIM:main]

116 {
117  //Here we want to set stress in y direction to constant, 100 is just an example,
118  //if you would like to keep the volume constant, then everything here should be set to zero
119  Matrix3D stressGoal;
120  stressGoal.XX = 0.0;
121  stressGoal.YY = 100.0;
122  stressGoal.ZZ = 0.0;
123  stressGoal.XY = 0.0;
124 
125  //Here we set the simple shear strainrate tensor, negative sign means compression
126  Matrix3D strainRate;
127  strainRate.XX = 0.0;
128  strainRate.YY = 0.0;
129  strainRate.ZZ = 0.0;
130  strainRate.XY = 1.0;
131 
132  //This is default gainFactor, if you choose to use stress control, you might want to tune this one
133  Matrix3D gainFactor;
134  gainFactor.XY = 0.0001;
135  gainFactor.XX = 0.0001;
136  gainFactor.YY = 0.0001;
137  gainFactor.ZZ = 0.0001;
138 
139  //This is by default set to true, so particles are controlled by affine movement.
140  //If set it to false, then the particles will only follow the boundary movement.
141  bool isStrainRateControlled = true;
142 
143  //Define the object and problem to solve
144  StressStrainControl dpm(stressGoal, strainRate, gainFactor, isStrainRateControlled);
145 
146  //Set name
147  dpm.setName("Tutorial_SimpleShear");
148  //Set output and time stepping properties
149  dpm.setTimeMax(10);
150  //Set the SaveCount, i.e. 100 timesteps saving one snapshot
151  dpm.setSaveCount(100);
152  //Currently all the normal file outputs are switched off, simply switch it on by replacing NO_FILE to ONE_FILE
153  dpm.dataFile.setFileType(FileType::NO_FILE);
154  dpm.restartFile.setFileType(FileType::NO_FILE);
155  dpm.fStatFile.setFileType(FileType::NO_FILE);
156  dpm.eneFile.setFileType(FileType::NO_FILE);
157  //Set output the particle information in VTK for ParaView Visualisation
158  dpm.setParticlesWriteVTK(true);
159  //Because of periodic boundary, out put wall files is not necessary in this case
160  //dpm.wallHandler.setWriteVTK(true);
161  //Solve the problem
162  dpm.solve();
163 }
@ 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.