2D AND 3D FLOW ANALYSIS IN MICROFLUIDIC
CHANNELS INCLUDING MULITPLE SPECIES
TRANSPORT.
Written and Tested by: Scott Stelick
[email protected]
Alliance for NanoMedical Technologies
Cornell University
Problem Specification
Applicable ANSYS Products: ANSYS/Multiphysics, ANSYS/FLOTRAN, ANSYS/ED Level of Difficulty: advanced
Interactive Time Required: 1-1/2 to 2 hours Discipline: Computational Fluid Dynamics (CFD) Analysis Type: steady-state
Element Types Used: FLUID141 and FLUID 142
ANSYS Features Demonstrated: Solid modeling, mapped meshing, defining an abbreviation on the Toolbar, restart of FLOTRAN solution, multiple solutions, vector displays, line graphs, path operations, trace particle animation, multiple species, fluid mixing in microfluidic channels, fluid flow around obstacles in fluid channel.
Problem Description
This problem models laminar fluid flow in a small microfluidic channel. Two input arms combine in the design creating laminar flow out of the single output channel. You will first run a 2D analysis of the design and after this is completed, a 3D analysis will be done. The final analysis will be fluid flow around an obstruction in the channel. Added information is given on how to model complex 3D structures.
Constants and dimensions
All parameters and constants are either given in the tutorial or in the table at the end of this tutorial.
Approach and Assumptions
You will perform two and three-dimensional analyses using the FLOTRAN element FLUID141 and FLUID142, respectively. This problem is divided into three parts:
A laminar analysis of the 2D fluid flow and multiple species analysis of two different fluids.
Extruding of the 2D model into a 3 dimensional design and multiple species analysis of the two different fluids.
Velocity profiles of the fluids flowing in a microfluidic channel with obstructions are modeled.
For all solutions, you will apply a uniform velocity profile at the inlet. This includes specification of a zero velocity condition at the inlet in the direction normal to the inlet flow. You will apply no-slip (zero velocity) conditions all
along the walls (including where the walls intersect the inlets and outlets). The fluid is considered incompressible and you can assume that the properties will be constant. In such cases, only the relative value of pressure is important, and a zero relative pressure is applied at the outlet.
For the initial analysis, the flow is in the laminar regime (Reynold's number < 1000). (Note that in a two-dimensional geometry, the hydraulic diameter is twice the inlet height.)
For internal flows, the transition to turbulence occurs within the Reynolds number range of 2000-3000.
Summary of Steps
Use the information in the problem description and the steps below as a guideline in solving the problem on your own. Or, use the detailed interactive step-by-step solution below.
Before you begin, delete any results files (.rfl) from previous CFD analyses that still reside in your working directory. If you begin an ANSYS session to start a new CFD analysis, and use the same jobname from a file stored from a previous CFD analysis, the program will not start from scratch, but will restart and append to files with the same name (Jobname.rfl and Jobname.pfl). To avoid this situation, delete these results files when starting a new
CFD analysis. Another way of avoiding this situation is to change the jobname to one that was not used in a previous CFD analysis. You can change the jobname in the product launcher before starting ANSYS, or during an ANSYS session by choosing Utility Menu
> File > Change Jobname
Preprocessing (Laminar Analysis) 1. Set preferences.
2. Define element type. 3. Units.
4. Create Keypoints.
7. Create the finite element mesh. 8. 2D meshing.
9. 3D meshing.
10. Extruding 2D models into 3D structures. 11. Unselecting 2D elements.
12. Establish Fluid properties. 13. Set execution controls.
14. Change reference conditions. 15. Multiple species setup. 16. Enter fluid properties. 17. Boundary conditions.
18. Execute FLOTRAN solution. 19. Post processing.
20. Plot velocity vectors. 21. Plot density variations. 22. Plot total pressure contours.
23. Animate velocity of trace particles instructions. 24. Path plot of velocity.
25. Construct single microfluidic channel with obstacles. 26. Mesh regions.
27. Apply boundary conditions. 28. Execute FLOTRAN solution. 29. Complex 3D modeling.
Launching ANSYS:
It is probably best to save your work on a Zip Disk in the computer IOMEGA Zip Drive. Then, simply click on the ANSYS icon on the Windows Desktop. The ANSYS Launcher menu should appear. It is shown at the top of the next page. The only input you will likely need on this menu is specification of the Zip Drive as your “Working Directory”. If you don’t have a Zip Disk, or if you prefer to work on the computer hard drive instead, then specify any directory (or, “Folder”) as your working directory. To browse and find the desired working directory, click on the button with the three dots to the far right on the Launcher Menu on the line that says “Working Directory”. Once the working directory is specified, click on “Run” at the bottom of the Launcher Menu.
The ANSYS menus should open up. You will see a Main Menu, illustrated on the following page, and a large black graphics window. You are now ready to begin creating the model and performing the analysis. Enter an initial jobname here, no spaces are allowed.
ANSYS Launcher Menu:
Note: Most of the required tasks are performed using menu picks from the ANSYS
Graphical User Interface, as specified in italics in the step-by-step instructions below. It is sometimes more convenient, however, to enter certain commands directly at the command line. The command line is seen on the screen as:
The method of direct command line entry is used in some cases in this exercise, whenever this method is more convenient than using menu picks.
****IMPORTANT***: AS YOU WORK THROUGH THIS EXERCISE, WITHIN ANSYS, ON THE ANSYS TOOLBAR (UPPER RIGHT), CLICK ON “SAVE_DB” OFTEN!!! THIS TOOLBAR APPEARS AS:
At any point, if you want to resume from the previous time the model was saved, simply click on “RESUM_DB” on this same Toolbar. Any information entered since the last save will be lost, but this is a nice feature in the event that you make an input mistake, and are unsure of how to correct it.
There are a number of ways to model a system and perform an analysis in ANSYS. The steps below present only one method.
You will now set preferences in order to filter quantities that pertain to this discipline only. 1. Main Menu > Preferences 2. Turn on FLOTRAN CFD filtering 3. OK.
Define element type.
1. Main Menu > Preprocessor > Element Type > Add/Edit/Delete
2. Add an element type.
3. Choose 2D FLOTRAN element (FLUID141). 4. Choose 3D FLOTRAN element (FLUID142). 5. OK.
6. Close.
Units.
1. Main Menu > Preprocessor > Material prop > material library > select units
2. Choose the cgs system
Note: All units shown in this tutorial are in cgs units.
Main Menu > Preprocessor > Materials > temperature unit
Create Keypoints:
In fluid modeling, it is best to have a single area defined. Original tests were done where rectangles were made and merged together. This method did not work well and it was decided to enter the coordinates of all the vertices of the design and connect all the points to create a 2D area. This 2D area can then extruded to make the 3D design.
To add keypoints to a coordinate system:
Preprocessor -> -Modeling- Create -> Keypoints -> In Active CS…
Fill in the fields as shown below, then click “APPLY”. When you click on “Apply”, the command is issued to create keypoint number 1 at (x,y)=(0.0501, -0.2645). Note that when the Z field is left blank, in this case, the blank space defaults to zero, which is desired. Since you clicked on “Apply”, instead of “OK”, then the keypoint creation box remains open.
Create keypoint number 2 at (x,y)=(0.0678,-0.2822), using the input shown below. After entering the input, again, click on “APPLY”:
Enter all of your keypoints in this manner. Units are in cm and for this design the channel is 8.5 mm long and 250 microns wide.
Keypoint # X Coordinate Y Coordinate
3 0.34916 0
4 0.85 0
5 0.85 0.025
8 0.3146 0
When the final keypoint is entered, click on “OK” instead of “APPLY”. “OK” issues the command and also closes the keypoint creation box.
Before moving on, it is probably a good idea to check the keypoint locations. Along the top toolbar:
Choose: List -> Keypoints -> Coordinates Only. A box should open up with the keypoint location information. If any keypoint is not in the correct location, at this point, you can just re-issue the keypoint creation command for that particular keypoint. To do this, choose: Preprocessor -> -Modeling- Create -> Keypoints -> In Active CS…
Fill in the correct information for that particular keypoint in the box, and click “OK”. The keypoint will be moved to the correct location. If you have some keypoint incorrectly numbered above number 12, this will not cause a problem. Just be sure you have keypoint numbers 1 thru 12 located correctly.
You can close the box listing the keypoint locations, by clicking, in that listing box, on “File-> Close”.
Create areas.
In this design, all lines connecting the keypoints are straight lines so the following command is used. If in your design, curved lines are used, the next section gives an example of the process.
Main Menu > Preprocessor > -Modeling- Create > -Areas- Arbitrary > By Lines
Connect the points in numerical order and when done click “OK” on the picking menu. The following area is created.
Curved lines will not be used in this tutorial but I will include information for reference. If you have a curved line in your design the following example will show you how to
difficult because the areas are broken up but should still work fine. The example is from another gas flow tutorial that is available in the ANSYS help menu.
Making areas with curved lines
1. Main Menu > Preprocessor > -Modeling- Create > -Lines- Lines > Tan to 2 Lines 2.Pick first line (upper line of left rectangle).
3.OK (in picking menu).
4.Pick the tangency end of the first line (upper right corner).
5.OK (in picking menu).
6.Pick the second line (upper line of the larger rectangle.
7.OK (in picking menu).
8.Pick the tangency end of the second line.
9.OK to create the line
Now create the third area as an arbitrary area through keypoints.
10.Main Menu > Preprocessor > -Modeling- Create > -Areas- Arbitrary > Through
KPs
11.Pick 4 corners in counterclockwise order.
12.OK.
13.Toolbar: SAVE_DB
Meshing
Of all the steps in this process, meshing is by far the most important step to get an accurate modeling of your system. Meshing breaks up the areas of your design into user defined shapes. The smaller the shape the more accurate the analysis will be but the downside being the finer the mesh, the longer the processing time. A good balance is needed between processing time and resolution of the solution.
For most fluid modeling applications, only a 2D model is required so from now on I will separate the 2D and 3D commands.
2. Main Menu > Preprocessor > Mesh Tool 3. Choose Lines Set.
4. Pick all lines (in the picking menu).
Note (You can separate different regions of your design and mesh them differently if you want, you will have to play with that stuff by yourself).
5. Apply (in the picking menu). 6. Enter 100 as the No. of element divisions.
7. Enter 1 as the Spacing ratio (-2 produces smaller elements near both ends of the line).
7. Apply.
8. On the meshtool menu, pick the option for “free” mesh and also ”quad shape”. 9. Click “Mesh”
10. Pick all lines (in the picking menu) 11. Close the meshtool menu
This will mesh the entire design and for 2D designs and should look like the following image.
If only modeling in 2D, you can skip the next section and start again at adding boundary conditions.
3D Meshing
The next step is to specify mesh controls in order to obtain a particular mesh density.
1. Main Menu > Preprocessor > Mesh Tool 2. Set global size controls.
3. Enter 0.005 for element edge length. 4. OK.
5. Mesh.
6. Pick All (in picking menu). 7. Close.
8. Close Mesh Tool. 9. SAVE_DB
Some error messages might pop up because of irregular
Extrude the meshed area into a 3D meshed volume.
In this step, first changing the element type to Fluid 142, which is defined as element type 2, and then extruding the area into a volume generates the 3-D volume.
1. Main Menu > Preprocessor > -Modeling- Operate > Extrude > Elem Ext Opts 2. Choose 2 (FLOTRAN 142) for Element type number.
3. Enter 30 for the No. of element divisions.
4. OK.
5. Main Menu > Preprocessor >
-Modeling- Operate > Extrude > -Areas- By XYZ Offset
6. Pick All (in picking menu). 7. Enter 0,0,0.002 (Where 0.002 if the height of your channel in cm, 20 microns high) for offsets for extrusion in the Z direction.
8. OK. 9. Close.
To examine the extruded design, use the commands in steps 10-11 below. 10. Utility Menu > PlotCtrls > Pan,
Zoom, Rotate
11. Choose ISO, then box zoom. 12. Close.
Before applying boundary values to the microfluidic channels, unselect all FLOTRAN 141 elements used in the 2-D area mesh since they will not be used for
the analysis.
1. Utility Menu > Select > Entities 2. Choose Elements.
3. Choose By Attributes. 4. Choose Elem type num.
5. Enter 1 for the element type number. 6. Choose Unselect.
7. Apply.
The 3D modeling design should now be constructed. The FLOTRAN parameters must now be setup and added to the model.
Multiple species Laminar Analysis (both 2D and 3D) Establish fluid properties.
Fluid properties will be established for water in the cgs system.
1. Main Menu > Solution > FLOTRAN Set
Up > Fluid Properties
2. Choose CMIX for density. Leave viscosity and conductivity and specific heat as constant.
3. Click “yes” for allow density variations. 4. OK.
5. Enter 0.01 for viscosity and 0.04 for conductivity. Leave specific heat at –1. 6. OK. (for next screen that pops up)
Set execution controls.
Choose the execution control from the FLOTRAN Set Up Menu.
1. Main Menu > Solution > FLOTRAN Set Up >
Execution Ctrl
2. Enter 40 Global iterations (Note: 40 global iterations is arbitrary with no guarantee of convergence.)
3. OK to apply and close.
Change reference conditions.
At the end of this tutorial there is a table of constants and reference conditions for water. The reference conditions will have be changed to suit your design and units used.
1. Main Menu > Solution > FLOTRAN
Set Up > Flow Environment > Ref Conditions
2. Change the reference pressure to 101350 (cgi units, equivalent to 1 atmosphere).
3. Change the nominal, stagnation, and reference temperatures to 20oC.
4. Change bulk modulus to 0.21x1011
5. Change the temperature offset from absolute 0 to 273.
7. OK.
8. Toolbar: SAVE_DB.
There are a lot of steps that will have to be completed for this process. It is the same for 2D and 3D designs.
1. Main Menu > Preprocessor >
FLOTRAN Set Up > solution options
2. Highlight the multiple species transport box.
3. OK
This turns on the multiple species transport. Now you have to define all the parameters for each liquid that is added to the system.
First define the number of different liquids that are added to the system. In this case, two different liquids are being modeled.
1. Main Menu > Solution > FLOTRAN
Set Up > Multiple species
In this case 2 species were used. 2. Enter 2 for Number of
species
3. Make sure the Algebraic species number is set at 2. 4. OK
After clicking ok, the following screen appears. For each species all the parameters have to input.
These windows are all connected so when “OK” is pressed it just brings you back to this screen.
Main Menu > Solution > FLOTRAN Set Up > Multiple species > Species
#1 > general the following window appears:
1. Change the “species name” to something you can remember.
2. Change the molecular weight of the fluid to the one you are using (18 in this case).
3. Leave mass fraction to 0.5 if there is 2 species. If you
have 3 then change it to 0.3, 0.3, and 0.4 for the different species. This number has to add up to 1, regardless of how many species there are.
4. OK
1. Main Menu > Solution > FLOTRAN Set Up > Multiple species > Species #1 > solver
3. OK
(preconditioned conjugate residual method) for both species. The other solver options have not really been tried.
4. Change “No of search
vectors used” from 2 to 3.
5. OK
Species relaxation
1. Main Menu > Solution > FLOTRAN Set Up > Multiple species > Species #1 > relaxation
2. Change concentration relaxation
to 1.
3. OK
Enter fluid properties.
Main Menu > Solution > FLOTRAN Set Up > Multiple species > Species #1 > properties menu.
Enter all density, viscosity, conductivity, mass fraction constants and change the solution options.
Enter all the information you can on all the constants.
All the data here is very important. To solve for density variations in the fluid flow/mixing region.
1. Select density. 2. OK.
3. For Density type enter “liquid”.
4. For nominal value enter the density (for water it is 1 g/cm3) 5. Also enter first and
second coefficients if you have them.
6. Click vary density yes. 7. OK
Do the same thing for the rest of the variables that you want solved and the parameters. For constant inputs, enter CONSTANT for the “type” and enter the nominal value.
HINT!! If you want to plot density differences in the graphs later on, let the nominal value for density of species 1 be 1.0 and the density of species 2 to be 1.001. Ansys will apply colors to the two densities (red and blue) and with this little difference, mixing can be plotted. You can also do the same for viscosity if that is to be plotted also.
1. Main Menu > Solution > FLOTRAN Set Up > Multiple species > Species #1 > fluid properties > mass diffusion.
2. Enter 0.000013 for the nominal value. 3. OK
4. SAVE_DB
The mass diffusion constant is the most important constant for mixing modeling. Make sure the constant for this is as accurate as possible. (See sheet at end of tutorial).
Click “EXIT Properties Panels” when done. Enter properties for both species. One last thing to change:
1. Main Menu > Solution > FLOTRAN Set Up > Multiple species > Capping 2. Click “yes” for cap mass fraction.
3. OK
Click “cancel” to exit the main “multiple Species” panel.
Boundary Values
Now comes the fun part, adding velocities and pressures to the lines and areas.
It is slightly different for adding boundary values to 2D and 3D designs but for the most part, it is similar so I will cover both at the same time.
A velocity of 0.1 cm/s is applied in the X direction (VX) at the inlet, and a zero velocity is applied in the transverse direction at the inlet (VY in the Y direction). Zero velocities in both directions are applied all along the walls, and a zero pressure is applied at the outlet.
1. Main Menu > Preprocessor > Loads > -Loads- Apply > -Fluid/CFD- Velocity >
On Lines (2D) [On Areas (3D)].
2. Pick the inlet line (the vertical line at the far left).
3. OK
4. Enter 0.1 for VX. (2D and 3D). 5. Enter 0.0 for VY. (2D and 3D). 6. Enter 0.0 for VZ (3D only) 7. OK
Select the second arm of the microfluidic design.
1. Main Menu > Preprocessor > Loads > -Loads- Apply > -Fluid/CFD- Velocity >
On Lines (2D) [On Areas (3D)].
2. Pick the inlet line (angled line on the lower left). 3. OK
4. Enter 0.0707 for VX. (2D and 3D). 5. Enter 0.0707 for VY. (2D and 3D). 6. Enter 0.0 for VZ (3D only).
The following picture should appear.
Next, apply the wall boundary conditions. Choose the lines that make up the walls and then apply zero velocities in the X and Y directions.
1. Main Menu > Preprocessor > Loads > -Loads- Apply > -Fluid/CFD- Velocity >
On Lines (2D) – [On Areas (3D)]
2. Pick the five lines (or 8 areas) on the top and bottom. 3. OK
4. Enter 0.0 for VX and VY. [Enter 0.0 for VZ (3D)]. 5. OK
One of the following pictures should appear for 2D or 3D.
3D
Apply the outlet condition.
1. Main Menu > Preprocessor > Loads > -Loads- Apply > -Fluid/CFD- Pressure DOF > On Lines. [On Areas (3D)].
2. Pick the outlet line (vertical line on the far right) or (output areas for 3D). 3. OK
4. Enter 0 for the pressure value. 5. Set endpoints to yes. 6. OK 7. Toolbar: SAVE_DB.
After the flow rates and pressures are added to the model, the species will now be added. In multiple species transport, there are 2 or more inputs and a single output so mixing can be studied. For each input arm, both species have to be added.
Apply Species.
Main Menu > Preprocessor > Loads > -Loads- Apply > -Fluid/CFD-Species > On Lines (2D) [on Areas (3D)]
1. Click on the left vertical line. 2. APPLY
3. Pick species #1. 4. OK
5. Enter percentage of that species for that input location. (1 is 100%). 1 in this case.
6. OK
7. Highlight “yes” for another species.
8. OK
9. Click species #2 10. OK
11. Enter other loading factor (0 for this case).
14. OK
15. Repeat for the angled input. But reverse the species, 0 is now species 1 and 1.0 is species 2.
16. SAVE_DB
Both species are now added to the two inputs and the image should look like the following.
Everything should be setup up now and the solution can now be run.
Execute FLOTRAN solution.
1. Main Menu > Solution > Run FLOTRAN
2. Close the information window when the solution is done.
While running the FLOTRAN solution, ANSYS will plot the "Normalized Rate of Change" as a function of the "Cumulative Iteration Number." This is the Graphical Solution Tracker, which allows visual monitoring of the solution for convergence.
Post processing (Laminar Analysis)
Read in the results for post processing.
Enter the general postprocessor and read in the latest set of solution results, and then create a vector plot.
1. Main Menu > General Postproc > -Read Results- Last set
Plot velocity vectors.
1. Main Menu > General Postproc > Plot Results > -Vector Plot- Predefined 2. Choose DOF solution.
3. Choose Velocity V. 4. OK.
3. Choose Velocity Vx or Vy. 4. OK.
2D Vx
2D Vy
This gives the velocity profiles for the x and y direction in the channels. Red is the highest pressure.
3D Vx
These images show a generalized velocity profile in the microfluidic system. If using 3D you can rotate the design to get a better angle.
Plot total density variations.
1. Main Menu > General Postproc > Plot Results > -Contour Plot- Nodal Solu 2. Choose other quantities.
3. Choose Density, DENS. 4. OK.
2D Density variations
3D Density variations
These results show the mixing of the two species. If viscosity is varied, you can plot that also. The degree of mixing depends on the mass diffusion constant. For this model that constant was 0.00001, which is not accurate. I used this number to show off the mixing modeling and this is not a real world model. Do some research for the fluids you are using and make sure this constant is accurate.
Plot total pressure contours.
1. Main Menu > General Postproc > Plot Results > -Contour Plot- Nodal Solu 2. Choose Other quantities.
4. OK.
The resulting contour plot shows the total static and dynamic pressures that occur in the system.
Animate velocity of trace particles.
Animation cannot be used with this design because of the small size. But in a larger microfluidic channel a movie can be made of the motion. The following procedure can be used to do that.
1. Main Menu > General Postproc > Plot Results > -Flow Trace- Defi Trace Pt
2. Pick two or three points around the inlet region and one or two points in the recalculation region (along the upper wall of the transition region).
3. OK (in picking menu).
4. Utility Menu > PlotCtrls > Animate > Particle Flow 5. Choose DOF Solution.
6. Choose Velocity VX. 7. OK.
Ignore any warning messages about maximum number of loops (Choose Close). The resulting trace plot shows the path of flow particles.
8. Make choices in the Animation Controller (not shown), if necessary, then choose Close.
Make a path plot of velocity through the outlet.
1. Main Menu > General Postproc > Path Operations > Define Path > By Nodes 2. Pick the lowest
and then the highest point just on the other side where the two fluids come together. 3. OK (in picking menu).
4. Enter Mixers for the Path Name.
5. OK.
6. File > Close (Windows)
Now specify the velocity in the X direction (VX) to map onto the path. 7. Main Menu > General Postproc > Path Operations > Map onto Path 8. Enter DENSITY as label.
9. Choose other quantities. 10. Choose DENS.
11. OK.
12. Main Menu > General Postproc > Path Operations > -Plot Path Item- On Graph 13. Choose the label DENSITY that you previously defined.
14. OK.
Fluid flow modeling with obstructions in the channel.
This tutorial is a simple model to show the important features for modeling fluid flow with pillars and shapes in the fluid flow. The beginning is similar to the 2D model shown above with few important differences. The design is a 250 µm wide by 5 mm long channel which has two 50 µm square pillars evenly spaced in the channel.
Start the ANSYS program with a new jobname.
Set preferences.
You will now set preferences in order to filter quantities that pertain to this discipline only. 1. Main Menu > Preferences 2. Turn on FLOTRAN CFD filtering 3. OK.
Define element type. (2D)
4. Main Menu > Preprocessor > Element Type > Add/Edit/Delete
5. Add an element type.
6. Choose 2D FLOTRAN element (FLUID141). 7. OK.
8. Close.
Units
9. Main Menu > Preprocessor > Material prop > material library > select units
11. Main Menu > Preprocessor > Materials > temperature unit
12. Choose the Celsius scale
Create Keypoints:
In fluid modeling, it is best to have a single area defined. Original tests were done where rectangles were made and merged together. This method did not work well and it was decided to enter the coordinates of all the vertices of the design and connect all the points to create a 2D area. This 2D area can then extruded to make the 3D design.
To add keypoints to a coordinate system:
Preprocessor -> -Modeling- Create -> Keypoints -> In Active CS…
Fill in the fields as shown below, then click “APPLY”. When you click on “Apply”, the command is issued to create keypoint number 1 at (x,y)=(0, 0). Note that when the Z field is left blank, in this case, the blank space defaults to zero, which is desired. Since you clicked on “Apply”, instead of “OK”, then the keypoint creation box remains open.
Enter all of your keypoints in this manner. Units are in cm and for this design the channel is 8.5 mm long and 250 microns wide.
Keypoint # X Coordinate Y Coordinate
2 0.025 0 3 0.025 0.5 4 0 0.5 5 0.005 0.5 6 0.010 0.5 7 0.015 0.5 8 0.020 0.5 9 0.005 0.45 10 0.010 0.45 11 0.015 0.45
When the final keypoint is entered, click on “OK” instead of “APPLY”. “OK” issues the command and also closes the keypoint creation box.
Before moving on, it is probably a good idea to check the keypoint locations. Along the top toolbar:
Choose: List -> Keypoints -> Coordinates Only. A box should open up with the keypoint location information. If any keypoint is not in the correct location, at this point, you can just re-issue the keypoint creation command for that particular keypoint. To do this, choose:
Preprocessor -> -Modeling- Create -> Keypoints -> In Active CS…
Fill in the correct information for that particular keypoint in the box, and click “OK”. The keypoint will be moved to the correct location. If you have some keypoint incorrectly numbered above number 12, this will not cause a problem. Just be sure you have keypoint numbers 1 thru 12 located correctly.
You can close the box listing the keypoint locations, by clicking, in that listing box, on “File-> Close”.
Create areas
In this design, all lines connecting the keypoints are straight lines so the following command is used.
Main Menu > Preprocessor > -Modeling- Create > -Areas- Arbitrary > By Lines
Connect the four outside points to form the outside area then connect the other keypoints so it forms two squares as shown in the picture at the right. The following area is created.
Area subtraction.
To form the model system, the two small squares have to be subtracted from the larger channel.
1. Main Menu > Preprocessor > -Modeling- Operate > Subtract
2. It ask you first for the area to subtract from so pick the larger area. 3. OK
4. Pick both of the small squares. 5. OK
You can always unpick an object by changing the setting on the picking menu. This might have to be down in Step 1. Usually one square is also highlighted so just it from “pick” to “unpick” in
the menu, un-highlight the square and click OK. When done properly the following image should be seen.
Meshing
Of all the steps in this process, meshing is by far the most important step to get an accurate modeling of your system. Meshing breaks up the areas of your design into user defined shapes. The smaller the shape the more accurate the analysis will be. With the downside being the finer the mesh, the longer the processing time. A good balance is needed between processing time and resolution of the solution.
Meshing for this is design slightly different than the channels in the first tutorial. The regions around the square have to be meshed differently than the rest of the channel for the modeling to be accurate.
1. Utility Menu > Plot > Lines
2. Main Menu > Preprocessor > Mesh Tool 3. Choose Lines Set.
4. Pick the four lines that surround the full channel. 5. Apply (in the picking
menu).
6. Enter 100 as the No. of element divisions.
7. Enter 1 as the Spacing ratio (-2 produces smaller elements near both ends of the line).
8. Apply.
9. No pick the 8 lines that form the squares.
10. OK
11. Enter 15 for the No. of element divisions.
12. Enter –2 as the spacing ratio. (The reason for the two-mesh spacing is to make the mesh element for the larger rectangle and the space between the squares comparable. If this is not done and all the lines are meshed the same, there will be no flow between the squares and that is incorrect.)
13. On the meshtool menu, pick the option for “free” mesh and also ”quad shape”.
14. Click “Mesh”
15. Pick all lines (in the picking menu) 16. Close the meshtool menu
This will mesh the entire design and for should look like the following image.
Establish fluid properties.
Fluid properties will be established for water in the cgs system.
NOTE: The images that follow in the
instructions below so not have the correct values entered. The images are from the tutorial above, change the numbers accordingly.
1. Main Menu > Solution >
FLOTRAN Set Up > Fluid Properties
8. Choose Liquid for density, viscosity and conductivity. Leave specific heat as constant.
9. There should be no variations in the modeling so they should be all “no”
10. OK
11. Enter 1.0 for density, 0.01 for viscosity and 0.04 for conductivity. Leave specific heat at –1.
5. OK
Set execution controls.
Choose the execution control from the FLOTRAN Set Up Menu.
1. Main Menu > Solution > FLOTRAN Set Up >
2. Enter 40 Global iterations (Note: 40 global iterations is arbitrary with no guarantee of convergence.)
3. OK to apply and close.
Change reference conditions.
At the end of this tutorial there is a table of constants and reference conditions for water. The reference conditions will have be changed to suit your design and units used.
1. Main Menu > Solution >
FLOTRAN Set Up > Flow Environment > Ref Conditions
2. Change the reference pressure to 101350 (cgi units, equivalent to 1 atmosphere).
3. Change the nominal, stagnation, and reference temperatures to 20oC.
4. Change bulk modulus to 0.21x1011
5. Change the temperature offset from absolute 0 to 273.
17. OK.
7. Toolbar: SAVE_DB.
Boundary Values
Now comes the fun part, adding velocities and pressures to the lines.
A velocity of 0.1 cm/s is applied in the Y direction (VY) at the inlet, and a zero velocity is applied in the transverse direction at the inlet (VX in the X direction). Zero velocities in both directions are applied all along the walls and squares, and a zero pressure is applied at the outlet.
1. Main Menu > Preprocessor > Loads > -Loads- Apply > -Fluid/CFD- Velocity > On Lines
2. Pick the inlet line (the horizontal line at the bottom). 3. OK
4. Enter 0.0 for Vx. 5. Enter 0.1 for Vy. 6. Leave Vz blank 7. OK
Wall boundary conditions
Choose the lines that make up the vertical walls and also the lines that form the squares and apply zero velocities in the X and Y directions.
1. Main Menu > Preprocessor > Loads > -Loads- Apply > -Fluid/CFD- Velocity > On Lines
2. Pick All. 3. OK
4. Enter 0.0 for Vx and Vy. 5. OK
6. Main Menu > Preprocessor > Loads > -Loads- Apply > -Fluid/CFD- Pressure DOF > On Lines.
7. Pick the outlet line (horizontal line on the top). 8. OK
9. Enter 0 for the pressure value. 10. Set endpoints to Yes
11. OK
12. Toolbar: SAVE_DB.
When all the boundary conditions are inputted, the design should look like the following.
Execute FLOTRAN solution.
1. Main Menu > Solution > Run FLOTRAN
2. Close the information window when the solution is done.
While running the FLOTRAN solution, ANSYS will plot the "Normalized Rate of Change" as a function of the "Cumulative Iteration Number." This is the Graphical Solution Tracker, which allows visual monitoring of the solution for convergence.
Post processing
Enter the general postprocessor and read in the latest set of solution results, and then create a vector plot.
1. Main Menu > General Postproc > -Read Results- Last set
Plot velocity vectors.
1. Main Menu > General Postproc > Plot
Results > -Vector Plot- Predefined
2. Choose DOF solution. 3. Choose Velocity V. 4. OK.
1. Main Menu > General Postproc > Plot Results > -Vector Plot- Predefined 2. Choose Nodal solution.
3. Choose Velocity Vx or Vy. 4. OK.
Vy
These images show the velocity profile for the microfluidic system above.
Make a path plot of velocity through the outlet.
1. Main Menu > General Postproc > Path Operations > Define Path > By Nodes 2. Pick the nodes near the outlet of the squares.
3. OK (in picking menu).
4. Enter Velocity for the Path Name. 5. OK.
6. File > Close (Windows)
Now specify the velocity in the Y direction (Vy) to map onto the path.
7. Main Menu > General Postproc > Path Operations >
9. Choose DOF solution. 10. Choose Velocity Vy. 11. OK.
12. Main Menu > General Postproc >
Path Operations > -Plot Path Item- On Graph
13. Choose the label Velocity that you previously defined.
14. OK.
15. Close any warning messages.
Make a path plot of velocity through the outlet (second location).
1. Main Menu > General Postproc > Path Operations > Define Path > By Nodes 2. Pick the nodes near the outlet of the squares.
3. OK (in picking menu).
4. Enter Velocity for the Path Name. 5. OK.
6. File > Close (Windows)
Now specify the velocity in the Y direction (Vy) to map onto the path.
7. Main Menu > General Postproc > Path Operations
> Map onto Path
8. Enter Velocity as label. 9. Choose DOF solution. 10. Choose Velocity Vy.
12. Main Menu > General Postproc > Path Operations > -Plot Path Item- On Graph 13. Choose the label Velocity that
you previously defined. 14. OK.
15. Close any warning messages. These graphs show the velocity profiles for two slices in the modeling. Any area can be analyzed in this way.
Complex 3D structure modeling
In this set of instructions, the steps for modeling fluid flow in complex 3D structures are described. Many of the steps are similar to one shown above with several important differences. I will model a simple microfluidic channel that has large interconnect reservoirs on the ends of the channels. This will demonstrate what happens to the fluid when needles and reservoirs are used in conjunction with small microfluidic channels. Start a new ANSYS filename as shown above.
Set preferences.
You will now set preferences in order to filter quantities that pertain to this discipline only. 1. Main Menu > Preferences 2. Turn on FLOTRAN CFD filtering 3. OK.
Define element type.
4. Main Menu > Preprocessor > Element Type > Add/Edit/Delete
5. Add an element type.
6. Choose 2D FLOTRAN element (FLUID141). 7. Choose 3D FLOTRAN element (FLUID142). 8. OK.
9. Close.
Units.
Note: All units shown in this tutorial are in cgs units.
Main Menu > Preprocessor > Materials > temperature unit
12. Choose the Celsius scale
Create Keypoints:
Keypoints for the design will be entered here. What will be entered are the coordinate for the channel, reservoirs and needle inputs. 2D areas will first be made then extruded into the 3D design.
IMPORTANT!! When doing 3D modeling, the areas have to overlap slightly. Areas
that butt up against each other WILL NOT work with this simulation. Be aware of this when inputting your points.
To add keypoints to a coordinate system:
Preprocessor -> -Modeling- Create -> Keypoints -> In Active CS…
Fill in the fields as shown below, then click “APPLY”. When you click on “Apply”, the command is issued to create keypoint number 1 at (x,y)=(-0.06, 0.00625). Note that when the Z field is left blank, in this case, the blank space defaults to zero, which is desired. Since you clicked on “Apply”, instead of “OK”, then the keypoint creation box remains open.
When the final keypoint is entered, click on “OK” instead of “APPLY”. “OK” issues the command and also closes the keypoint creation box.
Before moving on, it is probably a good idea to check the keypoint locations. Along the top toolbar:
Choose: List -> Keypoints -> Coordinates Only. A box should open up with the keypoint location information. If any keypoint is not in the correct location, at this point, you can just re-issue the keypoint creation command for that particular keypoint. To do this, choose: Preprocessor -> -Modeling- Create -> Keypoints -> In Active CS…
Fill in the correct information for that particular keypoint in the box, and click “OK”. The keypoint will be moved to the correct location. If you have some keypoint incorrectly numbered above number 12, this will not cause a problem. Just be sure you have keypoint numbers 1 thru 12 located correctly.
You can close the box listing the keypoint locations, by clicking, in that listing box, on “File-> Close”.
The keypoints should look like the image below.
Keypoint # X Coordinate Y Coordinate Keypoint # X Coordinate Y Coordinate
2 0 0.075 17 0.95 -0.075 3 -0.15 0.075 18 0.95 0.075 4 -0.15 -0.075 19 0.8 0.075 5 0 -0.075 20 0.86 0.00625 6 -0.06 -0.00625 21 -0.075 -0.01 7 0.3 -0.00625 22 -0.075 0.01 8 0.29375 -0.36 23 -0.095 0.01 9 0.225 -0.3 24 -0.095 -0.01 10 0.225 -0.45 25 0.29 -0.375 11 0.375 -0.45 26 0.29 -0.395 12 0.375 -0.3 27 0.31 -0.375 13 0.30625 -0.36 28 0.31 -0.395 14 0.3125 -0.00625 29 0.895 -0.01 15 0.8 -0.00625 30 0.875 -0.01 16 0.8 -0.075 31 0.875 0.01 32 0.895 0.01
Create areas.
In this design, all lines connecting the keypoints are straight lines so the following command is used.
Main Menu > Preprocessor > -Modeling- Create > -Areas- Arbitrary > By Lines
There are seven separate regions that have to be made into areas. There are 3 small squares that represent the needle inputs, 3 larger squares that are the reservoirs and the microfluidic channel. So make three small square using the above command, three larger squares and the microfluidic channel so it looks like the image below.
Save your work Toolbar: SAVE_DB
Extrude the meshed area into a 3D meshed volume.
In this step, first changing the element type to Fluid 142, which is defined as element type 2, and then extruding the area into a volume generates the 3-D volume.
1. Main Menu > Preprocessor >
-Modeling- Operate > Extrude > Elem Ext Opts
2. Choose 2 (FLOTRAN 142) for Element type number.
3. Enter 20 for the No. of element divisions.
4. OK.
5. Main Menu > Preprocessor >
-Modeling- Operate > Extrude > -Areas- By XYZ Offset
6. Choose the small squares that
represent the needles and extrude then 0.21 cm in the Z direction. 7. Apply
8. Choose the 3 larger squares that represent the reservoirs and extrude then 0.20 cm in the Z direction.
9. Apply
10. Choose the microfluidic channel and extrude it 0.01 cm in the Z direction.
11. OK 12. Close
The resulting 3D model should
Inlet
Inlet
Unselect 2-D elements.
Before applying boundary values to the microfluidic channels, unselect all FLOTRAN 141 elements used in the 2-D area mesh since they will not be used for the analysis.
1. Utility Menu > Select > Entities 2. Choose Elements.
3. Choose By Attributes. 4. Choose Elem type num.
5. Enter 1 for the element type number. 6. Choose Unselect.
7. Apply.
Overlap 3D volumes.
This step you overlap the seven different volumes. I tried adding together the volumes but that does not seem to work.
1. Main Menu > Preprocessor > -Modeling- Operate > Overlap 2. Pick all seven volumes.
3. OK.
The 3D modeling design should now be constructed.
Meshing
Of all the steps in this process, meshing is by far the most important step to get an accurate modeling of your system. Meshing breaks up the areas of your design into user defined shapes. The smaller the shape the more accurate the analysis will be but the downside being the finer the mesh, the longer the processing time. A good balance is needed between processing time and resolution of the solution.
The next step is to specify mesh controls in order to obtain a particular mesh density.
2. Set global size controls. 3. Enter 0.005 for element edge length.
4. OK. 5. Mesh.
6. Pick All (in picking menu). 7. Close.
8. Close Mesh Tool. 9. SAVE_DB
Boundary Values
Now comes the fun part, adding velocities and pressures to the areas.
IMPORTANT!! Do not add velocities to the areas inside the volumes. Only the areas
that are exposed to the outside get boundary values.
A velocity of -0.1 cm/s is applied in the Z direction (VZ) at the inlet, and a zero velocity is applied in the transverse direction at the inlet (VX, VY). Zero velocities in all three dimensions are applied on all exterior areas, and a zero pressure is applied at the outlet.
Apply the inlet boundary condition.
1. Main Menu > Preprocessor > Loads > -Loads- Apply > -Fluid/CFD- Velocity > On Areas.
2. Pick the two needle inlets areas. 3. OK.
4. Enter 0.0 for VX. 5. Enter 0.0 for VY.
7. OK
Now, doing a couple of areas at a time, select all other outside areas (except for the needle outlet) and apply a 0.0 to VX, VY and VZ.
8. OK
Apply the outlet condition.
1. Main Menu > Preprocessor > Loads > -Loads- Apply > -Fluid/CFD- Pressure DOF > On Areas.
2. Pick the outlet needle area. 3. OK.
4. Enter 0 for the pressure value. 5. Set endpoints to
yes. 6. OK.
7. Toolbar: SAVE_DB. After all the pressures and velocities have been added to the model, the following picture will appear. This is the most difficult step so be careful and take your time.
If you miss an area, the simulation will not work.
Establish fluid properties.
Fluid properties will be established for water in the cgs system. 1. Main Menu > Solution > FLOTRAN Set Up > Fluid Properties
2. Choose liquid for density and viscosity. Leave conductivity and specific heat as constant.
4. Enter 1.0 for density, 0.01 for viscosity and 0.04 for conductivity. Leave specific heat at –1.
5. OK.
Set execution controls.
Choose the execution control from the FLOTRAN Set Up Menu.
1. Main Menu > Solution > FLOTRAN Set Up >
Execution Ctrl
2. Enter 40 Global iterations (Note: 40 global iterations is arbitrary with no guarantee of convergence.)
3. OK to apply and close.
Change reference conditions.
At the end of this tutorial there is a table of constants and reference conditions for water. The reference conditions will have to be changed to suit your design and units used.
1. Main Menu > Solution > FLOTRAN Set
Up > Flow Environment > Ref Conditions
2. Change the reference pressure to 101350 (cgs units, equivalent to 1 atmosphere). 3. Change the nominal, stagnation, and reference temperatures to 20oC.
4. Change bulk modulus to 0.21x1011
6. OK.
7. Toolbar: SAVE_DB.
The modeling should be ready to be run.
Execute FLOTRAN solution.
1. Main Menu > Solution > Run FLOTRAN 2. Close the information
window when the solution is done.
While running the FLOTRAN solution, ANSYS will plot the "Normalized Rate of Change" as a function of the "Cumulative Iteration Number." This is the Graphical Solution Tracker, which allows visual monitoring of the solution for convergence.
This step might take some
time so be patient, the output should look similar to the following.
Post processing (Laminar Analysis)
Read in the results for post processing.
Enter the general postprocessor and read in the latest set of solution results, and then create a vector plot.
1. Main Menu > General Postproc > -Read Results- Last set
1. Main Menu > General Postproc > Plot Results > -Vector Plot- Predefined 2. Choose DOF solution.
3. Choose velocity v. 4. OK.
1. Main Menu > General Postproc > Plot Results > -Vector Plot- Predefined 2. Choose Nodal solution.
3. Choose Velocity Vx or Vy. 4. OK.
Vy
This gives the velocity profiles for the x and y direction in the channels. Red is the highest pressure. These images show that the output is turbulent.
These images show a generalized velocity profile in the microfluidic system. If using 3D you can rotate the design to get a better angle.
Density Coeff 1 Coeff 2 Molecular wt Viscosity Micro Pa Mass Diffusion Conductivity N2 gas 1.1381 300 101325 28.018 .00001786 .0000160 1 0.02598 H2 gas 0.0819 300 101325 2.016 .00000894 .0000496 0.1815 H2O 1.0 300 101325 18 10 0.00001 0.04 O2 gas 1.2998 300 101325 31.99 .00001206 7 .0000214 9 0.02674
For other constants check out the CRC handbook online at: