3.1. Solidification of a Casting

3.1.1. Problem Specification

Applicable Products: Ansys Multiphysics, Ansys Mechanical
Level of Difficulty: Moderate
Interactive Time Required: 60 to 90 minutes
Discipline: Thermal
Analysis Type: Nonlinear transient
Element Types Used: PLANE55
Features Demonstrated: Conduction, convection, phase change, selecting, solution control, time-history postprocessing, use of a "get function"
Help Resources: Transient Thermal Analysis and PLANE55

3.1.2. Problem Description

This is a transient heat-transfer analysis of a casting process. The solidification process occurs over a duration of four hours. The casting is made in an L-shaped sand mold with four-inch-thick walls. Convection occurs between the sand mold and the ambient air.

Objective: Track the temperature distribution in the steel casting and mold during solidification.

3.1.2.1. Given

Material Properties for Sand  
Conductivity (KXX)0.025 Btu/(hr-in-oF)
Density (DENS)0.054 lb/in3
Specific heat (C)0.28 Btu/(lb-oF)
Conductivity (KXX) for Steel  
at 0oF1.44 Btu/(hr-in-oF)
at 2643oF1.54
at 2750oF1.22
at 2875oF1.22
Enthalpy (ENTH) for Steel  
at 0oF0.0 Btu/in3
at 2643oF128.1
at 2750oF163.8
at 2875oF174.2
Initial Conditions  
Temperature of steel2875 oF
Temperature of sand80 oF
Convection Properties  
Film coefficient0.014 Btu/(hr-in2-oF)
Ambient temperature80 oF

3.1.2.2. Approach and Assumptions

You will perform a 2D analysis of a one unit thick slice. Half-symmetry is used to reduce the size of the model. The lower half is the portion to be modeled.

The mold material (sand) has constant material properties. The casting (steel) has temperature-dependent thermal conductivity and enthalpy; both are input in a table of values versus temperature. The enthalpy property table captures the latent heat capacity of the metal as it solidifies. Radiation effects are ignored.

Solution control is used to establish several nonlinear options, including automatic time stepping. Automatic time stepping determines the proper time step increments needed to converge the phase change nonlinearity. This means that smaller time step sizes will be used during the transition from molten metal to solid state.

3.1.2.3. 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 by selecting the link for step 1.

Prepare for a Thermal Analysis

1. Set preferences.

Input Geometry

2. Read in the geometry of the casting.

Define Materials

3. Define material properties.

4. Plot material properties vs. temperature.

5. Define element type.

Generate Mesh

6. Mesh the model.

Apply Loads

7. Apply convection loads on the exposed boundary lines.

Obtain Solution

8. Define analysis type.

9. Examine solution control.

10. Specify initial conditions for the transient.

11. Set time, time step size, and related parameters.

12. Set output controls.

13. Solve.

Review Results

14. Enter the time-history postprocessor and define variables.

15. Plot temperature vs. time.

16. Set up to animate the results.

17. Animate the results.

18. Exit the program.

3.1.3. Prepare for a Thermal Analysis

3.1.3.1. Step 1: Set preferences.

To Set Preferences:

  1. Main Menu> Preferences

  2. (check) "Individual discipline(s) to show in the GUI" = Thermal

  3. [OK]

3.1.4. Input Geometry

3.1.4.1. Step 2: Read in the geometry of the casting.

Reading in the file containing the casting model.

  1. Utility Menu> File> Read Input from ...

  2. File name: casting.inp (Click the link to download the file in .zip format.)

  3. [OK]

3.1.5. Define Materials

3.1.5.1. Step 3: Define material properties.

