Back to all tutorials

# Blood Flow - CFD Simulation SimFlow Tutorial

## 1. Create Case

After opening SimFlow, we will create a new case named blood_flow

1. Go to panel

2. Provide name blood_flow

3. Click

## 2. Import Geometry

1. Click

2. Select all geometry files inlet.stl outlet01.stl outlet02.stl wall.stl

3. Click

## 3. Imported Geometry Units

The STL format does not contain the unit information which are defined during the geometry export. If we do not know the exported unit, we can estimate it based on the total size of imported geometries. The size is displayed next to Geometry size label. In our case, the default unit meter is correct.

1. To confirm default unit meter, press

## 4. Geometry - Blood Vessel

After importing geometry it will appear in the 3D window.

1. Click to zoom in on the geometry

## 5. Display Geometry - Blood Vessel

We will change the color of the wall to distinguish it from the other geometries.

1. Select the wall from geometry list or hold CTRL key and click on the wall face

2. Click Change Object Display Properties

3. Select green color

4. Approve by clicking

## 6. Meshing Parameters - Inlet

In the Hex Meshing panel, we will change meshing properties associated with geometry objects. We want to apply the same settings to all geometries. We will set the parameters for the first surface and copy the configuration to the remaining geometries.

1. Go to Hex Meshing panel

2. Select the inlet component

3. Enable Mesh Geometry

4. Set Refinement to Min 1 Max 1

## 7. Meshing Parameters - Copy

We want to apply the same settings to all geometries. We will copy the configuration from the inlet to the remaining geometries.

1. Select the inlet

2. Click Copy Meshing Properties

3. Select all the remaining faces as a target outlet01 outlet02 wall

4. Click

## 8. Base Mesh - Domain

Under the Base tab we will define the domain of the background mesh.

1. Go to Base tab

2. Click on

3. Define the number of divisions
Division6034125

## 9. Material Point

Material Point tells the meshing algorithm on which side of the geometry the mesh is to be retained. Since we are considering flow inside the blood vessel we need to place the material point inside the geometry.

1. Go to Point tab

2. Specify location inside blood vessel geometry
Material Point00-1e-03

You can specify the point location from the 3D view. Hold the CTRL key and drag the arrows to the destination.

## 10. Start Meshing

Everything is now set up for meshing

1. Go to Mesh tab

2. Press button to start meshing process

## 11. Mesh

After the meshing process, the mesh will appear in the graphics window. Use the scroll wheel in your mouse to zoom into the model.

1. Open the Console by clicking the icon in the lower right corner

## 12. Check Mesh

Check the mesh quality and statistics.

1. Expand the Options list next to default region

2. Select Check option

3. Checks summary will be displayed on the command window. It also shows checking criteria.

## 13. Mesh - Boundaries

1. Set the following boundaries types accordingly
inlet Patch
outlet01 Patch
outlet02 Patch
wall Wall

## 14. Select Solver - PIMPLE

We want to analyze the transient, incompressible flow with non-newtonian fluid to model the blood flow. For this purpose, we will use the pimpleFoam solver.

1. Go to SETUP panel

2. Filter the solvers by choosing flow

3. Pick PIMPLE (pimpleFoam) solver

4. solver

## 15. Turbulence

Due to the small diameter of the vessel and high viscosity of the fluid, it can be assumed that the flow remains laminar.

1. Go to Turbulence panel

2. Make sure the Laminar model is selected

## 16. Transport Properties

For the demonstration purpose, we will model the blood as non-newtonian fluid using the Bird-Carreu model. We will operate on quantities divided by density and we do not need to specify the density. However, we have to take this fact into account during postprocessing.

1. Go to Transport Properties panel

2. Change Transport Model to Bird-Carreau

3. Set the parameters accordingly
$$\nu_0$$ $${\sf [\frac{m^2}{s}]}$$3.3e-06
$$\nu_{\infty}$$ $${\sf [\frac{m^2}{s}]}$$1.32e-05
$$K$$ $${\sf [s]}$$0.6046
$$n$$ $${\sf [-]}$$0.3742

## 17. Boundary Conditions - Inlet (I)

The flow in the blood vessels is oscillatory in time. We will define the inlet velocity using the time history of one oscillation period. To do so we will use a table input option. The rest of the boundaries conditions we will leave as default.

1. Go to Boundary Conditions panel

2. Select the inlet boundary

3. Set the Velocity Inlet character

4. Change the Type of the velocity to the Fixed Mean Value

5. Change the Value [m/s] to the table

6. Click on

## 18. Boundary Conditions - Inlet (II)

We will use a predefined velocity profile from the external file.
We need to Download Velocity Profileprofile.csv and import it to the Simflow.

1. Click on Load Data From File

2. Select the profile.csv file

3. Press

