BaseSimulator#

class ansys.health.heart.simulator.BaseSimulator(model: ansys.health.heart.models.HeartModel, dyna_settings: ansys.health.heart.settings.settings.DynaSettings = None, simulation_directory: pathlib = '')#

Base class for the simulator.

Overview#

load_default_settings

Load default simulation settings.

compute_fibers

Compute the fiber sheet directions on the ventricles.

compute_uhc

Compute universal heart coordinates system.

compute_right_atrial_fiber

Compute right atrium fiber with the LDRBD method.

compute_left_atrial_fiber

Compute left atrium fiber with the LDRBD method.

run_laplace_problem

Run the Laplace-Dirichlet (thermal) problem in LS-DYNA.

model

Heart model to simulate.

root_directory

Root simulation directory.

settings

Simulation settings.

Import detail#

from ansys.health.heart.simulator import BaseSimulator

Attribute detail#

BaseSimulator.model: ansys.health.heart.models.HeartModel#

Heart model to simulate.

BaseSimulator.root_directory = ''#

Root simulation directory.

BaseSimulator.settings: ansys.health.heart.settings.settings.SimulationSettings#

Simulation settings.

Method detail#

BaseSimulator.load_default_settings() ansys.health.heart.settings.settings.SimulationSettings#

Load default simulation settings.

BaseSimulator.compute_fibers(method: Literal['LSDYNA', 'D-RBM'] = 'LSDYNA', rotation_angles: dict = None)#

Compute the fiber sheet directions on the ventricles.

Parameters:
methodLiteral[“LSDYNA”, “D-RBM”], default: “LSDYNA”

Method for computing the fiber orientation.

rotation_anglesdict, default: None

Rotation angle alpha and beta.

BaseSimulator.compute_uhc() pyvista.UnstructuredGrid#

Compute universal heart coordinates system.

BaseSimulator.compute_right_atrial_fiber(appendage: list[float], top: list[list[float]] = None) pyvista.UnstructuredGrid#

Compute right atrium fiber with the LDRBD method.

Parameters:
appendage: list[float]

Coordinates of appendage.

toplist[list[float]], default: None

List of nodal coordinates to define the top path.

The top path is a set of nodes connecting the superior (SVC) and inferior (IVC) vena cava. For more information, see the “Notes” section.

The default method (top=None) might not work for some anatomical structures. In such cases, you can define the start and end points by providing a list of coordinates like this: [[x1, y1, z1], [x2, y2, z2]]. These two nodes should be located on the SVC and IVC rings, approximately at the 12 o’clock position.

You can also add an intermediate point to enforce the geodesic path, like this: [[x1, y1, z1], [x3, y3, z3], [x2, y2, z2]].

Returns:
pv.UnstructuredGrid

Right atrium with fiber coordinates system in this format: e_l, e_t and e_n.

Notes

The method is described in Modeling cardiac muscle fibers in ventricular and atrial electrophysiology simulations

BaseSimulator.compute_left_atrial_fiber(appendage: list[float] = None) pyvista.UnstructuredGrid#

Compute left atrium fiber with the LDRBD method.

Parameters:
appendagelist[float], default: None

Coordinates of the appendage. If no value is specified, the cap named appendage is used.

Returns:
pv.UnstructuredGrid

Left atrium with fiber coordinates system in this format: e_l, e_t and e_n.

Notes

The method is described in Modeling cardiac muscle fibers in ventricular and atrial electrophysiology simulations .

BaseSimulator.run_laplace_problem(export_directory, type: Literal['uvc', 'la_fiber', 'ra_fiber'], **kwargs)#

Run the Laplace-Dirichlet (thermal) problem in LS-DYNA.

Parameters:
export_directory: str

LS-DYNA directory

type: str

Simulation type.

kwargsdict

Landmarks to create the nodeset. Keys can be laa, raa, and top’.

Returns:
UnstructuredGrid

UnstructuredGrid with array to map data back to the full mesh.