Full File Class#

class ansys.mapdl.reader.full.FullFile(filename: str | Path)

Stores the results of an ANSYS full file.

Parameters:

filename (str) – Filename of the full file to read.

Examples

>>> from ansys.mapdl import reader as pymapdl_reader
>>> full = pymapdl_reader.read_binary('file.rst')
>>> print(full)
PyMAPDL-Reader : MAPDL Full File
Title                    : Demo
Version                  : 20.1
Platform                 : WINDOWS x64
Jobname                  : file
Matrices                 : 2
Equations                : 345
Nodes                    : 115
Degrees of Freedom       : 3
property const

Constrained DOF Returns the node number and DOF constrained in ANSYS.

Examples

>>> full.const
array([], shape=(0, 2), dtype=int32)
property dof_ref

Sorted degree of freedom reference.

Examples

>>> full.dof_ref
array([[  1,   0],
       [  1,   1],
       [  1,   2],
       [115,   0],
       [115,   1],
       [115,   2]], dtype=int32)

Notes

Obtain the unsorted degree of freedom reference with >>> dof_ref, k, m = sparse_full.load_km(sort=False)

property filename

String form of the filename. This property is read-only.

property k

Stiffness Matrix corresponding to sorted DOF.

Examples

>>> from ansys.mapdl import reader as pymapdl_reader
>>> full = pymapdl_reader.read_binary('file.rst')
>>> print(full.k)
<345x345 sparse matrix of type '<class 'numpy.float64'>'
        with 7002 stored elements in Compressed Sparse Column format>
load_km(as_sparse=True, sort=False)

Load and construct mass and stiffness matrices from an ANSYS full file.

Parameters:
  • as_sparse (bool, optional) – Outputs the mass and stiffness matrices as scipy csc sparse arrays when True by default.

  • sort (bool, optional) – Rearranges the k and m matrices such that the rows correspond to to the sorted rows and columns in dor_ref. Also sorts dor_ref.

Returns:

  • dof_ref ((n x 2) np.int32 array) – This array contains the node and degree corresponding to each row and column in the mass and stiffness matrices. In a 3 DOF analysis the dof integers will correspond to: 0 - x 1 - y 2 - z Sort these values by node number and DOF by enabling the sort parameter.

  • k ((n x n) np.float_ or scipy.csc array) – Stiffness array

  • m ((n x n) np.float_ or scipy.csc array) – Mass array

Examples

>>> dof_ref, k, m = full.load_km()
>>> print(k)
(0, 0)       163408119.6581276
(0, 1)               0.0423270
(1, 1)       163408119.6581276
:       :
(342, 344)     6590544.8717949
(343, 344)    -6590544.8717950
(344, 344)    20426014.9572689

Notes

Constrained entries are removed from the mass and stiffness matrices.

Constrained DOF can be accessed from const, which returns the node number and DOF constrained in ANSYS.

property load_vector

The load vector

Examples

>>> full.load_vector
array([0., 0., 0., ..., 0., 0., 0.])
property m

Mass Matrix corresponding to sorted DOF.

Examples

>>> full.m
<345x345 sparse matrix of type '<class 'numpy.float64'>'
        with 2883 stored elements in Compressed Sparse Column format>
property neqn

Number of equations

Examples

>>> full.neqn
963
property pathlib_filename

Return the pathlib.Path version of the filename. This property can not be set.