TA11: Cooling of a Circular Fin of Rectangular Profile (Under Revision)
1. PROBLEM DESCRIPTION
A circular fin of rectangular cross section is subjected to a heat transfer by conduction from the main body and convection from its surfaces subjected to ambient air. Temperatures and geometries are given. At steady state, the temperature at the end of the fin is enquired. The problem is axisymmetric, so modelling has been done by taking a 5° piece of the circular fin.
Material Properties 
Geometric Properties 
Loading 

k = 15 Btu/hrft°F 
r1 = 0.5 in = 0.04167 ft 
T0 = 0°F 
h = 100 Btu/hrft2°F 
r2 = 0.75 in = 0.0625 ft 
T1 = 100°F 
2t= 0.0675 in = 0.005208 ft 
2. MODEL SETUP AND SOLUTION
The following sections describe the setup and solution steps for this tutorial:
2.1. Preparation
To run this tutorial;
You must sign up and log in. —>>>>> TwinAPI
After login, Click Personel Projects>>New Project button on the screen and then we will create a project page by giving the project name.
(Let us name our analysis “CoolingOfCircularFin”)
You can see the project page on your Personel Project Part.
Our Screen is a blank python page without any script. We will be doing a tutorial by using Simularge’s Library.
We import our libraries from the Simularge Libraries to our empty Python page that we almost will use in each tutorial.
1from TwinAPI.SimulationTools import Solver
2from TwinAPI.SimulationTools import Mesher
Material Properties is a significant factor that affects the result. Therefore, we should define it to the problem easily. The Libraries that has to be imported for the problem is given below.
1from TwinAPI.MaterialLibrary import MaterialManager
2from TwinAPI.MaterialLibrary.Units import units
2.2. General Settings
After the necessary libraries are imported into the analysis, analysis are defined.
Defined name of Analysis as “circFin”
1circFin= Solver.Analysis()
Corefem is used on heat transfer problems and others in TwinAPI. Hence, we are defining Corefem to run this analysis.
1circFin.SetSolver("corefem")
Analysis is defined successfully into TwinAPI System.
2.3. Geometry/Mesh
There is two different options to define geometry on TwinAPI System. Creating your own geometry on TwinAPI by using Mesher Library, (that belongs to Simularge’s libraries) or you can import your own CAD Geometry. Here the former approach is demostrated.
1 nodeSide=4
2 nodeLength=24
3 nodeExtrusion=20
4 r1=0.0416
5 r2=0.062
6 thickness= 0.00520
7 length= r2r1
8
9 section=Mesher.Quad2D(thickness,nodeSide,"uniform","",length,nodeLength,"uniform","")
10
11 r=r1+length*0.5
12 Point1=[r,0,0]
13 Point2=[.9994*r,.035*r,0]
14 Point3=[.9986*r,.0523*r,0]
15 Point4=[.9977*r,.077*r,0]
16
17 PointCloud=[Point1,Point2,Point3,Point4]
18
19 NurbsCurve=Mesher.node2Nurbs(PointCloud,3,4,nodeExtrusion)
20
21 circF=Mesher.extrusionPath(section,NurbsCurve)
With this script first we define parameters for the cross section of the fin, then we extrude the cross section for 5° slice. To do this we define the extrusion path by providing points, and then use extrude function. We provided the units in “feet”. This script produces a 5° slice of a circular fin. Geometry is named “circF”.
Note
You are told that you can also create this geometry by importing a 3D CAD file. Code can be written like this;
1 wedge=Mesher.MeshFromCad('wedge.step',0.04,1,1,SurfaceExtract=True)
If you are not sure about the created geometry and want to see geometry before starting analysis;
Click Preview Button
2.4. Material
For material properties following structure is followed, first we call the “material” class in the Material Manager library and name the material “circularfin” for specific material properties. We define conductivity alone in this problem, as it is sufficient. Convection coefficient is defined for the film temperature while setting boundary conditions.
1 material = MaterialManager.Material("TwinAPI","circfin")
2
3 material.SetThermalData("conductivityX",15,units["btu/hr*ft*F"])
After defining the material into our system, we should combine geometry defined above and our material using Addpart method.
1circFin.AddPart(circF,material)
2
3circFin.Assemble()
2.5. Boundary Conditions
After adding material and geometry to the analysis, we are ready to set the boundary conditions.
First of all, we need to call a method to create a step. Step1’s name can be changed.
1Step1=Solver.CreateStep("new")
We need to choose whether this step is computed depending on time or not.Explained problem is SteadyState. Therefore,below code should be written.
1Step1.Time("SteadyState",[0,0.5,0.1])
If the Problem was Transient,type of problem and time of analysis should be written in a similar manner with below code.
1Step1.Time("Transient",[0,10,0.1])
The type of boundary conditions required for the problem are temperature and convection. In the problem top, bottom and right surface is subjected to convection boundary condition. Left surface connected to main body is subjected to constant temperature boundary condition.
1T_zero=0
2T_one=100
3h=100
4
5Step1.AddBC("Temperature",[circF.bottom],[T_one],"F")
6Step1.AddBC("Convection",[circF.left],[(T_zero,h)],"")
7Step1.AddBC("Convection",[circF.top],[(T_zero,h)],"")
8Step1.AddBC("Convection",[circF.right],[(T_zero,h)],"")
2.6. Solution
After defining our boundary conditions, we need to combine our defined domain and the steps containing boundary conditions.To complete this task;
1circFin.Build([Step1])
Now,Problem is ready to be solved.
1circFin.Solve()
Before going into PostProcessing stage, we can review what we have done.
2.7. Processing
Click Run Button and gears rotate until the problem is solved.
2.8. PostProcessing
After the Problem is solved;
We can see results by clicking Result Button
If we want to see detailed result about problem;
Output Tab shows us the results that are printed.
1Temp=circFin.Result(Variable="Temperature", Set=circF.right)
2print("Temperature:" ,min(Temp))
Code above is used to print the results.
3. SUMMARY
In this tutorial, how to set up and solve a problem involving temperature and natural convection on an extruded slice with TwinAPI is demonstrated..
Table below shows a comparison of Ansys Mechanical Result and TwinAPI result of the exact same problem.
Target 
SIMULARGETwinAPI 
ANSYS 
Ratio: SIMULARGE/Target 
Ratio: ANSYS/Target 


