@@ -261,70 +261,6 @@ <h2 id="results"><a name="Results"></a>Results</h2>
261261 model . terminate ( ) ;
262262 }
263263 } ) ;
264-
265- window . addEventListener ( "resize" , async ( ) => {
266- if ( window . innerHeight > window . innerWidth ) {
267- document . getElementById ( "orientation-message" ) . style . display = "block" ;
268- document . getElementById ( "solutionPlot" ) . style . display = "none" ;
269- document . getElementById ( "loading" ) . style . display = "none" ;
270- } else {
271- document . getElementById ( "orientation-message" ) . style . display = "none" ;
272- document . getElementById ( "solutionPlot" ) . style . display = "block" ;
273-
274- // Show loading indicator
275- document . getElementById ( "loading" ) . style . display = "block" ;
276-
277- // Print FEAScript version
278- printVersion ( ) ;
279-
280- // Create a new FEAScriptWorker instance
281- const model = new FEAScriptWorker ( ) ;
282-
283- // Ensure the worker is ready
284- await model . ping ( ) ;
285-
286- // Set solver configuration
287- await model . setSolverConfig ( "solidHeatTransferScript" ) ;
288-
289- // Define mesh configuration
290- await model . setMeshConfig ( {
291- meshDimension : "2D" ,
292- elementOrder : "quadratic" ,
293- numElementsX : 8 ,
294- numElementsY : 4 ,
295- maxX : 4 ,
296- maxY : 2 ,
297- } ) ;
298-
299- // Define boundary conditions
300- await model . addBoundaryCondition ( "0" , [ "constantTemp" , 200 ] ) ;
301- await model . addBoundaryCondition ( "1" , [ "symmetry" ] ) ;
302- await model . addBoundaryCondition ( "2" , [ "convection" , 1 , 20 ] ) ;
303- await model . addBoundaryCondition ( "3" , [ "constantTemp" , 200 ] ) ;
304-
305- // Set solver method
306- await model . setSolverMethod ( "lusolve" ) ;
307-
308- // Solve the problem and get the solution
309- const { solutionVector, nodesCoordinates } = await model . solve ( ) ;
310-
311- // Hide loading indicator
312- document . getElementById ( "loading" ) . style . display = "none" ;
313-
314- // Plot the solution as a 2D contour plot
315- plotSolution (
316- solutionVector ,
317- nodesCoordinates ,
318- "solidHeatTransferScript" ,
319- "2D" ,
320- "contour" ,
321- "solutionPlot"
322- ) ;
323-
324- // Terminate the worker
325- model . terminate ( ) ;
326- }
327- } ) ;
328264 </ script >
329265
330266 < footer >
0 commit comments