hookeai.simulators.fetorch.material.models.vmap.lou.LouZhangYoonVMAP

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

Bases: ConstitutiveModel

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

Compatible with vectorized mapping.

_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(cls, stress)[source]

Compute invariants of stress and deviatoric stress.

get_stress_invariants_and_derivatives(cls, n_dim, stress)[source]

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

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

Compute effective stress.

_elastic_step(cls, e_trial_strain_mf, trial_stress_mf, acc_p_strain_old)[source]

Perform elastic step.

_plastic_step(cls, is_elastic_step, e_trial_strain_mf, e_consistent_tangent, acc_p_strain_old, E, G, 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, su_conv_tol, su_max_n_iterations)[source]

Perform plastic step.

_plastic_step_cone(cls, is_elastic_step, e_trial_strain_mf, e_trial_strain, e_consistent_tangent, acc_p_strain_old, 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, su_conv_tol, su_max_n_iterations, small)[source]

Perform plastic step (return-mapping to cone surface).

_get_residual_and_jacobian(cls, 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]
_nr_iteration(cls, residual, jacobian)[source]

Newton-Raphson iteration (return-mapping to cone surface).

_plastic_step_apex(cls, is_elastic_step, e_trial_strain_mf, trial_pressure, acc_p_strain_old, K, alpha, hardening_law, hardening_parameters, a_hardening_law, a_hardening_parameters, b_hardening_law, b_hardening_parameters, su_conv_tol, su_max_n_iterations, small)[source]

Perform plastic step (return-mapping to cone apex).

_nr_iteration_apex(cls, residual, jacobian)[source]

Newton-Raphson iteration (return-mapping to cone apex).

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_apex_handling (bool, default=True) – If True, then apex singularity is handled by means of a purely volumetric return-mapping along the hydrostatic axis. If False, then state update convergence is lost at the apex singularity. Disabling apex handling improves performance (bypassing any apex return-mapping computations), but is only viable if apex handling is not required (e.g., low pressure dependency).

  • is_fixed_yield_parameters (bool, default=True) – If True, then yield surface parameters are assumed to be fixed w.r.t. the accumulated plastic strain. Enabling this option improves performance by avoiding the computation of several derivatives w.r.t. the accumulated plastic strain.

  • 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

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_required_model_parameters

Get required material constitutive model parameters.

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.

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_apex_handling=True, is_fixed_yield_parameters=True, 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_apex_handling (bool, default=True) – If True, then apex singularity is handled by means of a purely volumetric return-mapping along the hydrostatic axis. If False, then state update convergence is lost at the apex singularity. Disabling apex handling improves performance (bypassing any apex return-mapping computations), but is only viable if apex handling is not required (e.g., low pressure dependency).

  • is_fixed_yield_parameters (bool, default=True) – If True, then yield surface parameters are assumed to be fixed w.r.t. the accumulated plastic strain. Enabling this option improves performance by avoiding the computation of several derivatives w.r.t. the accumulated plastic strain.

  • 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 _elastic_step(e_trial_strain_mf, trial_stress_mf, acc_p_strain_old)[source]

Perform elastic step.

Parameters:
  • e_trial_strain_mf (torch.Tensor(1d)) – Elastic trial strain (matricial form).

  • trial_stress_mf (torch.Tensor(1d)) – Trial stress (matricial form).

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

Returns:

elastic_step_output – Elastic step concatenated output data.

Return type:

torch.Tensor(1d)

classmethod _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, is_fixed_yield_parameters)[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) – If True, then adopt associative hardening rule.

  • is_fixed_yield_parameters (bool) – If True, then yield surface parameters are assumed to be fixed w.r.t. the accumulated plastic strain. Enabling this option improves performance by avoiding the computation of several derivatives w.r.t. the accumulated plastic strain.

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.

classmethod _nr_iteration(residual, jacobian)[source]

Newton-Raphson iteration (return-mapping to cone surface).

Parameters:
  • residual (torch.Tensor(1d)) – Residual.

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

Returns:

d_iter – Iterative solution vector.

Return type:

torch.Tensor(1d)

classmethod _nr_iteration_apex(residual, jacobian)[source]

Newton-Raphson iteration (return-mapping to cone apex).

Parameters:
  • residual (torch.Tensor(0d)) – Residual.

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

Returns:

d_iter – Iterative solution vector.

Return type:

torch.Tensor(0d)

classmethod _plastic_step(is_elastic_step, e_trial_strain_mf, trial_stress, e_consistent_tangent, acc_p_strain_old, K, 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, su_conv_tol, su_max_n_iterations, is_apex_handling, apex_switch_tol, is_fixed_yield_parameters, small)[source]

