LV_Base
LV_Base#
- class project_heart.lv.modules.lv_base.LV_Base(enums={}, *args, **kwargs)#
- create_spring_rim_bc(bc_name: str, surface: str, dist_from_c: float = 10.0, height: float = 2, r_alpha: float = 0.8) dict #
Adds information for boundary condition at defined surface. The current setup creates a ‘rim’ geometry at a distance from the surface’s center and relates the ‘rim’ nodes with the surface nodes based on closest distances. This setup is used to create springs during FEA simulations as BCs.
- Parameters
dist_from_c (float, optional) – Perpendicular distance determining the offset from surface’s center. Defaults to 10.0.
height (float, optional) – Height of the rim. Defaults to 2.
r_alpha (float, optional) – Percentage of found surface’s radius. Will adjust the radius of the rim based on surface_r*r_alpha. Defaults to 0.8.
- Returns
Rim data. Keys are defined based on LV_RIM Enum.
- Return type
dict
- est_centroid() numpy.ndarray #
Estimates the centroid of the geometry based on surface mesh.
- Returns
[x,y,z] coordinates of center
- Return type
np.ndarray
- set_aortic_info(aortic_id=LV_SURFS.AORTIC, border_aortic_id=LV_SURFS.BORDER_AORTIC, add_virtual_nodes=True) None #
- Sets aortic information for other computations, such as boundary conditions. Creates ‘aortic_info’ dictionary with radius, center, and mesh ids. If border information is provided, it adds information for the border as well.
If ‘add_virtual_nodes’ is set to true, it will create virtual node information based on respective centers.
- Parameters
aortic_id (int, str or Enum, optional) – identification of aortic nodeset. Defaults to LV_SURFS.AORTIC.
border_aortic_id (int, str or Enum, optional) – identification of border aortic nodeset. Defaults to LV_SURFS.BORDER_AORTIC.
add_virtual_nodes (bool, optional) – Whether to create virtual node information.
- set_base_info(base_id=LV_SURFS.BASE, add_virtual_nodes=True) None #
Sets base information for other computations, such as boundary conditions. Creates ‘base_info’ dictionary with radius, center, and mesh ids. If ‘add_virtual_nodes’ is set to true, it will create virtual node information at center.
- Parameters
base_id (int, str or Enum, optional) – identification of base nodeset. Defaults to LV_SURFS.base.
add_virtual_nodes (bool, optional) – Whether to create virtual node information.
- set_mitral_info(mitral_id=LV_SURFS.MITRAL, border_mitral_id=LV_SURFS.BORDER_MITRAL, add_virtual_nodes=True) None #
Sets mitral information for other computations, such as boundary conditions. Creates ‘mitral_info’ dictionary with radius, center, and mesh ids. if border information is provided, it adds information for the border as well. If ‘add_virtual_nodes’ is set to true, it will create virtual node information based on respective centers.
- Parameters
mitral_id (int, str or Enum, optional) – identification of mitral nodeset. Defaults to LV_SURFS.MITRAL.
border_mitral_id (int, str or Enum, optional) – identification of border mitral nodeset. Defaults to LV_SURFS.BORDER_MITRAL.
add_virtual_nodes (bool, optional) – Whether to create virtual node information.