Skip to content

Example: Triangular Mesh Geometry

Jon Drobny edited this page Jan 27, 2024 · 9 revisions

Warning

Note that in order for meshes to work properly in RustBCA, the following must be true:

  • meshes must consist of only triangles
  • meshes must be "watertight" (e.g., check with trimesh: mesh.is_watertight must return True)
  • all surface normals must point outwards (fix with trimesh: mesh.fix_normals())

Triangular Meshes for Homogeneous Composition, Complex Objects

Using parry3d, RustBCA can use full 3D triangular meshes. These are currently limited to homogeneous, single-mesh targets, but compound objects and inhomogeneity are planned features for triangular meshes.

To use this feature, run one of the examples below:

  • cargo run --release --features parry3d TRIMESH examples/tungsten_twist_trimesh.toml
  • cargo run --release --features parry3d TRIMESH examples/tungsten_tiles.toml

These examples can be plotted using rustbca.py (requires toml, shapely, mayavi, numpy, matplotlib):

from scripts.rustbca import *
do_trajectory_plot_3d('tungsten_twist_', input_file='examples/tungsten_twist_trimesh.toml')

Helium trajectories on a twisted and extruded tungsten shape

Hydrogen trajectories on castellated, ITER-like tungsten tiles in 3D

Click Pages above to see all pages in the Wiki.

Start Here

Home page

Installation

Selected Benchmarks

Frequently Asked Questions

FAQ

This page is a work in progress.

Using the Standalone Code

Input Files

Output Files

Error Messages

Interaction Potentials

Standalone Code Examples

Layered Targets

2D Geometry

Spherical Geometry

3D Geometry

Gaseous Targets

Multiple Interaction Potentials

Output Histograms

Bindings

Python

C/C++

Fortran

Clone this wiki locally