Skip to content

Commit b063822

Browse files
committed
Update Heat Conduction 1D Wall tutorial content and fix link to API
1 parent d955b27 commit b063822

File tree

2 files changed

+39
-17
lines changed

2 files changed

+39
-17
lines changed

index.html

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -231,11 +231,8 @@ <h2 id="tutorials"><a name="Tutorials"></a>Tutorials</h2>
231231
</p>
232232
<ul>
233233
<li>
234-
Heat conduction through wall (API)
235-
<i
236-
><a href="https://github.com/FEAScript/FEAScript-core/issues/4" target="_blank"
237-
>(under development)</a
238-
></i
234+
<a href="https://feascript.com/tutorials/HeatConduction1DWall.html" target="_blank"
235+
>Heat conduction through wall (API)</a
239236
>
240237
</li>
241238
<li>

tutorials/HeatConduction1DWall.html

Lines changed: 37 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,39 @@ <h2 id="mathematicalformulation"><a name="Mathematical formulation"></a>Mathemat
103103
<img src="../assets/HeatConduction1DWall.png" width="100" />
104104

105105
<p>
106-
The above schematic illustrates the problem domain and outlines the associated boundary conditions. In
107-
particular, a convection boundary condition, implemented as Robin type, is applied at the inner side of
108-
the wall (\(x = 0\)). The latter is expressed as \(\frac{dT}{dx}|_{x=0}=-{\frac{h}{k}}(T-T_{in})\),
109-
where \(h\) is the heat transfer coefficient, \(k\) the thermal conductivity and \(T_{in}\) is the
110-
internal temperature. We assume here that \({\frac{h}{k}}\) = 1 m<sup>-1</sup> and \(T_{in}\) = 25
111-
&deg;C. At the outer side of the wall (\(x = W\), where \(W\) = 0.15 m, is the width of the wall), we
112-
apply a constant temperature (\(T_0\) = 5 &deg;C) boundary condition, implemented as Dirichlet type in
113-
the finite element code.
106+
The above schematic illustrates the problem domain and outlines the associated boundary conditions. Our
107+
objective is to determine the temperature distribution within the wall itself. In this problem, a
108+
convection boundary condition, implemented as Robin type, is applied at the inner side of the wall (\(x
109+
= 0\)). The latter is expressed as \(\frac{dT}{dx}|_{x=0}=-{\frac{h}{k}}(T-T_{in})\), where \(h\) is the
110+
heat transfer coefficient, \(k\) the thermal conductivity, and \(T_{in}\) is the internal temperature of
111+
the house (room temperature). We assume here that \({\frac{h}{k}}\) = 1 m<sup>-1</sup> and \(T_{in}\) =
112+
25 &deg;C. At the outer side of the wall (\(x = W\), where \(W\) = 0.15 m, is the width of the wall), we
113+
apply a constant temperature (\(T_0\) = 5 &deg;C) boundary condition, representing the outdoor
114+
temperature, implemented as Dirichlet type in the finite element code.
115+
</p>
116+
117+
<p>
118+
This problem has an analytical solution. Since the governing equation is \(\frac{d^2T}{dx^2} = 0\),
119+
the general solution is a linear function \(T(x) = Ax + B\), where \(A\) and \(B\) are constants
120+
determined by the boundary conditions:
121+
</p>
122+
<ol>
123+
<li>
124+
At \(x=0\): \(\frac{dT}{dx} = -\frac{h}{k}(T-T_{in})\)
125+
</li>
126+
<li>
127+
At \(x=W\): \(T(W) = T_0\)
128+
</li>
129+
</ol>
130+
<p>
131+
Solving these equations for our specific values (\(\frac{h}{k} = 1\) m<sup>-1</sup>, \(T_{in} = 25\) &deg;C,
132+
\(T_0 = 5\) &deg;C, and \(W = 0.15\) m), we get the analytical solution:
133+
</p>
134+
<p>
135+
\(T(x) \approx 23.53x + 1.47\)
136+
</p>
137+
<p>
138+
The numerical solution using finite elements should closely match this analytical result.
114139
</p>
115140

116141
<h2 id="solvingwithfeascript"><a name="Solving with FEAScript"></a>Solving with FEAScript</h2>
@@ -228,8 +253,8 @@ <h2 id="results"><a name="Results"></a>Results</h2>
228253
});
229254

230255
// Define boundary conditions
231-
//model.addBoundaryCondition("0", ["convection", 1, 25]);
232-
model.addBoundaryCondition("0", ["constantTemp", 25]); // Temporary BC for testing
256+
model.addBoundaryCondition("0", ["convection", 1, 25]);
257+
//model.addBoundaryCondition("0", ["constantTemp", 25]); // Temporary BC for testing
233258
model.addBoundaryCondition("1", ["constantTemp", 5]);
234259

235260
// Set solver method
@@ -276,8 +301,8 @@ <h2 id="results"><a name="Results"></a>Results</h2>
276301
});
277302

278303
// Define boundary conditions
279-
//model.addBoundaryCondition("0", ["convection", 1, 25]);
280-
model.addBoundaryCondition("0", ["constantTemp", 25]); // Temporary BC for testing
304+
model.addBoundaryCondition("0", ["convection", 1, 25]);
305+
//model.addBoundaryCondition("0", ["constantTemp", 25]); // Temporary BC for testing
281306
model.addBoundaryCondition("1", ["constantTemp", 5]);
282307

283308
// Set solver method

0 commit comments

Comments
 (0)