Welcome to pycbg’s documentation! — pycbg documentation

# Welcome to pycbg’s documentation!

This module helps configuring MPM simulations for CB-Geo MPM: a simple python script can generate the input files required by CB-Geo (see Preprocessing). The results of the simulation can also be imported in python using pycbg (see Postprocessing). This documentation should be used alongside CB-Geo’s documentation.

# Preprocessing

Preprocessing a MPM simulation for CB-Geo consist in creating several input files :

> - a mesh file, where the positions of all nodes and their interconnections are described. Pycbg saves it under the name mesh.msh. Can be created using the `Mesh` object.

> - a particles file, where the initial positions of all material points are specified. Pycbg saves it under the name particles.txt. Can be created using the `Particles` object.

> - an entity sets file (if entity sets are defined), where all entity sets are defined using entities’ ids. An entity can be a node, a particle or a cell. Pycbg saves it under the name entity_sets.txt. Can be created using the `EntitySets` object.

The `Simulation` object creates `Mesh`, `Particles`, `Materials` and `EntitySets` objects and should be enough to prepare a simulation.

## Classes overview

`Mesh` | Create and write to a file a mesh using gmsh.
`Particles` | Create and write to a file particles from a `Mesh` object.
`EntitySets` | Create and write to a file entity sets for nodes and particles.
`Materials` | Create materials for particle sets.
`Simulation` | Create a simulation.

# Postprocessing

TODO: explain postprocessing here

`ResultsReader` | Load the result of a simulation.

# Indices and tables

- Index

- Module Index

- Search Page