Skip to content

step

gripyth.solving.step

Load steps.

MODULE DESCRIPTION
assembly

Assembly of the system's stiffness matrix.

CLASS DESCRIPTION
StepParameters

Parameters regarding the load steps.

StepVars

Load-step variables.

FUNCTION DESCRIPTION
load_linear

Linear load function.

load_sine

Sine load function.

load_triangle

Triangle load function.

post_iter_update

Update after load step.

pre_iter_update

Update before load step.

remove_unload

Change discretization of loading- and unloading phases.

StepParameters dataclass

Parameters regarding the load steps.

METHOD DESCRIPTION
__init__

Collects solver-step parameters.

__init__

__init__(
    load_fun: NDArray[np.float64],
    ux_final: float = 1.0,
    uy_final: float = 0.0,
    tx_final: float = 0.0,
    ty_final: float = 0.0,
)

Collects solver-step parameters.

Input:

  • n_step: number of solver steps
  • load_fun: Load function used to prepare tx_increment, ty_increment, ux_increment, uy_increment
  • ux_final: final displacement in x-direction
  • uy_final: final displacement in y-direction
  • tx_final: final traction in x-direction
  • ty_final: final traction in y-direction

StepVars dataclass

Load-step variables.

METHOD DESCRIPTION
__init__

Create load-step variables.

ATTRIBUTE DESCRIPTION
F_x

force in x-direction

TYPE: NDArray[float64]

F_y

force in y-direction

TYPE: NDArray[float64]

u_x

displacement in x-direction

TYPE: NDArray[float64]

u_y

displacement in y-direction

TYPE: NDArray[float64]

F_x instance-attribute

F_x: NDArray[float64] = zeros(n_step)

force in x-direction

F_y instance-attribute

F_y: NDArray[float64] = zeros(n_step)

force in y-direction

u_x instance-attribute

u_x: NDArray[float64] = zeros(n_step)

displacement in x-direction

u_y instance-attribute

u_y: NDArray[float64] = zeros(n_step)

displacement in y-direction

__init__

__init__(step_params: StepParameters)

Create load-step variables.

Arrays of length n are allocated for each variable, where n is the number of load steps: step_params.n_step.

load_linear

load_linear(
    n_step: int, n_step_burnin: int = 0
) -> NDArray[np.float64]

Linear load function.

To be used as the load_fun argument of StepParameters().

load_sine

load_sine(
    n_step: int,
    R: float,
    n_step_burnin: int = 0,
    zero_padding: float = 1e-06,
) -> NDArray[np.float64]

Sine load function.

To be used as the load_fun argument of StepParameters().

load_triangle

load_triangle(
    n_step: int,
    R: float,
    n_step_burnin: int = 0,
    zero_padding: float = 1e-06,
) -> NDArray[np.float64]

Triangle load function.

To be used as the load_fun argument of StepParameters().

post_iter_update

post_iter_update(
    i_step: int,
    step_vars: StepVars,
    stiffness_matrix: StiffnessMatrix,
    displacement: NDArray[float64],
    boundaries: NodeBoundaries,
    n_nodes: int,
    step_params: StepParameters,
) -> StepVars

Update after load step.

pre_iter_update

pre_iter_update(
    i_step: int,
    t: float,
    boundaries: NodeBoundaries,
    dofs: Dofs,
    stiffness_matrix: StiffnessMatrix,
    displ: NDArray[float64],
    step_params: StepParameters,
    bc: BoundaryConditions,
    quadrature: Quadrature,
    mesh: Mesh,
) -> tuple[
    NDArray[float64], NDArray[float64], NDArray[float64]
]

Update before load step.

remove_unload

remove_unload(
    load_fun: NDArray[np.float64],
) -> NDArray[np.float64]

Change discretization of loading- and unloading phases.