hookeai.miscellaneous.materials.compare_material_models.DruckerPragerVMAP

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

Bases: ConstitutiveModel

Drucker-Prager constitutive model with isotropic strain hardening.

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.

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

get_device

Get device on which torch.Tensor is allocated.

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.

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 _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 _nr_iteration_apex(inc_vol_p_strain, residual, alpha, beta, K, H)[source]

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

Parameters:
  • inc_vol_p_strain (torch.Tensor(0d)) – Incremental plastic volumetric strain.

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

  • alpha (torch.Tensor(0d)) – Ratio between yield surface cohesion parameter and yield surface pressure parameter.

  • beta (torch.Tensor(0d)) – Ratio between yield surface cohesion parameter and plastic flow rule pressure parameter.

  • K (torch.Tensor(0d)) – Bulk modulus. Plastic flow rule pressure parameter.

  • H (torch.Tensor(0d)) – Hardening modulus.

Returns:

inc_vol_p_strain – Incremental plastic volumetric strain.

Return type:

torch.Tensor(0d)

classmethod _nr_iteration_surface(inc_p_mult, residual, G, K, etaf, etay, xi, H)[source]

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

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

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

  • G (torch.Tensor(0d)) – Shear modulus.

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

  • xi (torch.Tensor(0d)) – Yield surface cohesion parameter.

  • etay (torch.Tensor(0d)) – Yield surface pressure parameter.

  • etaf (torch.Tensor(0d)) – Plastic flow rule pressure parameter.

  • H (torch.Tensor(0d)) – Hardening modulus.

Returns:

inc_p_mult – Incremental plastic multiplier.

Return type:

torch.Tensor(0d)

classmethod _plastic_step(is_elastic_step, e_trial_strain_mf, trial_pressure, dev_trial_stress_mf, j2_dev_trial_stress, acc_p_strain_old, G, K, xi, etay, etaf, alpha, beta, hardening_law, hardening_parameters, soid_mf, su_conv_tol, su_max_n_iterations, 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_pressure (torch.Tensor(0d)) – Trial pressure.

  • dev_trial_stress_mf (torch.Tensor(1d)) – Deviatoric trial stress (matricial form).

  • j2_dev_trial_stress (torch.Tensor(0d)) – Second invariant of deviatoric trial stress.

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

  • G (torch.Tensor(0d)) – Shear modulus.

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

  • xi (torch.Tensor(0d)) – Yield surface cohesion parameter.

  • etay (torch.Tensor(0d)) – Yield surface pressure parameter.

  • etaf (torch.Tensor(0d)) – Plastic flow rule pressure parameter.

  • alpha (torch.Tensor(0d)) – Ratio between yield surface cohesion parameter and yield surface pressure parameter.

  • beta (torch.Tensor(0d)) – Ratio between yield surface cohesion parameter and plastic flow rule pressure parameter.

  • hardening_law (function) – Hardening law.

  • hardening_parameters (dict) – Hardening law parameters.

  • soid_mf (torch.Tensor(1d)) – Second-order identity tensor (matricial form).

  • 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_apex(is_elastic_step, e_trial_strain_mf, trial_pressure, dev_trial_stress_mf, acc_p_strain_old, G, K, alpha, beta, H, hardening_law, hardening_parameters, soid_mf, su_conv_tol, su_max_n_iterations, small)[source]

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

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_pressure (torch.Tensor(0d)) – Trial pressure.

  • dev_trial_stress_mf (torch.Tensor(1d)) – Deviatoric trial stress (matricial form).

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

  • G (torch.Tensor(0d)) – Shear modulus.

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

  • alpha (torch.Tensor(0d)) – Ratio between yield surface cohesion parameter and yield surface pressure parameter.

  • beta (torch.Tensor(0d)) – Ratio between yield surface cohesion parameter and plastic flow rule pressure parameter.

  • H (torch.Tensor(0d)) – Hardening modulus.

  • hardening_law (function) – Hardening law.

  • hardening_parameters (dict) – Hardening law parameters.

  • soid_mf (torch.Tensor(1d)) – Second-order identity tensor (matricial form).

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

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]).

  • ‘yield_cohesion_parameter’ : Yield surface cohesion parameter

  • ‘yield_pressure_parameter’ : Yield surface pressure parameter

  • ‘flow_pressure_parameter’ : Plastic flow rule pressure parameter

  • ‘hardening_law’ : Isotropic hardening law (function)

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

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

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

    • Finite strains: Elastic spatial logarithmic strain tensor (matricial form).

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

  • acc_p_strain

    • Accumulated plastic strain.

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

  • strain_mf

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

    • Finite strains: Spatial logarithmic strain tensor (matricial form).

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

  • stress_mf

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

    • Finite strains: Kirchhoff stress tensor (matricial form) within state_update(), first Piola-Kirchhoff stress tensor (matricial form) otherwise.

    • Symbol: \(\boldsymbol{\sigma}\) / (\(\boldsymbol{\tau}\), \(\boldsymbol{P}\))

  • is_plastic

    • Plastic step flag.

  • is_su_fail

    • State update failure flag.

  • is_apex_return

    • Return-mapping to apex 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.