upxo.meshing.mesher_2d module

class upxo.meshing.mesher_2d.mesh_mcgs2d(getFEControlsFromUPXO=True, getGridControlsFromUPXO=True, meshInfo={'FESoftware': 'abaqus', 'elementType': 'quad4', 'mesher': 'UPXO', 'reduced_integration': False}, gridInfo={'xinc': 1, 'xmax': 10, 'xmin': 0, 'yinc': 1, 'ymax': 5, 'ymin': 0}, gsInfo={'grainAreas': array([0.33594281, 0.1555276, 0.66772993, 0.26316631, 0.34993662, 0.79715784, 0.46453471, 0.34388758, 0.03960198, 0.48303452]), 'm': 10}, lfi=array([[5, 8, 4, 7, 6], [8, 7, 7, 4, 5], [4, 7, 2, 3, 4], [5, 8, 6, 2, 6], [1, 4, 8, 9, 1], [7, 1, 1, 6, 8], [2, 8, 7, 5, 6], [7, 1, 3, 7, 5], [3, 5, 2, 1, 6], [6, 4, 9, 9, 9]], dtype=int32))[source]

Bases: object

2D FE meshing of Monte-Carlo (MCGS) grain structures on a square lattice.

Core mcgs meshing helper for temporal-slice label fields. Non-square lattices should be interpolated to a square grid before use. Supports conformal / non-conformal paths and export-oriented bookkeeping for Abaqus or MOOSE (and related packages).

meshing_package

Backend hint (UPXO / GMSH / PYGMSH).

gb_conformity

Conformal vs non-conformal grain-boundary meshing.

element_type

Finite-element type.

target_fe_software

Destination FE package (e.g. Abaqus, MOOSE).

reduced_integration

Reduced-integration element flag.

Type:

bool

m

Temporal slice identifier.

coords_element_nodes, nodal_connectivity

Node coordinates and element connectivity after meshing.

meshInfo

General mesh metadata.

Type:

dict

ABQ_NODES, ABQ_ELEMENTS

Abaqus-friendly node/element tables when exported.

xgrid, ygrid

Square-lattice coordinate vectors.

lfi

Labelled feature / grain image used as meshing input.

dim

Spatial dimensionality (2 for this class).

elsets, ndsets

Element and nodal set maps for features / boundaries.

meshInfo
gridInfo
gsInfo
lfi
mesher_brancher()[source]

Mesher brancher.

abaqus_mesher_brancher()[source]

Abaqus mesher brancher.

upxo_abaqus_nonconformal_mesher()[source]

Upxo abaqus nonconformal mesher.

mesh_abaqus_upxo_nonconformal_quad4()[source]

Generates ABAQUS compatible mesh data-structure inside UPXO targetted at non-conformal mesh with 4 noded quadrilateral elements.

map_elements_grainids()[source]

This makes a map of grain ids and the pixel ids. Map is stored in a dictionary. grain id forms the keys and pixel ids for the values

This is akin to the element-set defined in ABAQUS

abaqus_make_element_sets()[source]

Abaqus make element sets.

meshing_package
element_type
target_fe_software
reduced_integration
coords_element_nodes
nodal_connectivity
ABQ_NODES
ABQ_ELEMENTS
xgrid
ygrid
dim
elsets
ndsets
info()[source]

Info.

export_abaqus_inp_file(folder='DATABASE_FEMESH', file='UPXO_ABQ_MESH.inp')[source]

Export or convert to ort abaqus inp file.