hookeai.miscellaneous.materials.lou_convexity.LouZhangYoon

class LouZhangYoon(strain_formulation, problem_type, model_parameters, is_su_float64=True, device_type='cpu')[source]

Bases: ConstitutiveModel

Lou-Zhang-Yoon model with general differentiable yield function.

_name

Constitutive model name.

Type:

str

_strain_type

Material constitutive model strain formulation: infinitesimal strain formulation (‘infinitesimal’), finite strain formulation (‘finite’) or finite strain formulation through kinematic extension (‘finite-kinext’).

Type:

{‘infinitesimal’, ‘finite’, ‘finite-kinext’}

_model_parameters

Material constitutive model parameters.

Type:

dict

_n_dim

Problem number of spatial dimensions.

Type:

int

_comp_order_sym

Strain/Stress components symmetric order.

Type:

list

_comp_order_nsym

Strain/Stress components nonsymmetric order.

Type:

list

_is_su_float64

If True, then state update is locally computed in floating-point double precision. If False, then default floating-point precision is assumed.

Type:

bool

_device_type

Type of device on which torch.Tensor is allocated.

Type:

{‘cpu’, ‘cuda’}

_device

Device on which torch.Tensor is allocated.

Type:

torch.device

get_required_model_parameters()[source]

Get required material constitutive model parameters.

state_init(self)[source]

Get initialized material constitutive model state variables.

state_update(self, inc_strain, state_variables_old)[source]

Perform material constitutive model state update.

get_stress_invariants(self, stress)[source]

Compute invariants of stress and deviatoric stress.

get_stress_invariants_and_derivatives(self, n_dim, stress)[source]

Compute stress invariants and derivatives w.r.t. stress.

get_effective_stress(self, stress, yield_a, yield_b, yield_c, yield_d)[source]

Compute effective stress.

get_residual_and_jacobian(self, n_dim, comp_order_sym, e_strain, e_trial_strain, acc_p_strain, acc_p_strain_old, inc_p_mult, e_consistent_tangent, init_yield_stress, hardening_law, hardening_parameters, a_hardening_law, a_hardening_parameters, b_hardening_law, b_hardening_parameters, c_hardening_law, c_hardening_parameters, d_hardening_law, d_hardening_parameters, is_associative_hardening=False)[source]

Compute state update residuals and Jacobian matrix.

get_numerical_jacobian(self, n_dim, comp_order_sym, e_strain,                            e_trial_strain, acc_p_strain, acc_p_strain_old,                            inc_p_mult, e_consistent_tangent,                            init_yield_stress,                            hardening_law, hardening_parameters,

a_hardening_law, a_hardening_parameters, b_hardening_law, b_hardening_parameters, c_hardening_law, c_hardening_parameters, d_hardening_law, d_hardening_parameters, is_associative_hardening=False, is_verbose=False)

Compute state update Jacobian matrix with finite differences.

compute_num_derivatives(self, n_dim, comp_order_sym, e_strain,

e_consistent_tangent)

Compute numerical derivatives by finite differences.

convexity_return_mapping(cls, yield_c, yield_d)[source]

Perform convexity return-mapping.

compute_convex_boundary(cls, n_theta=360)[source]

Compute convexity domain boundary.

directional_convex_boundary(cls, theta, r_lower=0.0, r_upper=4.0, search_tol=1e-6)[source]

Compute convexity domain boundary along given angular direction.

check_yield_surface_convexity(cls, yield_c, yield_d)[source]

Check yield surface convexity.

plot_convexity_boundary(cls, convex_boundary, parameters_paths=None, is_plot_legend=False, save_dir=None, is_save_fig=False, is_stdout_display=False, is_latex=False)[source]

Plot convexity domain boundary.

Constitutive model constructor.

Parameters:
  • strain_formulation ({'infinitesimal', 'finite'}) – Problem strain formulation.

  • problem_type (int) – Problem type: 2D plane strain (1), 2D plane stress (2), 2D axisymmetric (3) and 3D (4).

  • model_parameters (dict) – Material constitutive model parameters.

  • is_su_float64 (bool, default=True) – If True, then state update is locally computed in floating-point double precision. If False, then default floating-point precision is assumed.

  • device_type ({'cpu', 'cuda'}, default='cpu') – Type of device on which torch.Tensor is allocated.

List of Public Methods

check_yield_surface_convexity

