Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions tests/cases/cep/cylinder_purkinje_1d3d/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

# **Problem Description**

Simulate the propagation of an electric signal in a cylinder coupled with a network of Purkinje fibers using the ten-Tusscher-Panfilov cell activation model.

Note: Conductivities in the myocardium were selected so that the propagation occurs in the myocardium (if too slow, due to the coarseness of the mesh, the action potential does not propagate beyond the coupled nodes).

<p align="center">
<img src="./activation_10fps.gif" width="600">
</p>

## References
K. H. W. J. ten Tusscher, D. Noble, P. J. Noble, and A. V. Panfilov. A model for human ventricular tissue. American Journal of Physiology-Heart and Circulatory Physiology,
286(4):H1573–H1589, apr 2004.

K. H. W. J. ten Tusscher and A. V. Panfilov. Alternans and spiral breakup in a human
ventricular tissue model. American Journal of Physiology-Heart and Circulatory Physiology,
291(3):H1088–H1100, sep 2006.

3 changes: 3 additions & 0 deletions tests/cases/cep/cylinder_purkinje_1d3d/activation_10fps.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions tests/cases/cep/cylinder_purkinje_1d3d/mesh/cyl-tree.vtu
Git LFS file not shown
Git LFS file not shown
81 changes: 81 additions & 0 deletions tests/cases/cep/cylinder_purkinje_1d3d/mesh/cyl-tree_endnodes.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
1
16
54
62
66
74
84
85
91
99
101
122
123
124
128
129
137
141
149
151
164
167
175
178
203
227
231
239
252
268
283
285
287
291
294
298
302
307
323
326
327
328
329
333
334
338
342
346
350
351
355
363
364
368
369
373
376
378
379
380
381
384
392
396
400
402
409
411
414
415
419
426
430
432
436
438
441
442
443
445
446
3 changes: 3 additions & 0 deletions tests/cases/cep/cylinder_purkinje_1d3d/mesh/cylinder.vtu
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
3 changes: 3 additions & 0 deletions tests/cases/cep/cylinder_purkinje_1d3d/result_001.vtu
Git LFS file not shown
107 changes: 107 additions & 0 deletions tests/cases/cep/cylinder_purkinje_1d3d/solver.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
<?xml version="1.0" encoding="UTF-8" ?>
<svMultiPhysicsFile version="0.1">

<GeneralSimulationParameters>
<Continue_previous_simulation> false </Continue_previous_simulation>
<Number_of_spatial_dimensions> 3 </Number_of_spatial_dimensions>
<Number_of_time_steps> 1 </Number_of_time_steps>
<Time_step_size> 0.1 </Time_step_size>
<Spectral_radius_of_infinite_time_step> 0.50 </Spectral_radius_of_infinite_time_step>
<Searched_file_name_to_trigger_stop> STOP_SIM </Searched_file_name_to_trigger_stop>

<Save_results_to_VTK_format> true </Save_results_to_VTK_format>
<Name_prefix_of_saved_VTK_files> result </Name_prefix_of_saved_VTK_files>
<Increment_in_saving_VTK_files> 1 </Increment_in_saving_VTK_files>
<Start_saving_after_time_step> 1 </Start_saving_after_time_step>

<Increment_in_saving_restart_files> 1 </Increment_in_saving_restart_files>
<Convert_BIN_to_VTK_format> 0 </Convert_BIN_to_VTK_format>

<Verbose> 1 </Verbose>
<Warning> 0 </Warning>
<Debug> 0 </Debug>
</GeneralSimulationParameters>

<Add_mesh name="efib" >
<Set_mesh_as_fibers> true </Set_mesh_as_fibers>
<Mesh_file_path> ./mesh/cyl-tree.vtu </Mesh_file_path>
<Add_face name = "fc_efib">
<End_nodes_face_file_path> ./mesh/cyl-tree_endnodes.txt </End_nodes_face_file_path>
</Add_face>
<Domain_file_path> ./mesh/cyl-tree_domain.dat </Domain_file_path>
<Mesh_scale_factor> 10 </Mesh_scale_factor>
</Add_mesh>

<Add_mesh name="msh" >

<Mesh_file_path> ./mesh/cylinder.vtu </Mesh_file_path>

<Add_face name="endo">
<Face_file_path> ./mesh/mesh-surfaces/cylinder_inner.vtp </Face_file_path>
</Add_face>

<Domain_file_path> ./mesh/cylinder_domain.dat </Domain_file_path>

<Fiber_direction_file_path> ./mesh/cylinder_fiber.vtu </Fiber_direction_file_path>
<Mesh_scale_factor> 10 </Mesh_scale_factor>

</Add_mesh>

<Add_projection name = "fc_efib">
<Project_from_face> endo </Project_from_face>
<Projection_tolerance> -1.0 </Projection_tolerance> <!-- a negative value means using the nearest neighbor, no matter how far it is -->
</Add_projection>


<Add_equation type="CEP" >
<Coupled> true </Coupled>
<Min_iterations> 1 </Min_iterations>
<Max_iterations> 3 </Max_iterations>
<Tolerance> 1e-12 </Tolerance>

<Domain id="1" >
<Electrophysiology_model> TTP </Electrophysiology_model>
<Myocardial_zone> myocardium </Myocardial_zone>
<Isotropic_conductivity> 0.05 </Isotropic_conductivity>
<Anisotropic_conductivity> 0.05 </Anisotropic_conductivity>
<ODE_solver> RK </ODE_solver>
</Domain>

<Domain id="2" >
<Electrophysiology_model> TTP </Electrophysiology_model>
<Myocardial_zone> pfib </Myocardial_zone>
<Isotropic_conductivity> 1.1 </Isotropic_conductivity>
<ODE_solver> RK </ODE_solver>
</Domain>

<Domain id="3" >
<Electrophysiology_model> TTP </Electrophysiology_model>
<Myocardial_zone> pfib </Myocardial_zone>
<Isotropic_conductivity> 1.1 </Isotropic_conductivity>
<ODE_solver> RK </ODE_solver>
<Stimulus type="Istim" >
<Amplitude> -52.0 </Amplitude>
<Start_time> 0.0 </Start_time>
<Duration> 2.0 </Duration>
<Cycle_length> 1000.0 </Cycle_length>
</Stimulus>
</Domain>

<Output type="Spatial" >
<Action_potential> true </Action_potential>
</Output>

<LS type="GMRES" >
<Linear_algebra type="fsils" >
<Preconditioner> fsils </Preconditioner>
</Linear_algebra>
<Max_iterations> 100 </Max_iterations>
<Tolerance> 1e-12 </Tolerance>
<Krylov_space_dimension> 50 </Krylov_space_dimension>
</LS>

</Add_equation>

</svMultiPhysicsFile>


4 changes: 4 additions & 0 deletions tests/test_cep.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ def test_purkinje(n_proc):
run_with_reference(base_folder, test_folder, fields, n_proc)


def test_cylinder_purkinje_1d3d(n_proc):
test_folder = "cylinder_purkinje_1d3d"
run_with_reference(base_folder, test_folder, fields, n_proc)

@pytest.mark.parametrize(
"confs_ecgs",
[
Expand Down
Loading