Skip to content

Model Parts File

Rafael Rangel edited this page Feb 21, 2024 · 1 revision

The Model Parts file is a text file that contains all the elements of the model (particles and walls) with their initial coordinates and geometry. It is also used to group elements into model parts, which are groups of elements that can be used in the Project Parameters file to apply properties and conditions to all elements belonging to the same model part.

This file is necessary for running a simulation and must always be accompanied by a Project Parameters file. Its name must be indicated in the Project Parameters file.

The format of this file includes some tags to indicate the element types followed by their properties. A template is available here.

Tags

%PARTICLES.SPHERE

Create particles of spherical shape. Although their properties are computed considering a 3D body, all spheres are assumed to be moving on the same plane (the plane that cuts the mid cross-section of the spheres), thus behaving as disks but contacting each other through a circular area.

The total number of spherical particles must come in the line below the tag.

A list of spherical particles must come on the next lines, with the following data for each particle (one particle per line), thus behaving as disks but contacting each other through a rectangular area:

ID X Y Orientation Radius

  • ID: Identification number of each particle, starting at 1 and going in ascending order (avoid skipping numbers). Particles IDs cannot be repeated, even for different types of particles!
  • X: Initial coordinate of the particle centroid on the X axis.
  • Y: Initial coordinate of the particle centroid on the Y axis.
  • Orientation: Initial orientation angle relative to the positive X direction (irrelevant for circular shapes).
  • Radius: Initial radius of the sphere.
%PARTICLES.CYLINDER

Create particles of cylindrical shape. Although their properties are computed considering a 3D body, all cylinders are assumed to be moving on the same plane (the plane perpendicular to their longitudinal axis), thus behaving as disks.

The total number of cylindrical particles must come in the line below the tag.

A list of cylindrical particles must come on the next lines, with the following data for each particle (one particle per line):

ID X Y Orientation Length Radius

  • ID: Identification number of each particle, starting at 1 and going in ascending order (avoid skipping numbers). Particles IDs cannot be repeated, even for different types of particles!
  • X: Initial coordinate of the particle centroid on the X axis.
  • Y: Initial coordinate of the particle centroid on the Y axis.
  • Orientation: Initial orientation angle relative to the positive X direction (irrelevant for circular shapes).
  • Length: Out-of-plane length of the cylinder.
  • Radius: Initial radius of the sphere.
%WALLS.LINE

Create boundary walls of straight shape. These walls have an infinite out-of-plane length.

The total number of straight walls must come in the line below the tag.

A list of straight walls must come on the next lines, with the following data for each wall (one wall per line):

ID X1 Y1 X2 Y1

  • ID: Identification number of each wall, starting at 1 and going in ascending order (avoid skipping numbers). Walls IDs cannot be repeated, even for different types of walls!
  • X1: Initial coordinate of the first line extremity on the X axis.
  • Y1: Initial coordinate of the first line extremity on the Y axis.
  • X2: Initial coordinate of the second line extremity on the X axis.
  • Y2: Initial coordinate of the second line extremity on the Y axis.
%WALLS.CIRCLE

Create boundary walls of circular shape. These walls have an infinite out-of-plane length.

The total number of circular walls must come in the line below the tag.

A list of circular walls must come on the next lines, with the following data for each wall (one wall per line):

ID X Y Radius

  • ID: Identification number of each wall, starting at 1 and going in ascending order (avoid skipping numbers). Walls IDs cannot be repeated, even for different types of walls!
  • X: Initial coordinate of the wall centroid on the X axis.
  • Y: Initial coordinate of the wall centroid on the Y axis.
  • Radius: Initial radius of the wall.
%MODELPART

Create model parts to group particles and walls.

Each tag corresponds to a single model part.

The name of the model part must come in the line below the tag, using the sub-tag NAME followed by the given name (do not use spaces in the model part name), all in the same line.

The number of particles and their IDs, as well as the number of walls and their IDs, belonging to the model part must be indicated next (IT MUST INDICATE 0, ZERO, PARTICLE OR WALL WHEN THERE IS NONE!).

It must always contain the three sub-tags NAME, PARTICLES, and WALLS. Therefore, model parts are created in the following way:

%MODELPART
NAME [name_of_model_part_with_no_spaces]
PARTICLES [Number of particles]
[IDs of particles]
WALLS [Number of walls]
[IDs of walls]

Example

The following file creates the model shown below: 3 spherical particles of radius 0.2 inside a square box of side 5.0 made by 4 straight walls, and 2 spherical particles of radius 0.3 inside a circular wall of radius 2.5. It also creates three model parts.

wiki_mpf_example

%PARTICLES.SPHERE
5
1   0.4  1.0  0.0  0.2
2   2.9  3.5  0.0  0.2
3   4.1  2.2  0.0  0.2
4   9.7  1.0  0.0  0.3
5   7.7  2.3  0.0  0.3

%WALLS.LINE
4
1   0.0  0.0  5.0  0.0
2   5.0  0.0  5.0  5.0
3   5.0  5.0  0.0  5.0
4   0.0  5.0  0.0  0.0

%WALLS.CIRCLE
1
5   8.5  2.5  2.5

%MODELPART
NAME particles_box
PARTICLES 3
1 2 3
WALLS 0

%MODELPART
NAME particles_circle
PARTICLES 2
4 5
WALLS 0

%MODELPART
NAME side_walls_box
PARTICLES 0
WALLS 2
2 4

%MODELPART
NAME some_particles_and_walls
PARTICLES 2
3 4
WALLS 1
5
Clone this wiki locally