Check yield surface convexity.

compute_convex_boundary

Compute convexity domain boundary.

compute_num_derivatives

Compute numerical derivatives by finite differences.

convexity_return_mapping

Perform convexity return-mapping.

directional_convex_boundary

Compute convexity domain boundary along given angular direction.

get_device

Get device on which torch.Tensor is allocated.

get_effective_stress

Compute effective stress.

get_model_parameters

Get material constitutive model parameters.

get_name

Get material constitutive model name.

get_numerical_jacobian

Compute state update Jacobian matrix with finite differences.

get_required_model_parameters

Get required material constitutive model parameters.

get_residual_and_jacobian

Compute state update residuals and Jacobian matrix.

get_strain_type

Get material constitutive model strain formulation.

get_stress_invariants

Compute invariants of stress and deviatoric stress.

get_stress_invariants_and_derivatives

Compute stress invariants and derivatives w.r.t.

plot_convexity_boundary

Plot convexity domain boundary.

set_device

Set device on which torch.Tensor is allocated.

state_init

Get initialized material constitutive model state variables.

state_update

Perform material constitutive model state update.

Methods

__init__(strain_formulation, problem_type, model_parameters, is_su_float64=True, device_type='cpu')[source]

Constitutive model constructor.

Parameters:
  • strain_formulation ({'infinitesimal', 'finite'}) – Problem strain formulation.

  • problem_type (int) – Problem type: 2D plane strain (1), 2D plane stress (2), 2D axisymmetric (3) and 3D (4).

  • model_parameters (dict) – Material constitutive model parameters.

  • is_su_float64 (bool, default=True) – If True, then state update is locally computed in floating-point double precision. If False, then default floating-point precision is assumed.

  • device_type ({'cpu', 'cuda'}, default='cpu') – Type of device on which torch.Tensor is allocated.

classmethod check_yield_surface_convexity(yield_c, yield_d)[source]

Check yield surface convexity.

Geometry-Inspired Numerical Convex Analysis (GINCA) method.

Parameters:
  • yield_c (torch.Tensor(0d)) – Yield parameter.

  • yield_d (torch.Tensor(0d)) – Yield parameter.

Returns:

is_convex – If True, then yield surface is convex, False otherwise.

Return type:

bool

classmethod compute_convex_boundary(n_theta=360)[source]

Compute convexity domain boundary.

Parameters:

n_theta (int, default=360) – Number of discrete angular coordinates to discretize the convexity boundary domain.

Returns:

convex_boundary – Convexity domain boundary stored as torch.Tensor(2d) of shape (n_point, 2), where each point is stored as (yield_c, yield_d).

Return type:

torch.Tensor(2d)

compute_num_derivatives(n_dim, comp_order_sym, e_strain, e_consistent_tangent)[source]

Compute numerical derivatives by finite differences.

Parameters:
  • n_dim (int) – Problem number of spatial dimensions.

  • comp_order_sym (list) – Strain/Stress components symmetric order.

  • e_strain (torch.Tensor(2d)) – Elastic strain.

  • e_consistent_tangent (torch.Tensor(4d)) – Elastic consistent tangent modulus.

classmethod convexity_return_mapping(yield_c, yield_d)[source]

Perform convexity return-mapping.

For a given set (c, d), the convexity return-mapping works as follows:

  1. If the yield parameters (c, d) lie inside the convexity domain (yield surface is convex), then they are kept unchanged;

  2. If the yield parameters (c, d) lie outside the convexity domain (yield surface is not convex), then they are updated to the convexity domain boundary point along the same angular direction.

Parameters:
  • yield_c (torch.Tensor(0d)) – Yield parameter.

  • yield_d (torch.Tensor(0d)) – Yield parameter.

Returns:

  • is_convex (bool) – If True, then yield surface is convex, False otherwise.

  • yield_c (torch.Tensor(0d)) – Yield parameter.

  • yield_d (torch.Tensor(0d)) – Yield parameter.

classmethod directional_convex_boundary(theta, r_lower=0.0, r_upper=5.0, search_tol=1e-06)[source]

Compute convexity domain boundary along given angular direction.

Parameters:
  • theta (torch.Tensor(0d)) – Angular coordinate in yield parameters domain (radians).

  • r_lower (float, default=0.0) – Initial searching radius lower bound.

  • r_upper (float, default=5.0) – Initial searching radius upper bound.

  • search_tol (float, default = 1e-6) – Searching window tolerance.

