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§
- AuxDeriv2
Invariant J3 - Holds auxiliary data to compute the second derivative of the J3 invariant
- AuxDeriv2
Invariant Lode - Holds auxiliary data to compute the second derivative of the Lode invariant
- AuxDeriv2
Invariant SigmaD - Holds auxiliary data to compute the second derivative of the deviatoric invariant
- LinElasticity
- Implements the linear elasticity equations for small-strain problems
- Sample
Tensor2 - Collects values related to a sample Tensor2
- Samples
Tensor2 - Holds second-order tensor samples
- Samples
Tensor4 - 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§
- IDENTIT
Y2 - Second-order identity tensor in Mandel basis (I)
- IDENTIT
Y4 - 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