Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 33 additions & 4 deletions matflow/param_classes/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def example_uniaxial(cls) -> Self:
)

@classmethod
def null(
def zero_deformation(
cls,
total_time: float | int,
num_increments: int,
Expand All @@ -286,7 +286,7 @@ def null(

target_def_grad = np.eye(3)

_method_name = "null"
_method_name = "zero_deformation"
_method_args = {
"total_time": total_time,
"num_increments": num_increments,
Expand All @@ -298,6 +298,30 @@ def null(
target_def_grad=target_def_grad,
)

@classmethod
def zero_normal_stress(
cls,
total_time: float | int,
num_increments: int,
) -> Self:
"""A zero normal stress load step"""

target_def_grad = np.ma.masked_array(np.zeros((3, 3)), mask=np.eye(3))
stress = np.ma.masked_array(np.zeros((3, 3)), mask=np.logical_not(np.eye(3)))

_method_name = "zero_normal_stress"
_method_args = {
"total_time": total_time,
"num_increments": num_increments,
}

return cls(
total_time=total_time,
num_increments=num_increments,
target_def_grad=target_def_grad,
stress=stress,
)

@classmethod
def uniaxial(
cls,
Expand Down Expand Up @@ -1142,9 +1166,14 @@ def create_damask_loading_plan(self) -> list[dict[str, Any]]:
return load_steps

@classmethod
def null(cls, **kwargs) -> Self:
def zero_deformation(cls, **kwargs) -> Self:
"""A zero deformation load case"""
return cls(steps=[LoadStep.null(**kwargs)])
return cls(steps=[LoadStep.zero_deformation(**kwargs)])

@classmethod
def zero_normal_stress(cls, **kwargs) -> Self:
"""A zero normal stress load case"""
return cls(steps=[LoadStep.zero_normal_stress(**kwargs)])

@classmethod
def uniaxial(cls, **kwargs) -> Self:
Expand Down
Loading