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': numpy.random.random, 'm': 10}, lfi=numpy.random.randint)[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.