# Exercises — Lesson 9

### Simulating a Non-Newtonian Fluid Using the Casson Model

A user-defined function (UDF) can be used to implement the Casson fluid model. The Casson fluid model is given below:

A UDF incorporating the equations above is included in the file that you can download here. This file also contains the UDF for defining the time variation of the inlet velocity. You need to use this file for the Casson model and not the one provided in the tutorial. This is necessary because all UDF's need to be in one .c file. You could also use this .c file for all your cases, whether you are using the Casson model or not.

In order to implement this file in Ansys Fluent, in the top menu bar, under "Define" -> "User Defined" -> "Functions", choose "Interpreted." Find the .c file in the directory and choose "Interpret". Under materials, double click on the fluid you defined, and for viscosity choose "User Defined.".Then choose "casson_viscosity." Assign the inlet velocity as in the tutorial.

The following videos go through the steps for modifying the bifurcating artery geometry in Ansys SpaceClaim.

Watch the following video for a demonstration of how to add obstructions to the original artery geometry using Ansys SpaceClaim.

Quick Summary:

1. Edit Model in SpaceClaim
2. File > SpaceClaim Options > Set Minimum Grid Spacing to 0.1 mm
3. Place a point where you want the centroid of the obstruction to be located
4. Merge the surrounding faces using Repair > Merge Faces
5. Hide Artery
6. Sketch an ellipse on XZ plane
7. Major axis length (along Z): 12 mm
8. Minor axis length (along X): 4 mm
9. Pull > Select the Z axis > Click the |> button
10. Move > Up to > Click on the Point from earlier
11. Unhide Artery and make sure ellipsoid is properly sized and positioned
12. Use Pull > Scale to resize the ellipsoid
13. Use Move to reposition the ellipsoid using the directional or orientational handles
14. Click Combine
15. Click the artery, then the ellipsoid (should result in three solids)
16. Delete or suppress all entities except the artery
17. Click Pull, click on the edge of the resulting depression and create a fillet
18. If you need to restart for any reason, simply CTRL + click the depression and the fillet and then click Fill (make sure you click the green checkmark that is on the screen)

Watch the following video for a demonstration of how to add a stent to the original artery geometry using Ansys SpaceClaim. You will need to suppress the solid created to generate the effect of the stent before opening the geometry in the mesher.

Quick Summary:

1. Create a new sketch, move to one end of the obstruction
2. Use Spline to mimic the artery boundary (just click on the edge of the artery that is visible and follow the dots that show up)
3. Use Offset Curve to create two more curves: one inside and one outside the artery