# TA5: Heat Transfer Along Composite Wall

## 1.PROBLEM DESCRIPTION

There is a furnace wall consist of two layers which are fire brick and insulating brick. The cross-sectional area and length of layers are known. The convection coefficients and ambient temperatures are known for both inside and outside of furnace. Max and min temperature values at the wall will be examined. We will define two different material and two convection boundary condition for both end of the wall. Then we will solve the problem for steady-state. Properties and BC Value

Material Properties

Geometric Properties

Boundary Conditions

Fire Brick: k_fb = 0.0002222 Btu/s-ft-°F

Fire Brick: L_fb = 9 in = 9*0.0833333 ft

T_i = 3000°F , h_i = 0.003333 #btu/s*(ft^2)*F

Insulating Brick: k_ib = 0.00002778 Btu/s-ft-°F

Insulating Brick: L_ib = 5 in = 5*0.0833333 ft

T_o = 80°F , h_o = 0.0005556 #btu/s*(ft^2)*F

## 2.MODEL SETUP AND SOLUTION

The following sections describe the setup and solution steps for this tutorial:

2.1.Preparation

2.2.General Settings

2.3.Geometry/Mesh

2.4.Material

2.5.Boundary Conditions

2.6.Solution

2.7.Processing

2.8.Post-Processing

### 2.1. Preparation

To run this tutorial;

2.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’s name of Analysis “TempDistCompWall”)

3.You can see the project page on your Personel Project Part.

4.Our Screen is a blank python page without any script. We will be doing a tutorial by using Simularge’s Library.   5.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 one of the most significant factor that affect to result. Therefore,we should define it easily to the problem. I will explain below how to use and write Material Library elaborately. Furtherless, The Libraries that has to imported to 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.

1.Defined name of Analysis as “TempDistCompWall”

```1TempDistCompWall= Solver.Analysis(Verbose=True)
```

2.Calculix is used on solid mechanics problems in TwinAPI. Hence, we are defining Calculix to run this analysis.

```1TempDistCompWall.SetSolver("Calculix")
```

Analysis is defined successfully into TwinAPI System. ### 2.3. Geometry/Mesh

There is two different options to define geometry on TwinAPI System. Create own geometry on TwinAPI by using Mesher Library that belong to Simularge’s libraries or You can import own CAD Geometry.

``` 1    LengthX=1*0.0833333 #ft
2    LengthY=1*0.0833333 #ft
3    LengthZ_1=9*0.0833333 #ft L_fb
4    LengthZ_2=5*0.0833333 #ft L_ib
5    NodeX=3
6    NodeY=3
7    NodeZ_1=9
8    NodeZ_2=5
9    Trans_X=0
10    Trans_Y=0
11    Trans_Z_1=LengthZ_2
12    Trans_Z_2=0
13    directionX=''
14    directionY=''
15    directionZ=''
16    typeX='uniform'
17    typeY='uniform'
18    typeZ='uniform'
19
20
21    box1=Mesher.box(LengthX,NodeX,typeX,directionX,LengthY,NodeY,typeY,directionY, LengthZ_1,NodeZ_1,typeZ,directionZ, Trans_X,Trans_Y,Trans_Z_1)
22    box2=Mesher.box(LengthX,NodeX,typeX,directionX,LengthY,NodeY,typeY,directionY, LengthZ_2,NodeZ_2,typeZ,directionZ, Trans_X,Trans_Y,Trans_Z_2)
```

With the script given above, you can create two different box geometry and mesh.

LengthX= Length of X Direction

NodeX= Node Number of X Direction

Trans_X= Translation of X Direction

directionX= Aspect

typeX= Mesh type of X direction.

All of given above is valid for Y and Z Direction.

We create two box geometry that name is “box1” and “box2” from given inputs.

Note

We told you that you can also create these geometries import 3D CAD file apart from using MESHER. Code should be written like this;

```1 Box1=Mesher.MeshFromCad('Box.step',20000,1,1e4,SurfaceExtract=True)
```

If we are not sure how created geometry and want to see geometry before starting analysis;

Click Preview Button  ### 2.4. Material

Before we started,There are lots of parameters to impact to result of problem. We are going to explain which parameters are requirement for problem first. Later, We would give an parameters instances which can be used.

If your material is isotropic thats means all properties is equal with different direction. However Anisotropic Material Properties is not the same value with different direction. Only Thermal Conductivitiy of material will impact amount of heat transfer in this problem.

We call the Material class in the Material Manager library and name two different material called “Fire Brick” and “insulatingBrick”. At the same time, We give the information that materials behave as a metal by typing “metal”.

We have written the conductivity properties in the X direction below. It will be enough because my material is isotropic.

``` 1 k_fb=0.0002222 #btu/s*ft*F
2 k_ib=0.00002778 #btu/s*ft*F
3
4 material_1 = MaterialManager.Material('FireBrick','metal')
5
6 material_1.SetThermalData('conductivityX',k_fb,units['btu/hrftf'])
7
8 material_2 = MaterialManager.Material('insulatingBrick','metal')
9
10 material_2.SetThermalData('conductivityX',k_ib,units['btu/hrftf'])
```

We will make an example to understand better what can be used parameters in Material Library.

```1 material.SetThermalData("specificHeat",7,units["j/kgk"])
2
3 material.SetThermalData("expansionCoefficient",10,units["1/k"])
4
5 material.SetGeneralData("density",5,units["kg/m3"])
```