Returns:

  • yield_c (torch.Tensor(0d)) – Yield parameter.

  • yield_d (torch.Tensor(0d)) – Yield parameter.

get_device()

Get device on which torch.Tensor is allocated.

Returns:

  • device_type ({‘cpu’, ‘cuda’}) – Type of device on which torch.Tensor is allocated.

  • device (torch.device) – Device on which torch.Tensor is allocated.

get_effective_stress(stress, yield_a, yield_b, yield_c, yield_d)[source]

Compute effective stress.

Parameters:
  • stress (torch.Tensor(2d)) – Stress.

  • yield_a (torch.Tensor(0d)) – Yield parameter.

  • yield_b (torch.Tensor(0d)) – Yield parameter.

  • yield_c (torch.Tensor(0d)) – Yield parameter.

  • yield_d (torch.Tensor(0d)) – Yield parameter.

Returns:

effective_stress – Effective stress.

Return type:

torch.Tensor(0d)

get_model_parameters()

Get material constitutive model parameters.

Returns:

model_parameters – Material constitutive model parameters.

Return type:

dict

get_name()

Get material constitutive model name.

Returns:

name – Material constitutive model name.

Return type:

str

get_numerical_jacobian(n_dim, comp_order_sym, e_strain, e_trial_strain, acc_p_strain, acc_p_strain_old, inc_p_mult, e_consistent_tangent, init_yield_stress, hardening_law, hardening_parameters, a_hardening_law, a_hardening_parameters, b_hardening_law, b_hardening_parameters, c_hardening_law, c_hardening_parameters, d_hardening_law, d_hardening_parameters, is_associative_hardening=False, is_verbose=False)[source]

Compute state update Jacobian matrix with finite differences.

Parameters:
  • n_dim (int) – Problem number of spatial dimensions.

  • comp_order_sym (list) – Strain/Stress components symmetric order.

  • e_strain (torch.Tensor(2d)) – Elastic strain.

  • e_trial_strain (torch.Tensor(2d)) – Elastic trial strain.

  • acc_p_strain (torch.Tensor(0d)) – Accumulated plastic strain.

  • acc_p_strain_old (torch.Tensor(0d)) – Last converged accumulated plastic strain.

  • inc_p_mult (torch.Tensor(0d)) – Incremental plastic multiplier.

  • e_consistent_tangent (torch.Tensor(4d)) – Elastic consistent tangent modulus.

  • init_yield_stress (torch.Tensor(0d)) – Initial yield stress.

  • hardening_law (function) – Hardening law.

  • hardening_parameters (dict) – Hardening law parameters.

  • a_hardening_law (function) – Yield parameter hardening law.

  • a_hardening_parameters (function) – Yield parameter hardening law parameters.

  • b_hardening_law (function) – Yield parameter hardening law.

  • b_hardening_parameters (function) – Yield parameter hardening law parameters.

  • c_hardening_law (function) – Yield parameter hardening law.

  • c_hardening_parameters (function) – Yield parameter hardening law parameters.

  • d_hardening_law (function) – Yield parameter hardening law.

  • d_hardening_parameters (function) – Yield parameter hardening law parameters.

  • is_associative_hardening (bool, default=False) – If True, then adopt associative hardening rule.

  • is_verbose (bool, default=False) – If True, enable verbose output.

Returns:

num_jacobian – Jacobian matrix.

Return type:

torch.Tensor(2d)

static get_required_model_parameters()[source]

Get required material constitutive model parameters.

Model parameters:

  • ‘elastic_symmetry’ : Elastic symmetry (str, {‘isotropic’, ‘transverse_isotropic’, ‘orthotropic’, ‘monoclinic’, ‘triclinic’})

  • ‘elastic_moduli’ : Elastic moduli (dict, {‘Eijkl’: float})

  • ‘euler_angles’Euler angles (degrees) sorted according with Bunge

    convention (tuple[float])

  • ‘hardening_law’ : Isotropic hardening law (function)

  • ‘hardening_parameters’ : Isotropic hardening law parameters (dict)

  • ‘a_hardening_law’: Yield parameter hardening law (function)

  • ‘a_hardening_parameters’: Yield parameter hardening parameters (dict)

  • ‘b_hardening_law’: Yield parameter hardening law (function)

  • ‘b_hardening_parameters’: Yield parameter hardening parameters (dict)

  • ‘c_hardening_law’: Yield parameter hardening law (function)

  • ‘c_hardening_parameters’: Yield parameter hardening parameters (dict)

  • ‘d_hardening_law’: Yield parameter hardening law (function)

  • ‘d_hardening_parameters’: Yield parameter hardening parameters (dict)

  • ‘is_associative_hardening’: Assume associative hardening rule (bool)