Perform plastic step.

Parameters:
  • is_elastic_step (torch.Tensor(0d)) – If True, then avoid return mapping computations and compute elastic response. This flag avoids non-admissible values stemming from invalid return-mapping problem and consequent runtime errors when computing gradients with autograd.

  • e_trial_strain_mf (torch.Tensor(1d)) – Elastic trial strain (matricial form).

  • trial_stress (torch.Tensor(2d)) – Trial stress.

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

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

  • K (torch.Tensor(0d)) – Bulk modulus.

  • 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) – If True, then adopt associative hardening rule.

  • su_conv_tol (float) – State update convergence tolerance.

  • su_max_n_iterations (int) – State update maximum number of iterations.

  • is_apex_handling (bool) – If True, then apex singularity is handled by means of a purely volumetric return-mapping along the hydrostatic axis. If False, then state update convergence is lost at the apex singularity. Disabling apex handling improves performance (bypassing any apex return-mapping computations), but is only viable if apex handling is not required (e.g., low pressure dependency).

  • apex_switch_tol (float) – Tolerance of criterion to switch to apex return-mapping. Switch is triggered when the trial pressure is greater than (1.0 - apex_switch_tolerance) times the apex pressure. Increasing the tolerance may prevent convergence issues in the surface return-mapping near the apex (namely for large strain increments), but leads to an early switch from surface to apex.

  • is_fixed_yield_parameters (bool) – If True, then yield surface parameters are assumed to be fixed w.r.t. the accumulated plastic strain. Enabling this option improves performance by avoiding the computation of several derivatives w.r.t. the accumulated plastic strain.

  • small (float) – Minimum threshold to handle values close or equal to zero.

Returns:

plastic_step_output – Plastic step concatenated output data.

Return type:

torch.Tensor(1d)

classmethod _plastic_step_apex(is_avoid_return_mapping, e_trial_strain_mf, trial_pressure, acc_p_strain_old, K, hardening_law, hardening_parameters, a_hardening_law, a_hardening_parameters, b_hardening_law, b_hardening_parameters, su_conv_tol, su_max_n_iterations, small)[source]

Perform plastic step (return-mapping to cone apex).

Parameters:
  • is_avoid_return_mapping (torch.Tensor(0d)) – If True, then avoid return mapping computations. This flag avoids non-admissible values stemming from invalid return-mapping problem and consequent runtime errors when computing gradients with autograd.

  • e_trial_strain_mf (torch.Tensor(1d)) – Elastic trial strain (matricial form).

  • trial_pressure (torch.Tensor(0d)) – Trial pressure.

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

  • K (torch.Tensor(0d)) – Bulk modulus.

  • 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.

  • su_conv_tol (float) – State update convergence tolerance.

  • su_max_n_iterations (int) – State update maximum number of iterations.

  • small (float) – Minimum threshold to handle values close or equal to zero.

Returns:

plastic_step_output – Plastic step concatenated output data.

Return type:

torch.Tensor(1d)

classmethod _plastic_step_cone(is_avoid_return_mapping, e_trial_strain_mf, e_trial_strain, e_consistent_tangent, acc_p_strain_old, 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, is_fixed_yield_parameters, su_conv_tol, su_max_n_iterations, small)[source]

Perform plastic step (return-mapping to cone surface).

Parameters:
  • is_avoid_return_mapping (torch.Tensor(0d)) – If True, then avoid return mapping computations. This flag avoids non-admissible values stemming from invalid return-mapping problem and consequent runtime errors when computing gradients with autograd.

  • e_trial_strain_mf (torch.Tensor(1d)) – Elastic trial strain (matricial form).

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

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

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

  • E (torch.Tensor(0d)) – Young modulus.

  • 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) – If True, then adopt associative hardening rule.

  • is_fixed_yield_parameters (bool) – If True, then yield surface parameters are assumed to be fixed w.r.t. the accumulated plastic strain. Enabling this option improves performance by avoiding the computation of several derivatives w.r.t. the accumulated plastic strain.

  • su_conv_tol (float) – State update convergence tolerance.

  • su_max_n_iterations (int) – State update maximum number of iterations.

  • small (float) – Minimum threshold to handle values close or equal to zero.

Returns:

plastic_step_output – Plastic step concatenated output data.

Return type:

torch.Tensor(1d)

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.

classmethod 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(2d)

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

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_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’}

classmethod 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.

classmethod 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.

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.