Heating Coil Simulation Workshop 12 ANSYS CFX 5.7 Heating Coil Simulation
Introduction The objective is to set up, solve and post-process a simplified CFD problem which illustrates fluid flow and conjugate heat transfer. The mesh resolution used in this workshop will not necessarily obtain accurate results, but will enable the participants to work through test cases in the limited time available.
Workshop Outline Analysis of a heating coil surrounded by moving fluid Open an existing workbench project containing the Design Modeler geometry Open CFX Mesh: Set mesh parameters and create mesh Preprocess: set fluid domain physics, boundary conditions, initial conditions, solver parameters Solution: monitor residuals, review out files Post-process
Double click on to start the CFX5.7 launcher ... Heating Coil Workshop Double click on to start the CFX5.7 launcher ...
Getting Started Ensure that the Working Directory is set Copy the following files to your working directory HeatCoil.wbdb & HeatCoil.agdb Click on the CAD2Mesh icon to start the ANSYS Workbench environment
Starting CFX Mesh Select Open Project and open the HeatCoil.wbdb database. On the project page, select on the Design Modeler database HeatCoil.agdb With the Design Modeler database selected, click on Generate CFX Mesh.
Mesher Environment Mesher window appears as tab on the Project Page Layout is similar to Design Modeler with parts tree on left Meshing Progress from top to bottom of Tree Feedback from mesher appears at bottom left
Mesher Environment Perform tree functions by right- clicking on objects Suppress or unsuppress geometry parts/bodies for easier viewing Mouse Usage: to rotate (default) + shift to zoom + ctrl to translate
Mesher Environment Left clicking on selected objects in the tree allows you to change attributes of that object To change the geometry view from solid (opaque) to transparent mode, left click on Geometry Set % Transparency to 67 using the slider bar or by typing in a number. Experiment with different transparencies and shine
2D Region Creation 1 Define 2D regions for placement of CFD boundary conditions Right-click on Regions to Insert a new Composite 2D Region Composite regions can consist of one or more surfaces
2D Region Creation 2 Create the 2D Region “cinlet” to define the nearest end of the cylinder To select a location on the geometry, click None under Composite 2D Region at bottom left Pick the nearest end of the cylinder
Save Often Save your work often ! Save after each significant change to the mesh definition Click Save As … and save in your working directory For subsequent saves, simply click Save
2D Region Creation 3 Surfaces selected for 2D regions will appear as green in the viewer window Unfinished region definitions appear with a red-circled exclamation mark Click Apply to finish defining the new 2D region. Marks should disappear
2D Region Creation 4 Create 3 more 2D regions: coutlet for the far end of the cylinder hinlet for the end of the coil nearest to the inlet houtlet for far end of the coil
2D Region Creation 7 We will now create a region coil that defines the surfaces of the coil which will be in contact with the fluid. Set the display to transparent so that the interior structures of the geometry become visible Left click the Geometry object in the tree Use the slider bar to adjust the transparency
2D Region Creation 9 Orient the geometry so that you are viewing the side of the cylinder Insert a new 2D Region “coil” Click on None to set the Location Box select the coil to include all the coil surfaces. Note that the ends of the coil have already been assigned to hinlet and houtlet
2D Region Creation 6 All the selected coil surfaces should turn green. Holding down the control key select the two end surfaces of the coil (previously defined as hinlet and houtlet) to deselect them Click on apply to assign the selected surfaces
Mesh Controls 1 Some parameters are required to control the density of the tetrahedral mesh produced by CFX-Mesh Under Mesh in the Object Tree, click on Default body spacing and set to 0.12 mm. Click on Default Face Spacing. Set Angular resolution to 30 Degrees, Minimum and Maximum Edge Lengths to 0.006 and 0.12 mm respectively
Mesh Controls 2 Click on Inflation. Set the number of Inflated Layers to 3. Set the Expansion Factor to 1.7. Inflation controls the mesh near the walls of the geometry (more later …) Click on Options. Set Overwrite Existing GTM file to Yes.
Mesh Controls 3 Click on Preview. This section of the tree controls mesh visualization. Set Mesh Render Mode to Wireframe Set the mesh Face Colour Mode to Uniform and choose a color by clicking on the colored bar Next, we will select the surfaces on which to display the finished mesh.
Mesh Preview 1 Mesh Preview allows the definition of surfaces on which to view the mesh before exporting to CFD Right click on Preview and Insert a Preview Group. Label the group “coilsurface”. Click on None under Preview Group to select surfaces and box select the entire Coil Click Apply to accept the selection
Mesh Preview 2 Create a second Preview Group called “all” Click on None to select the defining surfaces Box Select the entire geometry Click Apply to accept the selection
Mesh Generation 1 CFX Mesh generates surface meshes first, then makes the volume mesh To generate a surface mesh for the coil, left-click on the coilsurface Preview region and select Generate This Surface Mesh A progress bar appears at the bottom of the window. When the coil surface mesh is complete, it appears in the viewer
Mesh Generation 2 To generate a surface mesh for the coil, left-click on the all Preview region and select Generate This Surface Mesh A progress bar appears at the bottom of the window. When the surface mesh is complete, it appears in the viewer
Mesh Generation 3 Next we will define the characteristics of the mesh near the walls of the geometry Insert Inflated Boundary “cylinder” and set the maximum thickness to 0.12 mm Click on None next to Location box and select, the inner and outer cylinders. (Note: Use the control key for multiple selections) Click on Apply to accept
Mesh Generation 4 Now we will view the changes produced by defining inflation. Click on Preview and Set Mesh Render Mode to Solid Face Right-click on Preview region all and generate the surface mesh Mesh appears as solid and shaded. The meshed surfaces shown represent the interface between the inflation layer and the tetrahedral mesh
Mesh Generation 5 Generate the volume mesh (this step writes out a mesh *.gtm file) Use the icon at the top right corner of the meshing window, Or right click on the Mesh object in the tree Volume meshing uses the constraints created during surface meshing A progress bar will appear at the bottom left of the mesher window
Saving the Mesh file Save the CFX Mesh database. Return to the Project Page by clicking the Project Tab Save the project and exit Workbench
Starting CFX-5 Pre Click on CFX-Pre 5.7 The CFX-Pre Splash Screen should appear
Starting CFX-5 Pre Click on Open Simulation Set the file type to be GTM Database Select the GTM file written out by CFX Mesh (HeatCoil.gtm) Click on Open to start CFX Pre.
Preprocessing 1 Click on the Physics Tab to start defining the problem parameters Click Create, Flow Objects and select Simulation Type. Set the Simulation Type to Steady State. Click Ok
Preprocessing 2 Next we will define the working fluid around the coil Click Create, Flow Objects and select Domain. Call the Domain “fluid” Click Ok to Edit the Domain
Preprocessing 3 The Edit Domains Form has three sections Under General Options set the location to B2.P3, the fluid to Water and the reference Pressure to 1 atm Under Fluid Models, set the Heat Transfer Model to Thermal energy and the Turbulence Model to k- Epsilon
Preprocessing 4 Under Initialization, set the fluid Relative Pressure to 0 Pa. This is the pressure relative to the reference pressure set for the domain Click on the checkbox next to Turbulence Eddy Dissipation to set it Leave the initialization as automatic Click OK to save all the Domain settings and close the form Click on initial conditions checkbox to activate initialization
Preprocessing 5 Note that the Tree at the left now has a new object called fluid This is the domain created in the last few steps Create a second domain and call it coil Click OK to edit the coil domain
Preprocessing 6 Set the Location to B1.P3. This should highlight the coil mesh in the viewer window Set the Domain Type to Solid and select Copper from the Solids List Under the Solid Models tab, note the the Heat Transfer Option is already set to Thermal Energy Leave the Radiation Model as None
Preprocessing 7 Click on Initial Conditions to Activate initialization Set the Temperature Option to Automatic (this is default if the Initialization is not activated) Click OK to save the domain settings and exit the form
Preprocessing 8 Next we will specify a heat source in the coil location Create a Subdomain Label it “heatsource” Make sure the Domain is set to coil Click OK to accept the selection
Preprocessing 9 Set the location to B1.P3 (Note: the heat source will be specified for the entire volume of the coil) Under The Sources Tab, set the Energy Sources Option to Total Source Specify a total heat source of 50 kg m^2 s^-3 (50 W) Click OK to save the subdomain setting and exit the form
Preprocessing 10 Next, we will create inlet and outlet boundary conditions to the fluid domain Create a boundary condition called “inlet” Make sure that the domain is set to fluid Click OK to accept and specify the inlet conditions
Preprocessing 11 Edit the inlet boundary conditions Under Basic Settings, set the Boundary Type to Inlet and the Location to cinlet Under Boundary Details, set the Normal Speed to 0.1 m/s and the Temperature to 300 K Click OK to save the boundary settings and exit the form
Preprocessing 12 Note that creating objects automatically adds them to the tree at left To make changes to any object, simply double click to bring up the appropriate form The inlet boundary is shown as flow arrows in the viewer Create a second boundary condition called “outlet” for the domain fluid and click OK to edit it
Preprocessing 13 Edit the outlet boundary conditions Under Basic Settings, set the Boundary Type to Outlet and the Location to coutlet Under Boundary Details, set the Mass and Momentum Option to Average Static Pressure Set the Relative Pressure to 0 Pa Click OK to save the boundary settings and exit the form
Preprocessing 14 We are now ready to set the CFD Solver Specifications Create a Solver Control Flow Object This will bring up a form on which the discretization scheme and fluid/solid time scales can be set
Preprocessing 15 For most problems, only the Basic Settings Tab is used The default discretization is High Resolution and is also most accurate and robust. The fluid will have a much shorter timescale than the solid Use a physical timescale of 0.01 s for the fluid and 5 s for the solid Set the Conservation target for equation balances to 0.01 Click OK to save and exit the form
Preprocessing 16 (optional) Click on File -- Export ccl to save the problem setup Turn off ‘Save All Objects’ and select the Flow & Library objects. Save the setup as coil.ccl Saving setup files will allow the boundary conditions to be read in quickly if the grid is changed The .ccl file is a text file that can be edited using any text editor
Preprocessing 17 Click on File -- Write Solver (.def) file to write a file to the solver Save the setup as HeatCoil.def Set the Operation to Start Solver Manager and turn ON the Report Summary Interface Connections option. Click OK to save and exit the form
Preprocessing 18 Minimize the Solver Manager window. Notice that a domain interface has been automatically created by PRE, to connect the fluid and solid domains. Click OK on the information window. Save the CFX Pre database and exit. Restore the Solver Manager window.
Starting the Solver On the Define Run form click on Start Run to start the solver
The Solver Manager Workspace All the functions available from the icons at the top of the Solver Manager window are also available from the Workspace menu Use the Workspace menu or the icon tool tips to see what various icons do Note that once a workspace has been changed, this custom setting can be saved and recalled when needed
Viewing the residual plots Click on the Heat Transfer tab to see the solution residuals for the solid (coil) and fluid energy equations
RMS Residual Diagnostics Click on the Turbulence Quantities tab to see the solution residuals for the fluid turbulence The text window at the right shows the solution progress and the numerical values of the solution residuals As the solution progresses, the Rate of convergence should fall below 1.0 Values from 0.4 - 0.8 are indicative of a well chosen timestep
Changing the Layout The Solver Manager can be reconfigured to view all diagnostics simultaneously. Click on the Toggle Layout Type icon at the top of the Solver Manager Window Click on the Arrange Workspace icon afterward to organize the extra windows that appear, or use the Workspace Menu
Multiple Residual Plots Seeing all the solution residual plots simultaneously makes it easier to diagnose the trends in a run
Changing the plot windows The RMS (root mean square) residuals are the default plot for the Solver Manager To see the maximum residuals, click on the View Max Residuals icon at the top of the Solver Manager window
Interpreting Residual Plots All the plots should change to show the maximum residuals Maximum residuals will generally be a one or more orders of magnitude higher than RMS residuals Note that the convergence rates on the right are now between 0.5 and 0.9 Flat residual plots indicate that the timestep should be increased
Changing individual plot formats Right clicking on the residual plots allows the plot format to be changed Right click on the Momentum and Mass Max residuals plot and select Monitor Properties The Monitor Properties form for Momentum and Mass Balances should appear Change the Window Label to Momentum and Mass Balances
Changing individual plot formats The Range Settings tab allows the axes ranges of the residual plots to be changed Click the Plot Lines tab and remove the checks from the checkboxes beside Max P-Mass, MAX U-Mom, MAX V- Mom and MAX W-Mom Click Apply to update the plot title and remove the Max residual plotlines
Plotting Mass Imbalances The Plot Lines window allows a number of diagnostic variables to be plotted. These are shown in a tree structure Collapse the RESIDUAL tree (by clicking the minus sign) to view the entire list Since the equation imbalances are not shown in the text window, we will plot these Expand the IMBALANCE tree so that the required plots can be selected
Plotting Mass Imbalances The IMBALANCE tree shows all equations for which an imbalance can be computed Note that the solid energy balance is shown separately Check off P-Mass, U-Mom, V-Mom and W-Mom under fluid Click on Ok to update the plot settings and exit the form
Plotting Energy Imbalances The Momentum and Mass window now shows all the changes Note that the balances show a different trend from the residuals. Create a new Monitor to plot energy imbalances. (Workspace >New Monitor)
The completed run The run should stop after about 30 iterations Diagnostics will be generated by the solver in the text window at right.
Final momentum balances Maximize the view of the text window The Boundary Flow and Total Source Term Summary shows the convergence level of the equations Click on the Post Processing button to launch CFX-Post with the current results file.
Post Processing CFX Post starts with a wireframe view of the geometry The boundary condition and interfaces created in CFX-Pre appear in the tree to the left Test Mouse Usage: to rotate to translate to zoom
Creating a Locator Plane 1 Start the Post Processing session by creating a YZ locator plane. This plane will be used to locate plots of solution variables on a cross section of the geometry Leave the name as Plane1 Click OK to set the plane attributes
Creating a Locator Plane 2 Note that Plane 1 has been added to the tree on the left under User Locations and Plots The plane attributes can be set in the form that appears under the tree. Leave all the default settings as they are and click Apply
Creating a Contour Plot 1 Hide Plane 1 by clicking the checkbox to the left Create a contour plot using the Create Menu or the icons across the top of the viewer Leave the name as Contour 1 and click OK This contour plot will be associated with Plane 1 to view temperature and velocity
Creating a Contour Plot 2 Set the attributes of the Contour plot by changing the properties in the form below the tree Set the location to Plane 1 Change the Variable to Temperature Change the Range to Local Click Apply to save
Customizing the Legend 1 The contour plot of temperature should appear Next, we will change the format of the legend to increase the view area Expand the View Control object in the tree at left The Default Legend object should be listed Double click to edit the legend
Customizing the Legend 2 The Default Legend form should appear under the tree Change the Title Mode to Variable and Location Click the Appearance tab to change the legend text Set the Precision to 0 and change Scientific to Fixed Click Apply to update the legend in the viewer window
Coil Temperature Note that the coil temperature changes from inlet to outlet The coil creates turbulence, which improves heat transfer from the downstream portion of the coil Downstream sections are therefore slightly cooler
Fluid Temperature 1 Change the range of the contour plot to see what is happening to the fluid temperature Double click on Contour1 under User Locations and Plots Change the Range from Local to User Specified Set the Min and Max to 300 K and 400 K respectively Click Apply to update
Fluid Temperature 2 The fluid gets progressively hotter as it moves along the coil The largest temperature increases in the fluid corresponds to areas where the cooling water has stagnated The smallest temperature increases in the fluid correspond to areas where the flow velocity is higher Create a contour plot of fluid velocity on Plane 1 Create a tangential vector plot of fluid velocity on Plane 1.
Streamline Plots 1 Streamline plots give the best visualization of flow around the coil Under User Locations and Plots, hide the Vector and Contour plots by clicking on the checkboxes Use the Create Menu or icons to create a Streamline plot Leave the name as Streamline 1 and click OK
Streamline Plots 2 In the Streamline 1 form, set Start From to inlet Set Reduction to 2 (streamline for every second node on inlet) Under the Color tab, set Mode to Variable Set Variable to Temperature and Range to User Specified Set Min and Max to 300 and 400 K as before
Streamline Plots 3 Click on the Symbol tab, to set the appearance of streamlines Change the Stream Type to Tube Set the Tube Width to 2.5 Leave the # sides as 8 Click Apply to update the plot in the viewer window
Streamline Plots 4 The streamline plot shows the flow path of a fluid “parcel” Streamlines can be coloured by pressure, velocity, turbulence variables Experiment with different types of streamline colouring