ANSYS 19.2 3D CFD Tutorial
Last updated
Last updated
Instructions: https://docs.google.com/document/d/1l5zS3rDZNhere1akOaFCs_O0VW4Dil8Atkec5RnhjSo/edit
ISOs: https://drive.google.com/drive/u/1/folders/1grdEHUKfftCNnkoH3mhTrcDQaJvqN3aE
3D Meshing & Fluent Guide v2
DesignModeler
Notes:
After pretty much every step, you will need to update your geometry by clicking “Generate”. For the sake of clarity, it’s not included in this guide.
SAVE OFTEN
Ansys defaults to metric, so all dimensions following this will be metric unless otherwise stated.
If DM gives you errors/issues about your geometry, try Boolean uniting your imported CAD into one solid piece
DM allows you to hide individual faces by right clicking on them and selecting “hide face”. This is useful for editing your model after it’s been subtracted from the fluid body.
Import your STP or SW file: File -> Import External Geometry File
Create the fluid body: Create -> Primitive -> Box
Tip: using the “two points” box type is generally much much easier than 1 point and a diagonal
Again, this is possible in SolidWorks, this way is just less buggy.
Create a box that contains everything you want to simulate and then some. For half car sims, we’ve generally been using the two points method with (-8,-3,0) and (15,0,4).
You should see that this creates a box surrounding the car with one wall going down the centerline of the car.
Boolean out your imported CAD model from your box: Create -> Boolean
Set Operation to “Subtract”
Target Body -> Fluid
Tool Bodies -> CAD model (could potentially be multiple bodies)
At the base of anything protruding from the box, you should see rectangular-ish holes
Put a fillet on the edge of this hole traditionally (While not necessary, it can reduce errors). Create -> Fixed Radius Blend
Before:
After:
Create your named selections: Tools -> Named Selections or right click on a face -> Named Selection
Coloring by named selection will make this process way easier and prettier looking: View -> Graphics Options -> Face Coloring -> By Named Selection
Note: Colors will only display on one side of a face, so this can look a little confusing at times.
Fillets will (unfortunately) create tons of little faces. Make sure you select all of them!
You do not have to get every face in one pass. Right clicking on a named selection allows you to edit the selections
Toggling visibility on a named selection also makes it extremely apparent if you’ve forgotten to select a part of it.
ICEM
Tips:
ICEM is very unforgiving, so be careful not to screw up
no pressure
For whatever reason, most of the icons aren’t named and instead you must solely rely on the little pictures. I’ve included names of what the icon looks like to try and make up for this.
Selections are made by left-clicking and confirmed by middle mouse
Right click deselects them in the reverse order of selection (ie, newest to oldest)
Setting your background to all black makes it easier to view your geometry: Settings -> Background Style
SAVE OFTEN
After importing your model, immediately repair your geometry: Geometry -> Cube and wrench icon -> Enter
If you see any yellow lines/surfaces, those are suspected to cause holes in your mesh, a fatal error. Go back to your model in SW and clean up/thicken the areas where you saw them.
Toggle the display of points and surfaces: Model Tree (on left side of screen) -> Check off points and surfaces
Deselecting curves can help declutter your screen
Create fluid body: Geometry -> Cube and pencil
Change part name to fluid
Select two opposite corners of your bounding box by clicking on them
Set your mesh parameters:
Mesh -> Cube and two globes -> Set Global element seed size -> max element to 1 m
Within the same dialog on the lower left, click on the orange triangular icon with the gears
Scroll all the way to the bottom and click on “Advanced Prism Meshing Parameters”
Select “Do checks’ and “Do not allow sticking” and apply
Set your part mesh parameters: Mesh -> Cone, cylinder, and sphere
See here for the settings.
Notes:
Increasing number of layers and decreasing maximum size causes computing time to increase dramatically. Halving your maximum size will lead to far greater than two-fold increase in time. Make sure that you are only being as accurate as you need to be.
Example pic:
Create points for your mesh densities: Geometry -> Three black dots and pencil
You can place points using the following tools:
Computer screen with dot places points wherever you click (Quick, but inaccurate)
Circle with 3 dots allows you to place points at the center of a circle (useful for wheels)
Two black dots and blue dot allows you to place points halfway between two other points
Blue arrow allows you to put point a certain distance away from a known location
Place points at the places specified in the settings doc.
Create mesh densities: Mesh -> Cube with rho
See settings doc again.
Notes:
To create a cylindrical density zone (the ones that are specified as “connected” on the settings doc), select both points before hitting apply.
Be very careful of accidentally creating nested mesh densities; they will make a bajillion elements and take forever
Large widths with small sizes will also take forever and make a bajillion elements
You can edit/delete densities by right-clicking on densities in the
left panel
Doublecheck all your mesh settings
If you’re simulating rolling wheels, copy down the locations of the centers of the wheels, you’ll need it during Fluent
Left panel -> Geometry -> Left click on points -> show point info
Copy down the output from the console to a txt file or something
It doesn’t matter where the point is, as long as it’s on the axis of rotation of your tire
Now you’re ready to mesh! Don’t run this on a laptop. It will take a very long time and probably fail. Archive your wbpj (in Workbench, click File -> Archive) and transfer it over Chrome Remote Desktop to one of the sim comps
Unarchive it. Open Workbench -> File -> Restore Archive
Open ICEM back up
Go into Settings → General and make sure you put the appropriate number of processors (32 for SC1 and SC2)
Now it’s time to actually mesh. Mesh -> Blue icon with colored arrows on it (on the far right)
Select create prism layers
Click compute!
Wait for meshing to finish
NOTE: A prompt may pop up asking you if you want to save the geometry. This typically indicates that the initial meshing has finished and ICEM is about to move onto prisms meshing. Select “No”.
After meshing has finished, scroll up in the console and ensure that ICEM has properly meshed prisms. You should be able to see lines of blue text that the prism mesher outputs.
Check your mesh: Edit Mesh -> Cube with red check mark. Hit apply.
Multi-face errors will crash fluent on orientation
This is different from multiple edge errors - Fluent seems to be fine with those.
If fix is an option for the error message, choose that. If it’s not, choose subset.
If your geometry has a hole in it, gg
Smooth your mesh: Edit Mesh -> Iron with multicolored background (not the iron with brown background)
Freeze Tetra 4, Penta 6, and Pyra 5
Set iterations to 20 and quality to 0.5 and smooth
Set everything to smooth
Lower quality to .2 and smooth
Repeat step o to check mesh one more time.
Fluent
Notes:
Error troubleshooting
Crashes before 1st iteration - remesh
Segmentation error - remesh
Floating point error - remesh
Use as many cores as you again (for most of our desktops, try 8). Don’t use double precision unless single precision gives you convergence issues and you don’t want to remesh
Models -> Reynolds Stress (7 eqn)
Boundary Conditions
Set inlet velocity and ground to 20 m/s (process is identical to 2D)
If using wheels:
Wall motion -> Moving Wall
Motion -> Rotational
Set xyz coordinates to whatever you copied down from ICEM
If you used the standard origin and orientation, you should be able to use the points on the settings doc.
Rotation axis direction should be (0,1,0), unless you made your model funny.
Speed: -87.5 rad/s
Alternatively, you can set this to positive and flip the direction of your rotation axis
Example:
Double check remaining zones (symmetry, chassis, etc)
Solutions Method
Scheme -> Coupled
Set Momentum, Turbulent Kinetic Energy, Turbulent Dissipation Rate, and Reynolds Stresses to 2nd order
Note: If you have convergence issue, try running the first 50 iterations with 1st order, then switching to 2nd order after 50 iterations
Enable Pseudo-transient
Solution Controls
Pressure: 0.65
Momentum: 0.35
Turbulent Kinetic Energy: 0.5
Turbulent Dissipation Rate: 0.5
Reynolds Stresses: 0.5
Monitors
Create lift and drag plots for whatever you’re modeling:
For Ansys 19.2 Top menu: Solving → Reports → Definitions → New → Force Report → Drag/Lift
Ansys 17 options are still in Monitors
Select residuals -> edit -> disable convergence criterion
Initialization -> Initialize
Initialization might fail. If it does, go to more settings -> set number of iterations to 15 or 20
Run calculation: Try starting off with 200-300 iterations