Log in
Log in Simulate Now
Log in Simulate Now
Help > OnScale Solve Validation Cases > Validation Case: Heat Transfer Through Encased Rod

Validation Case: Heat Transfer Through Encased Rod

Problem statement

This thermal simulation is part of the series of validation cases performed using OnScale Solve. In this case, a copper rod encased in stainless steel has an imposed temperature at each side of the rod. The predicted temperature distribution across the copper rod from the simulation results is compared against the reference solution given by Lienhard’s A Heat Transfer Textbook [1].


The geometry is a 0.5 m long and 0.04 m wide copper rod encased in stainless steel as shown in fig. 1. The CAD file for this geometry is available as an Onshape document. The dimensions of the base sketch are shown in fig. 2.

Figure 1: Encased rod 3D CAD in meters
Figure 2: Encased rod dimensions of the base sketch in meters

Boundary Conditions

Temperature boundary conditions were imposed on the top and bottom stainless steel faces of the rod at 400 ºC and 100 ºC respectively. Note, all side walls are adiabatic (heat flux is zero).

Material Properties

The thermal conductivity material property is defined for the stainless steel and copper.

MaterialThermal Conductivity [~\text{W/(m$^2 \cdot$ C)}]
Stainless Steel18


OnScale Solve generated a second-order tetrahedral mesh. Five simulations are run with the mesh density ranging from very coarse to very fine.

Mesh density# of elements# of dofs
very coarse5,5689,641
very fine125,792186,168


Conservation of energy requires that the steady state heat flux through all three layer must be the same, therefore:

q = \left(k\frac{\Delta T}{L}\right)_\text{s.s} = \left(k\frac{\Delta T}{L}\right)_\text{cu}\qquad(1)

Where k is the thermal conductivity and L is the thickness of the layer. The total difference in temperature is given by,

\Delta T = \Delta T_\text{cu} + 2 \Delta T_\text{s.s}\qquad(2)

Subsitituting eq. 1 into eq. 2 gives, \Delta T = \Delta T_\text{cu}\left[1+2\cdot \frac{\left. \displaystyle \frac{k}{L}\right|_\text{cu}}{\left. \displaystyle \frac{k}{L}\right|_\text{ss}}\right]\qquad(3)

Solving eq. 3 for \Delta T_\text{cu} yields the temperature difference across the copper part.

The calculated temperatures and temperature difference from the reference solution are found in the table below.

Ref Name.Ref Value. [ºC]
\Delta T_\text{cu}13.846153846154

The absolute difference of the numerical solution with respect to the reference solution for all five mesh densities are in the table below. Note that the numerical solution can recover the reference solution (minus numerical accuracy) with any mesh size or element order. Note that Onscale Solve automatically switched from a direct solver to an iterative one in the fine mesh case to optimize memory usage. This explains the slighly larger absolute differences seen in the last row of the table.

Mesh density# of dofsAbs Diff. T_\text{cu,top} [ºC]Abs Diff. T_\text{cu,bot} [ºC]Abs Diff. \Delta T_\text{cu} [ºC]
very coarse9,6411.8 \times 10^{-7}-6.0 \times 10^{-8}-1.2 \times 10^{-7}
coarse12,0871.8 \times 10^{-7}-6.0 \times 10^{-8}-1.2 \times 10^{-7}
medium33,206-1.8 \times 10^{-7}-6.0 \times 10^{-8}-1.2 \times 10^{-7}
fine81,5462.4 \times 10^{-4}-2.9 \times 10^{-4}5.5 \times 10^{-5}
very fine186,1682.0 \times 10^{-4}2.0 \times 10^{-4}-3.8 \times 10^{-6}

Simulation Definition

The complete simulation definition is given below. The metadata tags for parts and faces correspond to the version of the CAD file that was imported from Onshape.

    Auto-generated simulation code.
import onscale as on
with on.Simulation('Simulation', 'Generated in SOLVE', version = '0.8.1') as sim:
    # General simulation settings
    # Define geometry
    geometry = on.CadFile('Assembly_1.x_t', unit="m")
    # Define meshing
    # Define material database and materials
    materials = on.CloudMaterials('onscale')
    structural_steel = materials['Structural steel']
    structural_steel.alias = 'Custom Structural steel 1'
    structural_steel.set('thermal_conductivity_x', 18.0)
    copper = materials['Copper']
    copper.alias = 'Custom Copper 1'
    copper.set('thermal_conductivity_x', 372.0)
    copper >> geometry.parts.search('MqfH5LB48Ur0JItJq', field='partIDTag')
    structural_steel >> geometry.parts.search('MCOFaFXCWpjJI5Tl5', field='partIDTag')
    structural_steel >> geometry.parts.search('MwY/f1Qk0nHzFKezb', field='partIDTag')
    # Define and apply loads
    temperature = on.loads.Temperature(400, alias='Temperature 1')
    temperature >> geometry.parts[0].faces[3]
    temperature_2 = on.loads.Temperature(100, alias='Temperature 2')
    temperature_2 >> geometry.parts[1].faces[2]
    # Define output variables
    field_sensor = on.sensors.FieldSensor(data="Temperature", alias='Global Sensor')
    field_sensor >> geometry
    probe_sensor = on.sensors.ProbeSensor(data="Temperature", alias='Sensor 1')
    probe_sensor >> geometry.parts[0].faces[3]
    probe_sensor_2 = on.sensors.ProbeSensor(data="Temperature", alias='Sensor 2')
    probe_sensor_2 >> geometry.parts[2].faces[0]
    probe_sensor_3 = on.sensors.ProbeSensor(data="Temperature", alias='Sensor 3')
    probe_sensor_3 >> geometry.parts[1].faces[0]
    probe_sensor_4 = on.sensors.ProbeSensor(data="Temperature", alias='Sensor 4')
    probe_sensor_4 >> geometry.parts[1].faces[2]
    # For OnScale System use only
    geometry.set('onshape_workspace_id', "9b687b1ff9a6c26074142d2a")
    geometry.set('onshape_doc_id', "8453f4033f6a2d2537b1ff4a")
    geometry.set('onshape_doc_microversion', "34e5b6e82382607a1d3b50dc")
    geometry.set('onshape_assembly_id', "bb1038c521c0cc9d20d09dbb")
    geometry.set('onshape_assembly_microversion', "e0625a2312b14792ad664ad1")


[1] J. H. L. IV and J. H. L. V, A heat transfer textbook. New York: Dover Publications, 2019.