![]() |
FEATool Multiphysics
v1.17.4
Finite Element Analysis Toolbox
|
This heat conduction tutorial example illustrates how to use data from a (text) file in an equation coefficient. The tabulated data here represents non-linear thermal conductivity as a function of temperature k = f(T). Where the conductivity curve is given as sin(pi/8)
to sin(3/4*pi)
for temperature values between 280
to 400
. In the data (text) file the first column represents temperature values and second the coefficient value:
280.0000 0.3827 281.2121 0.4009 ... 398.7879 0.7210 400.0000 0.7071
The coefficient is implemented and called from the toolbox using the finterpn function, which also supports interpolation in higher n dimensions (as well as csv and mat file formats).
This model is available as an automated tutorial by selecting Model Examples and Tutorials... > Heat Transfer > Heat Conduction with Tabulated Thermal Conductivity from the File menu. Or alternatively, follow the step-by-step instructions below. Note that the CFDTool interface differ slightly from the FEATool Multiphysics instructions described in the following.
The simple geometry consists of 3 x 1
rectangle, and a mesh with a 0.05
grid cell diameter.
3
into the xmax edit field.0.05
into the Grid Size edit field.k_interp
(to be defined later), and the initial temperature to 300
.Now add an equation expression named k_interp
, with the value finterpn('heat_transfer8_data.txt',T)
. Where the file heat_transfer8_data.txt
contains the tabulated data data = [linspace(280,420)', sin(linspace(pi/8,3/4*pi,100))']
to be interpolated. When evaluated this coefficient will call the finterpn function which reads the data from the file, interpolates, and returns the result.
data = [linspace(280,420)', sin(linspace(pi/8,3/4*pi,100))']; save('heat_transfer8_data.txt', '-ascii', 'data')
Enter k_interp
into row and column (1, 1), and finterpn('heat_transfer8_data.txt',T)
into row and column (1, 2) of the table.
In boundary mode, first set the top and bottom boundaries to Thermal insulation/symmetry
.
The right boundary features a negative heat flux -10
.
-10
into the Inward heat flux edit field.And the left boundary a fixed temperature of 400
.
400
into the Temperature edit field.In the Solver Settings dialog box, select the Time-Dependent
solver, a time step of 0.5
, and 100
maximum time steps.
0.5
into the Time step size edit field.100
into the Duration of time-dependent simulation (maximum time) edit field.The tstop parameters will stop the simulation if the normed differences between time-steps is 1e-4
or lower, assuming a stationary state has been reached.
1e-4
into the Stopping criteria for solution differences (changes) between time steps edit field.Note that the solver stopped after 24 seconds, as the tstop condition has been fulfilled.
Open the Postprocessing Settings dialog box and plot the thermal conductivity k_interp
to see how it varies with temperature.
k_interp
into the Surface plot expression edit field.Also try to animate it (Post menu > Animate/Playback Solution...) to see how it varies with time.
The heat conduction with tabulated thermal conductivity heat transfer model has now been completed and can be saved as a binary (.fea) model file, or exported as a programmable MATLAB m-script text file, or GUI script (.fes) file.