:class:`BaseSimulator` ====================== .. py: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. .. !! processed by numpydoc !! .. py:currentmodule:: BaseSimulator Overview -------- .. tab-set:: .. tab-item:: Methods .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~load_default_settings` - Load default simulation settings. * - :py:attr:`~compute_fibers` - Compute the fiber sheet directions on the ventricles. * - :py:attr:`~compute_uhc` - Compute universal heart coordinates system. * - :py:attr:`~compute_right_atrial_fiber` - Compute right atrium fiber with the LDRBD method. * - :py:attr:`~compute_left_atrial_fiber` - Compute left atrium fiber with the LDRBD method. * - :py:attr:`~run_laplace_problem` - Run the Laplace-Dirichlet (thermal) problem in LS-DYNA. .. tab-item:: Attributes .. list-table:: :header-rows: 0 :widths: auto * - :py:attr:`~model` - Heart model to simulate. * - :py:attr:`~root_directory` - Root simulation directory. * - :py:attr:`~settings` - Simulation settings. Import detail ------------- .. code-block:: python from ansys.health.heart.simulator import BaseSimulator Attribute detail ---------------- .. py:attribute:: model :type: ansys.health.heart.models.HeartModel Heart model to simulate. .. !! processed by numpydoc !! .. py:attribute:: root_directory :value: '' Root simulation directory. .. !! processed by numpydoc !! .. py:attribute:: settings :type: ansys.health.heart.settings.settings.SimulationSettings Simulation settings. .. !! processed by numpydoc !! Method detail ------------- .. py:method:: load_default_settings() -> ansys.health.heart.settings.settings.SimulationSettings Load default simulation settings. .. !! processed by numpydoc !! .. py:method:: compute_fibers(method: Literal['LSDYNA', 'D-RBM'] = 'LSDYNA', rotation_angles: dict = None) Compute the fiber sheet directions on the ventricles. :Parameters: **method** : :obj:`Literal`\["LSDYNA", "D-RBM"], default: "LSDYNA" Method for computing the fiber orientation. **rotation_angles** : :class:`python:dict`, default: :data:`python:None` Rotation angle alpha and beta. .. !! processed by numpydoc !! .. py:method:: compute_uhc() -> pyvista.UnstructuredGrid Compute universal heart coordinates system. .. !! processed by numpydoc !! .. py:method:: 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. **top** : :class:`python:list`\[:class:`python:list`\[:class:`python:float`]], default: :data:`python: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: :obj:`pv.UnstructuredGrid` Right atrium with fiber coordinates system in this format: ``e_l``, ``e_t`` and ``e_n``. .. rubric:: Notes The method is described in `Modeling cardiac muscle fibers in ventricular and atrial electrophysiology simulations `_ .. !! processed by numpydoc !! .. py:method:: compute_left_atrial_fiber(appendage: list[float] = None) -> pyvista.UnstructuredGrid Compute left atrium fiber with the LDRBD method. :Parameters: **appendage** : :class:`python:list`\[:class:`python:float`], default: :data:`python:None` Coordinates of the appendage. If no value is specified, the cap named ``appendage`` is used. :Returns: :obj:`pv.UnstructuredGrid` Left atrium with fiber coordinates system in this format: ``e_l``, ``e_t`` and ``e_n``. .. rubric:: Notes The method is described in `Modeling cardiac muscle fibers in ventricular and atrial electrophysiology simulations `. .. !! processed by numpydoc !! .. py:method:: 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. **kwargs** : :class:`python:dict` Landmarks to create the nodeset. Keys can be ``laa``, ``raa``, and ``top``'. :Returns: :obj:`UnstructuredGrid` UnstructuredGrid with array to map data back to the full mesh. .. !! processed by numpydoc !!