forked from SimVascular/simvascular.github.io-archive
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocsSimCardio.html
More file actions
2160 lines (1702 loc) · 135 KB
/
docsSimCardio.html
File metadata and controls
2160 lines (1702 loc) · 135 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>SimVascular Docs</title>
<link href="css/bootstrap.css" rel="stylesheet" type="text/css" />
<link href="css/shop-item.css" rel="stylesheet" type="text/css" />
<link href="css/codestyle.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="font-awesome-4.1.0/css/font-awesome.min.css">
<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/1.5.2/css/ionicons.min.css">
<link rel="shortcut icon" href="img/favicon.ico">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-main-collapse">
<i class="fa fa-bars" id="barIcon"></i>
</button>
<a class="navbar-brand" id="brandName" href="index.html">
<img src="img/svlogo/svLogoSmallText.png" alt="...">
</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse navbar-right navbar-main-collapse">
<ul class="nav navbar-nav">
<!-- USER GUIDES -->
<li>
<a href="#" id="dropdownMenu1" data-toggle="dropdown">
<b><span class="fa fa-user"></span> User Guides</b>
</a>
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
<li role="presentation"><a role="menuitem" tabindex="-1" href="docsInstallation.html"><b><span class="fa fa-sign-in fa-rotate-90"></span> Installation</b></a></li>
<li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="docsQuickGuide.html"><b><span class="icon ion-ios7-bolt"></span> Quick Guide</b></a></li>
<li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="docsModelGuide.html"><b><span class="icon ion-settings"></span> Modeling</b></a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="docsMeshing.html"><b><span class="icon ion-ios7-keypad"></span> Meshing</b></a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="docsFlowSolver.html"><b><span class="icon ion-play"></span> Simulation</b></a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="docssvFSI.html"><b><span class="icon ion-plus-round"></span> svFSI</b></a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="docsSimCardio.html"><b><span class="icon ion-plus-round"></span> SimCardio </b></a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="docsROMSimulation.html"><b><span class="icon ion-plus-round"></span> ROM Simulation</b></a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="docsGenBC.html"><b><span class="icon ion-refresh"></span> GenBC</b></a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="docsPythonInterface.html"><b><span class="icon ion-refresh"></span> Python Interface</b></a></li>
</ul>
</li>
<!-- CLINCAL CASES -->
<li>
<a href="#" id="dropdownMenu1" data-toggle="dropdown">
<b><i class="fa fa-stethoscope"></i> Clinical Cases</b>
</a>
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
<li role="presentation"><a role="menuitem" tabindex="-1" href="clinicalCase3.html"><b><span class="fa fa-user-md"></span> Coronary Normal</b></a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="clinicalCase1.html"><b><span class="fa fa-user-md"></span> Aortofemoral Normal - 1</b></a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="clinicalCase2.html"><b><span class="fa fa-user-md"></span> Aortofemoral Normal - 2</b></a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="clinicalCase4.html"><b><span class="fa fa-user-md"></span> Healthy Pulmonary</b></a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://simtk.org/projects/sv_tests"><b><span class="fa fa-user-md"></span> All demo projects</b></a></li>
</ul>
</li>
<!-- DEVELOPER GUIDES -->
<li>
<a href="#" id="dropdownMenu1" data-toggle="dropdown">
<b><span class="fa fa-caret-square-o-right"></span> Developer Guides</b>
</a>
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
<li role="presentation"><a role="menuitem" tabindex="-1" href="docsCompile.html"><b><span class="fa fa-file-text-o"></span> Compile Source Code</b></a></li>
</ul>
</li>
<!-- svCOMMUNITY -->
<li>
<a href="#" id="dropdownMenu1" data-toggle="dropdown">
<b><i class="fa fa-users"></i> svCommunity</b>
</a>
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://simtk.org/forums/viewforum.php?f=188"><b><span class="fa fa-users"></span> Public Forum</b></a></li>
<li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://simtk.org/mailman/listinfo/simvascular-news"><b><span class="fa fa-sign-in"></span> Join News Mailing List</b></a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://simtk.org/pipermail/simvascular-news/"><b><span class="fa fa-pencil-square-o"></span> News Mailing List Archive</b></a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="https://github.com/SimVascular/SimVascular/issues"><b><span class="fa fa-bug"></span> Report bugs and request features</b></a></li>
</ul>
</li>
<!-- REFERENCES -->
<li>
<a href="docsRefs.html" id="dropdownMenu1" >
<b><span class="icon ion-document-text"></span>References</b>
</a>
</li>
<!-- Archives -->
<li>
<a href="#" id="dropdownMenu1" data-toggle="dropdown">
<b> Archives</b>
</a>
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1">
<li role="presentation"><a role="menuitem" tabindex="-1" href="archiveQuickGuideSV2.html"><b>SimVascular 2.0</b></a></li>
</ul>
</li>
<!-- <li><a href="docsQuickGuide.html" id="btnQuickGuide"><b><span class="icon ion-ios7-bolt"></span> Quick Guide</b></a></li>
<li><a href="docsModelGuide.html" id="btnModelGuide"><b><span class="icon ion-settings"></span> Modeling</b></a></li>
<li><a href="docsMeshing.html" id="btnMeshing"><b><span class="icon ion-ios7-keypad"></span> Meshing</b></a></li>
<li><a href="docsPresolver.html" id="btnPresolver"><b><span class="icon ion-log-in"></span> svPre</b></a></li>
<li><a href="docsFlowSolver.html" id="btnFlowSolver"><b><span class="icon ion-play"></span> svSolver</b></a></li>
<li><a href="docsRefs.html" id="btnRefs"><b><span class="icon ion-document-text"></span> References</b></a></li>
<li><a href="clinicalCase1.html" id="btnRefs"><b>Case Studies</b></a></li> -->
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<!-- Page Content -->
<!--Nav Bar -->
<div class="row">
<div class="col-xs-1 col-sm-1 hidden-md hidden-lg">
</div>
<!-- ONE COLUMN OF SPACE -->
<nav class="hidden-xs hidden-sm col-md-2 col-lg-2 bs-docs-sidebar">
<ul id="sidebar" class="nav nav-stacked fixed manSimCardio"> <p><h3>SimCardio Guide</h3></p>
<li><a href="#intro">Introduction</a></li>
<li><a href="#automatic-cardiac-modeling">Cardiac Modeling</a>
<ul class="nav nav-stacked">
<li><a href="#auto-ml-cardiac-segmentation">Automatic Cardiac <br>Segmentation</a>
<ul class="nav nav-stacked">
<li><a href="#seg-intro">Introduction</a></li>
<li><a href="#seg-inputs">Input Requirements</a></li>
<li><a href="#seg-pre-trained-models">Download Pre-<br>Trained Models</a></li>
<li><a href="#seg-predict">Predict <br>Segmentations</a></li>
<li><a href="#seg-visualize">Visualization</a></li>
</ul>
</li>
<li><a href="#auto-meshing">Automatic Mesh <br>Generation</a>
<ul class="nav nav-stacked">
<li><a href="#mesh-intro">Introduction</a></li>
<li><a href="#mesh-lv-surface">Construct Surface <br>Meshes</a></li>
<li><a href="#mesh-volume">Volumetric Meshing</a></li>
<li><a href="#mesh-register">Mesh Registration</a></li>
<li><a href="#mesh-motion">Compute Mesh Motion</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="#cep-modeling">Cardiac Electro- <br>physiology Modeling</a>
<ul class="nav nav-stacked">
<li><a href="#cep-intro">Introduction</a></li>
<li><a href="#cep-theory">Mathematical <br>Formulation</a></li>
<li><a href="#cep-activation-models">Cellular Acti-<br>vation Models</a></li>
<li><a href="#purkinje">Purkinje Network</a>
<ul class="nav nav-stacked">
<li><a href="#pnet-intro">Introduction</a></li>
<li><a href="#pnet-install">Plugin Installation</a></li>
<li><a href="#pnet-workflow">Plugin Workflow &<br>Usage</a></li>
<li><a href="#pnet-parameters">Plugin Parameters</a></li>
<li><a href="#pnet-issues">Plugin Issues</a></li>
</ul>
</li>
<li><a href="#cep-examples">Examples</a>
<ul class="nav nav-stacked">
<li><a href="#cep-example-block">Activation of Cardiac Tissue</a></li>
<li><a href="#cep-example-pnet">Activation of Purkinje Network</a></li>
</ul>
</li>
<li><a href="#cep-refs">References</a></li>
</ul>
</li>
<li><a href="#mechanics-modeling">Cardiac Mechanics <br> Modeling</a>
<ul class="nav nav-stacked">
<li><a href="#mechanics-solve">Solve Cardiac Mechanics <br> with svFSI</a>
<ul class="nav nav-stacked">
<li><a href="#mechanics-obtain-svFSI">Obtain svFSI</a></li>
<li><a href="#mechanics-mesh-gen">Model Construction & <br> Mesh Generation</a></li>
<li><a href="#mechanics-fiber-gen">Fiber Generation</a></li>
<li><a href="#mechanics-solver-input">Input File</a></li>
<li><a href="#mechanics-simulation">Run Simulation</a></li>
</ul>
</li>
<li><a href="#mechanics-theory">svFSI Structure Solver</a>
<ul class="nav nav-stacked">
<li><a href="#mechanics-kinematics">Kinematics</a></li>
<li><a href="#mechanics-struct">STRUCT: displacement- <br> based elastodynamics</a></li>
<li><a href="#mechanics-ustruct">uSTRUCT: mixed formu- <br> lation elastodynamics</a></li>
<li><a href="#mechanics-material-models">Material Models</a></li>
</ul>
</li>
<li><a href="#amechanics-refs">References</a></li>
</ul>
</li>
<section id="mechanics-modeling" class="group"><h1>Cardiac Mechanics Modeling</h1>
<p>Human heart is an intrinsic multiphysics system. It’s normal function requires synchronization and coupling of cardiac electrophysiology, tissue (myocardium) mechanics, and hemodynamics. Among the three physics, cardiac mechanics plays a central role, as it serves as the bridge between electrophysiology and blood flow. In a physiological setting, the myocardial cells (myocytes) in the heart tissue initiate and propagate an electrical impulse (action potential) that travels through the heart and drives the contraction of the cardiac muscle, which, in turn, propels the blood to sustain whole body circulation.</p>
<p><strong>svFSI</strong> is a new multi-physics finite element solver designed for computational modeling of the whole heart dynamics. As the next generation underlining solver for the <strong>SimVascular</strong> software, <strong>svFSI</strong> is capable of simulating myocardial electrical activity using state-of-the-art cellular activation models, employ nonlinear hyperelastic material models to simulate tissue mechanics and activation coupling strategies, and perform large deformation fluid-structure interaction (FSI) to simulate the dynamics between heart tissue and blood flow. <strong>svFSI</strong> is compatible with several mesh formats and can read a wide range of 2D and 3D element types. The methods employed are widely popular among the scientific community and continue to evolve through research and development. The solver is parallelized using MPI for inter-process communication and was demonstrated to scale efficiently on large supercomputing clusters. ParMETIS is used for partitioning the computational domains. Simulation results are outputted into VTK format that can be easily visualized in the free software <a href="https://www.paraview.org"> Paraview</a>. In this document, we focus on demonstrating <strong>svFSI</strong>’s capability of cardiac mechanics modeling.</p>
</section>
<section id="mechanics-solve" class="subgroup"><h1>Solve Cardiac Mechanics with svFSI</h1>
<p>Solving cardiac mechanics is a challenging task as the heart muscle is a complex fibrous structure that is predominantly incompressible <a href="#ref-1">[1]</a>, and undergoes large deformation during a cardiac cycle. In the following sections, we will introduce the workflow of modeling cardiac mechanics in <strong>svFSI</strong> using the benchmark example from Land et al. <a href="#ref-2">[2]</a>, i.e., the passive inflation of an idealized left ventricle.</p>
</section>
<section id="mechanics-obtain-svFSI" class="subgroup"><h2>Obtain svFSI</h2>
<p>The source code of <strong>svFSI</strong> is publicly released through <a href="https://github.com/SimVascular/svFSI">
GitHub</a>, and many new features are introduced frequently. Users are encouraged to download the most recent version and test it on their problems. <strong>svFSI</strong> is built through a CMake system and a short build guide is provided <a href="https://github.com/SimVascular/svFSI/blob/master/README.md"> here</a>. In addition to the source code, pre-built binary files are also available through <a href="https://simtk.org/frs/?group_id=188#">SimTK</a>. Here users can download <strong>svFSI</strong> binary for Ubuntu or MacOS.</p>
<p>The <strong>svFSI</strong> executable (either built from source or downloaded from SimTK) is not packaged into each SimVascular release, so users have to manually add its path to <strong>SimVascular</strong> GUI. The location is under <code>Window</code> -> <code>Preference</code> -> <code>svFSI Simulation</code>.</p>
<figure>
<img class="svImg svImgMd" src="documentation/simcardio/mechanics/images/path_to_binary.png">
<figcaption class="svCaption" >Set up path to **svFSI** solver in SimVascular.</figcaption>
</figure>
</section>
<section id="mechanics-mesh-gen" class="subgroup"><h2>Model Construction & Mesh Generation</h2>
<p><strong>SimVascular</strong> GUI provides a complete pipeline that includes model construction, mesh generation, problem configuration, input file generation, and numerical simulation. Although the model construction and mesh generation have been discussed extensively in other parts of the <strong>SimVascular</strong> user guides, we will go over them briefly in this subsection for the sake of completeness.</p>
<p>First, we create a SV Project called LV_Inflation. In cardiovascular modeling, computational models are usually generated from medical images. However, as we are using an idealized ventricular geometry here, we can directly import the model into the <code>SV Data Manager</code> by right clicking <code>Models</code> and selecting <code>Import Solid Model</code>. The solid model can be a surface mesh stored in either stl or vtp format.</p>
<figure>
<img class="svImg svImgMd" src="documentation/simcardio/mechanics/images/import_model.png">
<figcaption class="svCaption" >Import solid model for mesh generation.</figcaption>
</figure>
<p>We could name the new model LV. When asked if you would like to extract faces from the model, click yes and accept the default separation angle (50 degree). Oftentimes, the imported model is not centered in the field of view. One can right click on the model and click <code>Global Reinit</code> to recenter the geometry. Double click the model name to open the <code>SV Modeling</code> window and rename each face corresponding to its physiological interpretation (base - LV basal plane; endo - endocardium; epi - epicardium) and set each of these face types as wall. You may also change the color of each face to distinguish them in the Display window.</p>
<figure>
<img class="svImg svImgMd" src="documentation/simcardio/mechanics/images/faces.png">
<figcaption class="svCaption" >Extract faces from the imported model.</figcaption>
</figure>
<p>Next we will generate an unstructured mesh from this idealized LV model. In the <code>SV Data Manager</code>, right click <code>Meshes</code> and select <code>Create Mesh</code>. Accepting the default options will create a mesh object named LV. Double click the mesh object to open the <code>SV Meshing</code> configuration window. The most import parameter here is <code>Global Max Edge Size</code>, which controls the size of the elements. We will set this value to 2.0 and run the mesher. A relatively coarse mesh will be generated. Users can reduce the <code>Global Max Edge Size</code> if a finer mesh is desired. </p>
<figure>
<img class="svImg svImgMd" src="documentation/simcardio/mechanics/images/Mesher.png">
<figcaption class="svCaption" >Meshing configuration.</figcaption>
</figure>
<p>To convert the generated mesh to the svFSI-ready format, right click the mesh object, LV, and select <code>Export Mesh Complete</code>.</p>
<figure>
<img class="svImg svImgMd" src="documentation/simcardio/mechanics/images/export_mesh.png">
<figcaption class="svCaption" >Export the complete mesh.</figcaption>
</figure>
<p>Open the destination folder to find the mesh files contained in a folder called &ltmesh object name&gt-mesh-complete (LV-mesh-complete in this case). In this folder, the vtu file (mesh-complete.mesh.vtu) contains the volume mesh of the ventricle. The surface (boundary) mesh files could be found in the subfolder mesh-surfaces in vtp format. This set of vtk files defines the computational domain of this problem and can be visualized in Paraview.</p>
<figure>
<img class="svImg svImgMd" src="documentation/simcardio/mechanics/images/mesh_folder.png">
<figcaption class="svCaption" >Layout of the mesh folder.</figcaption>
</figure>
</section>
<section id="mechanics-fiber-gen" class="subgroup"><h2>Generation of Fiber Distribution</h2>
<p>The heart wall is a composite of layers (or sheets) of parallel myocytes, which are the predominant fiber types. These fiber and sheet directions enable defining a local orthonormal coordinate system inside the cardiac muscle. This local coordinate system is crucial for using a structurally-based constitutive relation for the cardiac muscle <a href="#ref-9">[9]</a>. For 3D problems, the users are required to prescribe fiber and sheet directions in the computational domain for certain constitutive relations. Users are provided an option to define a constant fiber direction through the following input directives,</p>
<pre class="highlight plaintext"><code>
# Fiber direction
Fiber direction: (1.0, 0.0, 0.0)
# Sheet direction
Fiber direction: (0.0, 1.0, 0.0)
</code></pre>
<p><strong>svFSI</strong> also supports specifying distributed fiber and sheet direction generated by rule-based methods <a href="#ref-3">[3]</a> through the following input commands,</p>
<pre class="highlight plaintext"><code>
# Fiber direction
Fiber direction file path: fibersLong.vtu
# Sheet direction
Fiber direction file path: fibersSheet.vtu
</code></pre>
<p>In the latter approach, the vtu file should have the local coordinate system stored as a vector with the name “FIB_DIR” at the centroid of each element. An example is provided <a href="https://github.com/SimVascular/svFSI-Tests/blob/master/06-ustruct/03-LV-Guccione-active/mesh/P1/fibersLong.vtu">here</a>.</p>
</section>
<section id="mechanics-solver-input" class="subgroup"><h2>Input File</h2>
<p><strong>svFSI</strong> requires a plain-text input file to specify simulation parameters. An overview of the syntax could be found <a href=https://sites.google.com/site/memt63/tools/MUPFES/mupfes-scripting>here</a>. The <strong>SimVascular</strong> GUI currently supports limited input configurations. To access more advanced functions of <strong>svFSI</strong>, users are recommended to create their own input file by modifying existing <a href="https://github.com/SimVascular/svFSI-Tests">templates</a>. Below is a template of the input file for modeling passive inflation of a left ventricle,</p>
<pre class="highlight plaintext"><code>
# File svFSI.inp
#----------------------------------------------------------------
# General simulation parameters
Continue previous simulation: f
Number of spatial dimensions: 3
Number of time steps: 100
Time step size: 0.01
Spectral radius of infinite time step: 0.50
Searched file name to trigger stop: STOP_SIM
Save results to VTK format: 1
Name prefix of saved VTK files: result
Increment in saving VTK files: 1
Start saving after time step: 1
Increment in saving restart files: 100
Convert BIN to VTK format: 0
Verbose: 1
Warning: 1
Debug: 0
#----------------------------------------------------------------
# Mesh data including volume (vtu) and surface (vtp) meshes,
# domains and fiber distributions
Add mesh: msh {
Mesh file path: <path to mesh-complete folder>/mesh-complete.mesh.vtu
Add face: endo {
Face file path: <path to mesh-complete folder>/mesh-surfaces/endo.vtp
}
Add face: epi {
Face file path: <path to mesh-complete folder>/mesh-surfaces/epi.vtp
}
Add face: base {
Face file path: <path to mesh-complete folder>/mesh-surfaces/base.vtp
}
Fiber direction: (1.0, 0.0, 0.0)
Fiber direction: (0.0, 1.0, 0.0)
}
#----------------------------------------------------------------
# Equations solved
# Here we use mixed formulation, ustruct, with stabilization
# displacement-based formulation can be invoked through struct
Add equation: ustruct {
# Define min and max number of iterations, and convergence
# tolerance for the nonlinear solver (Newton method)
Coupled: 1
Min iterations: 4
Max iterations: 10
Tolerance: 1e-6
Use Taylor-Hood type basis: f
# Define constitutive model and its parameters
Constitutive model: Guccione {
C: 1.0e4
bf: 1.0
bt: 1.0
bfs: 1.0
}
# Define a small density value for quasi-steady (static)
# simulation
Density: 1e-3
# Define Poisson ratio
Poisson ratio: 0.5
#==================================================================================
# This block is for struct; remove if ustruct is used
# Define elasticity modulus for the volumetric part of the
# strain energy function
Elasticity modulus: 1.0
# Penalty method to enforce incompressibility
Dilational penalty model: ST91
# Use a penalty parameter, if different from bulk modulus
Penalty parameter: 1.0E6
#==================================================================================
#==================================================================================
# This block is for ustruct; remove if struct is used
# Define elasticity modulus to calculate tauM/tauC
Elasticity modulus: 2.0e5
# Stabilization paramters
Momentum stabilization coefficient: 1e-3
Continuity stabilization coefficient: 1e-3
#==================================================================================
# Define variables for output
Output: Spatial {
Displacement: t
Velocity: t
Jacobian: t
}
# Linear solver parameter
# Jacobi preconditioner (FSILS) is the default.
# For ustruct, trilinos-ilu preconditioner is recommended.
LS type: GMRES
{
Preconditioner: FSILS
Tolerance: 1D-6
Max iterations: 1000
Krylov space dimension: 50
}
# Apply zero displacement BC at the base
Add BC: base {
Type: Dir
Value: 0.0
Impose on state variable integral: t
}
# Add pressure load at the endo surface
# Here we define a ramp function to linearly
# increase pressure load from zero to the
# desired value to increase solver stability.
# Follower pressure load is set as the direction
# of the applied load follows deformation.
Add BC: endo {
Type: Neu
Time dependence: Unsteady
Temporal values file path: <path to load.dat file>
Ramp function: t
Follower pressure load: t
}
}
</code></pre>
<p>The applied load on the endocardial surface is provided in a file, load.dat, defining the ramp function. In this file, the first line specifies that there are two data points and the value will change linearly. The second and third line specify the time and the value at that time. Note that for a ramp function, the code expects data at two time points only. Should the simulation go beyond the last time stamp (t=1.0 in the current example), a constant value equal to the last extrema (1.0e4) will be applied.</p>
<pre class="highlight plaintext"><code>
2 1
0.0 0.0
1.0 1.0e4
# content of load.dat
</code></pre>
</section>
<section id="mechanics-simulation" class="subgroup"><h2>Run Simulation</h2>
<p>Though we can run the simulation through the GUI. It currently does not support some advanced features. Hence, we will use the aforementioned input file to directly run the simulation in terminals. The MPI run can be initiated through the following command
<pre class="highlight plaintext"><code>
mpiexec -np &ltnumber of MPI processes&gt &ltpath to svFSI executable&gt &ltpath to the input file&gt
</code></pre></p>
<p><strong>Please remember to change the path to mesh folder and path to the load.dat in the input file according to your local configuration.</strong> <strong>svFSI</strong> will create a results directory called n-procs, where n is the number of MPI processes for the simulation. This directory will have vtu files that contain all the requested output fields and a log file called histor.dat.</p>
</section>
<section id="mechanics-theory" class="subgroup"><h1>svFSI Nonlinear Mechanics Solver</h1>
<p>This section briefly explains the theory and implementation of the nonlinear solid dynamics solver in <strong>svFSI</strong>. Two types of formulations are provided in <strong>svFSI</strong> for modeling solid mechanics: STRUCT and uSTRUCT. STRUCT uses a pure displacement-based formulation of the balance laws (mass and momentum conservation principles), while uSTRUCT uses a mixed (velocity-pressure) formulation of the governing equations. The latter approach uses either a stabilized equal-order discretization for velocity and pressure function spaces, or the inf-sup-conforming Taylor-Hood-type finite element discretization.</p>
</section>
<section id="mechanics-kinematics" class="subgroup"><h2>Kinematics</h2>
<p>During a cardiac cycle, the heart undergoes large deformations which can no longer be described by linear elasticity. Since the domain is continuously deforming, we introduce the concepts of a reference configuration (denoted $\Omega<em>{0}$) and a current configuration (denoted $\Omega</em>{t}$). The reference configuration is fixed for all times, and often refers to the initial geometry when $t=0$. We will use the vector $\mathbf{X}$ to denote the physical coordinates of the geometry in the reference configuration, and define the following relation:</p>
<p>$$
\begin{equation}
\mathbf{x}(\mathbf{X}, t)=\mathbf{X}+\mathbf{u}(\mathbf{X}, t)
\end{equation}
$$</p>
<p>where $\mathbf{x}$ describes the physical coordinates of the geometry in the current configuration and $\mathbf{u}$ is the time-varying displacement vector field on $\Omega<em>{0}$ which acts as a mapping between the reference and current configurations such that $\mathbf{u}: \Omega</em>{0} \Rightarrow \Omega_{t} .$ We also define the following relationships and tensors, which are standard for describing nonlinear structural mechanics:</p>
<p>$$
\begin{equation}
\begin{split}
\ddot{\mathbf{u}}=\frac{d^{2} \mathbf{u}}{d t^{2}}, \quad \mathbf{F}=\frac{\partial \mathbf{x}}{\partial \mathbf{X}}, \quad & J=\operatorname{det}(\mathbf{F}) \
\mathbf{E}=\frac{1}{2}(\mathbf{C}-\mathbf{I}), \quad & \mathbf{C}=\mathbf{F}^{T} \mathbf{F}
\end{split}
\end{equation}
$$</p>
<p>where $\ddot{\mathbf{u}}$ refers to the structural acceleration and the time derivative operator, $d^{2} / d t^{2}$, is applied on the reference configuration. $\mathbf{F}$ denotes the deformation gradient tensor and $J$ is the the determinant of $\mathbf{F}$ tensor that denotes the Jacobian of the transformation. $\mathbf{C}$ is the Cauchy-Green deformation tensor while $\mathbf{E}$ is the Green-Lagrange strain tensor.</p>
</section>
<section id="mechanics-struct" class="subgroup"><h2>STRUCT: displacement-based nonlinear elastodynamics</h2>
<p>The STRUCT equation solves equations for nonlinear structural dynamics using finite element formulation. We start with the function spaces and weak form. We require that the trial and weighting functions satisfy their respective properties on the current domain. The strong form of the momentum balance is</p>
<p>$$
\begin{equation}
\begin{split}
\rho\ddot{\mathbf{u}} = \nabla<em>{x}\cdot{\sigma} + \rho\mathbf{f</em>b}, \
\sigma\cdot \mathbf{n} = \mathbf{h},~\mathrm{on}~\left(\Gamma<em>{t}\right)</em>{h}.
\end{split}
\end{equation}
$$</p>
<p>where $\sigma$ is the stress term in the current configuration.</p>
<p>The resulting weak form of the structural dynamics equations is </p>
<p>$$
\begin{equation}
\int<em>{\Omega</em>{t}} \mathbf{w} \cdot \rho \ddot{\mathbf{u}} d \Omega+\int<em>{\Omega</em>{0}} \nabla<em>{X} \mathbf{w}:(\mathbf{F} \mathbf{S}) d \Omega-\int</em>{\Omega<em>{t}} \mathbf{w} \cdot \rho \mathbf{f</em>b} d \Omega-\int<em>{\left(\Gamma</em>{t}\right)<em>{h}} \mathbf{w} \cdot \mathbf{h} d \Gamma</em>{h}=0
\end{equation}
$$</p>
<p>The acceleration term (i.e. $\int<em>{\Omega</em>{t}} \mathbf{w} \cdot \rho \ddot{\mathbf{u}} d \Omega$), body forcing term (i.e. $\int<em>{\Omega</em>{t}} \mathbf{w} \cdot \mathbf{f<em>b} d \Omega$), and the natural boundary condition term (i.e. $\int</em>{\left(\Gamma<em>{t}\right)</em>{h}} \mathbf{w} \cdot \mathbf{h} d \Gamma_{h}$) are all evaluated in the current configuration. These terms are commonly referred to as external work done on the structure by body forces and surface tractions. The remaining stress term in the equation is often referred to as internal work done on the structure by internal stresses, which we will treat differently here. We rewrite this in the reference configuration in terms of the deformation gradient and the second Piola-Kirchhoff stress tensor, which is commonly denoted as $\mathbf{S}$. </p>
<p><strong>svFSI</strong> uses a splitting approach where the strain energy and the resulting second Piola-Kirchhoff stress tensor, $\mathbf{S}$, are decomposed into deviatoric (or isochoric, $\mathbf{S}<em>{iso}$) and dilational (or volumetric, $\mathbf{S}</em>{vol}$) components. The specific form of $\mathbf{S}$ will depend on the chosen constitutive model (isochoric and volumetric). More information on these <a href="#material-model">Material models</a> can be found in the literature <a href="#ref-1">[1]</a>. It is noted that the symbol $E$ denotes the elastic modulus of the structure and is not to be confused with $\mathbf{E}$, which denotes the Green-Lagrange strain tensor, and $\nu$ represents Poisson’s ratio. Some key material parameters can then be defined as,
$$
\begin{equation}
\lambda=\frac{E v}{(1+v)(1-2 v)}, \quad \mu=\frac{E}{2(1+v)}, \quad \kappa=\lambda + \frac{2}{3} \mu
\end{equation}
$$</p>
<p>where, $\lambda$ and $\mu$ are the Lam&eacute’s first and second parameters, respectively, and $\kappa$ is the bulk modulus. The second Piola-Kirchhoff stress tensors for a few standard constitutive models are given as,</p>
<p>$$
\begin{equation}
\begin{split}
& \mathbf{S}^{StVK} & = 2 \mu \mathbf{E} + \lambda \operatorname{tr}(\mathbf{E}) \mathbf{I}, & \quad \textrm{St. Venant-Kirchhoff} \
& \mathbf{S}^{mStVK} & = \kappa \operatorname{ln}(J) \mathbf{C}^{-1} + \mu(\mathbf{C} - \mathbf{I}), & \quad \textrm{Modified St. Venant-Kirchhoff} \
& \mathbf{S_{iso}}^{nHK} & = \mu J^{-2/3} \left(\mathbf{I} - \frac{1}{3} \operatorname{tr}(\mathbf{C}) \mathbf{C}^{-1} \right), & \quad \textrm{Neo-Hookean}
\end{split}
\end{equation}
$$</p>
<p>where $\mathbf{I}$ is the identity matrix. For the Neo-Hookean and other hyperelastic constitutive models, the $\mathbf{S}$ tensor is computed as $\mathbf{S} = \mathbf{S<em>{iso}} + \mathbf{S</em>{vol}}$, where $\mathbf{S_{vol}} = p J \mathbf{C}^{-1}$, and $p$ is the hydrostatic pressure computed based on the chosen dilational strain-energy function. See the section on <a href="#material-model">Material models</a> and the corresponding references for the available dilational penalty models in <strong>svFSI</strong> .</p>
</section>
<section id="mechanics-ustruct" class="subgroup"><h2>uSTRUCT: mixed formulation nonlinear elastodynamics</h2>
<p><strong>svFSI</strong> allows solving nonlinear elastodynamics using a mixed formulation where the structure’s velocity and pressure are the unknown degrees of freedom <a href="#ref-4">[4]</a>. Two variants are available within this feature: (a) first, a novel variational multiscale stabilized (VMS) formulation that allows equal-order interpolation of velocity and pressure bases using a unified framework <a href="#ref-4">[4]</a>; (b) second, using the classical inf-sup stable Taylor-Hood type elements where the velocity basis is derived from a function space that is one order higher relative to the pressure basis. In the displacement-based formulation, a hyperelastic material model assumes the existence of a Helmholtz free energy potential. However, uSTRUCT postulates hyperelasticity using Gibbs free energy potential <a href="#ref-4">[4]</a> and takes the following additive decoupled form as,
$$
\begin{equation}
G(\overline{\mathbf{C}},p,T) = G<em>{iso}(\overline{\mathbf{C}},T) + G</em>{vol}(p,T)
\end{equation}
$$</p>
<p>where $G<em>{vol}(p,T)=\int \rho^{-1}dp$, $\overline{\mathbf{C}}=J^{-2/3}\mathbf{C}$, $p$ is the pressure and $T$ is the temperature. It is worth mentioning that the free energy above is the specific free energy, i.e. the energy per unit mass. The free energy per unit volume is $G^R=\rho</em>0G$, where $\rho_0$ is the density of the reference configuration. The Helmholtz free energy per unit volume can be obtained by a Legendre transformation of $-G^R$ as,</p>
<p>$$
\begin{equation}
H^R(\overline{\mathbf{C}},J,T)=\sup_p\left(-pJ+G^R(\overline{\mathbf{C}},p,T) \right).
\end{equation}
$$</p>
<p>and due to the additive splitting of the Gibbs free energy, we have, </p>
<p>$$
\begin{equation}
H^R(\overline{\mathbf{C}},J,T)=G<em>{iso}^R(\overline{\mathbf{C}},T) + \sup</em>p\left(-pJ+G_{vol}^R(p,T) \right).
\end{equation}
$$</p>
<p>It is noted that Gibbs free energy naturally introduces pressure into the stress term. The governing equations for the motion of a continuum body in the current configuration are,</p>
<p>$$
\begin{equation}
\begin{split}
& \frac{\mathrm{d} \mathbf{u}}{\mathrm{d} t} - \mathbf{v} = \mathbf{0} \</p>
<pre class="highlight plaintext"><code>& \beta(p) \frac{\mathrm{d} p}{\mathrm{d} t} + \nabla_x \cdot \mathbf{v} = 0 \\
& \rho(p) \frac{\mathrm{d} \mathbf{v}}{\mathrm{d} t} - \nabla_x \cdot \mathbf{\sigma_{dev}} + \nabla_x p - \rho(p) \mathbf{f_b} = \mathbf{0}.
</code></pre>
<p>\end{split}
\end{equation}
$$</p>
<p>The above system of equations represent the kinematic relation between displacement and velocity, balance of mass and linear momentum. $\sigma_{dev}$ is the deviatoric Cauchy stress, while $\rho$ and $\beta$ are the density and isothermal compressibility coefficient, respectively, defined as functions of pressure. The expressions for these quantities are given as follows,</p>
<p>$$
\begin{equation}
\begin{split}
& \rho(p) = \left( \frac{\mathrm{d} G<em>{vol}}{\mathrm{d} p} \right)^{-1} \quad &, \quad & \beta(p) = \frac{1}{\rho} \frac{\mathrm{d} \rho}{\mathrm{d} p} = -\frac{\partial^2 G</em>{vol}}{\partial p^2} / \frac{\partial G_{vol}}{\partial p} \</p>
<pre class="highlight plaintext"><code>& \mathbf{\sigma_{dev}} = J^{-1} \bar{\mathbf{F}} \left( \mathbb{P}:\bar{\mathbf{S}} \right) \bar{\mathbf{F}}^T \quad &, \quad & \bar{\mathbf{S}} = 2 \frac{\partial G_{iso}^R}{\partial \bar{\mathbf{C}}} = 2 \frac{\partial (\rho_0 G_{iso})}{\partial \bar{\mathbf{C}}},
</code></pre>
<p>\end{split}
\end{equation}
$$</p>
<p>where $\mathbb{P} = \mathbb{I} - \frac{1}{3}\mathbf{C} \otimes \mathbf{C}^{-1}$ is the projection tensor, $\bar{\mathbf{F}} = J^{-1/3} \mathbf{F}$ and $\bar{\mathbf{C}} = J^{-2/3} \mathbf{C}$.</p>
<p>This mixed finite element problem is stabilized using variational multiscale method to allow using equal-order interpolating functions for velocity and pressure unknowns, employ linear elements and handle material incompressibility without suffering from locking issues. Defining an appropriate mixed function space, the stabilized weak form can then be written in the current configuration as,</p>
<p>$$
\begin{equation}
\begin{split}
& \mathbf{B}<em>k := & \int</em>{\Omega<em>x} \mathbf{w}</em>\mathbf{u} \cdot \left( \frac{\mathrm{d} \mathbf{u}}{\mathrm{d} t} - \mathbf{v} \right) \mathrm{d} \Omega_x = \mathbf{0} \</p>
<pre class="highlight plaintext"><code>& \mathbf{B}_p := & \int_{\Omega_x} w_p \left( \beta(p) \frac{\mathrm{d} p}{\mathrm{d} t} + \nabla_x \cdot \mathbf{v} \right) \mathrm{d} \Omega_\mathbf{x} \\
& & + \sum_e \int_{\Omega_x^e} \tau_M^e \nabla_x w_p \cdot \left( \rho(p)\frac{\mathrm{d} \mathbf{v}}{\mathrm{d} t} - \nabla_x \cdot \mathbf{\sigma_{dev}} + \nabla_x p - \rho(p)\mathbf{f_b} \right) \mathrm{d} \Omega_x^e = 0 \\
& \mathbf{B}_m := & \int_{\Omega_x} \left( \mathbf{w}_\mathbf{v} \cdot \rho(p) \frac{\mathrm{d} \mathbf{v}}{\mathrm{d} t} + \nabla_x \mathbf{w}_\mathbf{v} : \mathbf{\sigma_{dev}} - \nabla_x \cdot \mathbf{w}_\mathbf{v} p - \mathbf{w}_\mathbf{v} \cdot \rho(p)\mathbf{f_b} \right) \mathrm{d} \Omega_x \\
& & -\int_{\Gamma_x^h} \mathbf{w}_\mathbf{v} \cdot \mathbf{h} \mathrm{d} \Gamma_x + \sum_e \int_{\Omega_x^e} \tau_C \left(\nabla_x \cdot \mathbf{w}_\mathbf{v} \right) \left( \beta(p) \frac{\mathrm{d} p}{\mathrm{d} t} + \nabla_x \cdot \mathbf{v} \right) \mathrm{d} \Omega_x^e = 0.
\end{split}
</code></pre>
<p>\end{equation}
$$</p>
<p>The stabilization parameters are chosen as, </p>
<p>$$
\begin{equation}
\mathbf{\tau}<em>M = \tau</em>M\mathbf{I}<em>{nd}, \quad \tau</em>M = c<em>m \frac{\Delta x^e}{c\rho}, \quad \tau</em>C = c_c c\Delta x^e \rho
\end{equation}
$$</p>
<p>where, $\Delta x^e$ is the diameter of the circumscribing sphere of the tetrahedral element, $c<em>m$ and $c</em>c$ are two non-dimensional parameters, and $c$ is the maximum wave speed in the solid body. For compressible materials, $c$ is the bulk wave speed. Assuming isotropic small-strain linear elastic material, the bulk wave speed can be approximated as, $c=\sqrt{ \left( \lambda+2\mu \right) / \rho<em>0}$, where $\lambda$ and $\mu$ are the Lam&eacute’s parameters. For incompressible materials, $c = \sqrt{\frac{\mu}{\rho</em>0}}$ is the shear wave speed. Further details about the formulation, finite element discretization and time integration could be found in Liu et al. <a href="#ref-4">[4]</a>.</p>
</section>
<section id="mechanics-material-models" class="subgroup"><h2>Material Models</h2>
<p>Below is the list of available material constitutive models in <strong>svFSI</strong> :</p>
<table class="table table-bordered">
<caption>Volumetric constitutive models for the struct/ustruct equations</caption>
<thead>
<tr>
<th>Volumetric Model</th>
<th>Input Keyword</th>
</tr>
</thead>
<tr>
<td>Quadratic model</td>
<td> “quad”, “Quad”, “quadratic”, “Quadratic” </td>
</tr>
<tr>
<td>Simo-Taylor91 model<a href="#ref-5">[5]</a></td>
<td>“ST91”, “Simo-Taylor91”</td>
</tr>
<tr>
<td>Miehe94 model<a href="#ref-6">[6]</a></td>
<td>“M94”, “Miehe94”</td>
</tr>
</table>
<table class="table table-bordered">
<caption>Isochoric constitutive models for the struct/ustruct equations</caption>
<thead>
<tr>
<th>Isochoric Model</th>
<th>Input Keyword</th>
</tr>
</thead>
<tr>
<td>Saint Venant-Kirchhoff$^\dagger$ </td>
<td>“stVK”, “stVenantKirchhoff” </td>
</tr>
<tr>
<td>modified Saint Venant-Kirchhoff$^\dagger$</td>
<td>“m-stVK”, “modified-stVK”, “modified-stVenantKirchhoff” </td>
</tr>
<tr>
<td>Neo-Hookean model </td>
<td>“nHK”, “nHK91”, “neoHookean”, “neoHookeanSimo91” </td>
</tr>
<tr>
<td>Mooney-Rivlin model </td>
<td>“MR”, “Mooney-Rivlin” </td>
</tr>
<tr>
<td>Holzapfel-Gasser-Ogden model <a href="#ref-7">[7]</a> </td>
<td> “HGO” </td>
</tr>
<tr>
<td>Guccione model <a href="#ref-8">[8]</a> </td>
<td> “Guccione”, “Gucci” </td>
</tr>
<tr>
<td>Holzapfel-Ogden model <a href="#ref-9">[9]</a></td>
<td> “HO”, “Holzapfel” </td>
</tr>
</table>
<p>$^\dagger$ These models are not available for ustruct.</p>
</section>
<section id="mechanics-refs" class="subgroup"><h1>Reference</h1>
<p><a id="ref-1"> <a href="https://www.wiley.com/en-us/Nonlinear+Solid+Mechanics%3A+A+Continuum+Approach+for+Engineering-p-9780471823193">
[1] Holzapfel, G. A. (2002). <strong>Nonlinear solid mechanics: a continuum approach for engineering science</strong>. Wiley. </a></a></p>
<p><a id="ref-2"> <a href="https://doi.org/10.1098/rspa.2015.0641">
[2] Land, S., Gurev, V., Arens, S., Augustin, C. M., Baron, L., Blake, R., Bradley, C., Castro, S., Crozier, A., Favino, M., Fastl, T. E., Fritz, T., Gao, H., Gizzi, A., Griffith, B. E., Hurtado, D. E., Krause, R., Luo, X., Nash, M. P., … Niederer, S. A. (2015). <strong>Verification of cardiac mechanics software: benchmark problems and solutions for testing active and passive material behaviour</strong>. Proceedings of the Royal Society A: Mathematical, Physical and Engineering Science, 471 (2184), 20150641. https://doi.org/10.1098/rspa.2015.0641 </a></a></p>
<p><a id="ref-3"> <a href="https://doi.org/10.1007/s10439-012-0593-5">
[3] Bayer, J. D., Blake, R. C., Plank, G., & Trayanova, N. A. (2012). <strong>A Novel Rule-Based Algorithm for Assigning Myocardial Fiber Orientation to Computational Heart Models</strong>. Annals of Biomedical Engineering, 40(10), 2243–2254. https://doi.org/10.1007/s10439-012-0593-5 </a></a></p>
<p><a id="ref-4"> <a href="https://doi.org/10.1016/J.CMA.2018.03.045">
[4] Liu, J., & Marsden, A. L. (2018). <strong>A unified continuum and variational multiscale formulation for fluids, solids, and fluid–structure interaction</strong>. Computer Methods in Applied Mechanics and Engineering, 337, 549–597. https://doi.org/10.1016/J.CMA.2018.03.045 </a></a></p>
<p><a id="ref-5"> <a href="https://doi.org/10.1016/0045-7825(91)90100-K">
[5] Simo, J. C., & Taylor, R. L. (1991). <strong>Quasi-incompressible finite elasticity in principal stretches. Continuum basis and numerical algorithms</strong>. Computer Methods in Applied Mechanics and Engineering, 85(3), 273–310. https://doi.org/10.1016/0045-7825(91)90100-K</a></a></p>
<p><a id="ref-6"> <a href="https://doi.org/10.1002/nme.1620371202">
[6] Miehe, C. (1994). <strong>Aspects of the formulation and finite element implementation of large strain isotropic elasticity</strong>. International Journal for Numerical Methods in Engineering, 37(12), 1981–2004. https://doi.org/10.1002/nme.1620371202 </a></a></p>
<p><a id="ref-7"> <a href="https://doi.org/10.1098/rsif.2005.0073">
[7] Gasser, T. C., Ogden, R. W., & Holzapfel, G. A. (2006). <strong>Hyperelastic modelling of arterial layers with distributed collagen fibre orientations</strong>. Journal of The Royal Society Interface, 3(6), 15–35. https://doi.org/10.1098/rsif.2005.0073 </a></a></p>
<p><a id="ref-8"> <a href="https://doi.org/10.1115/1.2894084">
[8] Guccione, J. M., McCulloch, A. D., & Waldman, L. K. (1991). <strong>Passive material properties of intact ventricular myocardium determined from a cylindrical model</strong>. Journal of Biomechanical Engineering, 113(February), 42–55. https://doi.org/10.1115/1.2894084 </a></a></p>
<p><a id="ref-9"> <a href="https://doi.org/10.1098/rsta.2009.0091">
[9] Holzapfel, G. A, & Ogden, R. W. (2009). <strong>Constitutive modelling of passive myocardium: a structurally based framework for material characterization</strong>. Philosophical Transactions of the Royal Society Series A, 367(1902), 3445–3475. https://doi.org/10.1098/rsta.2009.0091 </a></a></p>
<p><a id="ref-10"> <a href="https://doi.org/10.1016/J.JMBBM.2014.06.016">
[10] Nolan, D. R., Gower, A. L., Destrade, M., Ogden, R. W., & McGarry, J. P. (2014). <strong>A robust anisotropic hyperelastic formulation for the modelling of soft tissue</strong>. Journal of the Mechanical Behavior of Biomedical Materials, 39, 48–60. https://doi.org/10.1016/J.JMBBM.2014.06.016 </a></a></p>
<p><br><br><br><br><br></p>
</section>
</ul>
</nav>
<!--Main Content -->
<div class="col-xs-10 col-sm-10 col-md-9 col-lg-9" id="manualContent">
<!-- ACTUAL CONTENT -->
<div class="manSimCardio"><section id="intro" class="group"><h1>Introduction</h1>
<p>Human heart is an intrinsic multiphysics system. It’s normal function requires synchronization and coupling of cardiac electrophysiology, tissue (myocardium) mechanics, and hemodynamics. Among the three physics, cardiac mechanics plays a central role, as it serves as the bridge between electrophysiology and blood flow. In a physiological setting, the myocardial cells (myocytes) in the heart tissue initiate and propagate an electrical impulse (action potential) that travels through the heart and drives the contraction of the cardiac muscle, which, in turn, propels the blood to sustain whole body circulation.</p>
<p>The SimVascular <strong>SimCardio</strong> software suite includes a machine learning-based tool to automatically segment heart chambers from medical data and create patient-specific cardiac models, a finite element solver for performing multiphysics cardiac simulations, and python-based plugins to interactively create cardiac models, Purkinje network and set solver parameters from within the main SimVascular GUI application. While some of the interactive plugins are under development, the software allows flexibility to use scripting and perform simulations on high performance clusters.</p>
<h3>Cardiac Segmentation and Modeling</h3>
<p>The SimVascular <strong>Automatic Cardiac Segmentation Tool</strong> uses pre-trained deep neural network models to automaticall generate segmentations for major cardiac structures, the four heart chambers, aorta and pulmonary arteries. The automatic cardiac segmentation tool utilized an ensemble of two-dimensional (2D) convolutional neural networks (CNNs) for automatic segmentation of cardiac structures from three-dimensional (3D) patient images and demonstrated state-of-the-art performance than prior approaches when evaluated on a benchmark dataset containing both magnetic resonance (MR) and computed tomography(CT) scans. This tool can be used from both the SimVascular’s Python plugin in the GUI or from the command line version of the SimVascular Python.</p>
<h3>Multiphysics Finite Element Solver</h3>
<p><strong>svFSI</strong> is a new multi-physics finite element solver designed for computational modeling of the whole heart dynamics. As the next generation underlining solver for the <strong>SimVascular</strong> software, <strong>svFSI</strong> is capable of simulating myocardial electrical activity using state-of-the-art cellular activation models, employ nonlinear hyperelastic material models to simulate tissue mechanics and activation coupling strategies, and perform large deformation fluid-structure interaction (FSI) to simulate the dynamics between the heart tissue and blood flow. <strong>svFSI</strong> could also be used to perform blood flow simulations by imposing the ventricular wall motion extracted from medical image data.</p>
<p><strong>svFSI</strong> is compatible with several mesh formats and can read a wide range of 2D and 3D element types. <strong>svFSI</strong> could be coupled to <a href="https://trilinos.github.io/index.html">Trilinos</a> linear solver library providing a wide choice of linear solvers and preconditioners for various applications. The methods employed are widely popular among the scientific community and continue to evolve through research and development. The solver is parallelized using MPI for inter-process communication and was demonstrated to scale efficiently on large supercomputing clusters. ParMETIS is used for partitioning the computational domains. Simulation results are outputted into VTK format that can be easily visualized in the free software <a href="https://www.paraview.org"> Paraview</a>.</p>
<p>The source code of <strong>svFSI</strong> is available on <a href="https://github.com/SimVascular/svFSI">GitHub</a> as part of the SimVascular project and the precompiled installers can be downloaded from <a href="https://simtk.org/projects/simvascular#">SimTK</a> website. A variety of examples are also available on <a href="https://github.com/SimVascular/svFSI-Tests">GitHub</a> for the users to get started quickly on using the solver. We recommend users to navigate through all the examples under a particular physics to educate themselves with the variety of options that the solver could accommodate. We also recommend users to use the existing input files as templates and make suitable modifications that meet their needs.</p>
</section>
<section id="automatic-cardiac-modeling" class="group"><h1>Automatic Cardiac Modeling Tool</h1>
<p>The SimVascular <strong>Automatic Cardiac Modeling Tool</strong> is designed to automatically segment medical images to extract major cardiac structures using machine learning techniques, create a volumetric mesh and perform registration to extract the wall motion for the ensuing blood flow simulation in <strong>svFSI</strong>.</p>
</section>
<section id="auto-ml-cardiac-segmentation" class="subgroup"><h1>Automatic Machine Learning Cardiac Segmentation</h1>
</section>
<section id="seg-intro" class="subgroup"><h2>Introduction</h2>
<p>The SimVascular <strong>Automatic Cardiac Segmentation Tool</strong> uses pre-trained deep neural network models to automaticall generate segmentations for major cardiac structures, the four heart chambers, aorta and pulmonary arteries. The automatic cardiac segmentation tool utilized an ensemble of two-dimensional (2D) convolutional neural networks (CNNs) for automatic segmentation of cardiac structures from three-dimensional (3D) patient images and demonstrated state-of-the-art performance than prior approaches when evaluated on a benchmark dataset containing both magnetic resonance (MR) and computed tomogra- phy(CT) cardiac scans. This tool can be used from both the SimVascular’s Python plugin in the GUI or from the command line version of the SimVascular Python. Detailed description about this tool can be found in the following paper:</p>
<p>Kong, F., and Shadden, S. C. (August 7, 2020). “Automating Model Generation for Imagebased Cardiac Flow Simulation.” ASME. J Biomech Eng. doi: <a href='https://doi.org/10.1115/1.4048032' target='_blank' class='url'>https://doi.org/10.1115/1.4048032</a></p>
</section>
<section id="seg-inputs" class="subgroup"><h2>Input Requirements</h2>
<p>The preferred input format of the image volumes is <strong>.nii.gz or .nii or .vti</strong>. VTK image volumes (.vti) should be reoriented to have an orientation matrix of identity. This is because the segmnetation method requires identity-oriented image volumes while the version of VTK within SimVascular does not include orientation matrix with VTI images.
The directory containing the input image data should be organized as follows:</p>
<pre><code>image_dir
|__ patient_id (optional)
|__ image_volume0.vti
|__ image_volume1.vti
|__ image_volume2.vti
|__ ...
</code></pre>
</section>
<section id="seg-pre-trained-models" class="subgroup"><h2>Download Pre-Trained Models</h2>
<p>We used the image and ground truth data provided by <a href='https://zmiclab.github.io/projects/mmwhs/'>MMWHS</a> to train our models. Our segmentation models were trained simultaneously on CT and MR data and trained weights are <a href='https://drive.google.com/open?id=162Xr5OezSZL-0K3aoYO7WnHWuGTEXkkj'>here</a>.</p>
</section>
<section id="seg-predict" class="subgroup"><h2>Predict Segmentations From Image Data</h2>
<h3>Prediction Using SimVascular Python Shell</h3>
<p>To generate segmentations for 3D CT or MR image volumes, we can use SimVascular’s Python Shell to run the prediction script. The SimVascular Python Shell can be invoked from the terminal according to the following instruction: <a href='http://simvascular.github.io/docsPythonInterface.html#python_shell' target='_blank' class='url'>http://simvascular.github.io/docsPythonInterface.html#python<em>shell</a>. The prediction script <code>prediction.py</code> can be found here in SimVascular’s source code: Python/site-packages/sv</em>auto<em>lv</em>modeling/segmentation/prediction.py</p>
<pre><code class='language-shell' lang='shell'>
data_path=/path/to/data
sv_python_dir=/usr/local/bin
script_dir=SimVascular/Python/site-packages/sv_auto_lv_modeling
patient_id=WS01
image_dir=$data_path/01-Images
output_dir=$data_path/02-Segmnts
weight_dir=$data_path/Weights
${sv_python_dir}/simvascular --python -- $script_dir/segmentation/prediction.py \
--pid $patient_id \
--image $image_dir \
--output $output_dir \
--model $weight_dir \
--view 0 1 2 \ # 0 for axial, 1 for coronal, 2 for sagital
--modality ct # ct or mr
</code></pre>
<p>A shell script (<code>Python/site-packages/sv<em>auto</em>lv_modeling/segmentation.sh</code>) is provided for ease of use.</p>
<h3>Prediction Using SimVascular Python Console</h3>
<p>We can also use the Python console in SimVascular GUI to run the prediction script. Within the Python plugin, we can use the <strong>Text Editor</strong> mode and enter the following lines to create a Python script.</p>
<pre><code class='language-python' lang='python'>
from auto_lv.auto_lv import Segmentation
data_path='/path/to/data'
seg = Segmentation()
seg.set_modality('ct')
seg.set_patient_id ('WS01')
seg.set_image_directory (data_path+'/01-Images')
seg.set_output_directory (data_path+'/02-Segmnts')
seg.set_model_directory ([data_path+'/Weights'])
seg.set_view ([2])
seg.generate_segmentation()
</code></pre>
</section>
<section id="seg-visualize" class="subgroup"><h2>Visualize Segmentation Results</h2>
<p>We can use either SimVascular or Paraview (for .vti files) to visualize the segmentation results. In SimVascular, we can right-click <strong>Images</strong> and chose <strong>Add/Replace Image</strong> to visualize the image and the segmentation data. The following two pictures show an example of CT image and the segmentaion results.</p>
<p>documentation/1d_simulation/tool/images/
<figure>
<img class="svImg svImgMd" src="documentation/simcardio/cardiacModeling/images/images.png">
<figcaption class="svCaption" >Example CT image data.</figcaption>
</figure></p>
<figure>
<img class="svImg svImgMd" src="documentation/simcardio/cardiacModeling/images/segmentation.png">
<figcaption class="svCaption" >Segmentation results of the CT image data.</figcaption>
</figure>
</section>
<section id="auto-meshing" class="subgroup"><h1>Automatic LV Mesh Generation For Cardiac Flow Simulations</h1>
</section>
<section id="mesh-intro" class="subgroup"><h2>Introduction</h2>
<p>One application of the <strong>SimVascular Automatic Cardiac Segmentation</strong> tool is to generate left venticle (LV) meshes from the segmentation results. We can use these meshes to perform computational fluid dynamics (CFD) modeling of LV flow combined with patient medical imaging data. A typical LV model construction pipeline usually starts with segmentation of the LV by manual delineation followed by mesh generation and registration techniques using separate software tools. In SimVascular, we have included an <strong>Automatic LV Mesh Generation</strong> tool to automate each of these steps to generate simulation-ready meshes with no or few human efforts.</p>
<p>The <strong>Automatic LV Mesh Generation</strong> tool takes in the generated segmentation and output reconstructed LV surface meshes for CFD simulations. Besides we also provide Python scripts for registering the surface meshes to compute wall motion using <a href='https://simpleelastix.github.io/'>SimpleElastix</a>. These registered surface meshes can also be interpolated to obtain sufficient temporal resolution.</p>
</section>
<section id="mesh-lv-surface" class="subgroup"><h2>Construct LV Surface Meshes with Tagged Boundary Faces</h2>
<h3>Using SimVascular Python Shell</h3>
<ul>
<li>Similarly, we can use SimVascular’s Python Shell to run the prediction script. The SimVascular Python Shell can be invoked from the terminal according to the following instruction: <a href='http://simvascular.github.io/docsPythonInterface.html#python_shell' target='_blank' class='url'>http://simvascular.github.io/docsPythonInterface.html#python_shell</a>. The surface generation script <code>surface_main.py</code> can be found here in SimVascular’s source code: Python/site-packages/sv_auto_lv_modeling/modeling/surface_main.py
<pre><code class='language-shell' lang='shell'>
# Path to SimVascular exectuable
data_path=/path/to/data
sv_python_dir=/usr/local/bin
script_dir=SimVascular/Python/site-packages/sv_auto_lv_modeling
# Path to the segmentation results
p_id=WS01
input_dir=$data_path/02-Segmnts/$p_id
# Path to the outputed surface meshes
output_dir=$data_path/03-Surfaces/$p_id
model_script=$script_dir/modeling/surface_main.py
# Construct LV surface meshes with tagged boundary faces
${sv_python_dir}/simvascular --python \
-- ${model_script} \
--input_dir ${input_dir} \
--output_dir ${output_dir} \
--edge_size 3.5 # maximum edge size for the mesh
</code></pre>
</li>
</ul>
<h3>Using SimVascular Python Console</h3>
<ul>
<li>We can also use the Python console in SimVascular GUI to run the prediction script. Within the Python plugin, we can use the <strong>Text Editor</strong> mode and enter the following lines to create a Python script.
<pre><code class='language-python' lang='python'>from auto_lv.auto_lv import Modeling
data_path='/path/to/data'
surf = Modeling()
surf.set_segmentation_directory(data_path+'/02-Segmnts/WS01')
surf.set_output_directory (data_path+'/03-Surfaces/WS01')
surf.set_max_edge_size (3.5)
surf.generate_lv_modes ()
</code></pre>
</li>
</ul>
<figure>
<img class="svImg svImgMd" src="documentation/simcardio/cardiacModeling/images/surface.png">
<figcaption class="svCaption" >Automatically created LV meshes at diastole and systole.</figcaption>
</figure>
</section>
<section id="mesh-volume" class="subgroup"><h2>Volumetric Meshing using SimVascular</h2>
<h3>Using SimVascular Python Shell</h3>
<p>The volumetric meshing script <code>volume<em>mesh</em>main.py</code> can be found here in SimVascular’s source code: Python/site-packages/sv<em>auto</em>lv<em>modeling/modeling/volume</em>mesh_main.py</p>
<pre><code class='language-shell' lang='shell'>
# Path to SimVascular exectuable
data_path=/path/to/data
sv_python_dir=/usr/local/bin
script_dir=SimVascular/Python/site-packages/sv_auto_lv_modeling
p_id=WS01
# Path to the surface meshes
input_dir=$data_path/04-SurfReg/$p_id
# Path to the outputed volume meshes
output_dir=$data_path/05-VolMesh/$p_id
volume_mesh_script=$script_dir/modeling/volume_mesh_main.py
# Volumetric Meshing using SimVascular
${sv_python_dir}/simvascular --python \
-- ${volume_mesh_script} \
--input_dir $input_dir \
--output_dir $output_dir \
--phase 0 \ # the phase id in $input_dir to generate a volumetric mesh
--edge_size 3.5
</code></pre>
<h3>Using SimVascular Python Console</h3>
<p>Within the Python plugin, we can use the <strong>Text Editor</strong> mode and enter the following lines to create a Python script.</p>
<pre><code class='language-python' lang='python'>
from auto_lv.auto_lv import VolumeMesh
data_path='/path/to/data'
vol = VolumeMesh()
vol.set_output_directory (data_path+'/05-VolMesh/WS01')
vol.set_max_edge_size (3.5)
vol.set_surface_model_filename (data_path+'/04-SurfReg/WS01/WS01_0.vti.vtp')
vol.generate_volume_mesh()
</code></pre>
</section>
<section id="mesh-register" class="subgroup"><h2>Mesh Registration</h2>
<p>We can simulate the LV flow over time by tracking the deformation of the heart from time-resolved imaging and imposes this motion to the fluidic domains inside the heart, which leads to a deforming-domain CFD problem. To be able to track the deformation of the generated LV mesh over time, we need to building point-corresponded LV meshes from segmentations at all time frames. We generate a surface mesh at one time frame and propagated to the others using the displacement field obtained from registering the corresponding segmentations.</p>
<p>We will need <a href='https://github.com/SuperElastix/SimpleElastix'>SimpleElastix</a> to perform the registration. One commit that is compatible with our code is 8244e0001f4137514b0f545f1e846910b3dd7769. The registration script <code>elastix<em>main.py</code> can be found here in SimVascular’s source code: Python/site-packages/sv</em>auto<em>lv</em>modeling/modeling/elastix_main.py</p>
<pre><code class='language-shell' lang='shell'>
# Use SimpleElastix to register surface meshes
data_path=/path/to/data
sv_python_dir=/usr/local/bin
script_dir=SimVascular/Python/site-packages/sv_auto_lv_modeling
# Path to the ct/mr images or segmentation results
p_id=WS01
image_dir=$data_path/01-Images/$p_id
mask_dir=$data_path/02-Segmnts/$p_id
# Path to the unregistered surface mesh
surface_dir=$data_path/03-Surfaces/$p_id
# Path to the registered surface meshes
output_dir=$data_path/04-SurfReg/$p_id
# Phase ID of the surface mesh used as the registration source
start_phase=0
# Registration with SimpleElastix
python $script_dir/modeling/elastix_main.py \
--image_dir $mask_dir \
--mask_dir $mask_dir \
--output_dir $output_dir \
--start_phase $start_phase \
--surface_dir $surface_dir \
--image_file_extension vti \
--edge_size 3.5
</code></pre>
</section>
<section id="mesh-motion" class="subgroup"><h2>Compute Mesh Motion from Registered Meshes</h2>
<p>Once we have registered meshes, we can then compute the displacement on each mesh vertex over the whole cardiac cycle. As the temporal resolution of time-series image data is usually not high enough for CFD simulations, we can apply cublic spline interpolation to the registered meshes to obtain finer and smooth mesh displacements. We provide a Python script to interpolate the meshes, compute the mesh motion, and write out a <code>.dat</code> file for each boundary face that can used in svFSI to set up the displacement boundary conditions. The interpolation script <code>interpolation.py</code> can be found here in SimVascular’s source code: Python/site-packages/sv<em>auto</em>lv_modeling/modeling/svfsi/interpolation.py.</p>