FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot...

81
FLUENT Training Seminar Christopher Katinas July 21 st , 2017

Transcript of FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot...

Page 1: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

FLUENT Training Seminar

Christopher Katinas July 21st, 2017

Page 2: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

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

Page 3: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

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!

Page 4: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

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

Page 5: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

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

Page 6: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Heating Block of AISI 1018 • Part Geometry

– 86.36 mm x 171.45mm x 6.35mm

• Beam Diameter – Gaussian, 5250μm Radius,146.8W

• Scanning Velocity – 3mm/s

• Absorptivity (α=0.35) • Density (ρ=7870 kg/m3) • Thermal Conductivity

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

AISI 1018 Substrate

Scanning Direction

z

x

AISI 1018 Substrate

Laser Beam

Scanning Direction

y

x

Page 7: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

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?

Page 8: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

ANSYS Workbench

Build your project here via drag-and-drop interface!

Model Types

Page 9: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

ANSYS Workbench

Drag Fluid Flow (FLUENT) to Workspace

Page 10: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

ANSYS Workbench

At this point, save your project to a safe location. ANSYS does have a tendency to crash on large or complex models.

Page 11: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

ANSYS Workbench

Page 12: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Defining the Geometry

Double-click Geometry

Page 13: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Creating the Geometry

Remember the units you are building your geometry in! This will be VERY important when we begin using FLUENT.

This acts like any CAD software!

Click OK!

Page 14: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Adding a Brick of a Given Dimension

Input origin (X,Y,Z) and diagonal point coordinates to define a brick, then click Generate to display the geometry

Page 15: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Adding a Brick of a Given Dimension

BAM! Geometry is Created

Certainly this process is substantially more difficult for more complex components. In such a case, import a geometry file.

Page 16: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

What Are We Trying to Solve • We must know the physical basis of the system we are

attempting to simulate numerically. • Which conservation principles are relevant?

– Conservation of Mass – Conservation of Momentum – Conservation of Energy – Conservation of Entropy – Conservation of Charge

• Can ANSYS even solve them? – If an equation can be put into conservative form, the

numerical solver CAN solve it 𝜕𝜕(𝜌𝜌𝑋𝑋)𝜕𝜕𝑡𝑡

+ 𝛻𝛻 ∙ 𝜌𝜌𝜌𝜌𝑋𝑋 = 𝛻𝛻 ∙ 𝜇𝜇𝛻𝛻𝑋𝑋 + 𝑆𝑆

– Whether it will or not depends on your model inputs

Laser heating without melting doesn’t require any conservation laws beyond conservation of energy!

Page 17: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Meshing (Domain Discretization) • Complex systems are approximated numerically to

obtain a solution – Governing equations rarely have analytic solutions except in

very simple cases • Too coarse of a mesh cannot provide granularity in the

numerical solution • Too fine of a mesh requires a REALLY long time. • General rules of thumb:

– Finer mesh in areas where you are interested in the result and in locations adjacent to areas of high gradients of quantities you are interested in

– Coarser mesh in remaining areas – Transitional mesh to link coarse and fine mesh areas

together

Page 18: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Meshing

Double-click Mesh

Page 19: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Meshing

How small of a mesh should we use? Laser beam diameter = 5250 μm (50 μm seems reasonable)

Page 20: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Meshing Calculation • How many computational volumes does this lead to?

– 86.36 mm 1727 cells – 171.45 mm 3429 cells – 6.35 mm 127 cells

• Total control volumes = 7.521e8 – 4e5 control volumes takes O(1 second) per iteration – 7.5e8 control volumes takes O(1.5 months) per iteration – (P.S. GOOD LUCK!)

• Lets use fine mesh in the vicinity of laser irradiation and coarser mesh everywhere else – ~200 μm mesh is fine mesh size

Page 21: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Mesh Sizing

Right click on Mesh > Insert > Sizing This will impose a sizing condition on the geometry you select Select the four edges parallel to the z-axis at first

Page 22: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Modifying the Selection Type

Use the right mouse button within the view window and select Cursor Mode to distinguish the geometry you need

Page 23: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Z-Direction Meshing

Within the “Details of Edge Sizing Dialog” Select Type as Number of Divisions, with 10 divisions Behavior should be “hard” if you do not want cell sizes to change during meshing. Bias type should be “No Bias” (i.e. Uniform Spacing)