After defining the materials into our system, we should combine geometries define above and materials using Addpart method. And with the Assemble code we will combine these geometries.

```1TempDistCompWall.AddPart(box1,material_1)
3TempDistCompWall.Assemble()
```

After creating the geometry, thermal contact is defined between the walls as follows.

```1thermalContact=Solver.Interaction.Contact()
2
6
```

### 2.5. Boundary Conditions

After adding material and geometry to the analysis, we are ready to set the boundary conditions.

1.First of all, we need to call a method to create a step. Step1’s name can be change.

```1Step1=Solver.CreateStep("new")
```

2.We need to choose whether this step is computed depending on time or not.Explained problem is Steady-State. 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])
```

3.The type of boundary condition required for the problem is convection. The ambient temperatures and heat transfer coefficient values are required to define boundary conditions.

```1h_i=0.003333 #btu/s*(ft^2)*F
2h_o=0.0005556 #btu/s*(ft^2)*F
3T_i=3000 #°F
4T_o=80 #°F
5
```

### 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;

```1TempDistCompWall.Build([Step1])
```

Now,Problem is ready to be solved.

```1TempDistCompWall.Solve()
```

Before going to be PostProcess Stage, we can review what we have done.  ### 2.7. Processing

1. Click Run Button and gears rotate on right side while problem is being solved. ### 2.8. Post-Processing

2.After Problem solved;

We can see result;

Click Result Button  3.If we want to see detailed result about problem; Output Tab shows us the results that we desire to see. If Print=False,We couldn’t see anything in the Output section.

```1print(TempDistCompWall.Result(Variable='Temperature', Loc=[LengthX/2,LengthY/2,0])) #box2 back
2print(TempDistCompWall.Result(Variable='Temperature', Loc=[LengthX/2,LengthY/2,LengthZ_1+LengthZ_2])) #box1 front
3
4TempDistCompWall.Result(Print=True)
``` Log tab tells us respectively what happened in analysis.

Error tab shows us if there is an error in script, It tells us what the error is and where it is.

Files tab can upload the files to be imported from the Upload command and check them from Files.

Graph tab shows us analysis result can be viewed graphically. (It will be shown in other examples.)

## 3.SUMMARY

In this tutorial, we learned how to set up and solve a problem involving two different material and natural convection on TwinAPI. We also learned how to perform postprocessing in an engineering manner.

With table given below shows that comparasion of Ansys Mechanical Result and TwinAPI result.

Comparasion

SOLID MODEL

Target

ANSYS

Error(%)

SIMULARGE-TwinAPI

Error(%)

Min Temperature (˚F)

336

336.68

0.202

336.695

0.2068

Max Temperature (˚F)

2957

2957.2

0.007

2957.21

0.0071

## 4. SOURCE CODE

``` 1from TwinAPI.SimulationTools import Solver
2from TwinAPI.SimulationTools import Mesher
3import numpy as np
4from TwinAPI.MaterialLibrary import MaterialManager
5from TwinAPI.MaterialLibrary.Units import units
6
7TempDistCompWall= Solver.Analysis(Verbose=True)
8TempDistCompWall.SetSolver('Calculix')
9LengthX=1*0.0833333 #ft
10LengthY=1*0.0833333 #ft
11LengthZ_1=9*0.0833333 #ft L_fb
12LengthZ_2=5*0.0833333 #ft L_ib
13NodeX=3
14NodeY=3
15NodeZ_1=9
16NodeZ_2=5
17Trans_X=0
18Trans_Y=0
19Trans_Z_1=LengthZ_2
20Trans_Z_2=0
21directionX=''
22directionY=''
23directionZ=''
24typeX='uniform'
25typeY='uniform'
26typeZ='uniform'
27
28box1=Mesher.box(LengthX,NodeX,typeX,directionX,LengthY,NodeY,typeY,directionY, LengthZ_1,NodeZ_1,typeZ,directionZ, Trans_X,Trans_Y,Trans_Z_1)
29box2=Mesher.box(LengthX,NodeX,typeX,directionX,LengthY,NodeY,typeY,directionY, LengthZ_2,NodeZ_2,typeZ,directionZ, Trans_X,Trans_Y,Trans_Z_2)
30
31material_1 = 'FireBrick'
32material_2 = 'InsulatingBrick'
33
36TempDistCompWall.Assemble()
37
38thermalContact=Solver.Interaction.Contact()
42
44
45Step1=Solver.CreateStep('new')
47
48h_i=0.003333 #btu/(s*(ft^2)*F)
49h_o=0.0005556 #btu/(s*(ft^2)*F)
50T_i=3000 #°F
51T_o=80 #°F
56
57TempDistCompWall.Build([Step1])
58TempDistCompWall.Solve()
59
60results1 = TempDistCompWall.Result(Variable='Temperature', Set=box1.All)
61results2 = TempDistCompWall.Result(Variable='Temperature', Set=box2.All)
62min1 = min(results1)
63min2 = min(results2)
64max1 = max(results1)
65max2 = max(results2)
66print("Min Temperature (˚F): ", min(min1, min2))
67print("Max Temperature (˚F): ", max(max1, max2))
```

Keywords: Heat Transfer,Cooling,Convection,Temperature,Heat Transfer Coefficient

Problem Reference:F. Kreith, Principles of Heat Transfer, Harper and Row Publisher, 3rd Edition, 1976, Example 2-5, pg. 39