write_ansys_inp

formatwriter.write_ansys_inp(nodes, elements, output_dir: str, output_prefix: str)

Exports the given mesh data (nodes and connectivity) as a compatible ANSYS input file. It generates two files: nodes.inp and elements.inp, which contain the node coordinates and the connectivity, respectively.

Parameters:
  • nodes (numpy array) – Array (Nnodes x 4) containing the node number and coordinates.

  • elements (numpy array) – Array (Nelements x 5) containing theelement number and node connectivity.

  • output_prefix (string) – Prefix for output files

  • output_dir (string) – Destination folder

Returns:

centroid_elems – Array (Nx3) containig the coordinates of the centroids of the elements.

Return type:

numpy array