Tutorials
- Discovering examples
- Building compact discrete domains
- Introduction to input file (You are here)
- Plugins and input files
- Initialize project
- Initialize your first custom plugin
- Implement your first custom plugin
- Run your first project
- granoo-viewer usage
- Inputs/Outputs with GranOO
- Building a very simple tensile test
- Using numerical sensor
This page describes the usage of *.inp input file
A granoo computation is described through input *.inp
files. These files
are written in the xml
language. Input files simply describe the chronological sequence of macro-commands (named PlugIn in the GranOO terminology)
which must be triggered in a computation. These PlugIns are embedded into a <STEP>
xml tag.. Generally, a simulation
contains three main steps : the PreProcessing
, Processing
and PostProcessing
steps.
The Processing
step corresponds to the main time loop required by the explicit time scheme.
It means that the PlugIn written in this section are triggered at each time step during
the simulation. The PreProcessing
and PostProcessing
PlugIn are triggered just one
time before and after the time loop respectively.
Note that these three sections must be embedded in a <GranOO.../>
xml tag.
This tag is used to define global settings of simulation output directory,
number of thread,etc…
Below, you will find the input file that corresponds to the granular rain example available in the
somewhere/tags/3.0/Example/00104_{dem}{mechanical}{granular}_SPHERICAL-RAIN
path.
In this example, only the pre-processing
and processing
steps are used. You can note that
the TotalTime
TimeStep
xml attributes of the processing
step allows to
define the main time loop. The NEW-GROUND
, AddElement
or CLEAR-LOAD
Xml tags correspond
to the GranOO macro-commands (also named PlugIn). The PlugIn which are written in capital letters
correspond to the GranOO standard plugins which are defined in the
somewhere/tags/3.0/Lib/GranOO3/PlugIn
C++ source files.
Practical work
Ok, please try to build this example (see the first tutorial step) and run the simulation with this
input file and see the result with the granoo3-viewer
program. Now, we will highlight that the plugin
order is important. For instance, move the CLEAR-LOAD
just before the INTEGRATE-ACCELERATION
. You must
obtain something like :
Now, re-run your simulation (note that you can skip the compilation process with cmake
and make
because
you do not change the c++ source files) and observe the results. These results should be very different !
If you do not understand why these results have changed, it means that you probably have to improve your understanding of the discrete element method. This is important, this tutorial is not an introduction to the discrete element method nor the c++ and the python languages… You must get by yourself some backgrounds on such topics.
Please go to the next tutorial step…