rvesimulator.additions

rvesimulator.additions.ampitudesampler

Module for generating amplitude curves for history dependent strain

class AmplitudeGenerator(num_dim=3)[source]

Bases: object

amplitude generator

Initialization

__init__(num_dim=3)[source]

Initialization

static generate_control_points(seed, num_control, num_steps, num_dim=3)[source]

generate control points

Parameters:
  • seed (int) – seed

  • num_control (int) – control points number

  • num_steps (int) – number of steps for abaqus simulation

  • num_dim (int, optional) – number of dimension, by default 3

Returns:

x_location of control points, y_location of control points

Return type:

Tuple[Any, Any]

get_amplitude(num_amplitude, num_control, num_steps, arg_name='amplitude', interpolation_method='quadratic', seed=None)[source]

get amplitude curves

Parameters:
  • num_amplitude (int) – number of amplitude, usually 3 or 6

  • num_control (int) – control points number

  • num_steps (int) – num steps of ABAQUS simulation

  • arg_name (str, optional) – name of amplitude, by default “amplitude”

  • interpolation_method (str, optional) – interpolation method, by default “quadratic”

  • seed (any, optional) – seed , by default None

Returns:

_description_

Return type:

pd.DataFrame

static interpolation(x_control, y_control, num_steps, interpolation_method='quadratic')[source]

do interpolation

Parameters:
  • x_control (np.ndarray) – x location of control points

  • y_control (np.ndarray) – y location of control points

  • num_steps (int) – number of steps of abaqus simulation

  • interpolation_method (str, optional) – interpolation method, by default “quadratic”

Returns:

amplitude

Return type:

np.ndarray

plot_amplitude(fig_name='amplitude_path.png', save_fig=False, internal=True, **kwargs)[source]

plot amplitude

Parameters:
  • fig_name (str, optional) – figure name, by default “amplitude_path.png”

  • save_fig (bool, optional) – save figure, by default False

  • internal (bool, optional) – approach this function from internal or external, by default True

Return type:

None

rvesimulator.additions.hardening_law

Material hardening laws for Abaqus default material models

class HardeningLaw[source]

Bases: ABC

Abstract class for the hardening law. The hardening law is defined by the hardening law table. The hardening law table is a 2D array with the first row being the strain and the second row being the stress.

__init__()[source]

Abstract class for the hardening law. The hardening law is defined by the hardening law table. The hardening law table is a 2D array with the first row being the strain and the second row being the stress.

_abc_impl = <_abc._abc_data object>
calculate_hardening_table()[source]
Return type:

List[float]

plot_hardening_law(**kwargs)[source]

plot the hardening law

class LinearHardeningLaw(a=0.2, yield_stress=0.5)[source]

Bases: HardeningLaw

Abstract class for the hardening law. The hardening law is defined by the hardening law table. The hardening law table is a 2D array with the first row being the strain and the second row being the stress.

_abc_impl = <_abc._abc_data object>
calculate_hardening_table()[source]
Return type:

List[float]

class RambergHardeningLaw(a=0.2, b=0.2, yield_stress=0.5)[source]

Bases: HardeningLaw

Abstract class for the hardening law. The hardening law is defined by the hardening law table. The hardening law table is a 2D array with the first row being the strain and the second row being the stress.

_abc_impl = <_abc._abc_data object>
calculate_hardening_table()[source]
Return type:

List[float]

class SwiftHardeningLaw(a=0.2, b=0.2, yield_stress=0.5)[source]

Bases: HardeningLaw

Abstract class for the hardening law. The hardening law is defined by the hardening law table. The hardening law table is a 2D array with the first row being the strain and the second row being the stress.

_abc_impl = <_abc._abc_data object>
calculate_hardening_table()[source]
Return type:

List[float]