Define the sand mold material properties as material number 1. These are not functions of temperature.

  1. Main Menu> Preprocessor> Material Props> Material Models

  2. (double-click) "Thermal", then "Conductivity", then "Isotropic"

  3. "KXX" = 0.025

  4. [OK]

  5. (double-click) "Specific Heat"

  6. "C" = 0.28

  7. [OK]

  8. (double-click) "Density"

  9. "DENS" = 0.54

  10. [OK]

    The metal casting is defined as material number 2. These properties change significantly as the metal cools down from the liquid phase to the solid phase. They are therefore entered in a table of properties versus temperature.

    First define the temperature-dependent thermal conductivity.

  11. Material> New Model

  12. "Define Material ID" = 2

  13. [OK]

  14. (double-click) "Isotropic"

  15. [Add Temperature] three times to create fields for the four temperatures.

  16. "T1" = 0

  17. "T2" = 2643

  18. "T3" = 2750

  19. "T4" = 2875

  20. "KXX" at "T1" = 1.44

  21. "KXX" at "T2" = 1.54

  22. "KXX" at "T3" = 1.22

  23. "KXX" at "T4" = 1.22

    Copy the four temperatures so that you can paste them into the Enthalpy dialog box.

  24. Select the temperatures by holding the left mouse button and dragging across the temperature row so that the row is highlighted.

  25. Ctrl+C to copy the temperatures.

  26. [OK]

    Define the temperature dependent enthalpy.

  27. (double-click) "Enthalpy"

  28. [Add Temperature] three times to create fields for the four temperatures.

  29. Paste the temperatures into the dialog box by highlighting the T1 temperature field, and pressing Ctrl+V.

  30. "ENTH" at "T1" = 0

  31. "ENTH" at "T2" = 128.1

  32. "ENTH" at "T3" = 163.8

  33. "ENTH" at "T4" = 174.2

  34. [OK]

3.1.5.2. Step 4: Plot material properties vs. temperature.

  1. (double-click) "Thermal conduct. (iso)" under Material Model Number 2.

  2. [Graph]

  3. [OK]

  4. (double-click) "Enthalpy" under the right or left window.

  5. [Graph]

  6. [OK]

  7. Material> Exit

  8. Toolbar: SAVE_DB

3.1.5.3. Step 5: Define element type.

Define the element type as PLANE55.

  1. Main Menu> Preprocessor> Element Type> Add/Edit/Delete

  2. [Add ...]

  3. "Thermal Solid" (left column)

  4. "Quad 4node 55" (right column)

  5. [OK]

  6. [Close]

  7. Toolbar: SAVE_DB

3.1.6. Generate Mesh

3.1.6.1. Step 6: Mesh the model.

  1. Utility Menu> Plot> Areas

    Specify a SmartSize of 4. This will allow a slightly finer mesh than the default.

  2. Main Menu> Preprocessor> Meshing> MeshTool

  3. (check) "Smart Size"

  4. (slide) "Fine Course" = 4

  5. [Mesh]

    Mesh the mold area first. Note that the material attribute reference number defaults to 1 and there is no need to set attributes before meshing the area.

  6. Pick the mold area A5. (Hint: Place the mouse cursor on top of the A5 label when you pick—this is the picking "hot spot," based on the centroid of the area.)

  7. [OK]

    Before meshing the casting area, set the material attribute to that of steel (material 2).

  8. (drop down in MeshTool) "Element Attributes" = Global, then [Set]

  9. (drop down) "Material number" = 2

  10. [OK]

  11. Utility Menu> Plot> Areas

  12. [Mesh] in MeshTool

  13. Pick area A4

  14. [OK]

  15. [Close] in MeshTool

  16. Utility Menu> Plot> Elements

    Note: The mesh you obtain may vary slightly from the mesh shown here. As a result of this, you may see slightly different results during postprocessing. For a discussion of results accuracy, see Planning Your Approach in the Modeling and Meshing Guide.

    To verify that the elements have the right materials, plot them with different colors for different materials.

  17. Utility Menu> PlotCtrls> Numbering

  18. (drop down) "Elem / Attrib numbering" = Material numbers

  19. [OK]

    Note: the elements of material 1 form the sand mold. The elements of material 2 form the steel casting. You can also plot the elements showing materials in different colors without displaying the associated material numbers.

  20. Utility Menu> PlotCtrls> Numbering

  21. (drop down) "Numbering shown with" = Colors only

  22. [OK]

  23. Toolbar: SAVE_DB

3.1.7. Apply Loads

3.1.7.1. Step 7: Apply convection loads on the exposed boundary lines.

Apply the convection to the lines of the solid model. Loads applied to solid modeling entities are automatically transferred to the finite element model during solution.

  1. Utility Menu> Plot> Lines

  2. Main Menu> Preprocessor> Loads> Define Loads> Apply> Thermal> Convection> On Lines

  3. Pick the three lines that are exposed to ambient air.

  4. [OK]

  5. "Film coefficient" = 0.014

  6. "Bulk temperature" = 80

  7. [OK]

  8. Toolbar: SAVE_DB

