-
Notifications
You must be signed in to change notification settings - Fork 11
/
docssvFSI-FSI.html
650 lines (470 loc) · 64.2 KB
/
docssvFSI-FSI.html
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
<!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" class="divider"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="docsQuickGuide.html"><b><span class="icon ion-ios7-bolt"></span> Getting Started</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>
<li role="presentation"><a role="menuitem" tabindex="-1" href="docsReferences.html"><b><span class="icon ion-refresh"></span> References </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="https://github.com/SimVascular/SimVascular/wiki/wiki_for_developers"><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://github.com/SimVascular/SimVascular/wiki/"><b><span class="fa fa-file-text-o"></span> Wiki</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 mansvFSI-FSI"> <!--Nav Bar -->
<p><h3>Fluid-Structure <br> Interaction</h3></p>
<li><a href="#intro">Introduction</a></li>
<li><a href="#wall_mesh">Creating FSI meshes</a></li>
<li><a href="#svFSI_simulation">Setting up an svFSI <br> simulation</a></li>
<li><a href="#sim_results">Example simulation results</a></li>
<li><a href="#app_meshmixer">Appendix: Making wall mesh <br> with Meshmixer</a>
<ul class="nav nav-stacked">
<li><a href="#app_fluid_geometry">Creating the fluid geometry</a></li>
<li><a href="#app_solid_geometry">Creating the solid geometry</a></li>
<li><a href="#app_solid_mesh">Creating the solid mesh</a></li>
<li><a href="#app_fluid_mesh">Creating the fluid mesh</a></li>
</ul>
</li>
<li><a href="#app_restart_after_remesh">Appendix: Restart after remesh</a></li>
</ul>
</nav>
<!--Main Content -->
<div class="col-xs-10 col-sm-10 col-md-9 col-lg-9" id="manualContent">
<!-- ACTUAL CONTENT -->
<div class="mansvFSI-FSI"><section id="intro" class="group"><h2>Fluid-Structure Interaction Modeling using <strong>svFSI</strong></h2>
<figure>
<img class="svImg svImgMd" src="documentation/svfsi/fsi/imgs/Picture1.png" style="width:100%;height:auto;max-width: 30vw;">
<figcaption class="svCaption" >Fluid and structure mesh are first created separately, and then used in svFSI to perform Fluid-Structure-Interaction simulations with Arbitrary Lagrangian–Eulerian (ALE) coordinates.</figcaption>
</figure>
<p>Cardiovascular applications that involve significant deformation are difficult to simulate and model. Some examples include vascular simulations where the wall dilates to more than 10% of the vessel diameter, cardiac simulations where the heart wall displaces as it contracts and expands, or coronary simulations where the coronary vessels displace with the motion of the heart.</p>
<p>One way to computationally model situations like these is to use a fluid-structure interaction (FSI) solver. In FSI, separate domains are defined for the fluid part and solid parts of the computational geometry. The respective equations governing fluid flow (typically Navier-Stokes) are solved in the fluid domain, while the equations governing solid mechanics are solved in the solid domain. The two domains then interact through their <em>interface</em> where the solution variables (displacements, velocities, pressures, stresses) are required to match. This interface acts as a coupled boundary condition for both domains, as the solution of one domain will affect the solution in the other, and vice-versa.</p>
<p><strong>svFSI</strong> utilizes Arbitrary Lagrangian-Eularian (ALE) method to perform FSI. As the name implies, this method is a combination of the Eularian and Lagrangian descriptions of motion that is particularly well suited for FSI problems. In the Eularian description, the computational mesh stays fixed and the motion is characterized as velocities flowing past the grid nodes. The Eularian description is typical for most fluid dynamics problems without FSI. While in the Lagrangian description, the mesh nodes move exactly with the motion of the fluid or solid and thus are often characterized as <em>moving domain</em> problems. Lagrangian problems are also often described in terms of the <em>reference</em> configuration (the initial computational geometry before any motion) and the <em>current</em> configuration (the current state of the geometry and mesh nodes). ALE combines these descriptions into a formulation that is convenient for describing FSI problems, where the mesh motion does not exactly match with the fluid motion, but instead a <em>mesh velocity</em> term is added to the convective term in the Navier-Stokes equations. More information can be found in the literature.</p>
</section>
<section id="wall_mesh" class="group"><h2>Creating the mesh for ALE simulations</h2>
<p>To run an FSI simulation we need a mesh for both the structural domain and the fluid domain. These two meshes must have their interface nodes coincide exactly in order to satisfy the interfacial conditions that result from conservation of mass and momentum. The coincident nodes of the fluid mesh are mapped onto the corresponding nodes on the structural mesh and the solution of velocity, displacement, pressure, etc. are treated as equal in the structural and fluid domains.</p>
<p>The fluid domain geometry for patient-specific anatomies are generated using the usual <a href="http://simvascular.github.io/docsModelGuide.html">SimVascular modeling pipeline</a>. To create the geometry for the structural domain, we will make use of the <a href="https://simvascular.github.io/docsMeshing.html#tetgenboundarylayer">boundary layer meshing feature</a> in the <code>Meshing</code> module. The usual case for boundary layer meshing involves extruding this thin layer of elements <em>inwards</em>, starting from the walls and going into the direction of the vessel centers. To make a wall mesh, we will instead use the boundary layer meshing feature to extrude elements <em>outwards</em> to effectively make a new mesh with a specified thickness that surrounds our fluid domain. This new mesh will form the geometry of our structural domain.</p>
<p>Before we use the boundary layer meshing to extrude outwards, it is extremely important that we thoroughly smooth our model. The outward extrusion of elements has the potential to cause some elements to extrude into each other and overlap, which will cause the extrusion to fail. This is especially true at bifurcations, where the extruded elements from the two daughter branches could easily run into each other near the junction if not properly smoothed. We will therefore make thorough use of the local smoothing tools in the Models module before meshing. Below is an example of a bifurcation that would normally occur after lofting segmentations together without smoothing. If we try to extrude a boundary layer mesh from this, the elements at the sharp corner will intersect with each other and cause it to fail.</p>
<figure>
<img class="svImg svImgSm" src="documentation/svfsi/fsi/imgs/sharp_bifurcation.png" style="width:100%;height:auto;max-width: 30vw;">
<figcaption class="svCaption" >Sharp bifurcation that will cause problems with wall mesh extrusion.</figcaption>
</figure>
<p>After creating your model from the Segmentations, you should see a list of all the surfaces in your model in the “Face List” section. The first thing we should do is remesh the entire surface to aid in the surface smoothing. Click on the “Global Ops” menu to the right of the “Face List”, then click on the “Remesh” option to open up the remeshing tool. Click “Estimate Size” to choose an appropriate size for your model, then hit “Remesh” beneath the selected size. This should remesh the surface with triangles that should all be approximately the same size.</p>
<figure>
<img class="svImg svImgMd" src="documentation/svfsi/fsi/imgs/global_remeshing.png" style="width:100%;height:auto;max-width: 30vw;">
<figcaption class="svCaption" >Remeshing in the Global Ops tab.</figcaption>
</figure>
<p>Now that we have remeshed our entire outer surface, we can start to smooth the walls. We only want to smooth the walls and leave the caps alone, so we will make use of the smoothing tools in the “Local Ops” tab. Use Ctrl + click to select all the “wall” surfaces in your model from the Face List, then click “Local Ops” to reveal the list of local operations. We will make use of the “Decimation” and “Cstr. Smooth” tools to perform our smoothing. Decimation will smooth the outer surface of the model by reducing the amount of surface triangles, while Cstr. Smooth will attempt to fillet over any sharp angles in the model while retaining the overall volume. Using these tools in tandem will iteratively smooth the model.</p>
<p>Before starting, check to confirm that all of the wall surfaces are selected in the “Face List” and none of the caps are selected. Now click the “Decimation” to open the Decimation menu, then click “Decimate Local” to decimate using the default settings.</p>
<figure>
<img class="svImg svImgSm" src="documentation/svfsi/fsi/imgs/deimation_pic.png"style="width:100%;height:auto;max-width: 30vw;">
<figcaption class="svCaption" >Local decimation.</figcaption>
</figure>
<p>Now, click “Cstr. Local” to open up the constrained smoothing menu, then click “Smooth Local” to perform smoothing with the default settings. You should notice your model is a little smoother at the junctions.</p>
<figure>
<img class="svImg svImgSm" src="documentation/svfsi/fsi/imgs/constrained_smooth_pic.png"style="width:100%;height:auto;max-width: 30vw;">
<figcaption class="svCaption" >Local constrained smoothing.</figcaption>
</figure>
<p>Repeat this cycle of Decimation and Constrained Smoothing several times to achieve a smoothed model. We recommend at least 10 repetitions of decimation and constrained smoothing. Repeated use of the Decimation feature will sometimes cause the surface of your model to lose so many triangles that the surface loses many of its key geometrical features. It is thus recommended to do a global remeshing every 5 decimations to ensure adequate surface accuracy. Once you are done smoothing, your bifurcations should be sufficiently smoothed and look something like this.</p>
<figure>
<img class="svImg svImgSm" src="documentation/svfsi/fsi/imgs/smooth_bifurcation.png" style="width:100%;height:auto;max-width: 30vw;">
<figcaption class="svCaption" >Smooth bifurcation.</figcaption>
</figure>
<p>Now that we have a smoothed model, we can open the “Meshes” module. Right-click on “Meshes” in the SV Data Manager and click “Create Mesh”. A new window will pop up asking you which model you would like to mesh, which meshing package to use, and the mesh name. Select the model you just smoothed in the previous step, select TetGen for the meshing package, and choose a name. You may leave the name section blank and SV will use the same name as your model. Once you have made these selections, the “SV Meshing” window should open and look like the image below.</p>
<figure>
<img class="svImg svImgMd" src="documentation/svfsi/fsi/imgs/meshing_window.png" style="width:100%;height:auto;max-width: 30vw;">
<figcaption class="svCaption" >SV Meshing.</figcaption>
</figure>
<p>We must first select an appropriate “Global Max Edge Size” for our model. This edge size will determine the thickness of our wall mesh. We will remesh the volume of the fluid and solid domains later, so select the edge size to be <em>double</em> what your desired thickness is. We select this to be double to cut down the meshing time. If you are not sure how to select the thickness of your model, choosing a thickness that is 10% of the mean radius in your model is a reasonable assumption used throughout the literature. Below the edge size selection, you should see a box to select boundary layer meshing. First, click the checkbox next to “Boundary Layer Meshing” to turn it on. Below this, you should notice three spaces to select parameters of the boundary layer meshing. Since we are producing this boundary layer for the wall mesh, we can use the same settings for these. “Portion Edge Size” determine the overall thickness of our boundary layer mesh, as a fraction of the “Global Max Edge Size” selected above. Since we selected a “Global Max Edge Size” to be double our desired thickness, we want this parameter to be 0.5. Next, you will have to choose the “Number of Layers” in your boundary layer mesh. Increasing this number will increase the accuracy of your structural domain calculations but also increase the number of elements and thus increase your cost. A reasonable number for this parameter is 2. Last, we must select the “Layer Decreasing Ratio”, which is a parameter that allows subsequent layers to be a smaller size than the one before it. Since this parameter does not matter too much for creating a wall mesh, we can select this to be 1.0 to make it so all our layers are the same size.</p>
<p>Below these parameter are three checkboxes. The “Extrude Boundary Layer Inward from Wall” checkbox will extrude the boundary layer mesh inwards if selected. Since we want to extrude the boundary layer mesh <em>outwards</em>, we will uncheck this box. The next box is a setting for “Use Constant Boundary Layer Thickness”, which will attempt to make the entire boundary layer the same thickness if selected. We recommend leaving this box unchecked so the boundary layer mesh can adaptively change thickness in areas of tricky geometry. The last checkbox, “Convert Boundary Layer to New Region/Domain”, is very important. We want to check this so that we will have a way to separate the fluid and structural domains later.</p>
<p>Now, you are ready to run the mesher. Click “Run Mesher” near the top right of the “SV Meshing” window to run the mesher. If the meshing was successful, you should see a window pop up to inform you of the statistics of your mesh. If the meshing was unsuccessful, it is likely that your model may need to be smoothed more to avoid intersecting elements. Once you are successful in producing this boundary layer mesh, right-click it from the SV Data Manager, and click “Export Mesh-Complete” and choose a location to send the mesh.</p>
<p>Navigating to the location where you saved the mesh-complete, you should see that SimVascular has produced two folders. One folder contains the mesh for the fluid part (i.e. domain-1) and the other folder contains the mesh for the structural part of your domain (i.e. domain-2). These two folders are the inputs that are needed in the next step, which is setting up the simulation. We need to do one extra step in this phase before launching the svFSI plugin. If you go into the mesh-complete folder for the fluid domain, you should notice that there is a file called “walls<em>combined.vtp”. We will need to copy this file into the “mesh-surfaces” folder. Now go into the “mesh-surfaces” folder, and you should notice that there are many “wall"faces. We need to move these out of this folder. Select all of the "wall” faces, EXCEPT for “walls</em>combined.vtp” and move them to the parent folder. The walls<em>combined file will contain all the information from the other walls, but combined into 1 file to make assigning boundary conditions easier. In the end, your mesh-surfaces folder should contain .vtp files for each of the caps and the walls</em>combined.vtp. An example with an aorta model is shown below:</p>
<figure>
<img class="svImg svImgMd" src="documentation/svfsi/fsi/imgs/fluid_mesh_surfaces.png" style="width:100%;height:auto;max-width: 30vw;">
<figcaption class="svCaption" >mesh-surfaces folder for the fluid domain.</figcaption>
</figure>
<p>Now exit from this folder, and enter the mesh-complete folder for the structural domain (i.e. domain-2). Inside this folder, you should notice two walls<em>combined (region</em>0 and region<em>1). We will need to copy both of these into the mesh-surfaces folder. The region</em>0 file is the .vtp which designates the interface between the solid and fluid domains, while region<em>1 is the outer wall. Navigate into the mesh-surfaces folder, and like we did in the fluid domain, remove all wall files EXCEPT for the two walls</em>combined files that we just put in here. Once you are done, your mesh-surfaces folder for the structural domain should look like below, where there is a surface for each cap in the model and the two walls_combined.</p>
<figure>
<img class="svImg svImgMd" src="documentation/svfsi/fsi/imgs/solid_mesh_surfaces.png" style="width:100%;height:auto;max-width: 30vw;">
<figcaption class="svCaption" >mesh-surfaces folder for the solid domain.</figcaption>
</figure>
</section>
<section id="svFSI_simulation" class="group"><h2>Basic GUI plugin use</h2>
<p>The plugin provides a GUI with which to create input files for your svFSI simulation using SimVascular. In this section, we will describe how to set up a fluid-structure interaction simulation of flow in a thick-walled blood vessel. For simplicity in presentation, we assume that the vessel has only one inlet and outlet. Before setting up a fluid-structure interaction job, one should have a mesh for the fluid domain and a mesh for the annulus (artery wall) domain as described above. We have provided you with an example meshes for the fluid domain of a cylinder and the solid domain of the cylinder.</p>
<p>Initiate a job by pressing “New Job.” Click the job in the SV Data Manager, and ensure that it appears in the plugin window. The “Domains” panel allows one to add meshes to the simulation for the different physical domains. Click “Add Mesh-Complete” and select the fluid mesh. You should see three faces appear, one for in the inlet, outlet and fluid-solid interface. Ensure that the button for “fluid” is selected.</p>
<figure>
<img class="svImg svImgMd" src="documentation/svfsi/fsi/imgs/domains_panel.png" style="width:100%;height:auto;max-width: 30vw;">
<figcaption class="svCaption" >The domains panel.</figcaption>
</figure>
<p>Click “Add Mesh-Complete” and select the solid mesh. You should see four faces appear, one for in the solid inlet and outlet outlet (through which we expect no flow), one for the fluid-solid interface, at which the fluid and solid domains will be coupled, and one for the outer annulus wall, which the the edge of the physical domain of our problem. Ensure that the button for “solid” is selected.</p>
<p>The next panel “Physics,” which allows one to select the appropriate differential equations for your problem. Select “FSI” for a coupled fluid-structure interaction simulation and click the right arrow. This will also add “Mesh Motion,” based on the ALE method, to the domains. In the list of added equations, click “FSI” to set fluid-structure parameters. Suppose for now that we are working in CGS units. Set fluid density to 1.06 g/cm$^{3}$, viscosity to 0.04 g/(cm s), solid density to 1.06 g/cm$^{3}$, Set the elastic modulus to a nominal value of $7e7$ dynes/cm$^{2}$ (See <span>https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4009743/</span>). We expect the artery wall to be nearly incompressible, and set the Poisson ratio to 0.49. Finally, select a “nHK” for a neo-Hookean solid.</p>
<figure>
<img class="svImg svImgMd" src="documentation/svfsi/fsi/imgs/physics_panel.png" style="width:100%;height:auto;max-width: 30vw;">
<figcaption class="svCaption" >The physics panel.</figcaption>
</figure>
<p>The mesh update equation determines the mesh dynamics in the ALE method. The parameter in the physics tab for this equation is the Poisson’s ratio, which should be set in the interval (0,.5), not too close to the boundary. A good default is .3.</p>
<p>The next tab is “output.” Select a quantity such as “WSS” for wall sheer stress, and click the right arrow to add it to variables that are output. Generally, for each piece of physics, there is a separate list of output variables. In the ALE method, since mesh motion is considered a separate domain and it has its own set of outputs.</p>
<p>The next tab is “boundary conditions.” Select “add,” which brings up a boundary condition menu. From there, select the type of boundary condition and other parameters accordingly. Set the lumen inlet to be a constant value Dirichlet condition of -10 cm$^{3}$/s. Select “impose flux” and a parabolic profile. Set the lumen outlet to be a constant value Neumann condition with value zero, corresponding to zero applied traction at the outlet. Set the annulus inlet and outlet to be zero Dirichlet boundary conditions, corresponding to zero displacement, which will hold them in place through the simulation. Set the annulus outer wall to a zero Neumann condition, which specifies no applied traction on the outer boundary of the physical domain.</p>
<figure>
<img class="svImg svImgMd" src="documentation/svfsi/fsi/imgs/dirichlet_bc.png" style="width:100%;height:auto;max-width: 30vw;">
<figcaption class="svCaption" >Setting a Dirichlet boundary condition.</figcaption>
</figure>
<p>To couple the fluid and solid at their interface, set a Dirichlet boundary condition on “interface_solid.” Under options, select “projection” and pick the face “interface_fluid.” Do not apply a separate boundary condition for “interface_fluid,” as the coupling will handle the updates. (Note that one must click Dirichlet or Neumann to get the projection box to appear. Such a condition is not added to the input file.)</p>
<figure>
<img class="svImg svImgMd" src="documentation/svfsi/fsi/imgs/projection_bc.png" style="width:100%;height:auto;max-width: 30vw;">
<figcaption class="svCaption" >Setting a projection boundary condition at the fluid/solid interface.</figcaption>
</figure>
<p>For the mesh equation, set zero Dirichlet conditions on the lumen inlet and outlet. Do not set boundary conditions for the other faces.</p>
<p>The advanced tab options are described here, but changes are not needed for basic simulations. The button “coupled” allows the user to specify a lumped parameter network for model inlets and outlets. This requires compiling a separate executable and is beyond the scope of this tutorial. Tolerance controls when the nonlinear Newton’s iteration terminates. Residual dB reduction terminates also terminates the nonlinear Newton’s iteration, in this case when the residual decreases sufficiently from iteration to iteration. Min iterations and max iterations determines the range of nonlinear iterations allowed. Backflow stabilization sets the value of the coefficient that reduces the so-called “open-boundary instability.” This is required to be in (0,1), but is best left at the default value of .3.</p>
<p>A number of linear solver parameters are available; the default should suffice for now. Finally, there is “Remesher.” If this is off, then the ALE solver will not re-mesh the domains, regardless of mesh distortion. If this value is set to “TetGen,” then the ALE solver will re-mesh automatically when it decides it is necessary. Set the max edge sizes to be the same as your previous mesh spacings for each domain. Use default values for the remaining parameters.</p>
<p>The “Simulation Parameters” panel allows specification of general parameters for the solver. First, set the desired time step and number of steps. The value of the time step depends on your desired resolution in time and the maximum stable time step for your problem, which is determined by the spatial resolution of the mesh, underlying physics and choice of spatial discretization. The option “start from a previous simulation” allows restarting from a previous simulation. This is useful if there was a problem, or one simply wants to run the simulation for longer without re-running the first set of time steps. Under “Save simulation results,” the value start determines the first time step that is output. Increment determines how often output files are saved. Set this to one to output every time step, or to a larger value to only save a subset of the steps.</p>
<figure>
<img class="svImg svImgMd" src="documentation/svfsi/fsi/imgs/simulation_panel.png" style="width:100%;height:auto;max-width: 30vw;">
<figcaption class="svCaption" >The simulation panel.</figcaption>
</figure>
<p>Finally, on the “Run Simulation” panel, click “Create Input File” to create the necessary files to run your simulation. If you wish to run with more than one processor, increase the slider accordingly. Finally, click “Run” to run your simulation.</p>
<p>svFSI will create a directory called n-procs, where n is the number of MPI tasks for the simulation. This directory will contain .vtu files that with values of all requested fields, as well as a log file called history.dat and averages of various quantities over time.</p>
</section>
<section id="sim_results" class="group"><h2>Example simulation results</h2>
<p>In this section, we show some example simulation results using the provided cylinder model. We will simply inflate the cylinder using a ramp for the pressure with a resistance outlet. Because the velocities and pressures in the domain are usually initialized to zero, it can be a good idea to slowly ramp up the pressure to avoid any sudden jump conditions that could produce oscillations. We apply a resistance boundary condition at the outlet to ensure a physiologic amount of flow. Below shows the inlet pressure vs. time, showing that we will ramp up slowly from 0 pressure to 80 mmHg over the course of a second.</p>
<figure>
<img class="svImg svImgMd" src="documentation/svfsi/fsi/imgs/ramp_pressure.png" style="width:100%;height:auto;max-width: 30vw;">
<figcaption class="svCaption" >Ramp pressure.</figcaption>
</figure>
<p>For reference, this simulation was run on a parallel cluster using 48 processors. Overall the simulation took about 10 hours to complete 1000 timesteps. The figure below shows the resulting displacement distribution. The wall has a thickness of approximately 0.016 cm, and we selected a physiologic Young’s modulus of about 1 MPa. The figure below shows the resulting displacement distribution across the cylinder.</p>
<figure>
<img class="svImg svImgMd" src="documentation/svfsi/fsi/imgs/cylinder_displacements.png" style="width:100%;height:auto;max-width: 30vw;">
<figcaption class="svCaption" >Cylinder displacements.</figcaption>
</figure>
</section>
<section id="app_meshmixer" class="group"><h2>Appendix: Creating the mesh for ALE simulations using Meshmixer</h2>
<p>In this appendix section, we discuss an alternative method for producing a wall mesh using the software Meshmixer. For users with highly complex geometrical models with a large number of bifurcations, this method provides a higher degree of flexibility and robustness, at the cost of a higher number of steps and higher complexity.</p>
<p>To run an FSI simulation we need a mesh for both the structural domain and the fluid domain. These two meshes must have their interfacial nodes coincide exactly in order to satisfy the interfacial conditions that result from conservation of mass and momentum. The coincident nodes of the fluid mesh are mapped onto the corresponding nodes on the structural mesh and the solution of velocity, displacement, pressure, etc. are treated as equal in the structural and fluid domains.</p>
<p>We will now go through the procedure to create such a mesh step by step.</p>
<ol>
<li>Create the geometry for the fluid domain</li>
<li>Create the geometry for the structural domain</li>
<li>Create the mesh for the structural domain</li>
<li>Create the mesh for the fluid domain</li>
</ol>
<p>We will use both SimVascular and Meshmixer, which is a freely available software from <a href="https://www.meshmixer.com">https://www.meshmixer.com</a>.
Meshmixer is a versatile tool that is useful for preparing meshes.
We will cover a subset of features in Meshmixer that is convenient for preparing meshes for FSI simulations, but more detailed documentation can be found at <a href="https://www.mmmanual.com">https://www.mmmanual.com</a>.</p>
</section>
<section id="app_fluid_geometry" class="group"><h3>Creating the geometry for the fluid domain</h3>
<p>For most cardiovascular modeling applications, the geometry of the fluid domain is generated by segmenting blood vessels out of medical image data. This process is described on the main SimVascular documentation: http://simvascular.github.io/docsModelGuide.html. We now want delete all the caps off the model. Once you have done that, export it by right-clicking the model from the left-hand menu and selecting “Export as Solid Model”. When SimVascular prompts you for a name and location for the exported model, make sure to add an .stl extension to make sure the exported model is in .stl format. We will perform the next step in Meshmixer, and Meshmixer only takes in .stl format surfaces.</p>
<figure>
<img class="svImg svImgMd" src="documentation/svfsi/fsi/imgs/SV_Export_as_stl1.png" style="width:100%;height:auto;max-width: 30vw;">
<figcaption class="svCaption" >Exporting the fluid geometry from SimVascular as an .stl for Meshmixer.</figcaption>
</figure>
</section>
<section id="app_solid_geometry" class="group"><h3>Creating the solid model for the structural domain</h3>
<p>In this step, we will import the fluid geometry into Meshmixer and utilize Meshmixer’s “Extrude” feature to create the wall geometry on top of the fluid. The resulting structural geometry resembles a “shell” that surrounds the fluid domain. We will also be using many of the geometry altering features within Meshmixer to smooth the structural geometry. Extrusions in Meshmixer often create intersecting elements and rough patches of geometry that are not suitable for meshing. These must be cleaned up in Meshmixer before meshing in SimVascular.</p>
<ol>
<li><p>Import the .stl file for the fluid domain into Meshmixer</p>
<p>When you open Meshmixer, you should see a button called “Import” that appears near the middle of the screen with a plus sign (+). Click this and select the fluid domain .stl that you created in the last step. After importing, you should see your fluid domain model appear in the main window as shown below.</p>
<figure>
<img class="svImg svImgLg" src="documentation/svfsi/fsi/imgs/opening_meshmixer.png" style="width:100%;height:auto;max-width: 30vw;"
<figcaption class="svCaption" >Opening Meshmixer and importing a fluid model.</figcaption>
</figure>
<p>At this point, we are going to want to smooth all bifurcations and sharp angles in the fluid model. If we do not do this, extruding out the elements in these sections will cause the extruded elements to run into each other and intersect, which will cause problems when attempting to mesh. Ideally, we would like to turn all these sharp corners into rounded fillets, as if you rolled a ball of clay into the sharp corners.</p>
<p>We will cover three main ways to smooth a model in Meshmixer: sculpting, local remeshing, and local smoothing. These all work well for smoothing a model, and your usage of them will depend on your personal preference and what works best with the models you are working with. We will first cover each of these tools in detail to discuss how to use them, then we will outline a general procedure that uses these tools that can be applied to most bifurcations. But keep in mind that a different combination of these tools might work better for you and your models.</p>
<p>A couple notes to keep in mind before modifying the geometry of your fluid geometry. If you do not like a particular change that you just applied, you can undo it using Ctrl + Z. You can adjust the center of rotation of the camera by hovering your cursor over a part of your model and hitting C. This is useful when working on specific parts of the model, and the camera rotation center is way off. Also be sure to not modify the geometry around the caps as much as possible. The cap geometry must be maintained in order to get a proper wall mesh around them.</p>
<p>a. Sculpting in Meshmixer</p>
<figure>
<img class="svImg svImgLg" src="documentation/svfsi/fsi/imgs/sculpting_figure.png" style="width:100%;height:auto;max-width: 30vw;">
<figcaption class="svCaption" >Using the sculpting tool in Meshmixer.</figcaption>
</figure>
<p>Sculpting is the most dynamic of the smoothing tools we will cover in this tutorial, and provides immediate feedback on the reshaped geometry. It allows users to point at a particular region of their geometry, and remodels it according to the currently selected sculpting brush. This is usually very convenient to do some quick touch ups to a small region that you noticed looks off. To activate the sculpting tool, selecting the “Sculpt” button from the left-hand menu, which has a chisel icon. You should see the sculpting options menu appear on the left hand side of the screen, which in the left most figure above. At the top you should see a slider that goes between “Volume” and “Surface”, which you should switch to “Surface” for this tutorial. After selecting “Surface” and moving your cursor over your geometry, you should notice a circle appear where your cursor is, and the circle should hug the surface of your geometry. If you left-click, the sculpting tool will remodel your geometry inside the circle according to your selected brush and parameters.</p>
<p>Below that is a button for “Brushes”, which allows you to select the sculpting shape that you would like to apply. You are of course free to experiment with the other brushes, but we have found the “BubbleSmooth” brush to work the best for smoothing sharp junctions in cardiovascular models. Below in the Properties window, you should see sliders for “Strength” and “Size”, two important parameters. Strength will determine how aggressively the sculpting tool will remodel your geometry, with higher numbers meaning more aggressive. When using the tool for the first time, we recommend using a low value of Strength, like 10, to see how it works. The Size parameter sets the radius of the sculpting circle. For smoothing the area between bifurcations, we recommend setting the Size such that the diameter of the sculpting circle is roughly the size of the space of the bifurcation.</p>
<p>b. Local remeshing in Meshmixer</p>
<figure>
<img class="svImg svImgLg" src="documentation/svfsi/fsi/imgs/using_remeshing.png" style="width:100%;height:auto;max-width: 30vw;">
<figcaption class="svCaption" >Using the remeshing tool in Meshmixer.</figcaption>
</figure>
<p>Local remeshing will reconfigure the triangle elements in a given region such that the triangles are all have roughly equal size, shape, and aspect ratio.These triangles will generally be higher quality than the initial discretization that comes out of SimVascular, especially at the bifurcations.To remesh a region, we first have to “Select” it. Click on the “Select” button from the left hand menu, which should change your cursor into a selection tool that you can left-click on your model to start selecting regions. Before we do, it is useful to change the select type and size to be convenient for your model. The “Sphere Brush” will allow you to select all the cells inside a sphere, while the “Unwrap Brush” will select cells in a flat circle that hugs your surface. The “Size” parameter changes the size of the sphere or unwrap brush and should be set to a value that is convenient for the region you are remeshing. Once you have selected a brush and size, left-click on the regions in your model you want to remesh, like all the elements around a bifurcation, for example. After all the elements have been selected, hit R on your keyboard to initiate remeshing. Alternatively, you can click the “Remesh” button that appears from the “Edit…” menu after you have selected a region.</p>
<p>For larger sized regions, it might a few seconds to a few minutes to remesh. After the initial remeshing is complete, the remeshing properties menu should appear on the left hand side of the screen that will allow you to select various properties. Two convenient properties to set are the remeshing type, and the density/edge size. The first drop down menu in the remeshing properties menu allows you to select the remeshing type, of which “Adaptive Density” and “Target Edge Length” are common selections. Setting the mode to “Adaptive Density” will cause the remeshing edge size to be selected adaptively based on local geometrical features. The amount of elements triangles packed into the remeshing can be adjusted by adjusting the “Density” slider, which higher densities resulting in a higher number of elements. More elements typically results in a more faithful representation of your geometry, at an added cost of requiring more memory. Setting the mode to “Target Edge Length” will allow users to adjust the number of elements based on the maximum Edge Length slider. Smaller edge lengths will result in more elements.</p>
<p>Once you get a remesh you are satisfied with, click the “Accept” button at the bottom of the remeshing properties. This will commit your remesh to the model and take you back to the selection tool with your current region still selected.</p>
<p>c. Local Smoothing in Meshmixer</p>
<figure>
<img class="svImg svImgLg" src="documentation/svfsi/fsi/imgs/using_smoothing.png" style="width:100%;height:auto;max-width: 30vw;">
<figcaption class="svCaption" >Using the smoothing tool in Meshmixer.</figcaption>
</figure>
<p>Local smoothing will attempt to smooth over any rough bumps or sharp corners automatically. This is usually useful to perform after remeshing a region to make sure the resulting remesh is smooth. Smoothing is achieved via the “Select” tool, just like remeshing. After selecting the region, press Ctrl + F to smooth the region. Alternatively, you can click “Deform…” then “Smooth” from the Select menu.</p>
<p>After the initial smoothing is complete, the smoothing properties menu will appear. Most of the time, the default settings for the smooth will provide adequate smoothing, though you are of course free to experiment and explore.</p></li>
<li><p>Extrude the fluid domain</p>
<p>After the fluid domain surface has been sufficiently smoothed at all sharp corners and bifurcations, we are now ready to extrude out the wall surface.</p>
<p>a. Select all (e.g. by choosing select and then hit Ctrl+a / Cmd+a)
b. Choose Edit > Extrude</p>
<p><figure>
<img class="svImg svImgMd" src="documentation/svfsi/fsi/imgs/MM_fig_Extrude1.png" style="width:100%;height:auto;max-width: 30vw;">
</figure></p>
<p>c. Choose your offset and the offset direction “normal”. This will extrude the wall in normal direction by your given offset. The offset will correspond to the thickness of the vessel wall. Typically, the thickness of the vessel wall is determined by the size of the vessels you are modeling. This information can often be found in the literature, but in the absence of such data, setting the thickness to 10% of the mean vessel diameter is a reasonable first approximation. If you prefer to have a variable thickness along the vessel, simply restrict your selection to the region you want to extrude by a given thickness. If you like the offset, hit “Accept”.</p>
<p><figure>
<img class="svImg svImgSm" src="documentation/svfsi/fsi/imgs/MM_fig_Extrude2.png">
</figure></p>
<p>d. If you do a plane cut of your model now it should look something like this:</p>
<p><figure>
<img class="svImg svImgMd" src="documentation/svfsi/fsi/imgs/MM_fig_Extrude_Planecut1.png" style="width:100%;height:auto;max-width: 30vw;">
</figure></p>
<p>In green you can see the surface of the fluid, and in purple the extruded surface.</p></li>
<li><p>Clean up the extruded surface</p>
<p>Even though we cleaned up the surface prior to extrusion, the extrusion will undoubtedly produce more intersecting, small, and poor quality elements. Use the sculpting, remeshing, and smoothing tools like we did earlier to clean up the model at the sharp corners and bifurcations again. One note when using the remeshing and smoothing tools: since there will be an interior fluid mesh along with the exterior surface mesh, it is important to select both when using the “Select” tool. In this scenario, it is often best to use the “Sphere Brush” when using the “Select” tool to get all the interior elements as well.</p>
<p>We will now outline a general recipe for extruding a fluid geometry to produce a structural geometry using the tools we just described. This is not the only way to do this, and if your geometry contains many complex features you will probably have to iterate several times to get an adequate structural geometry that can be used for FSI simulations.</p></li>
</ol>
<ul>
<li>After loading in the .stl for the fluid geometry, smooth the geometry at all the bifurcations by:
<ul>
<li>Use the “Sphere Brush” in the Select tool with a large enough size to select the entire region around a bifurcation.</li>
<li>Press “R” to remesh the region, select an appropriate edge size that captures the geometry well, then Accept.</li>
<li>While the region is still selected, Smooth it using Ctrl + F.</li>
<li>Use the “Sculpt” tool to further clean up the bifurcation to make it as smooth as possible.</li>
<li>Repeat for all other bifurcations.</li>
</ul></li>
<li>Extrude your model. Press Ctrl + A and extrude to use a uniform thickness or select individual parts of your model and extrude separately for variable thickness.</li>
<li><p>Smooth the post-extruded bifurcations using the same procedure as before.</p>
<ul>
<li>Use the “Sphere Brush” in the Select tool with a large enough size to select the entire region around a bifurcation.</li>
<li>Press “R” to remesh the region, select an appropriate edge size that captures the geometry well, then Accept.</li>
<li>While the region is still selected, Smooth it using Ctrl + F.</li>
<li>Use the “Sculpt” tool to further clean up the bifurcation to make it as smooth as possible.</li>
<li>Repeat for all other bifurcations.</li>
</ul>
<p>Below is an example of how a bifurcation looks before and after applying the above smoothing procedure. This example did not require much manual sculpting. But some bifurcations that produce sharp corners might require additional sculpting to ensure a smooth surface.</p>
<figure>
<img class="svImg svImgLg" src="documentation/svfsi/fsi/imgs/model_treatment_process.png" style="width:100%;height:auto;max-width: 30vw;">
<figcaption class="svCaption" >Smoothing bifurcations.</figcaption>
</figure>
<p>The solid model for the structural domain is finished. Export it as an stl file.</p>
<figure>
<img class="svImg svImgSm" src="documentation/svfsi/fsi/imgs/SV_Export_as_stl1.png" style="width:100%;height:auto;max-width: 30vw;">
</figure></li>
</ul>
</section>
<section id="app_solid_mesh" class="group"><h3>Create the solid domain mesh</h3>
<p>Similar to the way we create the mesh for the fluid domain in SimVascular (see: http://simvascular.github.io/docsMeshing.html) we can now create the mesh for the solid domain.</p>
<ol>
<li><p>Import the .stl of the structural domain geometry into SimVascular</p>
<p>Right-click on the “Models” button and choose “Import solid Model”, then select the .stl model you just exported from Meshmixer:</p>
<figure>
<img class="svImg svImgLg" src="documentation/svfsi/fsi/imgs/importing_solid_into_SV.png" style="width:100%;height:auto;max-width: 30vw;">
<figcaption class="svCaption" >Importing .stl model into SimVascular.</figcaption>
</figure></li>
<li><p>Extract faces, rename them if wanted</p>
<p>Extracting faces allows users to reference specific parts of the exterior of the model for applying boundary conditions. It is important to have separate faces that represent each of the inlet and outlet faces, the inner wall, and the outer wall.</p>
<p>To extract faces from your .stl, double-click on your newly imported model in the “Models” section of the left-hand menu to bring up the SV Modeling window. Then, click “Face Ops” and “Extract”. This should reveal a dialogue box asking for a “Sep. Angle”, which is a parameter that determines how aggressively to search for faces. SimVascular will check the direction of the outward facing normals in each element of the surface, and if it finds the difference in the angle between two normals to be greater than the threshold, it will assign them different faces. We recommend a value of 70 for the Sep. Angle., but this depends on the geometry of your model. After extracting faces, you should see a list of “noname” faces appear on the “Face List”. Ideally, you should have a face for each of the inlets and outlets and the inner wall and outer wall, for a total of (number of inlets and outlet) + 2. If you click a noname face from the list, it will highlight in yellow on your 3D model, and the surface area of the face will be displayed in the bottom left corner of the SimVascular Window.</p>
<p>Now is a good time to click each face on the list so you can confirm its location on the model, then rename it appropriately for your convenience. An example naming convention could be to call the inner wall “wall_inner”, the outer wall “wall_outer”, and all of the inlets and outlets as “perimeter_X”, where X is the name of the particular vessel.</p>
<p>This step can be difficult as Meshmixer often produces poor quality triangles that do not extract correctly in SimVascular. You will sometimes see many more faces in the Face List than you expected. If some or all faces are not correctly detected (number of faces is not correct or not correctly distinguished between faces) you can try to use a different separation angle and/or use the merge tool in SimVascular, or improve the affected areas in meshmixer, e.g. by smoothing, sculpting or remeshing them.</p>
<p>This situation most likely happens due to poor quality triangles being produced on the wall surfaces from either the extrusion or remeshing. This can be addressed with the surface treatment tools within SimVascular. Use Ctrl + click to select all the surfaces in your structural model EXCEPT for the perimeter surfaces that surround your caps. Then, under the “Face Ops” tab, click the “Combine” button to combine all of these faces into one. This will allow us to apply surface treatment on all of the walls and poor triangles. We now follow the usual procedure for smoothing surfaces. Now, click “Local Ops”, then “Decimation”, then click “Decimate Local” to decimate some triangles on that surface. Them click “Cstr. Smooth”, then “Smooth Local” to smooth the wall surfaces. This will hopefully eliminate all of the poor quality triangles. We now need to re-extract the inner and outer wall surfaces into separate faces. Go back to “Face Ops” then “Extract”. Select an extraction angle (70 degrees is usually good) and click “Extract Faces”. Hopefully now when you do this, you should see a much smaller list of faces. If the number of faces equals the number of inlets and outlets + 2, then you are in great shape.</p>
<p>You will want separate faces for each of the inlets and outlet perimeters, as well as a separate face for the inner wall and a separate face for the outer wall. This is so that we can apply boundary conditions on all of these faces. Clicking on each face in your Face List should highlight their locations in your structural model in yellow. Do this for each face to confirm their location and to confirm that all faces are accounted for.</p>
<figure>
<img class="svImg svImgLg" src="documentation/svfsi/fsi/imgs/extracting_faces.png" style="width:100%;height:auto;max-width: 30vw;">
<figcaption class="svCaption" >Extracting faces in SimVascular.</figcaption>
</figure></li>
<li><p>Create the structural mesh</p>
<p>Right-click on “Meshes” in the Data Manager Window and select “Create mesh”, then choose the structural domain model. If you double click on the newly created mesh item, the “mesh interactor” should open up. If the surface mesh of your structural model from Meshmixer was of a good spatial resolution, and quality, you may want to toggle off the option “Surface remeshing” (this will also speed up the meshing step, especially for larger models).</p>
<figure>
<img class="svImg svImgLg" src="documentation/svfsi/fsi/imgs/creating_structural_mesh.png" style="width:100%;height:auto;max-width: 30vw;">
<figcaption class="svCaption" >Creating volumetric solid mesh.</figcaption>
</figure></li>
<li><p>Run the mesher</p>
<p>This will create your solid domain mesh. Export the mesh by selecting “Export Mesh-Complete”. This will save a folder in the location of your choice that has all the mesh information. Inside this folder you will find a file called “mesh-complete.mesh.vtu” that contain the full volumetric mesh information of your model. You should also notice a folder called “mesh-surfaces” that has separate .vtp files for each of the extracted faces. Both the mesh-complete.mesh.vtu and all the .vtp mesh-surfaces are viewable in the free software Paraview.</p></li>
</ol>
</section>
<section id="app_fluid_mesh" class="group"><h3>Create the fluid domain mesh</h3>
<p>When making the mesh for the fluid domain, we need to ensure that the nodes at the interface between the structural and fluid domains coincide. We will thus use the surface mesh of the inner wall of the solid domain that we just created in the previous step. You will find it in the exported mesh in the sub-directory “mesh-surfaces” of your exported solid mesh. If you used the suggested naming convention from the previous step, this inner wall will be named “wall_inner”.</p>
<ol>
<li><p>Import the interfacial mesh of the solid domain by right-clicking “Models” in the SV Data Manager, then click “Import Solid Model”. Select the surface representing the interface between the structural and fluid domains (i.e. the “inner wall” of your structural domain mesh). Rename it as you wish.</p></li>
<li><p>Extract the face of the solid domain interface. You should get a single face which shows the entire wall. Rename it to something convenient like “wall_lumen”.</p></li>
<li><p>Fill holes with ID’s.</p>
<p>We now need to fill the inlet and outlet holes and name them so we can apply boundary conditions. Under the “SV Modeling” window, click the “Face Ops” button, then click the newly revealed “Fill Holes w. IDs”. This should place “noname” faces at each inlet and outlet of your fluid domain. Rename them to something convenient to remember, such as by the name of the vessel they are representing.</p></li>
<li><p>Remesh the inlets and outlets.</p>
<p>Filling the inlet and outlet holes produced geometry on those surfaces, but it does not have a mesh appropriate for computational modeling. We thus need to remesh them. Make sure you are under the “Face Ops” tab by clicking “Face Ops” on the right side of the screen. Clicking the blue “Remesh” button should reveal the Remeshing dialogue, which asks you to select an appropriate size of the elements. The element size you select should reflect the kind of accuracy and cost you would like to use in the FSI simulation. A good starting point is to use the same size that you used for the structural domain solid mesh, though they do not have to be equal. Remesh each of the inlet and outlet faces but DO NOT remesh the wall interface. This will ensure that the nodes still coincide with the structural domain nodes after this remeshing.</p>
<figure>
<img class="svImg svImgLg" src="documentation/svfsi/fsi/imgs/remesh_caps.png" style="width:100%;height:auto;max-width: 30vw;">
<figcaption class="svCaption" >Remeshing inlet and outlets of fluid domain.</figcaption>
</figure></li>
<li><p>Create the fluid domain mesh.</p>
<p>In the SimVascular DataManager right click “Meshes” and create a new mesh from the fluid model. This time, it is REQUIRED to toggle off the option “Surface mesh”. This is important, because it will keep the surface nodes exactly where they are. This way the nodes on the fluid interface will coincide with the nodes on structural interface. Choose your refinement to be consistent with the size of the elements you chose for the wall and caps, then run the mesher. Once it finishes, right-click your fluid mesh and click “Export Mesh-Complete”. You are done!</p>
<figure>
<img class="svImg svImgLg" src="documentation/svfsi/fsi/imgs/meshing_final_pic.png" style="width:100%;height:auto;max-width: 30vw;">
<figcaption class="svCaption" >Creating fluid domain mesh.</figcaption>
</figure></li>
</ol>
</section>
<section id="app_restart_after_remesh" class="group"><h2>Appendix: Restarting a simulation after re-meshing</h2>
<p>If a simulation is to be restarted after re-meshing has occurred, the new mesh must be added to the input file. svFSI will create a directory called n-procs, where n is the number of MPI tasks for the simulation, and we will refer to this as the run directory.</p>
<ol>
<li><p>In the run directory, find the stFile_n.bin. Make a symbolic link:</p>
<pre class="highlight plaintext"><code> ln -s stFile_n.bin stFile_last.bin
</code></pre>
<p>Note that if the previous job completed smoothly, this file may
already exist and no link is required to be made.</p></li>
<li><p>If remeshing has occurred, the run directory will contain a hidden
directory called “.remesh_tmp.dir”, which contains new mesh files
that should be named according according to their initial name and
the timestep of the last remesh. For example, lumen_21.vtu.</p></li>
<li><p>Change the input.mfs file to set a restarted simulation and for the
new mesh names.</p>
<ol>
<li> Set Continue previous simulation: 1</li>
<li> All new paths and names for mesh files should be updated,
including paths. For example, change
to 120-procs/.remesh_tmp.dir/lumen_21.vtu.</li>
<li> Set Check IEN order: F.</li>
<li> Update the final time if desired.</li>
</ol></li>
<li><p>Run the simulation again.</p></li>
</ol>
<p><br/><br/><br/><br/><br/></p>
</section></div>
</div>
</div>
<!-- /.container -->
<nav class="navbar navbar-default navbar-fixed-bottom">
<div class="container-fluid text-center">
<ul class="nav navbar-nav">
<li><a>Copyright © SimVascular Development Team - 2017</a></li>
</ul>
</div>
<!-- /.container -->
</nav>
<script src="js/jquery-1.11.0.js" type="text/javascript"></script><script src="js/bootstrap.min.js" type="text/javascript"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
});
$('body').scrollspy({
target: '.bs-docs-sidebar',
offset: 40
});
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-55333921-1', 'auto');
ga('send', 'pageview');
</script>
<script type="text/javascript"
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML">
</script>
</body>
</html>