homopy.stiffness_plot module
Created on Thu Apr 28 16:24:54 2022
@author: nicolas.christ@kit.edu
3D and Polar plot of Young’s modulus body based on [Boehlke2001].
- class homopy.stiffness_plot.ElasticPlot(USEVOIGT=False)[source]
Bases:
Tensor
Plot class to visualize tensorial results.
- Parameters:
USEVOIGT (boolean) – Flag which determines the usage of Voigt (USEVOIGT=True), or Normalized Voigt / Mandel (USEVOIGT=False).
- Variables:
~ElasticPlot.USEVOIGT (boolean) – Flag which determines the usage of Voigt (USEVOIGT=True), or Normalized Voigt / Mandel (USEVOIGT=False).
- matrix_reduction(matrix)[source]
Return the reduced notation (Voigt or normalized Voigt) depending on which one is ought to be used.
- Parameters:
matrix (ndarray of shape (3, 3)) – Tensor in regular tensor notation.
- Returns:
ndarray of shape (6,) – Tensor in Voigt or normalized Voigt notation.
- static _get_reciprocal_E(didi, S)[source]
Return the reciprocal of Young’s modulus (compliance) in the direction of di.
- Parameters:
didi (ndarray of shape (6,)) – Directional tensor.
S (ndarray of shape (6, 6)) – Compliance tensor in Voigt or normalized Voigt notation.
- Returns:
float – Scalar compliance value in direction of di.
- _get_E(di, S)[source]
Return Young’s modulus in the direction of di.
- Parameters:
di (ndarray of shape (3,)) – Directional vector.
S (ndarray of shape (6, 6)) – Compliance tensor in Voigt or normalized Voigt notation.
- Returns:
float – Scalar stiffness value in direction of didi.
- static _dir_vec(phi, theta)[source]
Return directional vector based on angular parametrization.
- Parameters:
phi (float) – First angle in [0, 2*pi].
theta (float) – Second angle in [0, pi].
- Returns:
ndarray of shape (3,) – Directional vector.
- plot_E_body(C, o, p, bound=None, rcount=200, ccount=200)[source]
Plot stiffness body.
- Parameters:
C (ndarray of shape (6, 6)) – Stiffness tensor in Voigt or normalized Voigt notation.
o (int) – Number of discretization steps for first angle.
p (int) – Number of discretization steps for second angle.
bound (array of shape (3,), default=None) – Boundaries for the 3 axis for the visualization. If None, boundaries are set automatically.
rcount (int) – Maximum number of samples used in first angle direction. If the input data is larger, it will be downsampled (by slicing) to these numbers of points. Defaults to 200.
ccount (int) – Maximum number of samples used in second angle direction. If the input data is larger, it will be downsampled (by slicing) to these numbers of points. Defaults to 200.
- polar_plot_E_body(C, o, angle, plot=True)[source]
Plot slice of stiffness body.
- Parameters:
C (ndarray of shape (6, 6)) – Stiffness tensor in Voigt or normalized Voigt notation.
o (int) – Number of discretization steps for first angle.
angle (float) – Angle to determine the angular orientation of the slice. Does not work yet.
plot (boolean) – Determines whether the plot will be displayed. If False, only the metadata of the plot will be returned.
- Returns:
rad (ndarray of shape (n+1,)) – Angular positions for polar plot.
E (ndarray of shape (n+1,)) – Sitffness at corresponding angle.
- static polar_plot(data)[source]
Polar plot of multiple Stiffness bodies in one plot. For this use the data generated from polar_plot_E_body or polar_plot_laminate with plot=False.
- Parameters:
data (list) – Data to be plotted with angluar position, stiffness and an optional string for the label in the plot.
- polar_plot_laminate(laminate_stiffness, o, limit=None, plot=True)[source]
Polar plot stiffness body of laminate. This method should be used for laminate results for the Halpin-Tsai homogenization.
- Parameters:
laminate_stiffness (ndarray of shape (3, 3)) – Planar stiffness matrix in Voigt or normalized Voigt notation.
o (int) – Number of discretization steps for first angle.
limit (float) – Limit of radial axis in polar plot.
plot (boolean) – Determines whether the plot will be displayed. If False, only the metadata of the plot will be returned.
- Returns:
rad (ndarray of shape (n+1,)) – Angular positions for polar plot.
E (ndarray of shape (n+1,)) – Sitffness at corresponding angle.
- get_E_laminate(C, phi)[source]
Return Young’s modulus of laminate as a function of angle omega.
- Parameters:
C (ndarray of shape (3, 3)) – Stiffness of laminate in default (orthonormal) coordinate system.
phi (float) – Angle of orientation in radians.
- Returns:
E (float) – Young’s modulus in angle direction