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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
252 changes: 252 additions & 0 deletions documentation/svmp_user_guide.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,252 @@
<!DOCTYPE html>
<html lang="en" class="html">
<head>
<!-- This corresponds to a fontawesome kit but can be customized -->
<script src="https://kit.fontawesome.com/48644805cd.js" crossorigin="anonymous"></script>

<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

<!-- Custom Fonts -->
<link href="https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css">
<link href="//vjs.zencdn.net/4.8/video-js.css" rel="stylesheet">

<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.1.3/dist/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">

<!-- This applies styling to the elements that aren't generated from markdown -->
<link rel="stylesheet" href="../css/bootstrap.css">
<link rel="stylesheet" href="../css/grayscale.css">
<link rel="stylesheet" href="../css/standards.css">
<link rel="stylesheet" href="../css/documentation.css">

<!-- This applies styling to the markdown that is generated with the <zero-md> element -->
<script>
window.ZeroMd = {
config: {
cssUrls: ["../css/bootstrap.css","../css/grayscale.css","../css/standards.css","../css/shop-item.css","../css/documentation.css"]
}
}
</script>

<script>
MathJax = {
tex: {
inlineMath: [
['$', '$'],
['\\(', '\\)'],
],
},
};
</script>

<!-- This is the CDN that imports the code for the <zero-md> element -->
<script
type="module"
src="https://cdn.jsdelivr.net/gh/zerodevx/zero-md@1/src/zero-md.min.js"
></script>

<!-- browser tab labels -->
<link rel="shortcut icon" type="image/jpg" href="../img/svlogo/svIcon.png"></link>
<title>SimVascular Docs</title>

<!-- Google Analytics Manager -->
<script
async
src="https://www.googletagmanager.com/gtag/js?id=G-PQXFMVS01C"
></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag("js", new Date());

gtag("config", "G-PQXFMVS01C");
</script>
</head>

<body>
<section class="header">
<div class="row navRow">
<div class="col-6 topLeftLogo">
<!-- logo top left -->
<div class="headerLogoContainer">
<img id="logo" class="headerLogoImage" src="../img/svlogo/svLogoTitle.png" alt="SimVascular Logo"></img>
</div>
</div>
<div class="col-6 topRightBars">
<!-- The following code defines the navigation bar in the header -->
<div id="headerNavBar">
<details>
<summary><i class="fa-solid fa-bars" id="iconForSkip"></i></summary>
<div class="navBarSection">
<div class="navLink">
<a href="../index.html">
<i class="iconInHeader fa-solid fa-house"></i>Home
</a>
</div>
<details>
<summary class="navTitle"><i class="iconInHeader fa-solid fa-user"></i>User Guides</summary>
<div>
<div class="navSubLink">
<a href="quickguide.html">Getting Started</a>
</div>
<div class="navSubLink">
<a href="modeling.html">Modeling</a>
</div>
<div class="navSubLink">
<a href="meshing.html">Meshing</a>
</div>
<div class="navSubLink">
<a href="cfd_simulation.html">CFD Simulation</a>
</div>
<div class="navSubLink">
<a href="multi_physics.html">MultiPhysics</a>
</div>
<div class="navSubLink">
<a href="rom_simulation.html">ROM Simulation</a>
</div>
<div class="navSubLink">
<a href="genbc.html">General B.C.</a>
</div>
<div class="navSubLink">
<a href="python_interface.html">Python Interface</a>
</div>
<div class="navSubLink">
<a href="references.html">References</a>
</div>
</div>
</details>
<details>
<summary class="navTitle"><i class="iconInHeader fa-solid fa-stethoscope" style="padding-right: 15px"></i>Clinical Cases</summary>
<div>
<div class="navSubLink">
<a href="../clinical/coronary.html">Coronary Normal</a>
</div>
<div class="navSubLink">
<a href="../clinical/aortofemoral1.html">Aortofemoral Normal - 1</a>
</div>
<div class="navSubLink">
<a href="../clinical/aortofemoral2.html">Aortofemoral Normal - 2</a>
</div>
<div class="navSubLink">
<a href="../clinical/pulmonary.html">Healthy Pulmonary</a>
</div>
<div class="navSubLink">
<a href="https://simtk.org/projects/sv_tests">All Demo Projects</a>
</div>
</div>
</details>
</div>
</div>
</div>
</div>
</section>