Page 24: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

X-Direction Meshing

Select Type as Number of Divisions, with 400 divisions Behavior should be “hard” if you do not want cell sizes to change during meshing. Bias type should be “No Bias” (i.e. Uniform Spacing)

Page 25: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Y-Direction Meshing

Select Type as Number of Divisions, with 200 divisions Set behavior to “hard” . Bias type should be “--- -- - -- ---” (i.e. Concentrated at Center) with a bias factor of 5.0. Now click “Generate Mesh”. It may take a while!

Page 26: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Checking Overall Mesh

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.

Page 27: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Modifying the Mesh

Change the number of intervals as follows and “Generate Mesh”: X-direction: 200 intervals Y-direction: 150 intervals, biasing 6.0 Z-direction: 10 intervals

Page 28: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Define the Boundary Faces

Create a unique “Named Selection” for each type of boundary. We need two Named Selections: Irradiated boundary at the +Z-plane Insulated boundary at the remaining faces

Page 29: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Save and Close 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.

Page 30: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Update the Project

This is necessary prior to entering the Setup section! You want to ensure the latest version of the mesh is being utilized for subsequent steps.

Page 31: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

FLUENT Setup

Double-click Setup

Page 32: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

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.

Page 33: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

FLUENT Startup

FLUENT may take a while to load, especially if parallel processing is used Upon loading, you should see your mesh within the Graphics Window.

Graphics Window

Command Window

Task Page Navigation Menu

Page 34: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

General Model Setup

Select Transient-based model We need to simulate laser scanning Pressure-based model is ideal for most systems If gravity needs to be considered, select the “Gravity” checkbox and specify the direction of the gravitational force.

Page 35: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

General Model Setup

Select the Scale… push button Verify the scale of the model to ensure consistent units based on the geometry created earlier. If consistent units are evident, click Close, otherwise scale the geometry.

Page 36: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Models Setup

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 Do we need any other types of models?

Page 37: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Materials Input

By default, a fluid and solid are automatically included in the model. If the material is not being used, it doesn’t affect the results. We are not using aluminum, but rather 1018 Steel. Click “aluminum” under the Solid material and then “Create/Edit…”

Page 38: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Materials Input

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

Page 39: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Materials Input

Change the thermal conductivity 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

k=46.8+4.4959e-2*T – 1.081e-4T2+4.757e-8T3 Click “Change/Create” button and overwrite the aluminum default material

Page 40: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Cell Zone Conditions

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.

Page 41: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

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?

Page 42: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Boundary Conditions

Now, select “irradiated_boundary” and click “Edit…” Look through the Heat Flux types and there are no others than “constant”. There are no default options for the method of heating we are interested in. We need to make our own heat flux boundary type via a User Defined Function UDFs are written in C code and can be one of two types:

Compiled or Interpreted C-code (compiled is faster)

Page 43: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

User-Defined Function • Allows override of boundary conditions, source

terms and/or material properties during the solution.

• We will use an interpreted UDF for this example • No need to run a compiler beforehand

– FLUENT will compile the code for us at a price of computation time

• UDF’s will slow down FLUENT analysis regardless since they require computation time to calculate the functions.

Page 44: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

User-Defined Function #include "udf.h" #define PI 3.1415926 //Pi, a constant #define sigma_q 0.35 //Absorptivity #define P 146.8 //Laser power #define R 5.250e-3 //Radius of laser beam #define v 3.000e-3 //Scanning velocity DEFINE_PROFILE(heat_flux,thread,position) //The UDF profile will have the name “heat_flux” { face_t f; //Define face variable double x[ND_ND],r,time,vol; //Define face centroid vector, distance, time, and exponential for laser double tempp,conv,emiss; //Define temperature, convection and emission energy time=RP_Get_Real("flow-time"); //Acquire time from FLUENT solver begin_f_loop(f,thread) //Loop through all relevant boundary faces { tempp=F_T(f,thread); //Get the temperature of the face F_CENTROID(x,f,thread); //Acquire the face centroid location r=sqrt(pow((x[0]+R-v*time),2.0)+pow(x[1]-0.085725,2.0)); //Determine distance from beam center conv=0.0*17.0*(tempp-299.4); //Calculate convective losses emiss=0.0*5.67e-8*(pow(tempp,4.0)-pow(299.0,4.0)); //Calculate radiation losses if (conv<0.0) {conv=0.0;} //Prevent convection if surface is colder than surroundings if (emiss<0.0) {emiss=0.0;} //Prevent radiation if surface is colder than surroundings //calculate the intensity with convective and radiation losses in the next two lines vol=2.0*r*r/(R*R); F_PROFILE(f,thread,position)=(2.0*P*sigma_q*exp(-vol)/(PI*R*R)-conv-emiss); //Set face flux end_f_loop(f,thread) } }