T_2, °F 
53.22 
52.50 
52.37 
0.986 
0.984 
4. SOURCE CODE
1from TwinAPI.MaterialLibrary import MaterialManager
2from TwinAPI.MaterialLibrary.Units import units
3from TwinAPI.SimulationTools import Solver
4from TwinAPI.SimulationTools import Mesher
5
6material = MaterialManager.Material("TwinApi","circfin")
7circFin= Solver.Analysis()
8circFin.SetSolver("corefem")
9
10material.SetThermalData("conductivityX",15,units["btu/hrftf"])
11
12nodeSide=10
13nodeLength=48
14nodeExtrusion=20
15r1=0.0416
16r2=0.062
17thickness= 0.00520
18length= r2r1
19
20section=Mesher.Quad2D(thickness,nodeSide,"uniform","",length,nodeLength,"uniform","")
21
22r=r1+length*0.5
23Point1=[r,0,0]
24Point2=[.9994*r,.035*r,0]
25Point3=[.9986*r,.0523*r,0]
26Point4=[.9977*r,.077*r,0]
27
28PointCloud=[Point1,Point2,Point3,Point4]
29
30NurbsCurve=Mesher.node2Nurbs(PointCloud,3,4,nodeExtrusion)
31
32circF=Mesher.extrusionPath(section,NurbsCurve)
33circF=Mesher.Tetralizer(circF)
34
35circFin.AddPart(circF,material)
36circFin.Assemble()
37
38Step1=Solver.CreateStep("new")
39Step1.Time("SteadyState",[0,0.5,0.1])
40
41T_zero=0
42T_one=100
43h=100
44
45Step1.AddBC("Temperature",[circF.bottom],[T_one],"F")
46Step1.AddBC("Convection",[circF.left],[(T_zero,h)],"")
47Step1.AddBC("Convection",[circF.top],[(T_zero,h)],"")
48Step1.AddBC("Convection",[circF.right],[(T_zero,h)],"")
49
50circFin.Build([Step1])
51circFin.Solve()
52Temp=circFin.Result(Variable="Temperature", Set=circF.right)
53print("Temperature:" ,min(Temp))
Keywords: Heat Transfer, Cooling, Convection, Temperature, Heat Transfer Coefficient
Problem Reference: P. J. Schneider, Conduction Heat Transfer, 2nd Printing, AddisonWesley Publishing Co., Inc., Reading, MA, 1957, pg. 82, article 410.
Author: Ahmet Taha Yayman