4. Loaded data will be presented on the chart

5. Press

## 19. Initial Conditions

Before we start simulation we need to define the flow state at the time zero. We will specify a constant velocity equal to  0.2 m/s  which corresponds to the initial inlet velocity.

1. Go to Initial Conditions panel

2. Set the initial velocity
U00-0.2

## 20. Monitors - Boundary

We would like to monitor flow velocity at the outlet boundaries. The results can be later on used to calculate the volumetric and mass flow rates for each outlet.

1. Go to Monitors panel

2. Switch to Boundary tab

3. Expand Fields for the outlet01

4. Select the velocity field U

5. Repeat this step for the outlet02 boundary.
Selected fields will be visible next to the boundary names.

## 21. Run - Time Control

We will set the time of simulation to match the inlet velocity time range. We also want the solver to automatically determine the proper time step. This should lead to good stability and potentially reduce simulation time.

1. Go to RUN panel

2. Set the Simulation Time [s] to 0.9

3. Change Time Stepping $$\Delta t[s]$$ to Automatic

4. Set initial and maximum time step (solver will start computation with initial value and adjust it in the next iterations not exceeding the maximum value)
Initial $$\Delta t$$ $${\sf [s]}$$1e-06
Max $$\Delta t$$ $${\sf [s]}$$1e-02

## 22. Run - Output

We can control how often results should be saved on the hard drive. We will write the results at the interval of  0.02  seconds. Note, that only saved data will be available during postprocessing.

1. Switch to Output tab

2. Set the Interval [s] to 0.02

## 23. Run - CPU

To speed up the calculation process increase the number of CPUs basing on your PC capability. We recommend using at least 4 cores for this tutorial. The free version allows you to use only 2 processors in parallel mode. To get the full version, you can use the contact form to Request 30-day Trial

Estimated computation time for 2 processors: 1 hour

1. Switch to CPU tab

2. Use parallel mode

3. Increase the Number of processors

4. Click button

## 24. Results - Outlet Velocity

Outlet boundary monitors are ploted on the charts next to Residual tab.

1. Switch to U on outlet01 tab

3. Set the range for X and Y axis:
X Min0
X Max0.9
Y Min0
Y Max1.2

## 25. Calculate Wall Shear Stress

Calculations are finished, but before we start postprocessing, we will calculate wall shear stress (WSS). It can be calculated as the multiplication of dynamic viscosity and velocity gradient next to the wall. WSS is a characteristic value in medicine, used for circulatory system disease identification. Too low values are the indicators of atherosclerosis while the large WSS leads to the thickening of the vessel wall and increasing its diameter. This occurs when one vessel splits into two like in our example.

1. Go to Calculate panel

2. Switch to Wall tab

3. Set the Time Range to Full Time Range

4. Set the Wall Calculation to Wall Shear Stress

5. Click on

## 26. Postprocessing - ParaView

After computations are finished we can do complex visualization of our results with ParaView.

1. Go to POSTPROCESSING panel

2. Click on Run ParaView

## 27. ParaView - Load Results (I)

Load the results into the program.

1. Select blood_flow.foam

2. Click to load results into ParaView

3. After loading results they will be shown in the 3D graphic window

## 28. ParaView - Load Results (II)

ParaView skips the initial time step by default, therefore we need to add the zero time to simulation.

1. Uncheck Skip Zero Time

2. Click

3. Click

4. Set the time or time step to 0

5. Select the velocity U from the list

## 29. ParaView - WSS

To get the true value of the wall shear stress we need to multiply SimFlow results by the density. Please remember that for the sake of this tutorial we have created coarse mesh. We also model the vessel as rigid walls, whereas in reality, it’s hyper-elastic. Nevertheless, still we can identify the regions of extremely high and low wall shear stresses.

1. Select blood_flow.foam

2. Click Calculator

3. Expand the vector list in calculator

4. Select wallShearStress

5. Selected vector appears in equation. Now we will multiply vector by the blood density 1060

6. Set the ressult name to WSS

7. Click

8. Select the wall shear stress WSS from the list

9. Play with an animation buttons to track the results of analysis

10. Click on Rescale to data range over all timesteps

## 30. ParaView - Streamline (I)

Finally, we can take a look at streamlines.

1. Select Stream Tracer from top menu

2. Select velocity U from the vectors list

3. Change Seed Type to Point Source

4. Type the center coordinate and radius of the sphere:
Center00-0.0005

5. Uncheck the Show Sphere

6. Increase the number of points to 200

7. Click

8. Select the velocity U from the list

9. Click on Rescale to Data Range

## 31. ParaView - Streamline (II)

To show the geometry together with the streamlines we will follow these steps:

1. Click on the eye next to blood_flow.foam

2. Select Solid Color from the list

3. Change the opacity to 0.3