Page 45: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Interpreting a User-Defined Function

By going through Define > User-Defined > Functions > Interpreted… Select the C-code file which has the previously shown UDF Click “Interpret”. If an error occurs, there is likely an error with the UDF C-code, and it will need to be revised and saved. Then repeat the steps.

Page 46: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

UDF Build Successful If the UDF build was successful, the command window will have text printing similar to this in nature.

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.

Page 47: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

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.

Page 48: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

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. Only use coupled when you have very large time steps or when mesh quality is poor. SIMPLE is the most common choice of solver. Spatial discretization describes order of accuracy of derivatives at cell faces and how the derivatives are acquired numerically. Generally, the default values for these will suffice, as higher order accuracy will increase computation time.

Page 49: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Solution Controls Dialog

Only the highlighted equations will be solved. By default, all equations are solved based on the models selected previously. Do we need flow equations for this simulation? Why/why not? Under Relaxation Factors (URF):

Pressure and Momentum URFs MUST sum to 1.00 Flow stability is best with smaller pressure URF (0.03 is not uncommon) Temperature URF must be less than or equal to 1, typically 1 works fine

Tnew=α*Tsol+(1-α)*Told

Unhighlight “Flow”

Page 50: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Monitors

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

Page 51: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

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.

Page 52: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Solution Initialization Prior to starting any simulation using numerical methods, an initial condition of the solution must be made. For steady-state simulation, the initial condition is a guess of the converged steady-state solution. In transient simulations, the initial condition provides the temporal starting point for the simulation, and results will likely be affected by the initial condition. For the case of the substrate being heated, the plate is initially at 299 K, which is room temperature. Once the initial condition is described, click the “Initialize” button.

Page 53: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Saving Data Periodically

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.

Page 54: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

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 iterations allow the solver to converge within a timestep before continuing to the next timestep. But we need to know how big of a time step to use and how many time steps and iterations (pseudo-timesteps) to use.

Page 55: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

How Small of a Time Step Should We Use? • The time step should be sufficiently small to guarantee

the physics can be captured from a numerical perspective.

• Typically, source displacement should be less than one tenth of a computational volume. Larger time steps can be taken, with increased numerical error – Mesh size: 86.36mm/200 cells = 0.432 mm/cell – Laser Scanning Speed : 3 mm/s

∆𝑡𝑡 =13

𝑠𝑠𝑚𝑚𝑚𝑚

∗ 0.432𝑚𝑚𝑚𝑚𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐

∗ 0.1 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 0.0144 𝑠𝑠

• At least 1999 physical time steps will be required to solve the domain, assuming we need to traverse the entire width of the block.

Page 56: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Time Stepping We calculated the necessary time step for this domain and the number of physical time steps required. Number of time steps are the physical time steps for the solution It is generally a good idea to have a large number of maximum iterations per time step, though if the physics are simple and coupling between equations is small, a lower number can be used. Set the reporting interval to the max iterations (one reporting update per time step). Profile update interval should be changed each pseudo timestep.

Page 57: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Running the Model Press calculate to start acquiring the numerical solution. When the solution is being obtained, lines within the command area will show values of the residuals for each equation and anything else you requested to have printed. The graphics window will have various pages to show a monitor of the residuals graphically and, in our case, the monitor for the maximum face temperature of the irradiated surface. We actually want to simulate this for 2300 time steps

Page 58: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Monitoring Model Progress

In general, residuals in transient simulations will start at an elevated level at the start of a physical time step and then decay. We want to ensure the residual does not change substantially prior to advancing to the next time step. If this occurs, the last iteration may not properly describe the solution at the prior time step, yielding inaccurate results

