Crate russell_tensor

Source
Expand description

Russell - Rust Scientific Library

russell_tensor: Tensor analysis, calculus, and functions for continuum mechanics

Important: This crate depends on external libraries (non-Rust). Thus, please check the Installation Instructions on the GitHub Repository.

This library implements structures and functions for tensor analysis and calculus. The library focuses on applications in engineering and [Continuum Mechanics](Continuum Mechanics). The essential functionality for the targeted applications includes second-order and fourth-order tensors, scalar “invariants,” and derivatives.

This library implements derivatives for scalar functions with respect to tensors, tensor functions with respect to tensors, and others. A convenient basis representation known as Mandel basis (similar to Voigt notation) is considered by this library internally. The user may also use the Mandel basis to perform simpler matrix-vector operations directly.

Structs§

AuxDeriv2InvariantJ3
Holds auxiliary data to compute the second derivative of the J3 invariant
AuxDeriv2InvariantLode
Holds auxiliary data to compute the second derivative of the Lode invariant
AuxDeriv2InvariantSigmaD
Holds auxiliary data to compute the second derivative of the deviatoric invariant
LinElasticity
Implements the linear elasticity equations for small-strain problems
SampleTensor2
Collects values related to a sample Tensor2
SamplesTensor2
Holds second-order tensor samples
SamplesTensor4
Holds fourth-order tensor samples
Spectral2
Holds the spectral representation of a symmetric second-order tensor
Tensor2
Implements a second-order tensor, symmetric or not
Tensor4
Implements a fourth order-tensor, minor-symmetric or not

Enums§

Mandel
Specifies the Mandel representation

Constants§

IDENTITY2
Second-order identity tensor in Mandel basis (I)
IDENTITY4
Fourth-order identity tensor in Mandel basis (II)
IJKL_TO_MN
Maps (i,j,k,l) of Tensor4 to the (m,n)-th position in the matrix representation
IJKL_TO_MN_SYM
Maps (i,j,k,l) of Tensor4 to the (m,n)-th position in the matrix representation (minor-symmetric version)
IJ_TO_M
Maps (i,j) of Tensor2 to the m-th position in the vector representation
IJ_TO_M_SYM
Maps (i,j) of Tensor2 to the m-th position in the vector representation (symmetric version)
MN_TO_IJKL
Maps the (m,n)-th position in the matrix representation to (i,j,k,l) of Tensor4
M_TO_IJ
Maps the m-th position in the vector representation to the index (i,j) of Tensor2
ONE_BY_3
1/3
P_DEV
Fourth-order deviatoric making projector (Pdev)
P_ISO
Fourth-order isotropic making projector (Piso)
P_SKEW
Fourth-order skew making projector (Pskew)
P_SYM
Fourth-order symmetric making projector (Psym)
P_SYMDEV
Fourth-order symmetric-deviatoric projector in Mandel basis
SQRT_2
sqrt(2) https://oeis.org/A002193
SQRT_3
sqrt(3) https://oeis.org/A002194
SQRT_6
sqrt(6) https://oeis.org/A010464
SQRT_2_BY_3
sqrt(2/3) https://oeis.org/A157697
SQRT_3_BY_2
sqt(3/2) https://oeis.org/A115754
TOL_J2
Tolerance to avoid zero division with the J2 invariant
TRACE_PROJECTION
Fourth-order trace-projection tensor (JJ)
TRANSPOSITION
Fourth-order transposition tensor in Mandel basis (TT)
TWO_BY_3
2/3

Traits§

AsMatrix3x3
Defines a trait to handle 3x3 matrices
AsMatrix9x9
Defines a trait to handle 9x9 matrices

Functions§

deriv1_invariant_jj2
Calculates the first derivative of the J2 invariant w.r.t. the stress tensor
deriv1_invariant_jj3
Calculates the first derivative of the J3 invariant w.r.t. the stress tensor
deriv1_invariant_lode
Calculates the first derivative of the Lode invariant w.r.t. the stress tensor
deriv1_invariant_sigma_d
Calculates the first derivative of the deviatoric stress invariant (von Mises) w.r.t. the stress tensor
deriv1_invariant_sigma_m
Calculates the first derivative of the mean stress invariant w.r.t. the stress tensor
deriv1_norm
Calculates the first derivative of the norm w.r.t. the defining Tensor2
deriv2_invariant_jj2
Calculates the second derivative of the J2 invariant w.r.t. the stress tensor
deriv2_invariant_jj3
Calculates the second derivative of the J3 invariant w.r.t. the stress tensor
deriv2_invariant_lode
Calculates the second derivative of the Lode invariant w.r.t. the stress tensor
deriv2_invariant_sigma_d
Calculates the second derivative of the deviatoric invariant (von Mises) w.r.t. the stress tensor
deriv_inverse_tensor
Calculates the derivative of the inverse tensor w.r.t. the defining Tensor2
deriv_inverse_tensor_sym
Calculates the derivative of the inverse tensor w.r.t. a symmetric Tensor2
deriv_squared_tensor
Calculates the derivative of the squared tensor w.r.t. a Tensor2
deriv_squared_tensor_sym
Calculates the derivative of the squared tensor w.r.t. a symmetric Tensor2
t2_add
Adds two second-order tensors
t2_ddot_t2
Performs the double-dot (ddot) operation between two Tensor2 (inner product)
t2_ddot_t4
Performs the double-dot (ddot) operation between a Tensor2 and a Tensor4
t2_ddot_t4_ddot_t2
Computes Tensor2 double-dot Tensor4 double-dot Tensor2
t2_dot_t2
Performs the single dot operation between two Tensor2 (matrix multiplication)
t2_dot_vec
Performs the single dot operation between a Tensor2 and a vector
t2_dyad_t2
Performs the dyadic product between two Tensor2 resulting a Tensor4
t2_dyad_t2_update
Performs the dyadic product between two Tensor2 resulting in a Tensor4 (with update)
t2_odyad_t2
Performs the overbar dyadic product between two Tensor2 resulting in a (general) Tensor4
t2_qsd_t2
Performs the quad-sum-dyadic (qsd) operation with two Tensor2 yielding a minor-symmetric Tensor4
t2_ssd
Performs the self-sum-dyadic (ssd) operation with a Tensor2 yielding a minor-symmetric Tensor4
t2_udyad_t2
Performs the underbar dyadic product between two Tensor2 resulting in a (general) Tensor4
t4_add
Adds two fourth-order tensors
t4_ddot_t2
Performs the double-dot (ddot) operation between a Tensor4 and a Tensor2
t4_ddot_t4
Performs the double-dot (ddot) operation between two Tensor4
t4_ddot_t2_dyad_t2_ddot_t4
Computes Tensor4 double-dot Tensor2 dyadic Tensor2 double-dot Tensor4
t4_ddot_t2_update
Performs the double-dot (ddot) operation between a Tensor4 and a Tensor2 with update
t4_ddot_t4_update
Performs the double-dot (ddot) operation between two Tensor4 with update
vec_dot_t2
Performs the single dot operation between a vector and a Tensor2
vec_dyad_vec
Performs the dyadic product between two vectors resulting in a second-order tensor

Type Aliases§

StrError
Defines the error output as a static string