<section class="mainSection">
<!-- The following code defines the navigation section on the left of the page -->
<section class="navigationSection" style="float: left">
<!-- The second class after "skipTo" is the ID of the <span> element
of the <zero-md> element that renders the markdown file -->
<div>
<h4 class="skipTo introduction">Introduction</h4>
</div>
<div>
<h4 class="skipTo example_1_intro">Example 1: Steady Rigid Simulation</h4>
<div>
<p class="skipTo meshing">Loading Mesh and Geometry into svMultiPhysics</p>
<p class="skipTo equations">Defining Equations and Fluid Properties</p>
<p class="skipTo boundary_conditions">Assigning Boundary Conditions</p>
<p class="skipTo time_marching">Time Marching Parameters</p>
<p class="skipTo output_quantities">Specifying Output Quantities</p>
<p class="skipTo linear_solver">Linear Solver Parameters</p>
<p class="skipTo file_management_and_miscellaneous">Output Control and File Management</p>
<p class="skipTo running_svmp">Running svMultiPhysics from Terminal</p>
<p class="skipTo runtime">Checking Simulation during Runtime</p>
<p class="skipTo sim_outputs">Checking Simulation Outputs</p>
</div>
</div>
</section>

<!-- The following code defines the place where the markdown files are rendered -->
<section class="docsSection" style="float: right">
<!-- To reference the section linked in the <zero-md> element,
reference the ID in the <span> element -->

<!-- All markdown files must be named readme.md -->

<!-- The first <zero-md> element should have the id="math" attribute -->
<!-- All <zero-md> elements should have the "no-shadow" attribute -->

<span id="introduction">
<zero-md id="math" src="svmp_user_guide/introduction/readme.md" no-shadow></zero-md>
</span>
<span id="example_1_intro">
<zero-md src="svmp_user_guide/example_1_steady_rigid_simulation/intro/readme.md" no-shadow></zero-md>
</span>
<span id="meshing">
<zero-md src="svmp_user_guide/example_1_steady_rigid_simulation/mesh/readme.md" no-shadow></zero-md>
</span>
<span id="equations">
<zero-md src="svmp_user_guide/example_1_steady_rigid_simulation/equations/readme.md" no-shadow></zero-md>
</span>
<span id="boundary_conditions">
<zero-md src="svmp_user_guide/example_1_steady_rigid_simulation/boundary_conditions/readme.md" no-shadow></zero-md>
</span>
<span id="time_marching">
<zero-md src="svmp_user_guide/example_1_steady_rigid_simulation/time_marching/readme.md" no-shadow></zero-md>
</span>
<span id="output_quantities">
<zero-md src="svmp_user_guide/example_1_steady_rigid_simulation/output_quantities/readme.md" no-shadow></zero-md>
</span>
<span id="linear_solver">
<zero-md src="svmp_user_guide/example_1_steady_rigid_simulation/linear_solver/readme.md" no-shadow></zero-md>
</span>
<span id="file_management_and_miscellaneous">
<zero-md src="svmp_user_guide/example_1_steady_rigid_simulation/file_management_and_miscellaneous/readme.md" no-shadow></zero-md>
</span>
<span id="running_svmp">
<zero-md src="svmp_user_guide/example_1_steady_rigid_simulation/running_svmp/readme.md" no-shadow></zero-md>
</span>
<span id="runtime">
<zero-md src="svmp_user_guide/example_1_steady_rigid_simulation/runtime/readme.md" no-shadow></zero-md>
</span>
<span id="sim_outputs">
<zero-md src="svmp_user_guide/example_1_steady_rigid_simulation/sim_outputs/readme.md" no-shadow></zero-md>
</span>
</section>
</section>
<section class="skipToTopSection">
<p id="skipToTop"><i class="fa-solid fa-arrow-up"></i></p>
</section>


<!-- The following code adds the Mathjax CDN to the html once it has been
rendered by the markdown files -->
<script>
math.addEventListener('zero-md-rendered', () => {
var el = document.createElement('script');
el.src = 'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js';
document.head.appendChild(el);
});
</script>

<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
<!-- <script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script> -->
<script src="../js/jquery-2.1.1.js"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.14.3/dist/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.1.3/dist/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-csv/1.0.21/jquery.csv.min.js"></script>

<!-- <script src="js/jquery-2.1.1.js"></script> -->
<script src="../js/jquery.mixitup.min.js"></script>

<script src="../js/documentation.js"></script>

</body>

</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@

### Assigning Boundary Conditions

The next step is to establish the boundary conditions. Boundary conditions specify the solution behavior at the exterior surfaces of the model that will be used to drive the solution. Recall from the `<Add_mesh>` section that we labeled each of the exterior surfaces according to the .vtp surface mesh files. We can now use these labels to define the boundary conditions. The figure below shows the boundary conditions we wish to specify for this model:

<figure>
<img class="svImg svImgMd" src="/documentation/svmp_user_guide/img/svmp_ug_ex1_model_and_bc.png">
<figcaption class="svCaption" >Descending Aorta model with inflow and outflow boundary conditions labeled.</figcaption>
</figure>

