morphogen.io.radioss¶
Inputs and outputs of OpenRadioss, the explicit finite element solver (Radioss Block Format of the input version 2022, which OpenRadioss reads; Radioss Reference Guide).
write_radioss()writes the Starter input<name>_0000.radof a mesh: its unit system (/BEGIN), its nodes, its elements by part (/BRICKfor the voxels,/TETRA4or/TETRA10for conforming tetrahedra; a part per phase), the solid property (/PROP/SOLID: the stabilized 8-node brick, Isolid 24; the linear tetrahedra with nodal pressures against locking), the materials of the phases (/MAT/LAW1elastic,/MAT/LAW36von Mises with tabulated yield curves,/MAT/LAW2Johnson–Cook), the node groups of the loaded faces, the loading (/BCS,/IMPVELand its/FUNCT;/INIVELand a fixed/RWALLfor an impact), the self contact of the outer surface (/INTER/TYPE24) and the time histories (/TH/NODEof the reactions of the loaded faces,/TH/PARTof the energies and momenta); and the Engine input<name>_0001.rad(/RUN,/TFILE,/ANIM: displacements, velocities, reaction and contact forces, von Mises stresses, plastic strains, energy densities, pressures and the status of the elements;/DT/NODA/CSTfor a mass scaling). It writes too the mesh and the manifest that morphoGen reads the results back with (morphogen.dynamics).read_radioss_listing()reads the listing of a run (<name>_0000.out,<name>_0001.out): its cycles and times (the progress of a run), its errors and whether it ended normally.read_radioss_th()reads a time history converted to CSV by OpenRadioss’sth_to_csv; the animations converted byanim_to_vtkare legacy VTK files (morphogen.io.vtk.read_vtk_grid()).
The fields of the cards are those of the reference guide: integers of 10 characters,
reals of 20, comments after #. The 4-node tetrahedra are written with their natural
coordinates r, s, t running from node 4 toward nodes 1, 2, 3 (positive Jacobian,
det[x1 - x4, x2 - x4, x3 - x4] > 0), the 10-node ones with their mid-side nodes 5 to
10 on the edges 1-2, 2-3, 3-1, 1-4, 2-4 and 3-4 (morphoGen’s and VTK’s order), the bricks
with their nodes 1-4 on a face whose normal (right-hand rule) points toward nodes 5-8.
- morphogen.io.radioss.INPUT_VERSION = 2022¶
The input version of the cards (
/BEGIN)
- morphogen.io.radioss.SOLID_PROPERTY = {'Icpre': -1, 'Iframe': -1, 'Ismstr': -1, 'Isolid': 24, 'Itetra10': 0, 'Itetra4': 3}¶
the 8-node brick with physical stabilization (Isolid 24), the small strains and the constant pressure chosen by Radioss for the law (-1), the linear tetrahedra with nodal pressures against volumetric locking (Itetra4 3), the quadratic ones by default
- Type:
The solid property
- morphogen.io.radioss.ANIM_VECTORS = ('DISP', 'VEL', 'FREAC', 'CONT')¶
The animated results of the Engine input
- morphogen.io.radioss.ELEMENTS = {'brick': ('BRICK', 8), 'tetra10': ('TETRA10', 10), 'tetra4': ('TETRA4', 4)}¶
the keyword of their block and their nodes
- Type:
The kinds of elements
- morphogen.io.radioss.MAX_HISTORY_VALUES = 20000000¶
a mesh with large loaded faces is sampled less often (its forces are also drawn from the reaction forces of the animations)
- Type:
The values (nodes times variables times samples) of the time histories, at most
- morphogen.io.radioss.RULER = '#---1----|----2----|----3----|----4----|----5----|----6----|----7----|----8----|----9----|---10----|'¶
The ruler of the columns of the cards (a comment)
- morphogen.io.radioss.run_name(text: str) str[source]¶
A name for the files of a run: letters, digits, ‘_’ and ‘-’, 4 characters at least (the Engine’s
/RUNasks for 4 to 80).
- morphogen.io.radioss.element_kind(mesh) str[source]¶
brick,tetra4ortetra10: the elements of a voxel or tetrahedral mesh.
- morphogen.io.radioss.oriented(mesh) ndarray[source]¶
The elements of a mesh (0-based nodes) in the orientation of Radioss: the tetrahedra whose
det[x1 - x4, x2 - x4, x3 - x4]is negative get their corners 1 and 2 swapped (and their mid-side nodes with them); the hexahedra of voxel meshes are kept (morphoGen’s order is Radioss’s).
- morphogen.io.radioss.box_of(mesh) tuple[ndarray, ndarray][source]¶
The box of a mesh: that of a tetrahedral mesh, the extent of the nodes of a voxel mesh.
- morphogen.io.radioss.face_nodes(mesh, axis: int, side: int) ndarray[source]¶
The nodes (0-based) on the face of the box of a mesh normal to
axis, lower (side0) or upper (1).
- morphogen.io.radioss.element_volumes(mesh) ndarray[source]¶
The volume of each element: the voxels’, or that of the corners of the tetrahedra (the straight ones).
- class morphogen.io.radioss.RadiossInputs(directory: Path, name: str, starter: Path, engine: Path, manifest: dict = <factory>)[source]¶
Bases:
objectThe inputs of a run of OpenRadioss written by
write_radioss(): theirdirectory, the runname, the Starter and Engine inputs, the manifest that the results are read back with (its contents inmanifest).- property end_time: float¶
- morphogen.io.radioss.material_curve_strains() tuple[float, ...][source]¶
The plastic strains of the tabulated yield curves (
morphogen.dynamics. model.CURVE_STRAINS).
- morphogen.io.radioss.write_radioss(directory, mesh, materials: dict, loading, *, name: str = 'morphogen', units=None, frames: int = 50, history: int = 1000, time_step: float | None = None, length_scale: float = 1.0, phase_names: dict | None = None, title: str = '') RadiossInputs[source]¶
Write the inputs of a run of OpenRadioss for a mesh in
directory.mesh: aVoxelMesh(bricks) or aTetMesh(4- or 10-node tetrahedra) of the box of a morphology;materials: phase ->ExplicitMaterialof each phase of the mesh;loading: anExplicitLoading;units: theUnitSystemof every value (Mg, mm, s by default).frames: the animations written over the run (and the initial one),history: the samples of the time histories;time_step: a minimum time step kept by adding mass to the nodes (/DT/NODA/CST; none by default, the run then going at the stable time step of its smallest element).length_scale: the length unit of the system per length unit of the mesh (1000 for a mesh in metres written in mm).phase_names: the names of the phases, for the titles of the parts.Returns the
RadiossInputs; besides the two inputs, the directory holds<name>_mesh.npz(the mesh and the nodes of its loaded faces) and the manifestmorphogen_radioss.jsonthatmorphogen.dynamics.read_explicit_run()reads the results back with.The loaded faces:
lateralfixedholds the lower face and the upper one across the drive (a compression between bonded platens),freeholds the lower face along the axis only and one of its nodes, the nearest to its centre, across it too (no rigid drift); a shear holds the lower face and the upper one but along the drive. The reactions of the nodes of the loaded faces along the axis and the drive are written to the time history, sampled less often when the faces are large (MAX_HISTORY_VALUES).
- class morphogen.io.radioss.RadiossListing(cycles: ndarray, times: ndarray, steps: ndarray, errors: list[str], normal: bool | None)[source]¶
Bases:
objectWhat the listing of a run of Radioss tells: its cycles, times and time steps (the lines printed every few cycles), its errors and whether it ended normally (None while it runs, or when the listing does not say).
- property time: float¶
- morphogen.io.radioss.read_radioss_listing(path) RadiossListing[source]¶
The cycles, times and errors of the listing of a Starter or Engine run (
<name>_0000.out,<name>_0001.out).
- morphogen.io.radioss.read_radioss_th(path) dict[str, ndarray][source]¶
The columns of a time history converted to CSV (
th_to_csv): name -> values, the first column, the time, under"time"as well. The names are those of the header (stripped of their quotes and spaces); a header given twice gets#2…
- morphogen.io.radioss.read_manifest(directory) dict[source]¶
The manifest of a run written by
write_radioss().