In openCARP—the open-source cardiac electrophysiology simulation environment—the gregion (geometry region) function is the primary mechanism used to assign distinct tissue electrical conductivities to different parts of a 3D computational mesh.
When managing complex cardiac meshes (such as an organ-scale heart model containing ventricles, atria, and blood pools), you cannot treat the entire geometry as a uniform block. The gregion configuration parameters bridge the structural mesh elements with the mathematical equations governing multi-physics bidomain or monodomain simulations. 🔑 Core Concepts of gregion
A cardiac mesh is composed of elements (like tetrahedra or hexahedra), each assigned a numerical tag or ID during the mesh generation phase (often using meshtool). The gregion parameters group these tags together to define uniform electrical properties across those specific regions.
num_gregions: Defines the total number of unique conductivity regions in your simulation.
gregion[X].ID: Maps the specific integer tag(s) from your mesh files to the gregion configuration array index [X].
gregion[X].num_IDs: Specifies how many different mesh tags share this exact conductivity setting. ⚡ Managing Electrical Conductivities
For every defined geometry region, you must specify how electricity flows along different tissue axes. Cardiac tissue is highly anisotropic, meaning electrical signals travel faster along the length of myocardial fibers than across them. gregion handles this using orthogonal direction parameters: Longitudinal (_l): Along the fiber direction.
Transverse (_t): Perpendicular to the fiber direction, within the sheet plane. Normal (_n): Cross-sheet direction.
In a standard bidomain simulation, you will configure both intracellular (_i) and extracellular (_e) tensors for a single region:
gregion[0].g_il / gregion[0].g_el (Intracellular / Extracellular longitudinal conductivity)
gregion[0].g_it / gregion[0].g_et (Intracellular / Extracellular transverse conductivity)
gregion[0].g_in / gregion[0].g_en (Intracellular / Extracellular normal conductivity) Handling Conductive Baths 🌊
If your experiment includes an extra-cardiac fluid environment (like a blood pool or a torso tank fluid), it behaves as an isotropic medium without cell membranes. You assign it a dedicated gregion and use the bath parameter: gregion[1].g_bath = 0.7 💻 A Practical Code Example
When constructing an in silico experiment via the Python-based carputils abstraction layer, you pass these parameters directly into your command line arguments or Python setup script.
Below is an example configuring a mesh with two distinct regions: a myocardial tissue block (Tag 1) and a surrounding bath (Tag 2):
# Define that the mesh has 2 unique conductivity configurations num_gregions = 2 # Region 0: Myocardial tissue (Tag 1 in the mesh file) gregion[0].name = “VentricularMuscle” gregion[0].num_IDs = 1 gregion[0].ID = 1 gregion[0].g_il = 0.118 # Intracellular Longitudinal gregion[0].g_it = 0.118 # Intracellular Transverse gregion[0].g_el = 0.4262 # Extracellular Longitudinal gregion[0].g_et = 0.4262 # Extracellular Transverse # Region 1: Isotropic perfusion bath (Tag 2 in the mesh file) gregion[1].name = “BathFluid” gregion[1].num_IDs = 1 gregion[1].ID = 2 gregion[1].g_bath = 0.7 # Isotropic fluid conductivity Use code with caution. 🛠️ Common Pitfalls & Best Practices openCARP parameters
Leave a Reply