ogstools.variables.matrix module#

class ogstools.variables.matrix.Matrix[source]#

Bases: Variable

Represent a matrix variable.

Matrix variables should contain either 4 (2D) or 6 (3D) components. Matrix components can be accesses with brackets e.g. stress[0]

__getitem__(index)[source]#

A scalar variable as a matrix component.

Return type:

Scalar

property magnitude: Scalar#

A scalar variable as the frobenius norm of the matrix.

property trace: Scalar#

A scalar variable as the trace of the matrix.

property eigenvalues: Vector#

A vector variable as the eigenvalues of the matrix.

property eigenvectors: VectorList#

A vector variable as the eigenvectors of the matrix.

property det: Scalar#

A scalar variable as the determinant of the matrix.

property invariant_1: Scalar#

A scalar variable as the first invariant of the matrix.

property invariant_2: Scalar#

A scalar variable as the second invariant of the matrix.

property invariant_3: Scalar#

A scalar variable as the third invariant of the matrix.

property mean: Scalar#

A scalar variable as the mean value of the matrix.

property hydrostatic_component: Matrix#

A vector variable as the effective pressure of the matrix.

property deviator: Matrix#

A vector variable as the deviator of the matrix.

property deviator_invariant_1: Scalar#

A scalar variable as the first invariant of the matrix deviator.

property deviator_invariant_2: Scalar#

A scalar variable as the second invariant of the matrix deviator.

property deviator_invariant_3: Scalar#

A scalar variable as the third invariant of the matrix deviator.

property octahedral_shear: Scalar#

A scalar variable as the octahedral shear component of the matrix.

property von_Mises: Scalar#

A scalar variable as the von Mises stress.

property qp_ratio: Scalar#

A scalar variable as the qp stress ratio.

__init__(data_name, data_unit='', output_unit='', output_name='', symbol='', mask='', func=<function identity>, mesh_dependent=False, process_with_units=False, cmap='coolwarm', bilinear_cmap=False, categoric=False, color=None, linestyle=None)#