Boundary conditions are specified further down in the `<Add_equation>` section of the .xml file:

<Add_equation type="fluid">

...

<Add_BC name="cap_aorta">
<Type>Dirichlet</Type>
<Time_dependence>Steady</Time_dependence>
<Value>-100</Value>
<Profile>Parabolic</Profile>
<Zero_out_perimeter>true</Zero_out_perimeter>
<Impose_flux>true</Impose_flux>
</Add_BC>

<Add_BC name="cap_aorta_2">
<Type>Neumann</Type>
<Time_dependence>Resistance</Time_dependence>
<Value>2600</Value>
<Profile>Flat</Profile>
</Add_BC>

<Add_BC name="cap_right_iliac">
<Type>Neumann</Type>
<Time_dependence>Resistance</Time_dependence>
<Value>2600</Value>
<Profile>Flat</Profile>
</Add_BC>

<Add_BC name="wall_aorta">
<Type>Dirichlet</Type>
<Time_dependence>Steady</Time_dependence>
<Value>0</Value>
<Profile>Flat</Profile>
<Zero_out_perimeter>true</Zero_out_perimeter>
</Add_BC>

<Add_BC name="wall_right_iliac">
<Type>Dirichlet</Type>
<Time_dependence>Steady</Time_dependence>
<Value>0</Value>
<Profile>Flat</Profile>
<Zero_out_perimeter>true</Zero_out_perimeter>
</Add_BC>

Notice how there is a separate `<Add_BC>` section for each of the surfaces we defined earlier. The inlet face is “cap_aorta” where we wish to specify an inlet flow rate of $100 \ mL/s$. This value of $100 \ mL/s$ is slightly higher than the typical cardiac output of a healthy individual, but we round up for simplicity. Generally, you want to choose the values of your boundary conditions to match the physiologic data of the patient you are simulating. If you do not have data on specific patients, then using population average values is a reasonable assumption.

Boundary conditions that specify velocity or flow are classified as “Dirichlet” `<Type>` boundary conditions. The flow rate at the inlet is not changing with time, so we specify its `<Time_dependence>` to “Steady”. The `<Value>` for this boundary condition is set to $-100$. We use a negative sign for the value here to specify that the flow is going into the domain. A positive flow value would have the flow exiting the domain. The `<Profile>` setting specifies the spatial profile for the velocity on the face. We set this to “Parabolic” for this case to model the Hagan-Poisuelle solution for flow of a viscous fluid in a pipe. The Hagan-Poisuelle solution has the highest fluid velocity in the center of the vessel and decreases smoothly to a value of zero at the walls. To enforce the no-slip boundary condition at the walls, we set the `<Zero_out_perimeter>` setting to “true”. Finally, to specify that this boundary condition is for the flow (and not velocity), we set the `<Impose_flux>` setting to “true”.

Next, we specify the resistance outlet boundary conditions at the two other caps of the model. Resistance outlet boundary conditions assign a pressure that is proportional to the flowrate of blood passing through the face. Resistance outlet boundary conditions are common for vascular simulations to accurately to the vascular resistance of all smaller vessels downstream of the model. The viscosity of the blood combined with the small vessel sizes requires a certain amount of pressure to push the blood through, which is proportional to the flowrate of blood:

$$ P = QR $$

Where $R$ is the vascular resistance of the vessels downstream of the outlet face. Pressure boundary conditions are considered “Neumann” `<Type>` and do not change with time. We specify a resistance outlet boundary condition by assigning “Resistance” in the `<Time_dependance>` field in the boundary condition. The value of $2600 \ dynes/cm^5$ was chosen to ensure physiologic pressure values within the model. For this examples, we assume both outlet resistances are equal. Thus, we can conclude the two outlets will receive roughly equal flow of about $50 \ mL/s$. We assumed an even flow split for this example for simplicity. Later in the User Guide, we will discuss strategies for assigning a more realistic flow split between vessels by adjusting the relative resistances of the outlets. Using the equation above, we can compute the assigned outlet pressure to be:

$$ P=(50 \ mL/s)*(2600 \ dynes/cm^5)=130000 dyne/cm^2 \approx 100 \ mmHg $$

$100 \ mmHg$ of pressure is roughly the average blood pressure in a healthy individual. If you have more specific physiologic data on your patient, you will want to choose your boundary condition values to match your patient data.

The last boundary conditions we need to specify are the wall conditions. This simple simulation assumes the walls are **rigid** which means they are fixed in space. For these cases, we apply the **no slip** boundary condition which states that any fluid in direct contact with the wall will have zero velocity. For both the wall surfaces, we assign them as “Dirichlet” type boundary conditions with a value of “0”. We wish to apply this to the velocity directly, thus the `<Impose_flux>` setting, which was present for the inlet face, is missing here.
Loading