stress.hpp
Overview
Functions for stress transformations between different configurations (Cauchy, first and second Piola-Kirchhoff, Kirchhoff, Biot, etc.). Handles both push-forward and pull-back operations.
API Reference
-
arma::mat Cauchy2PKI(const arma::mat &sigma, const arma::mat &F, const double &J = 0.)
Provides the first Piola Kirchoff stress tensor \( \mathbf{\Sigma} \) from the Cauchy stress tensor \( \mathbf{\sigma} \).
Returns a matrix, that is the first Piola-Kirchoff stress tensor from
the Cauchy stress tensor \( \mathbf{\sigma} \)
the transformation gradient \( \mathbf{F} \) and its determinant \( \mathbf{J} \) (this last one is optional, if not indicated, it will be computed from \( \mathbf{F} \))
Example:
mat matrand = randu(3,3); mat sigma = 0.5*(matrand + matrand.t()); mat F = eye(3,3); mat PKI = Cauchy2PKI(sigma, F);
- Parameters:
sigma – (3x3 arma::mat) the Cauchy stress tensor \( \mathbf{\sigma} \)
F – (3x3 arma::mat) transformation gradient \( \mathbf{F} \)
J – (double, optional) determinant of the transformation gradient \( \mathbf{F} \)
- Returns:
(3x3 arma::mat) the first Piola Kirchoff stress tensor \( \mathbf{\Sigma} \)
-
arma::mat Cauchy2Biot(const arma::mat &sigma, const arma::mat &F, const arma::mat &R = arma::zeros(3, 3), const double &J = 0.)
Provides the Biot stress tensor \( \mathbf{T} \) from the Cauchy stress tensor \( \mathbf{\sigma} \).
Returns a matrix, that is the Biot stress tensor from
the Cauchy stress tensor \( \mathbf{\sigma} \)
the transformation gradient \( \mathbf{F} \) and its determinant \( \mathbf{J} \) (this last one is optional, if not indicated, it will be computed from \( \mathbf{F} \)) Note that the first Piola Kirchoff stress tensor \( \mathbf{\Sigma} \) is computed, and the Biot stress is obtained through
\[ \mathbf{T} = \frac{1}{2} \left( \mathbf{R}^T \cdot \mathbf{\Sigma} + \mathbf{\Sigma}^T \cdot \mathbf{R} \right) \]
Example:
mat matrand = randu(3,3); mat sigma = 0.5*(matrand + matrand.t()); mat F = eye(3,3); mat Biot = Cauchy2Biot(sigma, F);
- Parameters:
sigma – (3x3 arma::mat) the Cauchy stress tensor \( \mathbf{\sigma} \)
F – (3x3 arma::mat) transformation gradient \( \mathbf{F} \)
R – (3x3 arma::mat, optional) rotation part of the transformation gradient \( \mathbf{R} \)
J – (double, optional) determinant of the transformation gradient \( \mathbf{F} \)
- Returns:
(3x3 arma::mat) the Biot stress tensor \( \mathbf{T} \)
-
arma::mat Cauchy2PKII(const arma::mat &sigma, const arma::mat &F, const double &J = 0.)
Provides the second Piola Kirchoff stress tensor \( \mathbf{S} \) from the Cauchy stress tensor \( \mathbf{\sigma} \).
Returns a matrix, that is the first Piola-Kirchoff stress tensor from
the Cauchy stress tensor \( \mathbf{\sigma} \)
the transformation gradient \( \mathbf{F} \) and its determinant \( \mathbf{J} \) (this last one is optional, if not indicated, it will be computed from \( \mathbf{F} \))
Example:
mat matrand = randu(3,3); mat sigma = 0.5*(matrand + matrand.t()); mat F = eye(3,3); mat PKII = Cauchy2PKII(sigma, F);
- Parameters:
sigma – (3x3 arma::mat) the Cauchy stress tensor \( \mathbf{\sigma} \)
F – (3x3 arma::mat) transformation gradient \( \mathbf{F} \)
J – (double, optional) determinant of the transformation gradient \( \mathbf{F} \)
- Returns:
(3x3 arma::mat) the second Piola Kirchoff stress tensor \( \mathbf{S} \)
-
arma::mat Cauchy2Kirchoff(const arma::mat &sigma, const arma::mat &F, const double &J = 0.)
Provides the Kirchoff stress tensor \( \mathbf{\tau} \) from the Cauchy stress tensor \( \mathbf{\sigma}\).
Returns a matrix, that is the Kirchoff stress tensor from
the Cauchy stress tensor \( \mathbf{\sigma} \)
the transformation gradient \( \mathbf{F} \) and its determinant \( \mathbf{J} \) (this last one is optional, if not indicated, it will be computed from \( \mathbf{F} \))
Example:
mat matrand = randu(3,3); mat sigma = 0.5*(matrand + matrand.t()); mat F = eye(3,3); mat tau = Cauchy2Kirchoff(sigma, F);
- Parameters:
sigma – (3x3 arma::mat) the Cauchy stress tensor \( \mathbf{\sigma} \)
F – (3x3 arma::mat) transformation gradient \( \mathbf{F} \)
J – (double, optional) determinant of the transformation gradient \( \mathbf{F} \)
- Returns:
(3x3 arma::mat) the Kirchoff stress tensor \( \mathbf{\tau} \)
-
arma::vec Cauchy2Kirchoff(const arma::vec &sigma, const arma::mat &F, const double &J = 0.)
Provides the Kirchoff stress tensor \( \mathbf{\tau} \) from the Cauchy stress tensor \( \mathbf{\sigma}\).
Returns a vector (considering Voigt Notation), that is the Kirchoff stress tensor from
the Cauchy stress tensor \( \mathbf{\sigma} \)
the transformation gradient \( \mathbf{F} \) and its determinant \( \mathbf{J} \) (this last one is optional, if not indicated, it will be computed from \( \mathbf{F} \))
Example:
mat matrand = randu(3,3); vec sigma = m2t_stress(0.5*(matrand + matrand.t())); mat F = eye(3,3); vec tau = Cauchy2Kirchoff(sigma, F);
- Parameters:
sigma – (arma::vec size=6) the Cauchy stress tensor \( \mathbf{\sigma} \)
F – (3x3 arma::mat) transformation gradient \( \mathbf{F} \)
J – (double, optional) determinant of the transformation gradient \( \mathbf{F} \)
- Returns:
(arma::vec size=6) the Kirchoff stress tensor \( \mathbf{\tau} \)
-
arma::mat Kirchoff2Cauchy(const arma::mat &tau, const arma::mat &F, const double &J = 0.)
Provides the Cauchy stress tensor \( \mathbf{\sigma}\) from the Kirchoff stress tensor \( \mathbf{\tau} \).
Returns a matrix, that is the Cauchy stress tensor from
the Kirchoff stress tensor \( \mathbf{\tau} \)
the transformation gradient \( \mathbf{F} \) and its determinant \( \mathbf{J} \) (this last one is optional, if not indicated, it will be computed from \( \mathbf{F} \))
Example:
mat matrand = randu(3,3); mat tau = 0.5*(matrand + matrand.t()); mat F = eye(3,3); mat sigma = Kirchoff2Cauchy(tau, F);
- Parameters:
tau – (3x3 arma::mat) the Kirchoff stress tensor \( \mathbf{\tau} \)
F – (3x3 arma::mat) transformation gradient \( \mathbf{F} \)
J – (double, optional) determinant of the transformation gradient \( \mathbf{F} \)
- Returns:
(3x3 arma::mat) the Cauchy stress tensor \( \mathbf{\sigma} \)
-
arma::vec Kirchoff2Cauchy(const arma::vec &tau, const arma::mat &F, const double &J = 0.)
Provides the Cauchy stress tensor \( \mathbf{\sigma}\) from the Kirchoff stress tensor \( \mathbf{\tau} \).
Returns a vecto, that is the Cauchy stress tensor from
the Kirchoff stress tensor \( \mathbf{\tau} \)
the transformation gradient \( \mathbf{F} \) and its determinant \( \mathbf{J} \) (this last one is optional, if not indicated, it will be computed from \( \mathbf{F} \))
Example:
mat matrand = randu(3,3); vec tau = m2t_stress(0.5*(matrand + matrand.t())); mat F = eye(3,3); mat sigma = Kirchoff2Cauchy(tau, F);
- Parameters:
tau – (arma::vec size=6) the Kirchoff stress tensor \( \mathbf{\tau} \)
F – (3x3 arma::mat) transformation gradient \( \mathbf{F} \)
J – (double, optional) determinant of the transformation gradient \( \mathbf{F} \)
- Returns:
(arma::vec size=6) the Cauchy stress tensor \( \mathbf{\sigma} \)
-
arma::mat Kirchoff2PKI(const arma::mat &tau, const arma::mat &F, const double &J = 0.)
Provides the first Piola-Kirchoff stress tensor \( \mathbf{\Sigma} \) from the Cauchy stress tensor \( \mathbf{\sigma}\).
Returns a matrix, that is the first Piola-Kirchoff stress tensor from
the Kirchoff stress tensor \( \mathbf{\tau} \)
the transformation gradient \( \mathbf{F} \) and its determinant \( \mathbf{J} \) (this last one is optional, if not indicated, it will be computed from \( \mathbf{F} \))
Example:
mat matrand = randu(3,3); mat tau = 0.5*(matrand + matrand.t()); mat F = eye(3,3); mat PKI = Kirchoff2PKI(tau, F);
- Parameters:
tau – (3x3 arma::mat) the Kirchoff stress tensor \( \mathbf{\tau} \)
F – (3x3 arma::mat) transformation gradient \( \mathbf{F} \)
J – (double, optional) determinant of the transformation gradient \( \mathbf{F} \)
- Returns:
(3x3 arma::mat) the first Piola-Kirchoff stress tensor \( \mathbf{\Sigma} \)
-
arma::mat Kirchoff2PKII(const arma::mat &tau, const arma::mat &F, const double &J = 0.)
Provides the second Piola-Kirchoff stress tensor \( \mathbf{S} \) from the Cauchy stress tensor \( \mathbf{\sigma}\).
Returns a matrix, that is the second Piola-Kirchoff stress tensor from
the Kirchoff stress tensor \( \mathbf{\tau} \)
the transformation gradient \( \mathbf{F} \) and its determinant \( \mathbf{J} \) (this last one is optional, if not indicated, it will be computed from \( \mathbf{F} \))
Example:
mat matrand = randu(3,3); mat tau = 0.5*(matrand + matrand.t()); mat F = eye(3,3); mat PKII = Kirchoff2PKII(tau, F);
- Parameters:
tau – (3x3 arma::mat) the Kirchoff stress tensor \( \mathbf{\tau} \)
F – (3x3 arma::mat) transformation gradient \( \mathbf{F} \)
J – (double, optional) determinant of the transformation gradient \( \mathbf{F} \)
- Returns:
(3x3 arma::mat) the second Piola-Kirchoff stress tensor \( \mathbf{S} \)
-
arma::vec Kirchoff2PKII(const arma::vec &tau, const arma::mat &F, const double &J = 0.)
Provides the second Piola-Kirchoff stress tensor \( \mathbf{S} \) from the Cauchy stress tensor \( \mathbf{\sigma} \).
Returns a vector, that is the second Piola-Kirchoff stress tensor from
the Kirchoff stress tensor \( \mathbf{\tau} \)
the transformation gradient \( \mathbf{F} \) and its determinant \( J \) (this last one is optional, if not indicated, it will be computed from \( \mathbf{F} \))
Example:
mat matrand = randu(3,3); vec tau = m2t_stress(0.5*(matrand + matrand.t())); mat F = eye(3,3); vec PKII = Kirchoff2PKII(tau, F);
- Parameters:
tau – (arma::vec size=6)) the Kirchoff stress tensor \( \mathbf{\tau} \)
F – (3x3 arma::mat) transformation gradient \( \mathbf{F} \)
J – (double, optional) determinant of the transformation gradient \( \textrm{det}\,\mathbf{F} \)
- Returns:
(arma::vec size=6) the second Piola-Kirchoff stress tensor \( \mathbf{S} \)
-
arma::mat PKI2Kirchoff(const arma::mat &Sigma, const arma::mat &F, const double &J = 0.)
Provides the Kirchoff stress tensor \( \mathbf{\tau} \) from the first Piola-Kirchoff stress tensor \( \mathbf{\Sigma} \).
Returns a matrix, that is the Kirchoff stress tensor from
the first Piola-Kirchoff stress tensor \( \mathbf{\Sigma} \)
the transformation gradient \( \mathbf{F} \) and its determinant \( J \) (this last one is optional, if not indicated, it will be computed from \( \mathbf{F} \))
Example:
mat PKI = randu(3,3); mat F = eye(3,3); mat tau = PKI2Kirchoff(PKI, F);
- Parameters:
Sigma – (3x3 arma::mat) first Piola-Kirchoff stress tensor \( \mathbf{\Sigma} \)
F – (3x3 arma::mat) transformation gradient \( \mathbf{F} \)
J – (double, optional) determinant of the transformation gradient \( \textrm{det}\,\mathbf{F} \)
- Returns:
(3x3 arma::mat) the Kirchoff stress tensor \( \mathbf{\tau} \)
-
arma::mat PKII2Kirchoff(const arma::mat &S, const arma::mat &F, const double &J = 0.)
Provides the Kirchoff stress tensor \( \mathbf{\tau} \) from the second Piola-Kirchoff stress tensor \( \mathbf{S} \).
Returns a matrix, that is the Kirchoff stress tensor from
the second Piola-Kirchoff stress tensor \( \mathbf{S} \)
the transformation gradient \( \mathbf{F} \) and its determinant \( J \) (this last one is optional, if not indicated, it will be computed from \( \mathbf{F} \))
Example:
mat matrand = randu(3,3); mat PKII = 0.5*(matrand + matrand.t()); mat F = eye(3,3); mat tau = PKII2Kirchoff(PKII, F);
- Parameters:
S – (3x3 arma::mat) the second Piola-Kirchoff stress tensor \( \mathbf{S} \)
F – (3x3 arma::mat) transformation gradient \( \mathbf{F} \)
J – (double, optional) determinant of the transformation gradient \( \textrm{det}\,\mathbf{F} \)
- Returns:
(3x3 arma::mat) the Kirchoff stress tensor \( \mathbf{\tau} \)
-
arma::mat PKI2Cauchy(const arma::mat &Sigma, const arma::mat &F, const double &J = 0.)
Provides the Cauchy stress tensor \( \mathbf{\sigma} \) from the first Piola-Kirchoff stress tensor \( \mathbf{\Sigma} \).
Returns a matrix, that is the Cauchy stress tensor from
the first Piola-Kirchoff stress tensor \( \mathbf{\Sigma} \)
the transformation gradient \( \mathbf{F} \) and its determinant \( J \) (this last one is optional, if not indicated, it will be computed from \( \mathbf{F} \))
Example:
mat PKI = randu(3,3); mat F = eye(3,3); mat sigma = PKI2Cauchy(PKI, F);
- Parameters:
Sigma – (3x3 arma::mat) first Piola-Kirchoff stress tensor \( \mathbf{\Sigma} \)
F – (3x3 arma::mat) transformation gradient \( \mathbf{F} \)
J – (double, optional) determinant of the transformation gradient \( \textrm{det}\,\mathbf{F} \)
- Returns:
(3x3 arma::mat) the Cauchy stress tensor \( \mathbf{\sigma} \)
-
arma::mat PKII2Cauchy(const arma::mat &S, const arma::mat &F, const double &J = 0.)
Provides the Cauchy stress tensor \( \mathbf{\sigma} \) from the second Piola-Kirchoff stress tensor \( \mathbf{S} \).
Returns a matrix, that is the Cauchy stress tensor from
the second Piola-Kirchoff stress tensor \( \mathbf{S} \)
the transformation gradient \( \mathbf{F} \) and its determinant \( J \) (this last one is optional, if not indicated, it will be computed from \( \mathbf{F} \))
Example:
mat matrand = randu(3,3); mat PKII = 0.5*(matrand + matrand.t()); mat F = eye(3,3); mat sigma = PKII2Cauchy(PKII, F);
- Parameters:
S – (3x3 arma::mat) the second Piola-Kirchoff stress tensor \( \mathbf{S} \)
F – (3x3 arma::mat) transformation gradient \( \mathbf{F} \)
J – (double, optional) determinant of the transformation gradient \( \textrm{det}\,\mathbf{F} \)
- Returns:
(3x3 arma::mat) the Cauchy stress tensor \( \mathbf{\sigma} \)