Notes:

  • Associative hardening rule is only admissible if the yield parameters a, b, c and d are constant, i.e., do not depend on the accumulated plastic strain through the corresponding hardening laws

Returns:

model_parameters_names – Material constitutive model parameters names (str).

Return type:

tuple[str]

get_residual_and_jacobian(n_dim, comp_order_sym, e_strain, e_trial_strain, acc_p_strain, acc_p_strain_old, inc_p_mult, e_consistent_tangent, init_yield_stress, hardening_law, hardening_parameters, a_hardening_law, a_hardening_parameters, b_hardening_law, b_hardening_parameters, c_hardening_law, c_hardening_parameters, d_hardening_law, d_hardening_parameters, is_associative_hardening=False)[source]

Compute state update residuals and Jacobian matrix.

Parameters:
  • n_dim (int) – Problem number of spatial dimensions.

  • comp_order_sym (list) – Strain/Stress components symmetric order.

  • e_strain (torch.Tensor(2d)) – Elastic strain.

  • e_trial_strain (torch.Tensor(2d)) – Elastic trial strain.

  • acc_p_strain (torch.Tensor(0d)) – Accumulated plastic strain.

  • acc_p_strain_old (torch.Tensor(0d)) – Last converged accumulated plastic strain.

  • inc_p_mult (torch.Tensor(0d)) – Incremental plastic multiplier.

  • e_consistent_tangent (torch.Tensor(4d)) – Elastic consistent tangent modulus.

  • init_yield_stress (torch.Tensor(0d)) – Initial yield stress.

  • hardening_law (function) – Hardening law.

  • hardening_parameters (dict) – Hardening law parameters.

  • a_hardening_law (function) – Yield parameter hardening law.

  • a_hardening_parameters (function) – Yield parameter hardening law parameters.

  • b_hardening_law (function) – Yield parameter hardening law.

  • b_hardening_parameters (function) – Yield parameter hardening law parameters.

  • c_hardening_law (function) – Yield parameter hardening law.

  • c_hardening_parameters (function) – Yield parameter hardening law parameters.

  • d_hardening_law (function) – Yield parameter hardening law.

  • d_hardening_parameters (function) – Yield parameter hardening law parameters.

  • is_associative_hardening (bool, default=False) – If True, then adopt associative hardening rule.

Returns:

  • residual_1 (torch.Tensor(2d)) – First residual.

  • residual_2 (torch.Tensor(2d)) – Second residual.

  • residual_3 (torch.Tensor(2d)) – Third residual.

  • jacobian (torch.Tensor(2d)) – Jacobian matrix.

get_strain_type()

Get material constitutive model strain formulation.

Returns:

strain_type – Material constitutive model strain formulation: infinitesimal strain formulation (‘infinitesimal’), finite strain formulation (‘finite’) or finite strain formulation through kinematic extension (‘finite-kinext’).

Return type:

{‘infinitesimal’, ‘finite’, ‘finite-kinext’}

get_stress_invariants(stress)[source]

Compute invariants of stress and deviatoric stress.

Parameters:

stress (torch.Tensor(2d)) – Stress.

Returns:

  • i1 (torch.Tensor(0d)) – First (principal) invariant of stress tensor.

  • i2 (torch.Tensor(0d)) – Second (principal) invariant of stress tensor.

  • i3 (torch.Tensor(0d)) – Third (principal) invariant of stress tensor.

  • j1 (torch.Tensor(0d)) – First invariant of deviatoric stress tensor.

  • j2 (torch.Tensor(0d)) – Second invariant of deviatoric stress tensor.

  • j3 (torch.Tensor(0d)) – Third invariant of deviatoric stress tensor.

get_stress_invariants_and_derivatives(n_dim, stress)[source]

Compute stress invariants and derivatives w.r.t. stress.

Parameters:
  • n_dim (int) – Problem number of spatial dimensions.

  • stress (torch.Tensor(2d)) – Stress.

