-
-
+
\ No newline at end of file
diff --git a/source/documentation/_simcardio_content.erb b/source/documentation/_simcardio_content.erb
index 5820f3e2..8559d4b3 100644
--- a/source/documentation/_simcardio_content.erb
+++ b/source/documentation/_simcardio_content.erb
@@ -15,35 +15,18 @@
<%= partial "documentation/simcardio/cardiacModeling/refs" %>
-
-<%= partial "documentation/simcardio/electrophysiology/cep-modeling" %>
- <%= partial "documentation/simcardio/electrophysiology/cep-intro" %>
- <%= partial "documentation/simcardio/electrophysiology/cep-theory" %>
- <%= partial "documentation/simcardio/electrophysiology/cep-activation-models" %>
- <%= partial "documentation/simcardio/electrophysiology/purkinje" %>
- <%= partial "documentation/simcardio/electrophysiology/pnet-intro" %>
+<%= partial "documentation/simcardio/electrophysiology/purkinje" %><%= partial "documentation/simcardio/electrophysiology/pnet-install" %><%= partial "documentation/simcardio/electrophysiology/pnet-workflow" %><%= partial "documentation/simcardio/electrophysiology/pnet-parameters" %><%= partial "documentation/simcardio/electrophysiology/pnet-issues" %>
- <%= partial "documentation/simcardio/electrophysiology/cep-examples" %>
- <%= partial "documentation/simcardio/electrophysiology/cep-example-block" %>
- <%= partial "documentation/simcardio/electrophysiology/cep-example-pnet" %>
- <%= partial "documentation/simcardio/electrophysiology/cep-refs" %>
-
-
-<%= partial "documentation/simcardio/mechanics/mechanics-modeling" %>
- <%= partial "documentation/simcardio/mechanics/mechanics-solve" %>
- <%= partial "documentation/simcardio/mechanics/mechanics-obtain-svFSI" %>
- <%= partial "documentation/simcardio/mechanics/mechanics-mesh-gen" %>
- <%= partial "documentation/simcardio/mechanics/mechanics-fiber-gen" %>
- <%= partial "documentation/simcardio/mechanics/mechanics-solver-input" %>
- <%= partial "documentation/simcardio/mechanics/mechanics-simulation" %>
-
- <%= partial "documentation/simcardio/mechanics/mechanics-theory" %>
- <%= partial "documentation/simcardio/mechanics/mechanics-kinematics" %>
- <%= partial "documentation/simcardio/mechanics/mechanics-struct" %>
- <%= partial "documentation/simcardio/mechanics/mechanics-ustruct" %>
- <%= partial "documentation/simcardio/mechanics/mechanics-material-models" %>
- <%= partial "documentation/simcardio/mechanics/mechanics-refs" %>
-
+ <%= partial "documentation/simcardio/electrophysiology/pnet-example" %>
+ <%= partial "documentation/simcardio/electrophysiology/pnet-refs" %>
+
+<%= partial "documentation/simcardio/fiberGeneration/fiber" %>
+ <%= partial "documentation/simcardio/fiberGeneration/fiber_intro" %>
+ <%= partial "documentation/simcardio/fiberGeneration/fiber_meshing" %>
+ <%= partial "documentation/simcardio/fiberGeneration/fiber_heat" %>
+ <%= partial "documentation/simcardio/fiberGeneration/fiber_gen" %>
+ <%= partial "documentation/simcardio/fiberGeneration/fiber_debug" %>
+ <%= partial "documentation/simcardio/fiberGeneration/fiber_ref" %>
\ No newline at end of file
diff --git a/source/documentation/simcardio/_intro.md b/source/documentation/simcardio/_intro.md
index b433f1ed..05d249bb 100644
--- a/source/documentation/simcardio/_intro.md
+++ b/source/documentation/simcardio/_intro.md
@@ -1,22 +1,21 @@
-#Introduction
+# Cardiac Modeling Guide
Human heart is an intrinsic multi-physics 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.
-The SimVascular SimCardio 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 multi-physics 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.
+Here we present a software suite for cardiac modeling, which 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 multi-physics 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.
+####[Cardiac Geometric Modeling Tool](http://simvascular.github.io/docsSimCardio.html#automatic-cardiac-modeling):
+This **SimVascular** tool provides an automated workflow to generate CFD-ready models from medical images. It uses pre-trained deep neural network models to automatically 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.
-###Cardiac Segmentation and Geometric Modeling
-
-The SimVascular Cardiac Image Segmentation Tool uses pre-trained deep neural network models to automatically 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.
-
-
-
-###Multi-physics Finite Element Solver
+####[Multi-Physics Finite Element Solver](http://simvascular.github.io/docssvFSI.html):
svFSI 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 SimVascular software, svFSI 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. svFSI could also be used to perform blood flow simulations by imposing the ventricular wall motion extracted from medical image data.
-svFSI is compatible with several mesh formats and can read a wide range of 2D and 3D element types. svFSI could be coupled to Trilinos 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 Paraview.
-The source code of svFSI is available on GitHub as part of the SimVascular project and the precompiled installers can be downloaded from SimTK website. A variety of examples are also available on GitHub 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.
+####[Purkinje Network Plugin](http://simvascular.github.io/docsSimCardio.html#purkinje):
+SimVascular provides a Purkinje plugin that can be used to generate Purkinje network on arbitrary patient-specific cardiac models. Our Purkinje plugin uses a fractal-tree-based method to generate the network and provides a simple interface to adjust the parameters that control the network density and coverage. The Purkinje mesh is then exported in vtu format compatible with [**svFSI**](http://simvascular.github.io/docssvFSI.html) for the ensuing electrophysiology simulations.
+
+####[Myocardial Fiber Orientation Generation](http://simvascular.github.io/docsSimCardio.html#fiber):
+Both patient-specific cardiac mechanics modeling and electrophysiology modeling requires myocardial fiber orientation as an input. Here, we provide a pipeline to use rule-based algorithm to assign myocardial fiber orientation to patient-specific geometries. This pipeline takes advantage of existing SimVascular meshing tools and svFSI modeling capability.
\ No newline at end of file
diff --git a/source/documentation/simcardio/cardiacModeling/_auto-ml-cardiac-segmentation.md b/source/documentation/simcardio/cardiacModeling/_auto-ml-cardiac-segmentation.md
deleted file mode 100644
index 294728ab..00000000
--- a/source/documentation/simcardio/cardiacModeling/_auto-ml-cardiac-segmentation.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# Automated Image Segmentation
-
-The SimVascular Cardiac Geometric Modeling Tool uses pre-trained deep neural network models to automatically
-generate segmentations of major cardiac structures: the four heart chambers, aorta and pulmonary arteries. The segmentation tool
-uses an ensemble of two-dimensional (2D) convolutional neural networks (CNNs) for automatic segmentation of cardiac structures from
-three-dimensional (3D) patient images. It has been shown to have superior performance compared to prior approaches when evaluated on
-a benchmark dataset containing both magnetic resonance (MR) and computed tomography (CT) image data [1].
-The tool can be used from both the SimVascular GUI Python console and from the command line within the SimVascular Python
-environment.
-
-
-
diff --git a/source/documentation/simcardio/cardiacModeling/_mesh-intro.md b/source/documentation/simcardio/cardiacModeling/_mesh-intro.md
index e07d270f..e2d594e3 100644
--- a/source/documentation/simcardio/cardiacModeling/_mesh-intro.md
+++ b/source/documentation/simcardio/cardiacModeling/_mesh-intro.md
@@ -1,4 +1,4 @@
-# Mesh Generation
+## Mesh Generation
The Cardiac Geometric Modeling Tool can be used to generate left ventricle (LV) meshes from
segmentation results. These meshes can then be used CFD modeling of LV flow combined with patient medical imaging data.
diff --git a/source/documentation/simcardio/cardiacModeling/_mesh-lv-surface.md b/source/documentation/simcardio/cardiacModeling/_mesh-lv-surface.md
index a9941cde..4c033883 100644
--- a/source/documentation/simcardio/cardiacModeling/_mesh-lv-surface.md
+++ b/source/documentation/simcardio/cardiacModeling/_mesh-lv-surface.md
@@ -1,6 +1,6 @@
-## Constructing LV Surface Meshes ##
+### Constructing LV Surface Meshes
-### Using SimVascular Python Shell
+#### Using SimVascular Python Shell
The SimVascular
Python Shell
@@ -28,7 +28,7 @@ surface_main.py Python surface generation script using the following comman
-###Using SimVascular Python Console
+#### Using SimVascular Python Console
The SimVascular GUI Python Console
can be used for surface generation. Use the Python console Text Editor mode to enter the following Python commands
diff --git a/source/documentation/simcardio/cardiacModeling/_mesh-motion.md b/source/documentation/simcardio/cardiacModeling/_mesh-motion.md
index ce87ec61..eb67d3a7 100644
--- a/source/documentation/simcardio/cardiacModeling/_mesh-motion.md
+++ b/source/documentation/simcardio/cardiacModeling/_mesh-motion.md
@@ -1,4 +1,4 @@
-## Mesh Motion
+### Mesh Motion
Once meshes have been registered the displacement of each mesh vertex over the whole cardiac cycle can be computed.
The series of registered meshes are interpolated using cubic splines to obtain mesh displacements with a temporal resolution
diff --git a/source/documentation/simcardio/cardiacModeling/_mesh-register.md b/source/documentation/simcardio/cardiacModeling/_mesh-register.md
index bb7afca9..c9b3fc4b 100644
--- a/source/documentation/simcardio/cardiacModeling/_mesh-register.md
+++ b/source/documentation/simcardio/cardiacModeling/_mesh-register.md
@@ -1,4 +1,4 @@
-## Mesh Registration ##
+### Mesh Registration
We can simulate the LV flow over time by tracking the deformation of the heart from time-resolved imaging and impose this motion
to the fluid domains inside the heart, which leads to a deforming-domain CFD problem. To be able to track the deformation of the
diff --git a/source/documentation/simcardio/cardiacModeling/_mesh-volume.md b/source/documentation/simcardio/cardiacModeling/_mesh-volume.md
index 37decaf4..fb9d7786 100644
--- a/source/documentation/simcardio/cardiacModeling/_mesh-volume.md
+++ b/source/documentation/simcardio/cardiacModeling/_mesh-volume.md
@@ -1,6 +1,6 @@
-## Volumetric Meshing
+### Volumetric Meshing
-###Using SimVascular Python Shell
+#### Using SimVascular Python Shell
The volumetric meshing script
@@ -30,7 +30,7 @@ volume\_mesh\_main.py is used to generate a finite element mesh.
-###Using the SimVascular Python Console
+#### Using the SimVascular Python Console
Within the Python plugin, we can use the Text Editor mode and enter the following lines to create a Python script.
diff --git a/source/documentation/simcardio/cardiacModeling/_refs.md b/source/documentation/simcardio/cardiacModeling/_refs.md
index 5030a827..56fc2250 100644
--- a/source/documentation/simcardio/cardiacModeling/_refs.md
+++ b/source/documentation/simcardio/cardiacModeling/_refs.md
@@ -1,4 +1,4 @@
-# References
+## References
[1] Kong, F., and Shadden, S. C. (2020). **Automating Model Generation for Image-based Cardiac Flow Simulation**.
diff --git a/source/documentation/simcardio/cardiacModeling/_seg-inputs.md b/source/documentation/simcardio/cardiacModeling/_seg-inputs.md
index 706e29db..4fe2b6a2 100644
--- a/source/documentation/simcardio/cardiacModeling/_seg-inputs.md
+++ b/source/documentation/simcardio/cardiacModeling/_seg-inputs.md
@@ -1,4 +1,4 @@
-## Input Requirements ##
+### Input Requirements
The preferred input format of the image volumes is .nii.gz, .nii or .vti files.
The segmentation method requires an image to have an identity orientation matrix.
diff --git a/source/documentation/simcardio/cardiacModeling/_seg-intro.md b/source/documentation/simcardio/cardiacModeling/_seg-intro.md
index a043e150..7c02f984 100644
--- a/source/documentation/simcardio/cardiacModeling/_seg-intro.md
+++ b/source/documentation/simcardio/cardiacModeling/_seg-intro.md
@@ -1,4 +1,4 @@
-# Automated Image Segmentation
+## Automated Image Segmentation
The SimVascular Cardiac Geometric Modeling Tool uses pre-trained deep neural network models to automatically
generate segmentations of major cardiac structures: the four heart chambers, aorta and pulmonary arteries. The segmentation tool
diff --git a/source/documentation/simcardio/cardiacModeling/_seg-pre-trained-models.md b/source/documentation/simcardio/cardiacModeling/_seg-pre-trained-models.md
index 4fd10297..a1c3cc06 100644
--- a/source/documentation/simcardio/cardiacModeling/_seg-pre-trained-models.md
+++ b/source/documentation/simcardio/cardiacModeling/_seg-pre-trained-models.md
@@ -1,4 +1,4 @@
-## Pre-Trained Models ##
+### Pre-Trained Models
We used the image and ground truth data provided by MMWHS to train our models.
Our segmentation models were trained simultaneously on CT and MR data. The trained weight data can be downloaded from
diff --git a/source/documentation/simcardio/cardiacModeling/_seg-predict.md b/source/documentation/simcardio/cardiacModeling/_seg-predict.md
index 573032b4..f5f52315 100644
--- a/source/documentation/simcardio/cardiacModeling/_seg-predict.md
+++ b/source/documentation/simcardio/cardiacModeling/_seg-predict.md
@@ -1,6 +1,6 @@
-## Segmenting Image Data ##
+### Segmenting Image Data
-###Segmenting using the SimVascular Python shell
+#### Segmenting using the SimVascular Python shell
3D CT or MR image volumes can be segmented within the SimVascular
Python Shell using the
@@ -27,7 +27,7 @@ prediction.py Python script. For example
-###Segmenting using the SimVascular GUI Python Console
+#### Segmenting using the SimVascular GUI Python Console
Image segmentation can also be performed from within the SimVascular GUI
Python console .
diff --git a/source/documentation/simcardio/cardiacModeling/_seg-visualize.md b/source/documentation/simcardio/cardiacModeling/_seg-visualize.md
index bcb975be..1dfa094f 100644
--- a/source/documentation/simcardio/cardiacModeling/_seg-visualize.md
+++ b/source/documentation/simcardio/cardiacModeling/_seg-visualize.md
@@ -1,4 +1,4 @@
-## Visualizing Segmentation Results ##
+### Visualizing Segmentation Results
Segmentation results can be visualized using SimVascular by first creating a SimVascular project. The segmentation results .vti file
is then added as an image by right-clicking Images under the SV Data Manager and selecting the
diff --git a/source/documentation/simcardio/electrophysiology/_cep-activation-models.md b/source/documentation/simcardio/electrophysiology/_cep-activation-models.md
deleted file mode 100644
index ecefae68..00000000
--- a/source/documentation/simcardio/electrophysiology/_cep-activation-models.md
+++ /dev/null
@@ -1,106 +0,0 @@
-## Cellular Activation Models ##
-
-Depending on how the depolarization and repolarization within a single cardiac myocyte is described, the electrophysiology models can be roughly divided into two categories: biophysics-based ionic models (such as the ten Tusscher-Panfilov (TTP) model[2][3]), and phenomenological models (such as the Aliev-Panfilov (AP), Fitzhugh-Nagumo (FN) models[4]).
-
-
-###Biophysics-based Ionic Models
-
-Between cardiac myocytes, the propagation of the electrical signal is enabled by the transmembrane motion of different ions, such as $K^+$, $Na^+$ and $Ca^{2+}$ during depolarization and repolarization of the myocytes. Cellular biophysics-based activation models are designed to capture these ionic movements. One of the popular biophysics-based ionic models, the TTP model [3] is implemented in svFSI. Here, we will briefly illustrate the ionic currents involved in the TTP model.
-
-In the TTP model, the ionic current is expressed as
-
-$$ I\_{ion} = I\_{Na} + I\_{Kl} + I\_{to} + I\_{Kr} + I\_{Ks} + I\_{CaL} + I\_{NaCa} + I\_{NaK} + I\_{pCa} + I\_{pK} + I\_{bCa} + I\_{bNa} $$
-
-The governing equations for each current can be found in [3].
-
-Since, intracellular calcium concentration is the driving factor behind excitation-contraction coupling, we focus on the calcium dynamics here. In the TTP model,the following calcium concentrations are included:
-
-
-
$Ca_{itotal}$: total (free+buffered) cytoplasmic $Ca^{2+}$ concentration.
-
$Ca_{SRtotal}$: total SR $Ca^{2+}$ concentration.
-
$Ca_{SStotal}$: total dyadic space $Ca^{2+}$ concentration.
-
$Ca_i$: free cytoplasmic $Ca^{2+}$ concentration.
-
$Ca_{SR}$: free SR $Ca^{2+}$ concentration.
-
$Ca_{SS}$: free dyadic space $Ca^{2+}$ concentration.
-
-
-Sarcoplasmic reticulum (SR) is a membrane structure within the muscle cell, whose main function is to store $Ca^{2+}$. Dyadic space is the region bounded by the T-tubule and SR. $Ca^{2+}$ ions are considered buffered if they are bound to negatively charged proteins (called buffers). Otherwise they are considered free. The action potential transmitted through the gap junction cause the current myocyte to depolarize. The depolarization opens the L-type (long-lasting) Ca channel located on the surface membrane. A small amount of $Ca^{2+}$ enters the myocyte due to potential, leading to a sharp increase of $Ca^{2+}$ in the dyadic space, which is a small region. This increase triggers the SR to release a large amount of $Ca^{2+}$ (calcium-induced calcium release) to enable the excitation-contraction. During diastole, calcium is removed from the cytoplasm through two ways. Ca is pumped (1) back into the SR and (2) out of the cell, mainly by the sodium-calcium exchange (NCX).
-
-For the TTP model in svFSI, the following units have to be used: time in [ms], length [mm], amount of substance [mmol], voltage [mV]. Mass can be in [g].
-
-
-
-
- Structures involved in $Ca^{2+}$ cycling[6].
-
-
-
-###Phenomenological Models
-
-Phenomenological models are derived based on some observations of the full ion model [4]. Instead of following the transmembrane ionic currents, they use an oscillation system with a fast ($V$) and a slow ($r$) variable to mimic the behaviors of the action potentials. The oscillators, without considering the diffusion term, are modeled as
-
-$$ \frac{\mathrm{d}V}{\mathrm{d}t}=f^{V}(V,r) $$
-$$ \frac{\mathrm{d}r}{\mathrm{d}t}=f^{r}(V,r) $$
-
-Note that this set of equations describes the electrophysiology in a single cardiac myocyte, and the choice of $f^V$ and $f^r$ will determine if this is a pacemaker cell or a non-pacemaker cell.
-
-The FitzHugh-Nagumo (FN) model describes the pacemaker cells with
-
-$$ f^V = c[V(V-\alpha)(1-V)-r] $$
-$$ f^r = V-br+a $$
-
-
-
- Action potential calculated from FitzHugh-Nagumo model.
-
-
-The Aliev-Panfilov (AP) model describes the non-pacemaker cells with
-
-$$ f^V = cV(V-\alpha)(1-V)-Vr $$
-
-$$ f^r = \left( \gamma+\frac{\mu\_1r}{\mu\_2+V}\right)[-r-cV(V-b-1)] $$
-
-
-
- Action potential calculated from Aliev-Panfilov model.
-
-
-Note that $V$ and $t$ are non-dimensional values here. The following equations are used to recover the physiological action potential and time:
-
-$$ \mathrm{FitzHugh-Nagumo model}: V^{fhn}=(65V-35)mV; ~~ t^{fhn} = (220t) ms $$
-
-$$ \mathrm{Aliev-Panfilov model}: V^{ap}=(100V-80)mV; ~~ t^{ap} = (12.9t) ms $$
-
-Another class of phenomenological models exists that include additional variables to account for intra-cellular calcium kinetics. One such model is the Bueno-Orovio (BO) model [5] that can serve as a trade-off between the complex TTP model and the simplified phenomenological AP model.
-
-
-###Activation Models Available in svFSI
-
-The following table provides a summary of all the available electrophysiology models in svFSI.
-
-
-
diff --git a/source/documentation/simcardio/electrophysiology/_cep-example-block.md b/source/documentation/simcardio/electrophysiology/_cep-example-block.md
deleted file mode 100644
index e50e8a12..00000000
--- a/source/documentation/simcardio/electrophysiology/_cep-example-block.md
+++ /dev/null
@@ -1,118 +0,0 @@
-## Activation of a Myocardial Block ##
-
-The computational domain is a rectangular block, with dimensions of $3\times 7\times 20 mm$. A small cluster of cells located at one corner of the block (marked as S) will recive an initial stimulus, and the TTP model is used to model the activation of the rest of the domain. The entire simulation set-up along with results can be found on GitHub.
-
-
-
- Computational domain of example 1.[reference]
-
-
-Here is the breakdown of the input file for this study.
-
-
- # File svFSI.inp
- #----------------------------------------------------------------
- # General simulation parameters
-
- Continue previous simulation: f
- Number of spatial dimensions: 3
- Number of time steps: 100000
- 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: 100
- 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
- Add mesh: msh {
- Mesh file path): mesh/h0.1/mesh-complete.mesh.vtu
- Add face: X0 {
- Face file path: mesh/h0.1/mesh-surfaces/X0.vtp
- }
- Add face: X1 {
- Face file path: mesh/h0.1/mesh-surfaces/X1.vtp
- }
- Add face: Y0 {
- Face file path: mesh/h0.1/mesh-surfaces/Y0.vtp
- }
- Add face: Y1 {
- Face file path: mesh/h0.1/mesh-surfaces/Y1.vtp
- }
- Add face: Z0 {
- Face file path: mesh/h0.1/mesh-surfaces/Z0.vtp
- }
- Add face: Z1 {
- Face file path: mesh/h0.1/mesh-surfaces/Z1.vtp
- }
-
- Fiber direction: (1, 0, 0)
-
- # Here we also need to supply a domain information to separate
- # pacemaker cells and non-pacemaker cells. domain_info.dat
- # is a plaintext file store the domain ID of each element.
- # id == 1: non-pacemaker cells
- # id == 2: pacemaker cells (recivies stimulus)
- Domain file path: mesh/h0.1/domain_info.dat
- }
-
- #----------------------------------------------------------------
- # Equations
- Add equation: CEP {
- Coupled: 1
- Min iterations: 1
- Max iterations: 5
- Tolerance: 1e-6
-
- # Here domain id == 1 are non-pacemaker cells
- Domain: 1 {
- Electrophysiology model: TTP
- Conductivity (iso): 0.012571
- Conductivity (ani): 0.082715
- ODE solver: RK
- }
-
- # Here domain id == 2 are pacemaker cells
- Domain: 2 {
- Electrophysiology model: TTP
- Conductivity (iso): 0.012571
- Conductivity (ani): 0.082715
- # Stimulus to initiate the depolarization process
- Stimulus: Istim {
- Amplitude: -35.714
- Start time: 0.0
- Duration: 2.0
- Cycle length: 10000.0
- }
- ODE solver: RK
- }
-
- Output: Spatial {
- Action_potential: t
- }
-
- LS type: GMRES
- {
- Max iterations: 100
- Tolerance: 1D-6
- Krylov space dimension: 50
- }
- }
-
-
-
-
- Activation of the cuboid.
-
-
-
diff --git a/source/documentation/simcardio/electrophysiology/_cep-examples.md b/source/documentation/simcardio/electrophysiology/_cep-examples.md
deleted file mode 100644
index f146df29..00000000
--- a/source/documentation/simcardio/electrophysiology/_cep-examples.md
+++ /dev/null
@@ -1,4 +0,0 @@
-## Examples ##
-
-In this section, we will provide two examples of cardiac electrophysiology modeling. The first example is a widely used benchmark test, activation of a block of cardiac tissue [1]. The second example is the propagation of action potential in the Purkinje fibers. More examples are available on GitHub.
-
diff --git a/source/documentation/simcardio/electrophysiology/_cep-intro.md b/source/documentation/simcardio/electrophysiology/_cep-intro.md
deleted file mode 100644
index dbcba0a5..00000000
--- a/source/documentation/simcardio/electrophysiology/_cep-intro.md
+++ /dev/null
@@ -1,4 +0,0 @@
-## Introduction ##
-
-The electrical activity in a heart is initiated at the sinoatrial node, which is located at the right atrium of the heart. A small cluster of pacemaker cells periodically emits electrical signals into the heart’s conduction system. These signals first travel at a high speed through a network of special cells that allows the signals to reach the whole heart rapidly. Finally, they travel into the ventricular muscles, and cause the entire heart to contract almost simultaneously. The electrical signals travel between cells through a process called depolarization, during which voltage-sensitive protein channels on the cell membrane open to allow positively charged ions to move in and out of the cell, leading to ionic currents.
-
diff --git a/source/documentation/simcardio/electrophysiology/_cep-modeling.md b/source/documentation/simcardio/electrophysiology/_cep-modeling.md
deleted file mode 100644
index 3be7ae3d..00000000
--- a/source/documentation/simcardio/electrophysiology/_cep-modeling.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# Cardiac Electrophysiology Simulation Guide #
-
diff --git a/source/documentation/simcardio/electrophysiology/_cep-refs.md b/source/documentation/simcardio/electrophysiology/_cep-refs.md
deleted file mode 100644
index 07c42de5..00000000
--- a/source/documentation/simcardio/electrophysiology/_cep-refs.md
+++ /dev/null
@@ -1,29 +0,0 @@
-## References ##
-
-
-
diff --git a/source/documentation/simcardio/electrophysiology/_cep-theory.md b/source/documentation/simcardio/electrophysiology/_cep-theory.md
deleted file mode 100644
index 48ae88b1..00000000
--- a/source/documentation/simcardio/electrophysiology/_cep-theory.md
+++ /dev/null
@@ -1,32 +0,0 @@
-## Mathematical Model of Cardiac Electrophysiology ##
-
-The propagation of electrical signal in the heart is governed by a reaction-diffusion like equation,
-
-$$\frac{\partial V}{\partial t} + \frac{I\_{ion} - I\_{app}(t)}{C\_m} = \nabla \cdot\left( \mathbf{D}\nabla V \right) $$
-$$ \mathrm{in~} \Omega^E\times(0,T] \nonumber$$
-$$(\mathbf{D}\nabla V) \cdot \mathbf{N}=0 \mathrm{~on~} \partial\Omega^E\times(0,T]$$
-
-$V$ is the local transmembrane potential. $C\_m$ is the local membrane capacitance per unit area. $I\_{ion}$ and $I\_{app}$ are the ionic current flux (current per unit area) and applied external current flux, respectively. Here, $\mathbf{D}$ dictates the propagation velocity of the electrical signal and has the similar physical meaning as the diffusivity. It is calculated as
-
-$$
-\mathbf{D} =\frac{\sigma}{\chi C\_m}
-$$
-
-$\sigma$ is the conductivity tensor and has the unit $S/m$. $\chi$ is the ratio of membrane area over tissue volume. Then, $\mathbf{D}$ is a tensor with the dimension $Length^2/Time$.
-
-The above equation is the mono-domain description of the cardiac electrophysiology, i.e. we don't solve the intra- and extra-cellular electrical signal propagation separately. The mono-domain and multi-domain conductivities are connected through the following relation,
-
-$$ \sigma = \frac{\sigma\_i\sigma\_e}{\sigma\_i + \sigma\_e} $$
-
-where $\sigma\_i$ and $\sigma_e$ are the intra- and extra-cellular conductivity tensors [1]. It is commonly assumed that the conductivity is transversely isotropic,
-
-$$ \mathbf{\sigma} = \sigma\_f \mathbf{f}\otimes \mathbf{f} + \sigma\_s (\mathbf{I}-\mathbf{f}\otimes \mathbf{f}) $$
-
-where $\sigma\_f$ and $\sigma\_s$ are the conductivities along the fiber direction and in the transverse plane. $\mathbf{f}$ is the fiber direction vector.
-
-In svFSI, we directly specify $\mathbf{D}$ in the input file. We choose a slightly different form to enforce the transverse isotropy of the conductivity tensor,
-
-$$ \mathbf{D} = D\_{iso}\mathbf{I} + \sum\_{n=1}^{nsd}D\_{ani,n}\mathbf{fN}\_n\otimes\mathbf{fN}\_n $$
-
-Here, $nsd$ is the dimension, and $\mathbf{fN\_n}$ is the local orthonormal coordinate system built by fiber direction and sheet direction. To connect with the previous expression, we have $D\_f=D\_{iso}+D\_{ani}$ and $D\_s=D\_{iso}$.
-
diff --git a/source/documentation/simcardio/electrophysiology/_cep-example-pnet.md b/source/documentation/simcardio/electrophysiology/_pnet-example.md
similarity index 98%
rename from source/documentation/simcardio/electrophysiology/_cep-example-pnet.md
rename to source/documentation/simcardio/electrophysiology/_pnet-example.md
index 9d9692b1..ad069ddf 100644
--- a/source/documentation/simcardio/electrophysiology/_cep-example-pnet.md
+++ b/source/documentation/simcardio/electrophysiology/_pnet-example.md
@@ -1,4 +1,4 @@
-## Activation of a Purkinje Network ##
+## Example - Activation of a Purkinje Network
Here we perform electrophysiology simulation on a human biventricular Purkinje network. The initial stimulus is provided at the atrio-ventricular junction, and the TTP model is used to model for the activation of the individual Purkinje cells. The entire simulation set-up along with results can be found on GitHub.
diff --git a/source/documentation/simcardio/electrophysiology/_pnet-install.md b/source/documentation/simcardio/electrophysiology/_pnet-install.md
index 57a10d38..350012c5 100644
--- a/source/documentation/simcardio/electrophysiology/_pnet-install.md
+++ b/source/documentation/simcardio/electrophysiology/_pnet-install.md
@@ -1,4 +1,4 @@
-## Plugin Installation ##
+## Plugin Installation
The installer for the Purkinje plugin can be found on the Simtk website. The installer installs the shared libraries, the setup.sh script and a Python script in,
diff --git a/source/documentation/simcardio/electrophysiology/_pnet-intro.md b/source/documentation/simcardio/electrophysiology/_pnet-intro.md
deleted file mode 100644
index 8e7a3299..00000000
--- a/source/documentation/simcardio/electrophysiology/_pnet-intro.md
+++ /dev/null
@@ -1,8 +0,0 @@
-## Introduction ##
-
-The electrical activity in the heart tissue triggers muscle contraction and pumps blood into the systemic circulation. Under normal conditions, the electrical signal originates at the sinoatrial node located in the right atrium and reaches the atrioventricular node, which is the only electrical joint between the atria and the ventricles. [7] The bundle of His connects the atrioventricular node to a fast conducting network of fibers, called the Purkinje network, located beneath the inner-most layer of the heart wall. Purkinje cells are larger than the cardiomyocytes and conduct the excitation wave faster than any other cell on the heart tissue. [7]] The network not only synchronizes contraction between the left and the right ventricles but also allows the trajectory to follow a sequence beginning at the ventricular apex, spreading through the free-wall and eventually to the basal plane. Modeling the Purkinje network in cardiac electrophysiology simulations is therefore essential to achieve a realistic activation pattern and tissue contraction.
-
-SimVascular provides a Purkinje plugin that can be used to generate Purkinje network on arbitrary patient-specific cardiac models. Our Purkinje plugin uses a fractal-tree-based method to generate the network [8] and provides a simple interface to adjust the parameters that control the network density and coverage. The Purkinje mesh is then exported in vtu format compatible with SimVascular/svFSI for the ensuing electrophysiology simulations.
-
-In the following sections, we describe steps to download and install the Purkinje plugin, provide a workflow for creating Purkinje network using the plugin.
-
diff --git a/source/documentation/simcardio/electrophysiology/_pnet-issues.md b/source/documentation/simcardio/electrophysiology/_pnet-issues.md
index 8c069b5c..5953f477 100644
--- a/source/documentation/simcardio/electrophysiology/_pnet-issues.md
+++ b/source/documentation/simcardio/electrophysiology/_pnet-issues.md
@@ -1,4 +1,4 @@
-## Known Issues ##
+## Known Issues
SimVascular does not record that the plugin was added to a project. The plugin must be added to the project every time a project is opened. The project **Purkinje-Network** directory is saved between project sessions.
diff --git a/source/documentation/simcardio/electrophysiology/_pnet-parameters.md b/source/documentation/simcardio/electrophysiology/_pnet-parameters.md
index b87b4a39..efcb5b10 100644
--- a/source/documentation/simcardio/electrophysiology/_pnet-parameters.md
+++ b/source/documentation/simcardio/electrophysiology/_pnet-parameters.md
@@ -1,4 +1,4 @@
-## Network Control Parameters ##
+## Network Control Parameters
The Purkinje network is generated using a Python script. The inputs to the script include a triangular surface, the network starting point, a second point defining the direction of the first network branch, and the parameters used to control the shape, density and spread of the network [2]. These parameters are described below:
diff --git a/source/documentation/simcardio/electrophysiology/_pnet-refs.md b/source/documentation/simcardio/electrophysiology/_pnet-refs.md
new file mode 100644
index 00000000..93ea37d6
--- /dev/null
+++ b/source/documentation/simcardio/electrophysiology/_pnet-refs.md
@@ -0,0 +1,8 @@
+## References
+
+
diff --git a/source/documentation/simcardio/electrophysiology/_pnet-workflow.md b/source/documentation/simcardio/electrophysiology/_pnet-workflow.md
index c73d64a6..d8508961 100644
--- a/source/documentation/simcardio/electrophysiology/_pnet-workflow.md
+++ b/source/documentation/simcardio/electrophysiology/_pnet-workflow.md
@@ -1,9 +1,9 @@
-## Purkinje Plugin Workflow & Usage ##
+## Purkinje Plugin Workflow & Usage
The Purkinje plugin can be applied only on a SimVascular generated mesh and not on the model. Therefore, it is recommended that the user first create a mesh either by following the regular workflow (i.e., Image, Path, Segmentation, Model and Mesh) or by importing a solid model using the Models tool. In the example below, we use the latter approach and load the left ventricular endocardium directly into the SV project. We then mesh the volume before using the plugin to generate Purkinje network.
-###Create SV mesh
+### Create SV mesh
After creating an SV project, right-click on the Models tab to import a left ventricular solid model (.vtp) and run the Global Reinit command. During the import, extract faces on the model using the default settings.
@@ -48,7 +48,7 @@ We now mesh the model before adding the Purkinje network tool. Create a new mesh
-###Plugin workflow
+### Plugin workflow
Here we provide a brief overview of the workflow to generate Purkinje network. Once the mesh is created, activate the Purkinje plugin so that it displays the triangular surfaces of the mesh. Purkinje network can then be created using the following steps:
@@ -84,7 +84,7 @@ Provide a starting point of the Purkinje network by moving the mouse cursor to a
Select the starting point and direction of the Purkinje network.
-Adjust the control parameters of the Purkinje network and generate by selecting the Create Network button. The network is displayed by checking the Show Network box. You can repeat the selection of the initial point and network creation until the results are satisfactory. A detailed description of the network control parameters is provided below.
+Adjust the control parameters of the Purkinje network and generate by selecting the Create Network button. The network is displayed by checking the Show Network box. You can repeat the selection of the initial point and network creation until the results are satisfactory. A detailed description of the network control parameters is provided below.
@@ -96,7 +96,7 @@ Adjust the control parameters of the Purkinje network and generate by selecting
Purkinje network is overlaid on the mesh in the Display window.
-The network is saved in .vtu format under the Purkinje-Network sub-folder of the project directory. Additionally you can find the .txt files that contain the information of end nodes, position coordinates, and network connectivity under the same folder. Further details about the contents of each file is provided below.
+The network is saved in .vtu format under the Purkinje-Network sub-folder of the project directory. Additionally you can find the .txt files that contain the information of end nodes, position coordinates, and network connectivity under the same folder. Further details about the contents of each file is provided below.
@@ -104,7 +104,7 @@ The network is saved in .vtu format under the Purkinje-Network sub-folder of the
-###Output Description
+### Output Description
The Purkinje Network tool writes a set of files in the Purkinje-Network sub-folder within the SimVascular project directory. The files are prefixed with the name of the selected face. The files and their contents are described below:
diff --git a/source/documentation/simcardio/electrophysiology/_purkinje.md b/source/documentation/simcardio/electrophysiology/_purkinje.md
index 2be52965..ce5def90 100644
--- a/source/documentation/simcardio/electrophysiology/_purkinje.md
+++ b/source/documentation/simcardio/electrophysiology/_purkinje.md
@@ -1,3 +1,9 @@
-## Purkinje Network Plugin Tutorial ##
+# Purkinje Network Plugin Tutorial
+The electrical activity in the heart tissue triggers muscle contraction and pumps blood into the systemic circulation. Under normal conditions, the electrical signal originates at the sinoatrial node located in the right atrium and reaches the atrioventricular node, which is the only electrical joint between the atria and the ventricles. [1] The bundle of His connects the atrioventricular node to a fast conducting network of fibers, called the Purkinje network, located beneath the inner-most layer of the heart wall. Purkinje cells are larger than the cardiomyocytes and conduct the excitation wave faster than any other cell on the heart tissue. [1] The network not only synchronizes contraction between the left and the right ventricles but also allows the trajectory to follow a sequence beginning at the ventricular apex, spreading through the free-wall and eventually to the basal plane. Modeling the Purkinje network in cardiac electrophysiology simulations is therefore essential to achieve a realistic activation pattern and tissue contraction.
+
+SimVascular provides a Purkinje plugin that can be used to generate Purkinje network on arbitrary patient-specific cardiac models. Our Purkinje plugin uses a fractal-tree-based method to generate the network [2] and provides a simple interface to adjust the parameters that control the network density and coverage. The Purkinje mesh is then exported in vtu format compatible with SimVascular/svFSI for the ensuing electrophysiology simulations.
+
+In the following sections, we describe steps to download and install the Purkinje plugin, provide a workflow for creating Purkinje network using the plugin.
+
diff --git a/source/documentation/simcardio/electrophysiology/images/AP_model.png b/source/documentation/simcardio/electrophysiology/images/AP_model.png
deleted file mode 100644
index 3c1dd632..00000000
Binary files a/source/documentation/simcardio/electrophysiology/images/AP_model.png and /dev/null differ
diff --git a/source/documentation/simcardio/electrophysiology/images/Calcium.png b/source/documentation/simcardio/electrophysiology/images/Calcium.png
deleted file mode 100644
index 669ca5e1..00000000
Binary files a/source/documentation/simcardio/electrophysiology/images/Calcium.png and /dev/null differ
diff --git a/source/documentation/simcardio/electrophysiology/images/FN_model.png b/source/documentation/simcardio/electrophysiology/images/FN_model.png
deleted file mode 100644
index f8ae4075..00000000
Binary files a/source/documentation/simcardio/electrophysiology/images/FN_model.png and /dev/null differ
diff --git a/source/documentation/simcardio/electrophysiology/images/cuboid.png b/source/documentation/simcardio/electrophysiology/images/cuboid.png
deleted file mode 100644
index 1ba1b7fe..00000000
Binary files a/source/documentation/simcardio/electrophysiology/images/cuboid.png and /dev/null differ
diff --git a/source/documentation/simcardio/electrophysiology/images/ttp_pnet.gif b/source/documentation/simcardio/electrophysiology/images/ttp_pnet.gif
new file mode 100644
index 00000000..5519eb12
Binary files /dev/null and b/source/documentation/simcardio/electrophysiology/images/ttp_pnet.gif differ
diff --git a/source/documentation/simcardio/fiberGeneration/_fiber.md b/source/documentation/simcardio/fiberGeneration/_fiber.md
new file mode 100644
index 00000000..9c788d0c
--- /dev/null
+++ b/source/documentation/simcardio/fiberGeneration/_fiber.md
@@ -0,0 +1 @@
+# Myocardial Fiber Orientation Generation
\ No newline at end of file
diff --git a/source/documentation/simcardio/fiberGeneration/_fiber_debug.md b/source/documentation/simcardio/fiberGeneration/_fiber_debug.md
new file mode 100644
index 00000000..6f627a76
--- /dev/null
+++ b/source/documentation/simcardio/fiberGeneration/_fiber_debug.md
@@ -0,0 +1,47 @@
+## Troubleshooting
+### Bad Elements
+In an earlier version of this script, if the fiber generation software encountered an error for any one element in the mesh, the entire generation script would crash. This has been updated with a try-except block that replaces any bad elements with the most recently successfully obtained fiber direction. For example, if the fiber generation works for cells 1 and 2 but fails for 3 and 4, cells 3 and 4 will both be assigned the fiber orientation of cell 2. Given that the cells are numbered in a spatially random fashion (at least subjectively), the effect is to have each bad element populated with a random fiber orientation (**Figure 7**).
+
+
+
+ Figure 7. Bad Elements
+
+
+Strategies to minimize the number of bad elements mainly rely on remeshing with a finer resolution. Future work for the code could consider nearest neighbor interpolation of good elements' fiber orientation to the bad elements. With the current implementation, we can measure how many bad elements there are compared to the total number of elements by calling the following script in the interpreter after running the fiber generation code.
+
+```python
+# get error count and total number of cells in mesh
+err_ct, ncell
+```
+For the model shown in **Figure 7**, the error count is 301 and the total number of cells is 217765.
+
+By using a finer mesh, we can obtain a lower error count. This is shown below in **Figure 8**. For the model shown in **Figure 8**, the error count is 3 and the total number of cells is 507823.
+
+
+
+ Figure 8. Improved Results with Local Mesh Refinement
+
+
+### Nearest Neighbor Mesh Re-sampling
+The next challenge is that we do not always want to use a fine mesh for our electrophysiology and mechanics simulations due to high computational burden. However, as we have seen, in certain circumstances a fine mesh is required to generate fibers. We therefore need a way to cast the fiber direction information obtained from the fine mesh onto a coarser mesh intended for downstream finite element simulations.
+
+The script to perform remeshing is located at [./biventricular/P1/heat_sim/fibers/](https://github.com/StanfordCBCL/Cardiac_Modeling_Tools/tree/master/cardiac-multiphysics-pipeline/01-fibers/biventricular/P1/heat_sim/fibers/) and is called remeshv5.py. The script uses a nearest neighbor look-up to find the fiber orientation at the closest point on the fine mesh corresponding to the points on the coarse mesh. Unfortunately, the mesh must be converted to point data first and then back to cell data once the nearest neighbor exercise has been performed.
+
+To perform NN Resampling:
+1. Convert both the target mesh (course mesh) and the source mesh (finely resolved mesh) to point data and save as 'fibers_p.vtu' in their respective folders ([./biventricular/P1/heat_sim/fibers/](https://github.com/StanfordCBCL/Cardiac_Modeling_Tools/tree/master/cardiac-multiphysics-pipeline/01-fibers/biventricular/P1/heat_sim/fibers/) and [./biventricular/P1-refined/heat_sim/fibers/](https://github.com/StanfordCBCL/Cardiac_Modeling_Tools/tree/master/cardiac-multiphysics-pipeline/01-fibers/biventricular/P1-refined/heat_sim/fibers/))
+2. Open and run the remeshv5.py script
+3. Open the resulting fiber file, which should be entitled fibers_sampled_p.vtu and should be in the [./biventricular/P2/heat_sim/fibers/](https://github.com/StanfordCBCL/Cardiac_Modeling_Tools/tree/master/cardiac-multiphysics-pipeline/01-fibers/biventricular/P1/heat_sim/fibers/) directory
+4. Convert the mesh back to cell data using the [Point Data to Cell Data filter](https://docs.paraview.org/en/latest/UsersGuide/filteringData.html) in paraview
+5. Inspect the mesh to ensure that the magnitude of FIB_DIR is always 1.0 (**Figure 9A**). If it is not:
+ * Use the calculator filter on the resulting cell data with the expression shown in **Figure 9B**. The result is shown in **Figure 9C**.
+ * Last, save the mesh. Select the calculator object in the pipeline and ctrl-s to save. Name the file normals_remeshed.vtu (**Figure 9D**)
+
+
+
+
+ Figure 9. Improved Results with Local Mesh Refinement
+
+
+The completed coarse mesh shown in **Figure 9D** now has the fiber orientation information from the locally refined mesh. Note how the defect shown in **Figure 7B** has been fixed.
+
+With the refined mesh, generation of the orthogonal second set of fibers can be performed as described above.
\ No newline at end of file
diff --git a/source/documentation/simcardio/fiberGeneration/_fiber_gen.md b/source/documentation/simcardio/fiberGeneration/_fiber_gen.md
new file mode 100644
index 00000000..1489d069
--- /dev/null
+++ b/source/documentation/simcardio/fiberGeneration/_fiber_gen.md
@@ -0,0 +1,41 @@
+## Fiber Generation
+The fiber generation script works for tet, tet-10, and hexahedral elements. It can be used for single or biventricular models of the heart. Copy the result_020.vtu files from each of the four folders A, B, C, and D into a new folder entitled '/fibers/'. Be sure to replace the '020' part of each file name with A, B, C, or D, depending on the heat simulation. Copy the fiber generation script 'compute_orientations_gen.py' into the folder. For an example, see [./idealized_lv/Q1/heat_sim/fibers/](https://github.com/StanfordCBCL/Cardiac_Modeling_Tools/tree/master/cardiac-multiphysics-pipeline/01-fibers/idealized_lv/Q1/heat_sim/fibers/)
+
+Next, we open the fiber orientation script in our preferred IDE running ≥python 3.0. In the User Inputs portion of the script, we can change the alpha and beta values associated with the endocardial and epicardial surfaces. These values correspond to the angles described by Bayer, et al[1]. **Figure 4** below is adapted from their paper.
+
+
+
+ Figure 4. Definition of alpha and beta. Taken from Bayer, et al. [1]
+
+
+The fiber orientation script will create fiber direction data for each element. For tet elements, we should set elShape = 4, for tet-10, elShape = 10, and for hexahedral elements, elShape = 6. If we are unsure, we can also set elShape to 0 and the script will attempt to infer the element shape from the mesh.
+
+When the script has finished running, it will save two files in the working directory: fibers.vtu and layers.dat. To visualize fibers.vtu in paraview, first load it, then use the [Cell Data to Point Data filter](https://docs.paraview.org/en/latest/UsersGuide/filteringData.html) followed by the [glyph filter](https://docs.paraview.org/en/latest/UsersGuide/filteringData.html#glyph). Example fibers for the above cases of single and biventricular models are shown below in **Figure 5**.
+
+
+
+ Figure 5. Resulting Fiber Orientations
+
+
+**Figure 5A** shows the result of the fiber generation exercise on an idealized LV geometry. **Figure 5B** shows the results on a biventricular model.
+
+### Generating the Second Set of Fibers
+svFSI requires two sets of fibers to be defined for simulations considering fiber orientation. To obtain the second set, we will find the cross product of the normal vector and the first set of fibers to obtain a second set, which will be orthogonal to both the normals and the first set.
+
+To first obtain the normal vectors:
+
+
Load the result of simulation A, in which both endocardia are cold and the epicardium is hot. **Figure 6A** shows the Heat_flux data, which should be defined at each node in the mesh.
+
Use the [Point Data to Cell Data filter](https://docs.paraview.org/en/latest/UsersGuide/filteringData.html) to average the Heat_flux data over the space of each node. **Figure 6B** shows the Heat_flux data stored in each element. Note how the data are no longer as smooth (black arrow)
+
Use the calculator filter on the resulting cell data with the expression shown in **Figure 6C**. The result is shown in **Figure 6D**.
+
Last we need to save the mesh. But, we want to save only the FIB_DIR values from our dataset. Select the calculator object in the pipeline and ctrl-s to save. Name the file 'normals.vtu' (**Figure 6E**)
+
Choose only FIB_DIR as an array to write (**Figure 6F**)
+
+
+
+
+ Figure 6. Generating Normal Fibers from Heat Simulation
+
+
+Once we have both the set of normal vectors, we can now run the second script. A copy of this script is available at [./idealized_lv/P2/heat_sim/fibers](https://github.com/StanfordCBCL/Cardiac_Modeling_Tools/tree/master/cardiac-multiphysics-pipeline/01-fibers/idealized_lv/P2/heat_sim/fibers/) and takes as inputs:
+1. fibers.vtu
+2. normals.vtu
\ No newline at end of file
diff --git a/source/documentation/simcardio/fiberGeneration/_fiber_heat.md b/source/documentation/simcardio/fiberGeneration/_fiber_heat.md
new file mode 100644
index 00000000..32bc2e48
--- /dev/null
+++ b/source/documentation/simcardio/fiberGeneration/_fiber_heat.md
@@ -0,0 +1,40 @@
+## Heat Simulations
+### Single Ventricle
+We use the same general approach described by Bayer, et al[1]. for single and biventricular models. The script used to generate the fibers is the same in either case.
+
+For the single ventricle model, four simulations are performed:
+
+
+
Epicardium - Hot; Endocardium - Cold
+
Epicardium - Hot; Endocardium - Hot
+
Epicardium - Hot; Endocardium - Cold
+
Base - Hot; Apex - Cold
+
+
+Note that in the single ventricle case, conditions A and C are identical. This will become more clear in the biventricular model. Briefly, this is the case so that the same script can be generalized for biventricular and single ventricle models. Example input files corresponding to each of these heat flow simulations can be found in: [./idealized_lv/P2/heat_sim/\*](https://github.com/StanfordCBCL/Cardiac_Modeling_Tools/tree/master/cardiac-multiphysics-pipeline/01-fibers/idealized_lv/P2/heat_sim) and [./idealized_lv/Q1/heat_sim/\*](https://github.com/StanfordCBCL/Cardiac_Modeling_Tools/tree/master/cardiac-multiphysics-pipeline/01-fibers/idealized_lv/Q1/heat_sim)
+
+
+
+ Figure 2. Heat Simulations for Single Ventricular Model
+
+
+**Figures 2A-D** show the result of simulations A-D, **Figure 2E** shows the apex more clearly for simulation D.
+
+### Biventricular Model
+For the biventricular model, four simulations as above are performed:
+
+
+
Epicardium - Hot; LV - Cold; RV - Cold
+
Epicardium - Hot; LV - Hot; RV - Cold
+
Epicardium - Hot; LV - Cold; RV - Hot
+
Base - Hot; Apex - Cold
+
+
+For the biventricular case, we can see that conditions A and C are no longer identical. However, were the right ventricle to not exist, the boundary conditions would be the same as what were used for the single ventricle model. Example input files corresponding to each of these heat flow simulations can be found in: [./biventricular/P1/heat_sim/\*](https://github.com/StanfordCBCL/Cardiac_Modeling_Tools/tree/master/cardiac-multiphysics-pipeline/01-fibers/biventricular/P1/heat_sim)
+
+
+
+ Figure 3. Heat Simulations for Biventricular Model
+
+
+**Figures 3A-D** show the result of simulations A-D, **Figure 3E** shows the apex more clearly for simulation D.
\ No newline at end of file
diff --git a/source/documentation/simcardio/fiberGeneration/_fiber_intro.md b/source/documentation/simcardio/fiberGeneration/_fiber_intro.md
new file mode 100644
index 00000000..c6c4e198
--- /dev/null
+++ b/source/documentation/simcardio/fiberGeneration/_fiber_intro.md
@@ -0,0 +1,11 @@
+## Background
+This folder contains information on how to generate fiber orientations for patient-specific meshes. We use a rule-based method for assigning myocardial fiber orientation.
+
+To generate fibers, we need the following:
+
+
A solid .vtu mesh corresponding to myocardium
+
Surface meshes corresponding to endocardial and epicardial surfaces. We will generate fibers for both single and biventricular models
+
Surface meshes corresponding to the apex and base of the heart
+
+
+We will then run four heat simulations, A, B, C, and D.
\ No newline at end of file
diff --git a/source/documentation/simcardio/fiberGeneration/_fiber_meshing.md b/source/documentation/simcardio/fiberGeneration/_fiber_meshing.md
new file mode 100644
index 00000000..62449eeb
--- /dev/null
+++ b/source/documentation/simcardio/fiberGeneration/_fiber_meshing.md
@@ -0,0 +1,21 @@
+## Meshing
+A comprehensive overview of meshing with simvascular can be found elsewhere. Briefly, a solid model of format .vtp can be loaded into simvascular. It can then be remeshed, and subsequently the entire model can be exported. The full model should consist of:
+
+
+
A solid mesh (.vtu format)
+
Right ventricular endocardial surface mesh (.vtp format)
+
Left ventricular endocardial surface mesh (.vtp format)
+
Top surface mesh (.vtp format)
+
Epicardial surface mesh (.vtp format)
+
+
+🚨 Important! For single ventricle models, there will one fewer surface meshes.
+
+For the current task of fiber generation, we will need an additional surface mesh that is not typically produced by simvascular. This mesh will correspond to the apex fo the heart. This can be generated by importing the epicardial surface mesh (.vtp). This will look something like what is shown below in **Figure 1A**.
+
+
+
+ Figure 1. Generating Apex Surface For Heat Simulations
+
+
+**Figure 1B** shows the rotated epicardial mesh surface. The magenta spotlight indicates our target location for defining the apex. **Figure 1C** shows application of the [clip filter in paraview](https://docs.paraview.org/en/latest/UsersGuide/filteringData.html#clip "clip filter in paraview"), which can be used to trim the epicardial surface down to just the region defining the apex. **Figure 1D** shows proper rotation of the clip axis such that it is taking axial slices of the myocardium. **Figure 1E** shows the result of clipping. Note that in **Figure 1E**, the 'crinkle clip' setting is not toggled. This will create problems for svFSI later, so be sure to select 'crinkle clip'. The result with 'crinkle clip' is shown in **Figure 1F**. Note the jagged edges.
\ No newline at end of file
diff --git a/source/documentation/simcardio/fiberGeneration/_fiber_ref.md b/source/documentation/simcardio/fiberGeneration/_fiber_ref.md
new file mode 100644
index 00000000..12a941ca
--- /dev/null
+++ b/source/documentation/simcardio/fiberGeneration/_fiber_ref.md
@@ -0,0 +1,7 @@
+## References
+
+
\ No newline at end of file
diff --git a/source/documentation/simcardio/fiberGeneration/images/fig1.png b/source/documentation/simcardio/fiberGeneration/images/fig1.png
new file mode 100644
index 00000000..99a9fe8a
Binary files /dev/null and b/source/documentation/simcardio/fiberGeneration/images/fig1.png differ
diff --git a/source/documentation/simcardio/fiberGeneration/images/fig2.png b/source/documentation/simcardio/fiberGeneration/images/fig2.png
new file mode 100644
index 00000000..62cadb8f
Binary files /dev/null and b/source/documentation/simcardio/fiberGeneration/images/fig2.png differ
diff --git a/source/documentation/simcardio/fiberGeneration/images/fig3.png b/source/documentation/simcardio/fiberGeneration/images/fig3.png
new file mode 100644
index 00000000..3e3d47a8
Binary files /dev/null and b/source/documentation/simcardio/fiberGeneration/images/fig3.png differ
diff --git a/source/documentation/simcardio/fiberGeneration/images/fig4.png b/source/documentation/simcardio/fiberGeneration/images/fig4.png
new file mode 100644
index 00000000..bff7c5d8
Binary files /dev/null and b/source/documentation/simcardio/fiberGeneration/images/fig4.png differ
diff --git a/source/documentation/simcardio/fiberGeneration/images/fig5.png b/source/documentation/simcardio/fiberGeneration/images/fig5.png
new file mode 100644
index 00000000..4ad960de
Binary files /dev/null and b/source/documentation/simcardio/fiberGeneration/images/fig5.png differ
diff --git a/source/documentation/simcardio/fiberGeneration/images/fig6.png b/source/documentation/simcardio/fiberGeneration/images/fig6.png
new file mode 100644
index 00000000..840c69cb
Binary files /dev/null and b/source/documentation/simcardio/fiberGeneration/images/fig6.png differ
diff --git a/source/documentation/simcardio/fiberGeneration/images/fig7.png b/source/documentation/simcardio/fiberGeneration/images/fig7.png
new file mode 100644
index 00000000..b86597ea
Binary files /dev/null and b/source/documentation/simcardio/fiberGeneration/images/fig7.png differ
diff --git a/source/documentation/simcardio/fiberGeneration/images/fig8.png b/source/documentation/simcardio/fiberGeneration/images/fig8.png
new file mode 100644
index 00000000..469e490b
Binary files /dev/null and b/source/documentation/simcardio/fiberGeneration/images/fig8.png differ
diff --git a/source/documentation/simcardio/fiberGeneration/images/fig9.png b/source/documentation/simcardio/fiberGeneration/images/fig9.png
new file mode 100644
index 00000000..b0368745
Binary files /dev/null and b/source/documentation/simcardio/fiberGeneration/images/fig9.png differ
diff --git a/source/documentation/simcardio/mechanics/_mechanics-fiber-gen.md b/source/documentation/simcardio/mechanics/_mechanics-fiber-gen.md
deleted file mode 100644
index 1dea09f5..00000000
--- a/source/documentation/simcardio/mechanics/_mechanics-fiber-gen.md
+++ /dev/null
@@ -1,23 +0,0 @@
-## Generation of Fiber Distribution ##
-
-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 [9]. 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,
-
-
-# Fiber direction
-Fiber direction: (1.0, 0.0, 0.0)
-
-# Sheet direction
-Fiber direction: (0.0, 1.0, 0.0)
-
-
-**svFSI** also supports specifying distributed fiber and sheet direction generated by rule-based methods [3] through the following input commands,
-
-
-# Fiber direction
-Fiber direction file path: fibersLong.vtu
-
-# Sheet direction
-Fiber direction file path: fibersSheet.vtu
-
-
-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 here.
diff --git a/source/documentation/simcardio/mechanics/_mechanics-kinematics.md b/source/documentation/simcardio/mechanics/_mechanics-kinematics.md
deleted file mode 100644
index dcde3c46..00000000
--- a/source/documentation/simcardio/mechanics/_mechanics-kinematics.md
+++ /dev/null
@@ -1,13 +0,0 @@
-## Kinematics ##
-
-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\_{0}$) and a current configuration (denoted $\Omega\_{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:
-
-$$\mathbf{x}(\mathbf{X}, t)=\mathbf{X}+\mathbf{u}(\mathbf{X}, t)$$
-
-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\_{0}$ which acts as a mapping between the reference and current configurations such that $\mathbf{u}: \Omega\_{0} \Rightarrow \Omega\_{t} .$ We also define the following relationships and tensors, which are standard for describing nonlinear structural mechanics:
-
-$$ \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}), ~~ \mathbf{C}=\mathbf{F}^{T} \mathbf{F} $$
-
-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.
diff --git a/source/documentation/simcardio/mechanics/_mechanics-material-models.md b/source/documentation/simcardio/mechanics/_mechanics-material-models.md
deleted file mode 100644
index c32adadf..00000000
--- a/source/documentation/simcardio/mechanics/_mechanics-material-models.md
+++ /dev/null
@@ -1,64 +0,0 @@
-## Material Models ##
-
-Below is the list of available material constitutive models in **svFSI** :
-
-
-
Volumetric constitutive models for the struct/ustruct equations
diff --git a/source/documentation/simcardio/mechanics/_mechanics-simulation.md b/source/documentation/simcardio/mechanics/_mechanics-simulation.md
deleted file mode 100644
index 40535b17..00000000
--- a/source/documentation/simcardio/mechanics/_mechanics-simulation.md
+++ /dev/null
@@ -1,8 +0,0 @@
-## Run Simulation ##
-
-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
-
-mpiexec -np {number of MPI processes} {path to svFSI executable} {path to the input file}
-
-
-**Please remember to change the path to mesh folder and path to the load.dat in the input file according to your local configuration.** **svFSI** 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.
diff --git a/source/documentation/simcardio/mechanics/_mechanics-solve.md b/source/documentation/simcardio/mechanics/_mechanics-solve.md
deleted file mode 100644
index ead22da2..00000000
--- a/source/documentation/simcardio/mechanics/_mechanics-solve.md
+++ /dev/null
@@ -1,4 +0,0 @@
-# Solve Cardiac Mechanics with svFSI #
-
-Solving cardiac mechanics is a challenging task as the heart muscle is a complex fibrous structure that is predominantly incompressible [1], and undergoes large deformation during a cardiac cycle. In the following sections, we will introduce the workflow of modeling cardiac mechanics in **svFSI** using the benchmark example from Land et al. [2], i.e., the passive inflation of an idealized left ventricle.
-
diff --git a/source/documentation/simcardio/mechanics/_mechanics-solver-input.md b/source/documentation/simcardio/mechanics/_mechanics-solver-input.md
deleted file mode 100644
index 5768f2e0..00000000
--- a/source/documentation/simcardio/mechanics/_mechanics-solver-input.md
+++ /dev/null
@@ -1,145 +0,0 @@
-## Input File ##
-
-**svFSI** requires a plain-text input file to specify simulation parameters. An overview of the syntax could be found here. The **SimVascular** GUI currently supports limited input configurations. To access more advanced functions of **svFSI**, users are recommended to create their own input file by modifying existing templates. Below is a template of the input file for modeling passive inflation of a left ventricle,
-
-
-# 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
- }
-}
-
-
-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.
-
-
-2 1
-0.0 0.0
-1.0 1.0e4
-# content of load.dat
-
-
diff --git a/source/documentation/simcardio/mechanics/_mechanics-struct.md b/source/documentation/simcardio/mechanics/_mechanics-struct.md
deleted file mode 100644
index 3d0b723b..00000000
--- a/source/documentation/simcardio/mechanics/_mechanics-struct.md
+++ /dev/null
@@ -1,27 +0,0 @@
-## STRUCT: displacement-based nonlinear elastodynamics ##
-
-
-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
-
-$$ \rho\ddot{\mathbf{u}} = \nabla\_{x}\cdot{\sigma} + \rho\mathbf{f\_b}, $$
-$$ \sigma\cdot \mathbf{n} = \mathbf{h},~\mathrm{on}~\left(\Gamma\_{t}\right)\_{h}. $$
-
-where $\sigma$ is the stress term in the current configuration.
-
-The resulting weak form of the structural dynamics equations is
-
-$$ \int\_{\Omega\_{t}} \mathbf{w} \cdot \rho \ddot{\mathbf{u}} d \Omega+\int\_{\Omega\_{0}} \nabla\_{X} \mathbf{w}:(\mathbf{F} \mathbf{S}) d \Omega-\int\_{\Omega\_{t}} \mathbf{w} \cdot \rho \mathbf{f\_b} d \Omega-\int\_{\left(\Gamma\_{t}\right)\_{h}} \mathbf{w} \cdot \mathbf{h} d \Gamma\_{h}=0 $$
-
-The acceleration term (i.e. $\int\_{\Omega\_{t}} \mathbf{w} \cdot \rho \ddot{\mathbf{u}} d \Omega$), body forcing term (i.e. $\int\_{\Omega\_{t}} \mathbf{w} \cdot \mathbf{f\_b} d \Omega$), and the natural boundary condition term (i.e. $\int\_{\left(\Gamma\_{t}\right)\_{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}$.
-
-**svFSI** 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}\_{iso}$) and dilational (or volumetric, $\mathbf{S}\_{vol}$) components. The specific form of $\mathbf{S}$ will depend on the chosen constitutive model (isochoric and volumetric). More information on these Material models can be found in the literature [1]. 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,
-
-$$ \lambda=\frac{E v}{(1+v)(1-2 v)}, \quad \mu=\frac{E}{2(1+v)}, \quad \kappa=\lambda + \frac{2}{3} \mu $$
-
-where, $\lambda$ and $\mu$ are the Lame'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,
-
-$$ \mathbf{S}^{StVK} = 2 \mu \mathbf{E} + \lambda \operatorname{tr}(\mathbf{E}) \mathbf{I}, ~~~ \textrm{St. Venant-Kirchhoff} $$
-$$ \mathbf{S}^{mStVK} = \kappa \operatorname{ln}(J) \mathbf{C}^{-1} + \mu(\mathbf{C} - \mathbf{I}), ~~~ \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), ~~ \textrm{Neo-Hookean} $$
-
-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\_{iso}} + \mathbf{S\_{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 Material models and the corresponding references for the available dilational penalty models in **svFSI** .
diff --git a/source/documentation/simcardio/mechanics/_mechanics-theory.md b/source/documentation/simcardio/mechanics/_mechanics-theory.md
deleted file mode 100644
index 0bb59e54..00000000
--- a/source/documentation/simcardio/mechanics/_mechanics-theory.md
+++ /dev/null
@@ -1,3 +0,0 @@
-# svFSI Nonlinear Mechanics Solver #
-
-This section briefly explains the theory and implementation of the nonlinear solid dynamics solver in **svFSI**. Two types of formulations are provided in **svFSI** 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.
\ No newline at end of file
diff --git a/source/documentation/simcardio/mechanics/_mechanics-ustruct.md b/source/documentation/simcardio/mechanics/_mechanics-ustruct.md
deleted file mode 100644
index 4e24bc0e..00000000
--- a/source/documentation/simcardio/mechanics/_mechanics-ustruct.md
+++ /dev/null
@@ -1,50 +0,0 @@
-## uSTRUCT: mixed formulation nonlinear elastodynamics ##
-
-**svFSI** allows solving nonlinear elastodynamics using a mixed formulation where the structure's velocity and pressure are the unknown degrees of freedom [4]. 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 [4]; (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 [4] and takes the following additive decoupled form as,
-$$
-G(\overline{\mathbf{C}},p,T) = G\_{iso}(\overline{\mathbf{C}},T) + G\_{vol}(p,T)
-$$
-
-where $G\_{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\_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,
-
-$$
-H^R(\overline{\mathbf{C}},J,T)=\sup\_p\left(-pJ+G^R(\overline{\mathbf{C}},p,T) \right).
-$$
-
-and due to the additive splitting of the Gibbs free energy, we have,
-
-$$
-H^R(\overline{\mathbf{C}},J,T)=G\_{iso}^R(\overline{\mathbf{C}},T) + \sup\_p\left(-pJ+G\_{vol}^R(p,T) \right).
-$$
-
-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,
-
-$$ \frac{\mathrm{d} \mathbf{u}}{\mathrm{d} t} - \mathbf{v} = \mathbf{0} $$
-$$ \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}. $$
-
-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,
-
-$$ \rho(p) = \left( \frac{\mathrm{d} G\_{vol}}{\mathrm{d} p} \right)^{-1}, $$
-$$ \beta(p) = \frac{1}{\rho} \frac{\mathrm{d} \rho}{\mathrm{d} p} = -\frac{\partial^2 G\_{vol}}{\partial p^2} / \frac{\partial G\_{vol}}{\partial p}, $$
-$$ \mathbf{\sigma\_{dev}} = J^{-1} \bar{\mathbf{F}} \left( \mathbb{P}:\bar{\mathbf{S}} \right) \bar{\mathbf{F}}^T, $$
-$$ \bar{\mathbf{S}} = 2 \frac{\partial G\_{iso}^R}{\partial \bar{\mathbf{C}}} = 2 \frac{\partial (\rho\_0 G\_{iso})}{\partial \bar{\mathbf{C}}}, $$
-
-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}$.
-
-
-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,
-
-$$ \mathbf{B}\_k := \int\_{\Omega\_x} \mathbf{w}\_\mathbf{u} \cdot \left( \frac{\mathrm{d} \mathbf{u}}{\mathrm{d} t} - \mathbf{v} \right) \mathrm{d} \Omega\_x = \mathbf{0} $$
-
-$$ \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. $$
-
-The stabilization parameters are chosen as,
-
-$$
-\mathbf{\tau}\_M = \tau\_M\mathbf{I}\_{nd}, \quad \tau\_M = c\_m \frac{\Delta x^e}{c\rho}, \quad \tau\_C = c\_c c\Delta x^e \rho
-$$
-
-where, $\Delta x^e$ is the diameter of the circumscribing sphere of the tetrahedral element, $c\_m$ and $c\_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\_0}$, where $\lambda$ and $\mu$ are the Lame's parameters. For incompressible materials, $c = \sqrt{\frac{\mu}{\rho\_0}}$ is the shear wave speed. Further details about the formulation, finite element discretization and time integration could be found in Liu et al. [4].
diff --git a/source/documentation/simcardio/mechanics/images/Mesher.png b/source/documentation/simcardio/mechanics/images/Mesher.png
deleted file mode 100644
index 3a21c2a4..00000000
Binary files a/source/documentation/simcardio/mechanics/images/Mesher.png and /dev/null differ
diff --git a/source/documentation/simcardio/mechanics/images/export_mesh.png b/source/documentation/simcardio/mechanics/images/export_mesh.png
deleted file mode 100644
index 5b5024d6..00000000
Binary files a/source/documentation/simcardio/mechanics/images/export_mesh.png and /dev/null differ
diff --git a/source/documentation/simcardio/mechanics/images/faces.png b/source/documentation/simcardio/mechanics/images/faces.png
deleted file mode 100644
index 90649068..00000000
Binary files a/source/documentation/simcardio/mechanics/images/faces.png and /dev/null differ
diff --git a/source/documentation/simcardio/mechanics/images/import_model.png b/source/documentation/simcardio/mechanics/images/import_model.png
deleted file mode 100644
index 86269c18..00000000
Binary files a/source/documentation/simcardio/mechanics/images/import_model.png and /dev/null differ
diff --git a/source/documentation/simcardio/mechanics/images/mesh_folder.png b/source/documentation/simcardio/mechanics/images/mesh_folder.png
deleted file mode 100644
index 7843a5e2..00000000
Binary files a/source/documentation/simcardio/mechanics/images/mesh_folder.png and /dev/null differ
diff --git a/source/documentation/simcardio/mechanics/images/path_to_binary.png b/source/documentation/simcardio/mechanics/images/path_to_binary.png
deleted file mode 100644
index 535012a0..00000000
Binary files a/source/documentation/simcardio/mechanics/images/path_to_binary.png and /dev/null differ
diff --git a/source/documentation/simcardio/mechanics/images/tmp/base.png b/source/documentation/simcardio/mechanics/images/tmp/base.png
deleted file mode 100644
index 2a74def0..00000000
Binary files a/source/documentation/simcardio/mechanics/images/tmp/base.png and /dev/null differ
diff --git a/source/documentation/simcardio/mechanics/images/tmp/domain.png b/source/documentation/simcardio/mechanics/images/tmp/domain.png
deleted file mode 100644
index 9176f469..00000000
Binary files a/source/documentation/simcardio/mechanics/images/tmp/domain.png and /dev/null differ
diff --git a/source/documentation/simcardio/mechanics/images/tmp/endo.png b/source/documentation/simcardio/mechanics/images/tmp/endo.png
deleted file mode 100644
index 12fbce2f..00000000
Binary files a/source/documentation/simcardio/mechanics/images/tmp/endo.png and /dev/null differ
diff --git a/source/documentation/simcardio/mechanics/images/tmp/new_svFSIjob.png b/source/documentation/simcardio/mechanics/images/tmp/new_svFSIjob.png
deleted file mode 100644
index a3b9247f..00000000
Binary files a/source/documentation/simcardio/mechanics/images/tmp/new_svFSIjob.png and /dev/null differ
diff --git a/source/documentation/simcardio/mechanics/images/tmp/property.png b/source/documentation/simcardio/mechanics/images/tmp/property.png
deleted file mode 100644
index 58517df3..00000000
Binary files a/source/documentation/simcardio/mechanics/images/tmp/property.png and /dev/null differ
diff --git a/source/documentation/simcardio/mechanics/images/tmp/simulation_parameter.png b/source/documentation/simcardio/mechanics/images/tmp/simulation_parameter.png
deleted file mode 100644
index 8a00160a..00000000
Binary files a/source/documentation/simcardio/mechanics/images/tmp/simulation_parameter.png and /dev/null differ
diff --git a/source/documentation/svfsi/cep/_example.md b/source/documentation/svfsi/cep/_example.md
index f167fe70..0615cd6e 100644
--- a/source/documentation/svfsi/cep/_example.md
+++ b/source/documentation/svfsi/cep/_example.md
@@ -6,9 +6,10 @@ The computational domain is a rectangular block, with dimensions of $3\times 7\t
- Computational domain of example 1.[reference]
+ Computational domain.[1]
+
Here is the breakdown of the input file for this study.
```
diff --git a/source/homepage/_documentation.erb b/source/homepage/_documentation.erb
index 9a4bbe21..a656602f 100644
--- a/source/homepage/_documentation.erb
+++ b/source/homepage/_documentation.erb
@@ -24,7 +24,7 @@