Documente Academic
Documente Profesional
Documente Cultură
Christopher Katinas
July 21st, 2017
Motivation
• We want to know how to solve interesting
problems without the need to build our own code
from scratch
– GEMS has ~35 engineer-years to develop to date
• ANSYS Workbench is the overall package used to
perform meshing, obtain a solution, and post-
process results
• FLUENT is a commercially-available software
package commonly used for a plethora of fluid
dynamics and heat transfer systems
Before we get started….
• FLUENT only does two things:
– 1) Solves exactly what you tell it to solve
– 2) Nothing more
• Ask yourself what you would need to solve this
problem by hand
– Material properties
– Boundary conditions
– Duration of phenomena
– Sources of conserved quantities
• USE ENGINEERING INTUITION!
Problem Solving Methodology
• Assess what you are trying to model
• Create mesh for the domain with appropriate
domain boundaries
• Define governing equations and FLUENT models
which will be needed
• Define material properties
• Define boundary conditions
• Set solution method and under-relaxation factors
– Ensure numerical stability
• Select time stepping method
• Post-process results
Training Example
• Laser heating of a block with Gaussian beam
profile – without melting
• Can be analytic if constant material properties
– Jaeger solution to laser heating
– Seldom the case for non-isothermal systems
• This example shows the basics of what is needed
to setup and solve a more complex problem
– FLUENT cannot handle laser irradiation profiles natively
– BUT, we can still solve that!
• We can add additional physics, if desired
Heating Block of AISI 1018
Laser z
• Part Geometry
Beam – 86.36 mm x 171.45mm x 6.35mm
x
Scanning • Beam Diameter
Direction
– Gaussian, 5250μm Radius,146.8W
AISI 1018 Substrate
• Scanning Velocity
– 3mm/s
y • Absorptivity (α=0.35)
Scanning x • Density (ρ=7870 kg/m3)
Direction
• Thermal Conductivity
AISI 1018 Substrate k=46.8+4.4959e-2*T – 1.081e-4T2+4.757e-8T3
• Specific Heat
cp=481.65-0.2198*T + 6.710e-4T2-1.1734e-7T3
Heating Block of AISI 1018
• Assume all surfaces are insulated except the top
surface being irradiated
• Assume convection and radiation from the top
surface are negligible
• We want to know the maximum temperature of
the top surface during the laser scan.
• What does intuition say about where the
maximum temperature will be found?
ANSYS Workbench
Model Types
ANSYS Workbench
At this point, save your project to a safe location. ANSYS does have a tendency to crash on
large or complex models.
ANSYS Workbench
Defining the Geometry
Double-click Geometry
Creating the Geometry
Remember the units you are building your geometry in!
This will be VERY important when we begin using
FLUENT.
Click OK!
Double-click Mesh
Meshing
Use the right mouse button within the view window and
select Cursor Mode to distinguish the geometry you need
Z-Direction Meshing
Click “Mesh” with the Outline, and the mesh will be visible.
The number of cells can be found by scrolling down in the Details of
Mesh to view the Mesh Statistics.
We have 800,000 cells! This is a VERY large model for heat transfer.
Modifying the Mesh
Alternatively, if you close the mesh, you can save the project from the
Workbench interface. Generally, its safer to save the project, then close.
Update the Project
Double-click Setup
FLUENT Launcher
Dimensionality of the model will automatically be
selected
Parallelization can be performed to speed up calculation
(typically only on large domains)
Double precision allows for less computer-based round-
off error, slower calculation but more accurate
Much slower with MPI since
more data must be passed
between processors
If you can use single precision,
it is highly recommended
Double precision also requires
twice the memory of single
precision calculations.
FLUENT Startup
Command Window
This is where the types of models that are needed for the analysis are
selected. In many cases, changes to the type of models being used will
affect the material properties.
We need the Energy equation active, so let’s turn on the Energy model.
Select Energy > Edit… > Check Energy Equation
Click OK
Change the Material Name to “steel1018” and the Chemical Formula to “steel”.
Modify the density to 7870
Change the specific heat dropdown from “constant” to “polynomial”
A polynomial profile window will open
Change coefficients to 4 since we have a third order polynomial
Enter coefficients from low power to T to highest power of T
cp=481.65-0.2198*T + 6.710e-4T2-1.1734e-7T3
Materials Input
Ensure that the material being used within the domain is the newly created
steel material.
Other inputs for this problem are not necessary, but if you are dealing with
rotating equipment or a problem with moving mesh, remaining options within
this dialog may be important.
In the event heat addition occurs within the domain (electric heating, for
example) include it as a source term by checking the source term box and
filling the Source Terms tab inputs.
Boundary Conditions
The Named Selections created earlier were the boundary faces for the domain.
We grouped them so that the +z plane (a wall) was the irradiated surface and
remaining faces (also walls) were insulated surfaces.
A third boundary condition is shown but only represents faces internal to the
domain. NEVER show the mesh for this boundary zone, EVER!
Select “insulated_boundary” and click “Edit…”
By default, FLUENT makes wall boundary conditions zero flux!
Do we need to change anything for an insulated boundary?
Boundary Conditions
In this case, 7 parallel processes are being used, hence a total of 7 compilation
lines (cpp). Be patient when doing the compilation, as larger functions will
require additional compilation time.
Once the UDF has been compiled, additional options will be available based on
the type of function you built inside the C code.
Irradiation Boundary Condition
We now have a new option for the heat flux based on the UDF we compiled!
Once the UDF profile has been selected, the input box for the heat flux value
will disappear.
Troubleshooting UDFs are difficult to do during simulation, thus it is highly
recommended to test the functions offline to ensure you acquire the expected
function output.
Solution Methods (Numerics)
When flow is active, a pressure-velocity
coupling is required if a pressure-based
solver is being used.
Options are SIMPLE, SIMPLEC, PISO, and
Coupled.
Unhighlight “Flow”
Monitors show various quantities during the simulation process and can be
residuals or other calculated parameters (max/min cell values, average
temperature, etc.).
Parameters can be plotted, written to the screen, or to a predefined file.
Typical residual thresholds are as follows:
Continuity, Momentum, Turbulence 1e-6
Energy 1e-12
Turbulence 1e-6
Monitors
Let’s create a monitor to track the maximum temperature at the surface being
irradiated.
Create a “Surface Monitor”
Select Facet Maximum of Static Temperature
“irradiated boundary” should be the only surface selected
We will also plot the surface monitor to a new plot window (Window 2) after
each iteration.
Solution Initialization
Prior to starting any simulation using
numerical methods, an initial condition
of the solution must be made.
We may want to look at the temperature field during transient simulation, thus
we need to export the solution at the wall.
Create an Automatic Export and export the Static Temperature at boundaries.
Select the frequency to 100 time steps to a file named Wall_T.
Time Stepping
FLUENT uses a dual-timestepping
method for time advancement.
Each physical time step consists of
iterations:
1) Until specified number of iterations
2) Residuals for equations decreases
below threshold (1e-12 for energy)
The data will take a while to load, but once it is completed, you should see this.
The gray rectangle denotes the shaded domain.
Uncheck “Shade” and check the “Contour” box.
Tecplot Contour Plots
Now we see a contour plot, but what time is this plot for. ALL OF THEM. We
need to tell Tecplot to separate the files out since the data was transient.
Tecplot Transient Contour Plot
Select all of the zones in the left hand side of the dialog box
Check “Multiple Zones Per Time Step” since each time step has the insulated
and irradiated boundary
Enter two zones per group
Selected “Constant delta” (our time steps were uniform)
Delta is 1.44 seconds since 100 time steps per file @0.0144 s /step was used
Click “Apply”, then “Close”
Tecplot Transient Contour Plot
You will see the play bar active now! The data can be viewed transiently.
Tecplot Transient Contour Plot
If we want to take a look at the domain in three dimensions, change the plot
type from 2D-Cartesian to 3D-Cartesian
View 3D Domain
Scroll through the solution time to find the maximum temperature at the
surface (390.2 K).
Why is the maximum temperature at the edge of the domain? Use intuition.
Creating a Video