Returns:

  • i1 (torch.Tensor(0d)) – First (principal) invariant of stress tensor.

  • i2 (torch.Tensor(0d)) – Second (principal) invariant of stress tensor.

  • i3 (torch.Tensor(0d)) – Third (principal) invariant of stress tensor.

  • j1 (torch.Tensor(0d)) – First invariant of deviatoric stress tensor.

  • j2 (torch.Tensor(0d)) – Second invariant of deviatoric stress tensor.

  • j3 (torch.Tensor(0d)) – Third invariant of deviatoric stress tensor.

  • di1_dstress (torch.Tensor(1d)) – First-order derivative of first invariant of stress tensor w.r.t. stress.

  • dj2_dstress (torch.Tensor(1d)) – First-order derivative of second invariant of deviatoric stress tensor w.r.t. stress.

  • dj3_dstress (torch.Tensor(1d)) – First-order derivative of third invariant of deviatoric stress tensor w.r.t. stress.

  • d2j2_dstress2 (torch.Tensor(1d)) – Second-order derivative of second invariant of deviatoric stress tensor w.r.t. stress.

  • d2j3_dstress2 (torch.Tensor(1d)) – Second-order derivative of third invariant of deviatoric stress tensor w.r.t. stress.

classmethod plot_convexity_boundary(convex_boundary, parameters_paths=None, is_path_arrows=True, rect_search_domain=None, is_plot_legend=False, save_dir=None, is_save_fig=False, is_stdout_display=False, is_latex=False)[source]

Plot convexity domain boundary.

Parameters:
  • convex_boundary (torch.Tensor(2d)) – Convexity domain boundary stored as torch.Tensor(2d) of shape (n_point, 2), where each point is stored as (yield_c, yield_d).

  • parameters_paths (dict, default=None) – For each yield parameters path (key, str), store a torch.Tensor(2d) (item, torch.Tensor) of shape (n_point, 2), where each point is stored as (yield_c, yield_d).

  • is_path_arrows (bool, default=True) – If True, then yield parameters paths include directional arrows along the path, False otherwise.

  • rect_search_domain (tuple, default=None) – Rectangular search domain boundary defined by the corresponding limits along each direction as ((x_min, x_max), (y_min, y_max)).

  • is_plot_legend (bool, default=False) – If True, then plot legend.

  • save_dir (str, default=None) – Directory where data set plots are saved.

  • is_save_fig (bool, default=False) – Save figure.

  • is_stdout_display (bool, default=False) – True if displaying figure to standard output device, False otherwise.

  • is_latex (bool, default=False) – If True, then render all strings in LaTeX. If LaTex is not available, then this option is silently set to False and all input strings are processed to remove $(…)$ enclosure.

set_device(device_type)

Set device on which torch.Tensor is allocated.

Parameters:
  • device_type ({'cpu', 'cuda'}) – Type of device on which torch.Tensor is allocated.

  • device (torch.device) – Device on which torch.Tensor is allocated.

state_init()[source]

Get initialized material constitutive model state variables.

Constitutive model state variables:

  • e_strain_mf

    • Infinitesimal strains: Elastic infinitesimal strain tensor (matricial form).

    • Symbol: \(\boldsymbol{\varepsilon^{e}}\)

  • acc_p_strain

    • Accumulated plastic strain.

    • Symbol: \(\bar{\varepsilon}^{p}\)

  • strain_mf

    • Infinitesimal strains: Infinitesimal strain tensor (matricial form).

    • Symbol: \(\boldsymbol{\varepsilon}\)

  • stress_mf

    • Infinitesimal strains: Cauchy stress tensor (matricial form).

    • Symbol: \(\boldsymbol{\sigma}\)

  • is_plastic

    • Plastic step flag.

  • is_su_fail

    • State update failure flag.


Returns:

state_variables_init – Initialized material constitutive model state variables.

Return type:

dict

state_update(inc_strain, state_variables_old)[source]

Perform material constitutive model state update.

Parameters:
  • inc_strain (torch.Tensor(2d)) – Incremental strain second-order tensor.

  • state_variables_old (dict) – Last converged constitutive model material state variables.

Returns:

  • state_variables (dict) – Material constitutive model state variables.

  • consistent_tangent_mf (torch.Tensor(2d)) – Material constitutive model consistent tangent modulus stored in matricial form.