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]

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