Page 59: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Maximum Surface Temperature

The monitor we set up previously shows us the maximum temperature of the domain. Similarly, the value will be shown in the command window (391.4K).

Page 60: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Post-Processing of the Data • Before doing anything else, SAVE your project!

– This can be done directly from FLUENT

• Once the simulation has completed running, we need to visualize the results

• Post-processing within ANSYS is rather limited, thus Tecplot is used (hence why we exported Tecplot data for the transient save points).

• Tecplot 2015 will be used to show how to create a movie from single data frames

• You should have 23 files named Wall_T-XXXX.dat

Page 61: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Open Tecplot and Load the Data Files

Click Load Data File(s)… within Tecplot

Page 62: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Loading of the Data Files

Data files will be located in the ANSYS project directory/dp0/FFF/Fluent Select all of the files starting with Wall_T then click “Open” Make sure files are sorted numerically in increasing order from top to bottom!

Page 63: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Tecplot Contour Plots

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.

Page 64: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

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.

Page 65: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Tecplot Transient Contour Plot

Data > Edit Time Strands… needs to be used to accomplish this

Page 66: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

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”

Page 67: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Tecplot Transient Contour Plot

You will see the play bar active now! The data can be viewed transiently.

Page 68: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

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

Page 69: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

View 3D Domain

A rather thick domain is shown. We should know something is not correct. The domain thickness should be less than 1/10th the width. When Tecplot has domains of high aspect ratio, it automatically adjusts it.

Page 70: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

View 3D Domain

We can adjust it back using Plot > Axis…

Page 71: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Domain Aspect Ratio

By changing XY dependent to XYZ dependent and setting the X to Z ratio to 1…

Page 72: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

View 3D Domain

We get a more realistic looking representation of our geometry. Labels are an important aspect of visualization, so we should annotate the display window.

Page 73: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Automatic Text

Add Time=&(SOLUTIONTIME) seconds as a text box on the display window Similarly, add a second text box with : Max Temperature = &(MAXVAR[4]%4.1f) K

Page 74: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Finding the Maximum Temperature

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.

Page 75: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Creating a Video

Create a movie file by clicking Animate > Time…

Page 76: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Create a Video

Change the destination “To File”. When you click “Animate to File…”, The Export window shows up. Select AVI and set the animation to 4 frames/second. When “OK” is clicked, select where to save the video file.

Page 77: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

The Finished Video

Page 78: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Learning Objectives Accomplished • Learned the basics of the ANSYS interface • Created a simple geometry using the interface • Meshed the geometry with a variety of edge seeds • Learned the FLUENT interface and how to setup a

simple heat transfer problem to solve a traversing laser beam problem

• Post-processed the data into a meaningful format

Page 79: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Resources • All dialog boxes have a “Help” button. If you don’t

know what FLUENT is doing…USE IT!!! • FLUENT Theory Guide (describes the physics of

each input) • FLUENT UDF Manual – for user-defined functions • CFD forums- https://www.cfd-online.com/Forums/ • Google.com

Page 80: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

A Twist • Now that we have set up a simple heating model with a Gaussian beam,

what changes would we need to make to the model to allow for melting? • First, what changes in the physics exists?

– Tsolidus for 1018 Steel is ~1588K – Tliquidus for 1018 Steel is ~1723K – Heat of Fusion 2.65e5 J/kg

• With the given conditions for laser irradiation, will there be any effect? Why/why not?

• Maximum temperature was 390K, therefore no melting will be observed. If the laser were more concentrated, then melting may be required.

• Thermal properties would need to be expanded to higher temperatures – Validity of property correlations may not be valid at melting

• Block can not longer be considered a solid, since it could flow – Change Cell Zone type to “Fluid”

• Marangoni stress would need to be included (a significant driving force)

Page 81: FLUENT Training Seminar - College of Engineering - Purdue ... Training... · – FLUENT cannot handle laser irradiation profiles natively – BUT, ... rotating equipment or a problem

Modifying Plate Dimensions • What if we wanted to change the thickness of the

plate from 6.35mm to 1.00mm? – If you already have the mesh created from the thicker

domain, DON’T rebuild it – Use scaling of the mesh

• Click “Specify Scaling Factors” • Set z-scale to 0.1574803 (1mm/6.35mm) and click “Scale”