public class TensorUtils
extends java.lang.Object
Constructor and Description |
---|
TensorUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
addScaled4thPowerProduct(Matrix6d D,
double s,
Vector3d a)
Adds the scaled tensor product
|
static void |
addScaledIdentity(Matrix6d D,
double s)
Adds a scaled identity to a 4th order constitutive tensor represented as a
6 x 6 matrix.
|
static void |
addScaledIdentityProduct(Matrix6d D,
double s)
Adds the scaled tensor product
|
static void |
addSymmetricIdentityProduct(Matrix6d D,
Matrix3dBase S)
Adds the scaled tensor product
|
static void |
addSymmetricTensorProduct(Matrix6d D,
double s,
Matrix3dBase A,
Matrix3dBase B)
Adds a scaled symmetric tensor product
|
static void |
addSymmetricTensorProduct(Matrix6d D,
Matrix3dBase A,
Matrix3dBase B)
Adds the symmetric tensor product
|
static void |
addSymmetricTensorProduct4(Matrix6d D,
double s,
Matrix3dBase A,
Matrix3dBase B)
Adds the scaled symmetric tensor product
|
static void |
addTensorProduct(Matrix6d D,
double s,
Matrix3dBase A)
Adds the scaled tensor product
|
static void |
addTensorProduct(Matrix6d D,
double s,
Matrix3dBase A,
Matrix3dBase B)
Adds the scaled tensor product
|
static void |
addTensorProduct(Matrix6d D,
Matrix3dBase A)
Adds the tensor product
|
static void |
addTensorProduct4(Matrix6d D,
double s,
Matrix3dBase A)
Adds the scaled symmetric tensor product
|
static void |
createElasticityRotation(Matrix6d T,
Matrix3dBase R)
Creates a 6x6 rotation matrix for transforming the elasticity tensor
From Brown University Notes
|
static void |
createElasticityUnrotation(Matrix6d T,
Matrix3dBase R)
Creates a 6x6 "unrotation" matrix for transforming the elasticity tensor (i.e.
|
static void |
main(java.lang.String[] args) |
static void |
rotateTangent(Matrix6d DR,
Matrix6d D1,
Matrix3dBase R)
Rotates a 6x6 material tangent matrix into a new coordinate system.
|
static void |
rotateTangentOld(Matrix6d DR,
Matrix6d D1,
Matrix3dBase R)
Rotates a 6x6 material tangent matrix into a new coordinate system.
|
static void |
unrotateTangent(Matrix6d DR,
Matrix6d D1,
Matrix3dBase R)
Rotates a 6x6 material tangent matrix into a new coordinate system.
|
static void |
v3DotTens4sDotv3(Matrix3d out,
Vector3d a,
Matrix6d T,
Vector3d b)
Computes the following formula:
v3a .
|
public static void addSymmetricIdentityProduct(Matrix6d D, Matrix3dBase S)
S (X) I + I (X) Sto a symmetric 4th order constitutive tensor represented as a 6 x 6 matrix. Here, S is a symmetric 3 x 3 matrix, I is the 3 x 3 identity matrix, and
X
denotes a tensor product.D
- 6 x 6 matrix representation of the tensor to which
the product is addedS
- matrix for forming the product. This is assumed to be symmetric
and only the upper triangular components are used.public static void addSymmetricTensorProduct(Matrix6d D, Matrix3dBase A, Matrix3dBase B)
A (X) B + B (X) Ato a symmetric 4th order constitutive tensor represented as a 6 x 6 matrix. Here, A and B are 3 x 3 matrices (assumed to be symmetric), and
(X)
denotes a tensor product.
Note that this method sets only the upper triangular components of D.
D
- 6 x 6 matrix representation of the tensor to which
the product is addedA
- first matrix for forming the product, assumed to be
symmetric with only the upper triangular components used.B
- second matrix for forming the product, assumed to be
symmetric with only the upper triangular components used.public static void addSymmetricTensorProduct(Matrix6d D, double s, Matrix3dBase A, Matrix3dBase B)
s (A (X) B + B (X) A)to a symmetric 4th order constitutive tensor represented as a 6 x 6 matrix. Here, A and B are 3 x 3 matrices (assumed to be symmetric), and
(X)
denotes a tensor product.
Note that this method sets only the upper triangular components of D.
D
- 6 x 6 matrix representation of the tensor to which
the product is addeds
- scale factorA
- first matrix for forming the product, assumed to be
symmetric with only the upper triangular components used.B
- second matrix for forming the product, assumed to be
symmetric with only the upper triangular components used.public static void addTensorProduct(Matrix6d D, Matrix3dBase A)
A (X) Ato a symmetric 4th order constitutive tensor represented as a 6 x 6 matrix. Here, A is a 3 x 3 matrix (assumed to be symmetric), and
(X)
denotes a tensor product.
Note that this method sets only the upper triangular components of D.
D
- 6 x 6 matrix representation of the tensor to which
the product is addedA
- matrix for forming the product, assumed to be
symmetric with only the upper triangular components used.public static void addTensorProduct(Matrix6d D, double s, Matrix3dBase A)
s (A (X) A)to a symmetric 4th order constitutive tensor represented as a 6 x 6 matrix. Here, A is a 3 x 3 matrix (assumed to be symmetric), and
(X)
denotes a tensor product.
Note that this method sets only the upper triangular components of D.
D
- 6 x 6 matrix representation of the tensor to which
the product is addeds
- scale factorA
- matrix for forming the product, assumed to be
symmetric with only the upper triangular components used.public static void addTensorProduct(Matrix6d D, double s, Matrix3dBase A, Matrix3dBase B)
s (A (X) B)to a 4th order constitutive tensor represented as a 6 x 6 matrix. Here, A and B are 3 x 3 matrices (assumed to be symmetric), and
(X)
denotes a tensor product.D
- 6 x 6 matrix representation of the tensor to which
the product is addeds
- scale factorA
- matrix for forming the product, assumed to be
symmetric with only the upper triangular components used.B
- matrix for forming the product, assumed to be
symmetric with only the upper triangular components used.public static void addScaledIdentityProduct(Matrix6d D, double s)
s ( I (X) I )to a symmetric 4th order constitutive tensor represented as a 6 x 6 matrix. Here, s is a scalar, I is the 3 x 3 identity matrix, and
X
denotes a tensor product.D
- 6 x 6 matrix representation of the tensor to which
the product is addeds
- scaling factor for the productpublic static void addScaledIdentity(Matrix6d D, double s)
s
- scaling factor for the identitypublic static void addScaled4thPowerProduct(Matrix6d D, double s, Vector3d a)
s ( a X a X a X a )to a symmetric 4th order constitutive tensor represented as a 6 x 6 matrix. Here, s is a scalar, a is a 3-vector, and
X
denotes a tensor product.D
- 6 x 6 matrix representation of the tensor to which
the product is addeds
- scaling factor for the producta
- vector defining the productpublic static void addTensorProduct4(Matrix6d D, double s, Matrix3dBase A)
s (A_ik A_jl + A_il A_jk)/2to a symmetric 4th order constitutive tensor represented as a 6 x 6 matrix. Here, s is a scalar and A is a 3 x 3 matrix (assumed to be symmetric).
Note that this method sets only the upper triangular components of D.
D
- 6 x 6 matrix representation of the tensor to which
the product is addeds
- scaling factor for the productA
- matrix used to form the product (assumed symmetric with
only the upper triangular part used)public static void addSymmetricTensorProduct4(Matrix6d D, double s, Matrix3dBase A, Matrix3dBase B)
s (A_ik B_jl + A_il B_jk)/2 + (B_ik A_jl + B_il A_jk)/2to a symmetric 4th order constitutive tensor represented as a 6 x 6 matrix. Here, s is a scalar and A is a 3 x 3 matrix (assumed to be symmetric).
Note that this method sets only the upper triangular components of D.
D
- 6 x 6 matrix representation of the tensor to which
the product is addeds
- scaling factor for the productA
- first matrix in the product (assumed symmetric with
only the upper triangular part used)B
- second matrix in the product (assumed symmetric with
only the upper triangular part used)public static void rotateTangentOld(Matrix6d DR, Matrix6d D1, Matrix3dBase R)
A'_ijkl = sum R_ai R_bj R_ck R_dl A_abcd
but is optimized and also accomodates the fact that the 6x6 tangent matrix is a reduced version of the general elasticity tensor. It also assumes that the elasticity tensor is symmetric. Each entry in the tangent matrix corresponds to ijkl indices of the elasticity tensor as follows:[ 0000 0011 0022 0001 0012 0002 1100 1111 1122 1101 1112 1102 2200 2211 2222 2201 2212 2202 0100 0111 0122 0101 0112 0102 1200 1211 1222 1201 1212 1202 0200 0211 0222 0201 0212 0202 ]
Note that this indexing convention follows that used in FEBio but is not standard; in particular, the lower and right entries are sometimes interchanged depending on how the stress/strain tensors are vectorized.DR
- result is returned hereD1
- original tangent matrix to rotateR
- rotation matrixpublic static void createElasticityRotation(Matrix6d T, Matrix3dBase R)
T
- output 6x6 matrixR
- 3D rotation matrixpublic static void createElasticityUnrotation(Matrix6d T, Matrix3dBase R)
T
- output 6x6 matrixR
- 3D rotation matrixpublic static void rotateTangent(Matrix6d DR, Matrix6d D1, Matrix3dBase R)
DR
- result is returned hereD1
- original tangent matrix to rotateR
- rotation matrixpublic static void unrotateTangent(Matrix6d DR, Matrix6d D1, Matrix3dBase R)
DR
- result is returned hereD1
- original tangent matrix to rotateR
- rotation to "unrotate"public static void main(java.lang.String[] args)
public static void v3DotTens4sDotv3(Matrix3d out, Vector3d a, Matrix6d T, Vector3d b)
out
- Result to be stored in. 3x3 matrix.a
- Left vector3T
- Symmetrical 4th order tensor. E.g. material stress matrix.b
- Right vector3