|
2 | 2 |
|
3 | 3 | ## Heat Conduction in a 2D Fin |
4 | 4 |
|
5 | | -This example demonstrates solving a steady-state heat transfer problem in a 2D rectangular domain using the FEAScript library. The problem represents a typical cooling fin scenario, where the objective is to model heat conduction and understand temperature distribution under specific boundary conditions. |
| 5 | +This example demonstrates a typical cooling fin scenario. There are two Node.js implementations: |
6 | 6 |
|
7 | | -### Available Versions |
| 7 | +#### i. Standard Version (`heatConduction2DFin.js`) |
8 | 8 |
|
9 | | -This example is available in two Node.js implementations: |
| 9 | +Basic implementation using the FEAScriptModel class |
10 | 10 |
|
11 | | -1. **Standard Version** (`heatConduction2DFin.js`) - Basic implementation using the FEAScriptModel class |
12 | | -2. **Gmsh Version** (`heatConduction2DFinGmsh.js`) - Implementation using an unstructured mesh generated by [Gmsh](https://gmsh.info/) (the mesh file, `rect_quad_unstruct.msh`, is also located in the current directory) |
| 11 | +#### ii. Gmsh Version (`heatConduction2DFinGmsh.js`) |
13 | 12 |
|
14 | | -### Instructions |
15 | | - |
16 | | -The examples require the `feascript` npm package and its peer dependencies (`mathjs`). They import FEAScript directly from the npm package and run the simulations in a Node.js environment, making them suitable for server-side applications or local development without a browser (no WEB APIs here). To run the examples, follow these instructions: |
17 | | - |
18 | | -1. **Create package.json with ES module support:** |
19 | | - |
20 | | - ```bash |
21 | | - echo '{"type":"module"}' > package.json |
22 | | - ``` |
23 | | - |
24 | | -2. **Install dependencies:** |
25 | | - |
26 | | - ```bash |
27 | | - npm install feascript mathjs |
28 | | - ``` |
29 | | - |
30 | | -3. **Run the desired version:** |
31 | | - |
32 | | - ```bash |
33 | | - node HeatConduction2DFin.js |
34 | | - ``` |
35 | | - |
36 | | - or |
37 | | - |
38 | | - ```bash |
39 | | - node HeatConduction2DFinGmsh.js |
40 | | - ``` |
41 | | - |
42 | | -**Note:** For detailed information on the model setup, boundary conditions, and simulation results, refer to the comments in the JavaScript files and the corresponding standard [tutorial](https://feascript.com/tutorials/HeatConduction2DFin.html) as well as to the Gmsh mesh [tutorial](https://feascript.com/tutorials/HeatConduction2DFinGmsh.html). |
| 13 | +Implementation using an unstructured mesh generated by [Gmsh](https://gmsh.info/) (the mesh file, `rect_quad_unstruct.msh`, is also located in the current directory). For detailed information on the model setup refer to the corresponding [tutorial](https://feascript.com/tutorials/HeatConduction2DFin.html) in the FEAScript website. |
0 commit comments