3.1.8. Obtain Solution

3.1.8.1. Step 8: Define analysis type.

  1. Main Menu> Solution> Analysis Type> New Analysis

  2. (check) "Type of analysis" = Transient

  3. [OK]

  4. (check) "Solution method" = Full

  5. [OK]

3.1.8.2. Step 9: Examine solution control.

The Approach and Assumptions section of this tutorial mentioned that solution control is used to establish several nonlinear options. In this step, you will be directed to the online help for solution control so you can examine the details of this feature.

You will access this help topic by clicking on the Help button from within the Nonlinear Solution Control dialog box.

  1. Main Menu> Solution> Load Step Opts> Solution Ctrl

    Note that solution control is on by default.

    Before clicking on the Help button in the next step, you should be aware that the help information may appear in the same window as this tutorial, replacing the contents of the tutorial. If this is the case, after reading the help information, you will need to click on the Back button to return to this tutorial. If the help information appears in a separatewindow from the tutorial, you can minimize or close the help window after you read the help information.

  2. [Help] then read the details on Solution Control.

  3. If the help information replaced the tutorial, click on the Back button to return to the tutorial. If the help information appears in a separate window, you can close or minimize that window.

  4. [Cancel] to remove the dialog box.

3.1.8.3. Step 10: Specify initial conditions for the transient.

The mold is initially at an ambient temperature of 80oF and the molten metal is at 2875oF. Use select entities to obtain the correct set of nodes on which to apply the initial temperatures. First select the casting area, then select the nodes within that area and apply the initial molten temperature to those nodes. Next, invert the selected set of nodes and apply the ambient temperature to the mold nodes.

Start by plotting areas.

  1. Utility Menu> Plot> Areas

  2. Utility Menu> Select> Entities

  3. (first drop down) "Areas"

  4. [OK]

  5. Pick area A4, which is the casting.

  6. [OK]

  7. Utility Menu> Select> Everything Below> Selected Areas

  8. Utility Menu> Plot> Nodes

  9. Main Menu> Solution> Define Loads> Apply> Initial Condit'n> Define

  10. [Pick All] to use selected nodes.

  11. (drop down) "DOF to be specified" = TEMP

  12. "Initial value of DOF" = 2875

  13. [OK]

  14. Utility Menu> Select> Entities

  15. (first drop down) "Nodes"

  16. (second drop down) "Attached to"

  17. (check) "Areas, all"

  18. [Invert] This is an action command; the selected set of nodes is immediately inverted.

  19. [Cancel] to close the dialog box.

  20. Utility Menu> Plot> Nodes

  21. Main Menu> Solution> Define Loads> Apply> Initial Condit'n> Define

  22. [Pick All] to use all selected nodes.

  23. "Initial value of DOF" = 80

  24. [OK]

    Always select Everything again after you have finished selecting the nodes.

  25. Utility Menu> Select> Everything

  26. Toolbar: SAVE_DB

3.1.8.4. Step 11: Set time, time step size, and related parameters.

Stepped boundary conditions simulate the sudden contact of molten metal at 2875 oF with the mold at ambient temperature. The program selects automatic time stepping, enabling the time-step size to be modified depending on the severity of nonlinearities in the system. (For example, the program uses smaller time steps during the phase change.) The maximum and minimum time-step sizes represent the limits for this automated procedure.

  1. Main Menu> Solution> Load Step Opts> Time/Frequenc> Time-Time Step

  2. "Time at end of load step" = 4

    This setting represents 4 hours.

  3. "Time step size" = 0.01

  4. (check) "Stepped or ramped b. c." = Stepped

  5. "Minimum time step size" = 0.001

  6. "Maximum time step size" = 0.25

  7. [OK]

3.1.8.5. Step 12: Set output controls.

  1. Main Menu> Solution> Load Step Opts> Output Ctrls> DB/Results File

  2. (check) "File write frequency" = Every substep

  3. [OK]

  4. Toolbar: SAVE_DB

3.1.8.6. Step 13: Solve.

  1. Main Menu> Solution> Solve> Current LS

  2. Review the information in the status window, then select File> Close (Windows), or Close (Linux), to close the window.

  3. [OK] to initiate the solution.

  4. [Close] when the solution is done.

