Code Structure: generation (Calculations) - Computational-Mechanics-Material-Models/chrono-preprocessor GitHub Wiki
Overview
The generation
directory contains various scripts used by the Chrono Workbench for generating and calculating properties of meshes and other model components. These files are essential for processing and handling data required for simulations and model generation.
calc_parVolume.py
This module contains a function to calculate the total volume of particles in a mixture and related values. It includes methods for calculating volume fractions, cumulative distribution functions, and other related parameters.
calc_sieveCurve.py
This module contains a function to shift the total sieve curve to a coarse sieve curve. It calculates the new sieve curve diameter and percent passing data based on the minimum and maximum particle sizes.
-
Inputs:
minPar
: Minimum particle sizemaxPar
: Maximum particle sizesieveCurveDiameter
: An array of particle size datasieveCurvePassing
: An array of cumulative percent passing data
-
Outputs:
newSieveCurveD
: Shifted sieve curve diameter datanewSieveCurveP
: Shifted sieve curve percent passing dataNewSet
: Number of lines in shifted sieve curve dataw_min
: Minimum weight of particlesw_max
: Maximum weight of particles
calc_LDPMCSL_surfMeshSize.py
This module contains a function to calculate the maximum edge length of a triangular mesh defined by its vertices and faces.
-
Inputs:
vertices
: (x, y, z) coordinates of each vertexfaces
: (v1, v2, v3) vertex indices for each triangle node
-
Outputs:
maxEdgeLength
: Scalar of the longest edge length in the mesh
calc_LDPMCSL_surfMeshExtents.py
This module contains a function to determine the maximum and minimum extents of a bounding box surrounding the input mesh vertices.
-
Inputs:
vertices
: (x, y, z) coordinates of each vertex
-
Outputs:
minExtent
: Coordinate of minimum bounding box cornermaxExtent
: Coordinate of maximum bounding box corner
calc_LDPMCSL_meshVolume.py
This module contains a function to calculate the volume of a mesh composed of tetrahedrons.
-
Inputs:
vertices
: An array of vertex coordinates for the meshtets
: An array of tetrahedron vertices for the mesh
-
Outputs:
sum(tetVolume)
: Volume of the mesh