Skip to content

Commit 2eda2de

Browse files
committed
Update mesh configuration in HeatConduction2DSpeedTest.html to use linear elements and increase dimensions; adjust solver method comments for clarity.
1 parent a74c6f5 commit 2eda2de

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

tutorials/HeatConduction2DSpeedTest.html

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,27 @@
4141
// Define mesh configuration
4242
model.setMeshConfig({
4343
meshDimension: "2D",
44-
elementOrder: "quadratic",
45-
numElementsX: 16,
46-
numElementsY: 8,
44+
elementOrder: "linear",
45+
numElementsX: 77,
46+
numElementsY: 39,
4747
maxX: 4,
4848
maxY: 2,
4949
});
5050

51+
// Calculate total number of elements
52+
const totalElements = model.meshConfig.numElementsX * model.meshConfig.numElementsY;
53+
console.log(`Total number of elements in mesh: ${totalElements}`);
54+
5155
// Set boundary conditions (matching what's in the frontal solver)
5256
model.addBoundaryCondition("0", ["constantTemp", 200]);
5357
model.addBoundaryCondition("1", ["symmetry"]);
5458
model.addBoundaryCondition("2", ["convection", 1, 20]);
5559
model.addBoundaryCondition("3", ["constantTemp", 200]);
5660

5761
// Set solver method
58-
// model.setSolverMethod("lusolve");
59-
model.setSolverMethod("frontal");
62+
model.setSolverMethod("lusolve");
63+
// model.setSolverMethod("jacobi");
64+
// model.setSolverMethod("frontal");
6065

6166
// Solve the problem and get the solution
6267
const { solutionVector, nodesCoordinates } = model.solve();

0 commit comments

Comments
 (0)