While Mechanical APDL solves the analysis, the Graphical Solution Tracking (GST) monitor plots the "Absolute Convergence Norm" as a function of the "Cumulative Iteration Number." Notice that the solution is assumed to have converged for values less than or equal to the convergence criteria.

3.1.9. Review Results

3.1.9.1. Step 14: Enter the time-history postprocessor and define variables.

Use the time-history postprocessor to look at the variation of temperature with respect to time at one point on the casting (on the symmetry plane).

  1. Utility Menu> PlotCtrls> Numbering

  2. (check) "Node numbers" = On

  3. (drop down) "Numbers shown with" = Colors & numbers

  4. [OK]

  5. Utility Menu> Plot> Elements

    The node at the center of the casting on the symmetry plane is the node of interest. Use a "get function" to define a variable equal to the value of the node number at the location of interest (16,6,0). By using a variable to identify the node at the center point, the analysis will be more flexible in that the center node will always be used even if the mesh, and therefore node numbers, change.

  6. Utility Menu> Parameters> Scalar Parameters

  7. "Selection"=cntr_pt = node (16,6,0)

  8. [Accept}

    Note the center point node number. This number can vary due to differences in the mesh.

  9. [Close]

  10. Main Menu> TimeHist Postproc

  11. [+] to add data.

  12. (double-click) "Nodal Solution", then "DOF Solution", then "Temperature"

  13. "Variable Name" = center

  14. [OK]

  15. Type cntr_pt in the picker, then press Enter.

  16. [OK] in the picker.

  17. File> Close

3.1.9.2. Step 15: Plot temperature vs. time.

  1. Main Menu> TimeHist Postpro> Graph Variables

  2. "1st variable to graph" = 2

  3. [OK] to plot the results at cntr_point as a function of time.

Notice that the solidification region is approximately 2643oF - 2750oF. Your graph may vary slightly.

3.1.9.3. Step 16: Set up to animate the results.

Animate the solidification of the molten metal. To better visualize the solidification process, specify three contours. One will represent the molten metal (T greater than 2750 oF), one will represent the solidified metal (T less than 2643 oF), and the third will represent everything in between.

To generate an animation, enter the General Postprocessor and read the first set of results.

  1. Main Menu> General Postproc> Read Results> First Set

  2. Utility Menu> PlotCtrls> Numbering

  3. (check) "Node numbers" = Off

  4. (drop down) "Elem / Attrib numbering" = No numbering

  5. (drop down) "Replot upon OK/Apply?" = Do not replot

  6. [OK]

  7. Utility Menu> Plot> Elements

  8. Utility Menu> PlotCtrls> Style> Contours> Non_uniform Contours

    As indicated in the brackets at the upper left corner of the dialog box, the command to specify non_uniform contours is /CVAL.

  9. "V1" = 2643

  10. "V2" = 2750

  11. "V3" = 3000

    The three values represent the upper bounds of the first, second, and third contours, respectively.

  12. [OK]

3.1.9.4. Step 17: Animate the results.

Procedure on all systems:

  1. Utility Menu> PlotCtrls> Animate> Over Time

  2. "Number of animation frames" = 30

  3. (check) "Auto contour scaling" = Off

  4. [OK]

    During the animation, notice the three separate colors - red for temperatures greater than 2750 oF (molten steel), green for temperatures between 2643 oF and 2750 oF (the "mushy" phase-change region), and blue for temperatures below 2643 oF (the solidified steel and the sand mold). As you would expect, the last region to solidify is the material at the center of the casting. (Remember that a symmetry model was used.)

  5. Make selections in the Animation Controller (not shown), if necessary, then [Close].

    To visualize the temperature distribution throughout the model over the 4 hour span, animate the temperature distribution with the default contour settings. To change the contour settings back to their default value, enter /CVAL in the Input Window. (Alternatively, you can go back to the Non_Uniform Contours window and set all values to zero.)

  6. Type /CVAL, then press Enter.

  7. Utility Menu> PlotCtrls> Animate> Over Time

  8. [OK]

  9. Make selections in the Animation Controller (not shown), if necessary, then [Close].

3.1.9.5. Step 18: Exit the program.

  1. Toolbar: QUIT

  2. (check) "Quit - No Save!"

  3. [OK]