MechanicsSimulator#

class ansys.health.heart.simulator.MechanicsSimulator(model: ansys.health.heart.models.HeartModel, dyna_settings: ansys.health.heart.settings.settings.DynaSettings, simulation_directory: pathlib = '', initial_stress: bool = True)#

Bases: BaseSimulator

Mechanics simulator with imposed active stress.

Overview#

simulate

Launch the main mechanical simulation.

compute_stress_free_configuration

Compute the stress-free configuration of the model.

initial_stress

If stress-free computation is taken into consideration.

Import detail#

from ansys.health.heart.simulator import MechanicsSimulator

Attribute detail#

MechanicsSimulator.initial_stress = True#

If stress-free computation is taken into consideration.

Method detail#

MechanicsSimulator.simulate(folder_name: str = 'main-mechanics', zerop_folder: str | None = None, auto_post: bool = True, extra_k_files: list[str] | None = None)#

Launch the main mechanical simulation.

Parameters:
folder_namestr, default: 'main-mechanics'

Simulation folder name.

zerop_folderstr | None, default: None

Folder containing stress-free simulation. If None, the zeropressure folder under the root directory is used.

auto_postbool, default: True

Whether to run postprocessing scripts.

extra_k_fileslist[str], default: None

User-defined k files.

MechanicsSimulator.compute_stress_free_configuration(folder_name='zeropressure', overwrite: bool = True, extra_k_files: list[str] | None = None)#

Compute the stress-free configuration of the model.

Parameters:
folder_namestr, default: 'zeropressure'

Simulation folder name.

overwritebool, default: True

Whether to run simulation and overwrite files.

extra_k_fileslist[str], default: None

User-defined k files.