matflow.param_classes.load.LoadStep#

class matflow.param_classes.load.LoadStep(total_time, num_increments, direction=None, normal_direction=None, target_def_grad=None, target_def_grad_rate=None, target_vel_grad=None, stress=None, dump_frequency=1)#

Bases: ParameterValue

Boundary conditions for volume element loading.

Parameters:
  • direction (Optional[str]) – # TODO

  • rotation – # TODO

  • total_time (float or int) – Total simulation time.

  • num_increments (int) – Number of simulation increments.

  • target_def_grad (numpy.ma.core.MaskedArray of shape (3, 3), optional) – Deformation gradient aim tensor. Masked values correspond to unmasked values in stress.

  • target_def_grad_rate (Optional[np.typing.ArrayLike]) – Deformation gradient rate tensor. Masked values correspond to unmasked values in stress.

  • stress (numpy.ma.core.MaskedArray of shape (3, 3)) – Stress tensor. Masked values correspond to unmasked values in target_def_grad or target_def_grad_rate.

  • dump_frequency (int, optional) – By default, 1, meaning results are written out every increment.

  • normal_direction (Optional[str]) –

  • target_vel_grad (Optional[np.typing.ArrayLike]) –

Methods

biaxial

Generate a biaxial load step.

dump_to_HDF5_group

Write this parameter value to an HDF5 group.

example_uniaxial

A non-parametrisable example uniaxial load step.

planar_2D

Generate a planar 2D load case normal to the x-, y-, or z-direction.

plane_strain

Generate a plane-strain load step.

prepare_JSON_dump

Prepare this parameter value for serialisation as JSON.

random_2D

Get a random 2D planar load case.

random_3D

save_from_HDF5_group

Extract a parameter value from an HDF5 group.

save_from_JSON

Extract a parameter value from JSON data.

to_dict

Serialise this parameter value as a dictionary.

uniaxial

Generate a uniaxial load step.

uniaxial_cyclic

Attributes

method_args

method_name

strain_like_tensor

type

More user-friendly access to method name.

classmethod biaxial(total_time, num_increments, direction, target_def_grad=None, target_def_grad_rate=None, dump_frequency=1)#

Generate a biaxial load step.

Parameters:
  • total_time (float) –

  • num_increments (int) –

  • direction (str) – String of two characters, ij, where {i,j} ∈ {“x”,”y”,”z”}, corresponding to the two loading directions.

  • target_def_grad (float | None) – Target deformation gradient to achieve along both loading direction components.

  • target_def_grad_rate (float | None) – Target deformation gradient rate to achieve along both loading direction components.

  • dump_frequency (int | None) – By default, 1, meaning results are written out every increment.

Return type:

LoadStep

dump_to_HDF5_group(group)#

Write this parameter value to an HDF5 group.

classmethod example_uniaxial()#

A non-parametrisable example uniaxial load step.

property method_args#
property method_name#
classmethod planar_2D(total_time, num_increments, normal_direction, target_def_grad=None, target_def_grad_rate=None, dump_frequency=1)#

Generate a planar 2D load case normal to the x-, y-, or z-direction.

Parameters:
  • total_time (int | float) –

  • num_increments (int) –

  • normal_direction (str) – A single character, “x”, “y” or “z”, representing the loading plane normal direction.

  • target_def_grad ((nested) list of float or ndarray of shape (2, 2)) – Target deformation gradient components. Either a 2D array, nested list, or a flat list. If passed as a flat list, the first and fourth elements correspond to the normal components of the deformation gradient tensor. The second element corresponds to the first-row, second-column (shear) component and the third element corresponds to the second-row, first-column (shear) component.

  • target_def_grad_rate ((nested) list of float or ndarray of shape (2, 2)) – Target deformation gradient rate components. Either a 2D array, nested list, or a flat list. If passed as a flat list, the first and fourth elements correspond to the normal components of the deformation gradient rate tensor. The second element corresponds to the first-row, second-column (shear) component and the third element corresponds to the second-row, first-column (shear) component.

  • dump_frequency – By default, 1, meaning results are written out every increment.

Return type:

LoadStep

classmethod plane_strain(total_time, num_increments, direction, target_def_grad=None, target_def_grad_rate=None, dump_frequency=1, strain_rate_mode=None)#

Generate a plane-strain load step.

Parameters:
  • total_time

  • num_increments

  • direction – String of two characters, ij, where {i,j} ∈ {“x”,”y”,”z”}. The first character, i, corresponds to the loading direction and the second, j, corresponds to the zero-strain direction. Zero stress will be specified on the remaining direction.

  • target_def_grad (float | None) – Target deformation gradient to achieve along the loading direction component.

  • target_def_grad_rate (float | None) – Target deformation gradient rate to achieve along the loading direction component.

  • dump_frequency (int | None) – By default, 1, meaning results are written out every increment.

  • strain_rate_mode (StrainRateMode | str | None) – One of “def_grad_rate”, “vel_grad”, “vel_grad_approx”. If not specified, default is “def_grad_rate”. Use “vel_grad_approx” for specifying non-mixed boundary conditions.

Return type:

LoadStep

prepare_JSON_dump()#

Prepare this parameter value for serialisation as JSON.

Return type:

Dict

classmethod random_2D(total_time, num_increments, normal_direction, target_def_grad_rate=None, target_def_grad=None, dump_frequency=1)#

Get a random 2D planar load case.

Parameters:
  • total_time (int | float) –

  • num_increments (int) –

  • normal_direction (str) – A single character, “x”, “y” or “z”, representing the loading plane normal direction.

  • target_def_grad_rate (float) – Maximum target deformation gradient rate component. Components will be sampled randomly in the interval [-target_def_grad_rate, +target_def_grad_rate).

  • target_def_grad (float) – Maximum target deformation gradient component. Components will be sampled randomly in the interval [-target_def_grad, +target_def_grad).

  • dump_frequency (int) – By default, 1, meaning results are written out every increment.

Return type:

LoadStep

classmethod random_3D(total_time, num_increments, target_def_grad, dump_frequency=1)#
Return type:

LoadStep

classmethod save_from_HDF5_group(group, param_id, workflow)#

Extract a parameter value from an HDF5 group.

Parameters:

param_id (int) –

classmethod save_from_JSON(data, param_id, workflow)#

Extract a parameter value from JSON data.

Parameters:

param_id (int) –

property strain_like_tensor#
to_dict()#

Serialise this parameter value as a dictionary.

property type#

More user-friendly access to method name.

classmethod uniaxial(total_time, num_increments, direction, target_def_grad_rate=None, target_def_grad=None, dump_frequency=1)#

Generate a uniaxial load step.

Parameters:
  • total_time (float or int) –

  • num_increments (int) –

  • direction (str) – A single character, “x”, “y” or “z”, representing the loading direction.

  • target_def_grad (float) – Target deformation gradient to achieve along the loading direction component.

  • target_def_grad_rate (float) – Target deformation gradient rate to achieve along the loading direction component.

  • dump_frequency (int, optional) – By default, 1, meaning results are written out every increment.

Return type:

LoadStep

classmethod uniaxial_cyclic(max_stress, min_stress, cycle_frequency, num_increments_per_cycle, num_cycles, direction, waveform='sine', dump_frequency=1)#
Parameters:
  • max_stress (float) –

  • min_stress (float) –

  • cycle_frequency (float) –

  • num_increments_per_cycle (int) –

  • num_cycles (int) –

  • direction (str) –

  • waveform (str) –

Return type:

List[LoadStep]