-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
969 lines (931 loc) · 36.3 KB
/
index.html
File metadata and controls
969 lines (931 loc) · 36.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
<!doctype html>
<!--
════════════════════════════════════════════════════════════════
FEAScript Website
Lightweight Finite Element Simulation in JavaScript
Version: 0.2.0 | https://feascript.com
CC BY 4.0 License © 2023–2026 FEAScript
════════════════════════════════════════════════════════════════
-->
<html>
<head>
<title>FEAScript Finite Element Simulation Library</title>
<link rel="icon" type="image/x-icon" href="./assets/favicon.ico" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta
name="description"
content="FEAScript is a lightweight, open-source JavaScript library for finite element simulations in both browser-based and server-side environments for physics, engineering and computational mechanics."
/>
<meta
name="keywords"
content="finite elements, fem, galerkin, cfd, computational mechanics, javascript"
/>
<meta name="viewport" content="width=device-width" />
<!-- Link to the CSS files -->
<link href="feascript-website.css" rel="stylesheet" type="text/css" />
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet" />
<!-- Import the run_prettify.js library for JavaScript code coloring *** Deprecated library *** -->
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>
</head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-1JPK0KLEC9"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag("js", new Date());
gtag("config", "G-1JPK0KLEC9");
</script>
<body>
<h1 class="top">
<a href="index.html">
<img
src="./assets/feascript-logo.png"
alt="FEAScript Logo"
id="responsive-logo"
style="vertical-align: middle"
/>
</a>
<div class="social-icons-top-right">
<ul>
<li>
<a href="https://blog.feascript.com/" title="FEAScript blog">
<img
src="./assets/blog-icon-feascript.png"
alt="Blog Icon"
style="height: 18px; vertical-align: middle"
/>
</a>
</li>
<li>
<a href="https://www.youtube.com/@FEAScript" title="FEAScript YouTube">
<img
src="./assets/youtube-icon-feascript.svg"
alt="YouTube Icon"
style="height: 18px; vertical-align: middle"
/>
</a>
</li>
<li>
<a href="https://www.linkedin.com/company/feascript/" title="FEAScript LinkedIn">
<img
src="./assets/linkedin-icon-feascript.png"
alt="LinkedIn Icon"
style="height: 18px; vertical-align: middle"
/>
</a>
</li>
<li>
<a href="https://discord.gg/3DVjNcuW4f" title="FEAScript Discord">
<img
src="./assets/discord-icon-feascript.png"
alt="Discord Icon"
style="height: 18px; vertical-align: middle"
/>
</a>
</li>
<li>
<a href="https://github.com/FEAScript/FEAScript-core" title="FEAScript GitHub">
<img
src="./assets/github-icon-feascript.png"
alt="GitHub Icon"
style="height: 20px; vertical-align: middle"
/>
<span
id="github-stars"
style="
font-size: 0.9em;
margin-left: 5px;
vertical-align: middle;
border: 1px solid #ddd;
border-radius: 4px;
padding: 1px 5px;
background-color: #f8f8f8;
"
></span>
</a>
</li>
<li>
<button id="hamburger" aria-label="Menu">
<span></span>
<span></span>
<span></span>
</button>
</li>
</ul>
</div>
<div id="mobile-menu" aria-hidden="true">
<ul>
<li><a href="#whyusefeascript">Why Use FEAScript</a></li>
<li><a href="#howtousefeascript">How to Use FEAScript</a></li>
<li><a href="#features">Features</a></li>
<li><a href="#tutorials">Tutorials</a></li>
<li><a href="#documentation">Documentation</a></li>
<li><a href="#licensing">Licensing</a></li>
</ul>
</div>
</h1>
<div id="banner">
<img
src="./assets/cold-plate-logo-results-and-mesh.png"
alt="Results of heat conduction around the FEAScript logo"
loading="lazy"
/>
<p class="image-caption">
Heat conduction around the FEAScript logo (mesh generated by Gmsh, solved with FEAScript)
</p>
</div>
<h1>A JavaScript Finite Element Simulation Library</h1>
<ul id="menu">
<li><a href="#whyusefeascript">Why Use FEAScript</a></li>
<li><a href="#howtousefeascript">How to Use FEAScript</a></li>
<li><a href="#features">Features</a></li>
<li><a href="#tutorials">Tutorials</a></li>
<li><a href="#documentation">Documentation</a></li>
<li><a href="#licensing">Licensing</a></li>
</ul>
<script>
document.addEventListener("DOMContentLoaded", () => {
const hamburger = document.getElementById("hamburger");
const mobileMenu = document.getElementById("mobile-menu");
// Keep ARIA state in sync
hamburger.setAttribute("aria-expanded", "false");
hamburger.addEventListener("click", (ev) => {
ev.stopPropagation();
const opened = mobileMenu.classList.toggle("open");
hamburger.setAttribute("aria-expanded", opened ? "true" : "false");
});
// Close menu when clicking any link inside
document.querySelectorAll("#mobile-menu a").forEach((link) => {
link.addEventListener("click", () => {
mobileMenu.classList.remove("open");
hamburger.setAttribute("aria-expanded", "false");
});
});
// Close menu if clicking outside
document.addEventListener("click", (ev) => {
if (!mobileMenu.contains(ev.target) && !hamburger.contains(ev.target)) {
if (mobileMenu.classList.contains("open")) {
mobileMenu.classList.remove("open");
hamburger.setAttribute("aria-expanded", "false");
}
}
});
});
</script>
<div class="highlight-container">
<p>
<strong
><img
src="./assets/favicon.ico"
alt="FEAScript Icon"
style="vertical-align: middle; margin-right: 5px; height: 1em; width: auto"
/>FEAScript is a lightweight, open-source finite element simulation library developed in
JavaScript</strong
>. <br />It empowers users to perform simulations for physics and engineering problems in both
browser-based and server-side environments. FEAScript serves as an excellent tool for building
interactive web applications and facilitates hands-on learning of computational mechanics. <br />🎯
<strong
>Our goal is to democratize finite element analysis by making simulation capabilities accessible to
everyone, everywhere.</strong
>
</p>
</div>
<div style="margin-top: 1em"></div>
<p class="blue-label" style="margin-bottom: 0">INDUSTRY CASE STUDY</p>
<div class="blue-box" style="margin-top: 5px">
<p style="display: flex; align-items: center">
<img
src="assets/better-building-logo.png"
alt="BetterBuilding Logo"
style="height: 30px; margin-right: 10px; transform: translateY(-1px)"
/>
<span>
<a href="https://betterbuilding.io/">Better Building</a> leverages FEAScript to power an online
<a
href="https://docs.betterbuilding.io/sign-up-and-plans/news-and-updates/2025/introducing-our-free-heat-transfer-simulator"
>
Heat Transfer Simulator</a
>
for architects and engineers.
</span>
</p>
</div>
<div style="margin-top: 0.5em"></div>
<h2 id="whyusefeascript"><a name="Why Use FEAScript"></a>Why Use FEAScript</h2>
<ul>
<li>
<strong>No installation:</strong> Engineers hate installs and FEAScript runs directly in the browser
without any installation.
</li>
<li>
<strong>Portability:</strong> Works everywhere JavaScript runs (Windows, macOS and Linux systems that
use x64, IA-32, or ARM processors).
</li>
<li>
<strong>Open-source:</strong> The core library of FEAScript is open-source, removing the high cost
barrier of traditional FEA software.
</li>
</ul>
<div style="margin-top: 0.5em"></div>
<h2 id="howtousefeascript"><a name="Getting Started"></a>How to Use FEAScript</h2>
<p>
You can run simulations with FEAScript by calling its functions from JavaScript (the FEAScript API). The
API offers full programmatic control and works across multiple environments, including the browser
(simple HTML pages and online JavaScript playgrounds, e.g.
<a href="https://codepen.io/"
>CodePen<img
src="https://upload.wikimedia.org/wikipedia/commons/4/44/Icon_External_Link.svg"
alt="External Link Icon"
style="width: 16px; height: 16px; vertical-align: middle; margin-left: 2px; margin-bottom: 4px"
/></a>
and
<a href="https://scribbler.live/"
>Scribbler<img
src="https://upload.wikimedia.org/wikipedia/commons/4/44/Icon_External_Link.svg"
alt="External Link Icon"
style="
width: 16px;
height: 16px;
vertical-align: middle;
margin-left: 2px;
margin-bottom: 4px;
" /></a
>) and server-side runtimes such as
<a href="https://nodejs.org/en"
>Node.js<img
src="https://upload.wikimedia.org/wikipedia/commons/4/44/Icon_External_Link.svg"
alt="External Link Icon"
style="
width: 16px;
height: 16px;
vertical-align: middle;
margin-left: 2px;
margin-bottom: 4px;
" /></a
>.
</p>
<div class="highlight-container" style="margin-bottom: 1.5em">
<strong>Current stable release</strong>:
<a href="https://github.com/FEAScript/FEAScript-core/releases"
>0.2.0<img
src="./assets/github-icon-feascript-black.png"
alt="GitHub Icon"
style="width: 16px; height: 16px; vertical-align: middle; margin-left: 2px; margin-bottom: 4px"
/></a>
(also on
<a href="https://www.npmjs.com/package/feascript"
>npm<img
src="https://upload.wikimedia.org/wikipedia/commons/4/44/Icon_External_Link.svg"
alt="External Link Icon"
style="
width: 16px;
height: 16px;
vertical-align: middle;
margin-left: 2px;
margin-bottom: 4px;
" /></a
>)
<div style="height: 0.5em"></div>
💖 If you find FEAScript useful, please consider supporting its development:
<a href="https://github.com/sponsors/FEAScript">GitHub Sponsors</a> •
<a href="https://liberapay.com/FEAScript/donate">Liberapay</a>
</div>
<p class="blue-label" style="margin-bottom: 0">QUICK START</p>
<div class="blue-box" style="margin-top: 5px">
<p>
The example below demonstrates a simulation workflow: steady-state heat conduction in a 2D rectangular
fin with a circular hole, solved using a Gmsh-generated mesh. Create an HTML file with the code below
to run the simulation. See the <a href="#tutorials">tutorials section</a> for more examples.
</p>
</div>
<div class="code-block-wrapper">
<button class="copy-code-btn" id="copy-qs-btn" title="Copy code" onclick="copyQuickstartCode()">
<svg
xmlns="http://www.w3.org/2000/svg"
width="15"
height="15"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
aria-hidden="true"
>
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
</svg>
<span>Copy</span>
</button>
<div class="quickstart-overlay-actions">
<a
href="https://www.youtube.com/watch?v=35_aqDGPq50"
class="btn-video-quickstart"
target="_blank"
rel="noopener"
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
aria-hidden="true"
>
<rect x="2" y="5" width="20" height="14" rx="4" ry="4"></rect>
<polygon points="10 9 16 12 10 15 10 9"></polygon>
</svg>
Watch tutorial<img
src="https://upload.wikimedia.org/wikipedia/commons/4/44/Icon_External_Link.svg"
alt="External Link Icon"
style="width: 16px; height: 16px; vertical-align: middle; margin-left: 2px"
/>
</a>
<a
href="https://codepen.io/FEAScript/pen/ByzVveQ"
class="btn-codepen btn-codepen-quickstart"
target="_blank"
rel="noopener"
>
<svg
xmlns="http://www.w3.org/2000/svg"
width="16"
height="16"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
aria-hidden="true"
>
<polygon points="5 3 19 12 5 21 5 3"></polygon>
</svg>
Run on CodePen<img
src="https://upload.wikimedia.org/wikipedia/commons/4/44/Icon_External_Link.svg"
alt="External Link Icon"
style="width: 16px; height: 16px; vertical-align: middle; margin-left: 2px"
/>
</a>
</div>
<pre class="prettyprint" id="quickstart-code">
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Heat Conduction in a 2D Fin with a Hole</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mathjs/11.12.0/math.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/plotly.js/2.35.3/plotly.min.js"></script>
</head>
<body>
<div id="resultsCanvas"></div>
<script type="module">
import {FEAScriptModel, importGmshQuadTri, plotInterpolatedSolution} from "https://core.feascript.com/dist/feascript.esm.js";
window.addEventListener("DOMContentLoaded", async () => {
// Fetch mesh from GitHub Gist (swap the URL for any other hosted .msh file)
const response = await fetch(
"https://gist.githubusercontent.com/nikoscham/0c5a78922a16111ceef42de54fc631ea/raw/aeadcd2808f5531fd0ca1ca16d198f7d1e7f8e96/rect_with_hole.msh"
);
const meshFile = new File([await response.text()], "rect_with_hole.msh");
const model = new FEAScriptModel();
model.setModelConfig("heatConductionScript");
model.setMeshConfig({
parsedMesh: await importGmshQuadTri(meshFile),
meshDimension: "2D",
elementOrder: "quadratic"
});
// Boundary conditions (Gmsh physical group tag - 1)
model.addBoundaryCondition("0", ["constantTemp", 200]); // Bottom
model.addBoundaryCondition("1", ["constantTemp", 200]); // Right
model.addBoundaryCondition("2", ["convection", 1, 20]); // Top
model.addBoundaryCondition("3", ["symmetry"]); // Left
model.addBoundaryCondition("4", ["convection", 1, 20]); // Hole surface
model.setSolverMethod("lusolve");
const result = model.solve();
plotInterpolatedSolution(model, result, "contour", "resultsCanvas");
});
</script>
</body>
</html></pre
>
</div>
<!-- <div class="quickstart-actions">
<p class="quickstart-note">
💡 The mesh is hosted on
<a href="https://gist.github.com/nikoscham/0c5a78922a16111ceef42de54fc631ea">GitHub Gist</a> — fork it
and replace the URL with your own <code>.msh</code> file to simulate a different geometry.
</p>
</div> -->
<script>
function copyQuickstartCode() {
const pre = document.getElementById("quickstart-code");
const btn = document.getElementById("copy-qs-btn");
navigator.clipboard.writeText(pre.innerText.trim()).then(() => {
btn.classList.add("copied");
btn.querySelector("span").textContent = "Copied";
setTimeout(() => {
btn.classList.remove("copied");
btn.querySelector("span").textContent = "Copy";
}, 2000);
});
}
</script>
<p class="notice-dev">
🚧
<strong>FEAScript is currently under heavy development with new features being added regularly</strong>.
<br />Interested in contributing? Check out our
<a href="https://github.com/FEAScript/FEAScript-core/blob/main/CONTRIBUTING.md"
>contribution guidelines</a
>
to get started.
</p>
<h2 id="features"><a name="Features"></a>Features</h2>
<p>The following list highlights key FEAScript features:</p>
<ul class="features-list">
<li>
🧠 <strong>Physical Modeling</strong>
<ul>
<li>Creeping (Stokes) flow</li>
<li>Front propagation</li>
<li>Heat conduction</li>
</ul>
</li>
<li>
📐 <strong>Geometry and Meshing</strong>
<ul>
<li>Simple mesh generation (1D & 2D domains)</li>
<li>
Unstructured mesh import from
<a href="https://gmsh.info/"
>Gmsh<img
src="https://upload.wikimedia.org/wikipedia/commons/4/44/Icon_External_Link.svg"
alt="External Link Icon"
style="
width: 16px;
height: 16px;
vertical-align: middle;
margin-left: 2px;
margin-bottom: 4px;
"
/></a>
(<code>.msh</code> file format)
</li>
</ul>
</li>
<li>
⚙️ <strong>Numerical Methods</strong>
<ul>
<li>General form PDE</li>
<li>
Linear system solvers:
<ul>
<li>Frontal</li>
<li>Jacobi (CPU & WebGPU versions)</li>
<li>
LU (via
<a href="https://mathjs.org/"
>math.js<img
src="https://upload.wikimedia.org/wikipedia/commons/4/44/Icon_External_Link.svg"
alt="External Link Icon"
style="
width: 16px;
height: 16px;
vertical-align: middle;
margin-left: 2px;
margin-bottom: 4px;
" /></a
>)
</li>
</ul>
</li>
<li>Newton-Raphson method for nonlinear systems</li>
</ul>
</li>
<li>
📊 <strong>Performance & Parallelization</strong>
<ul>
<li>Web worker support for multi-threaded computation</li>
</ul>
</li>
<li>
📈 <strong>Visualization & Post-Processing</strong>
<ul>
<li>
Interactive line and surface visualization with
<a href="https://plotly.com/javascript/">
Plotly<img
src="https://upload.wikimedia.org/wikipedia/commons/4/44/Icon_External_Link.svg"
alt="External Link Icon"
style="
width: 16px;
height: 16px;
vertical-align: middle;
margin-left: 2px;
margin-bottom: 4px;
"
/>
</a>
</li>
</ul>
</li>
<li>
🚀 <strong>Platform & Deployment</strong>
<ul>
<li>
Browser runtime (<a href="https://core.feascript.com/dist/feascript.esm.js">hosted ESM build</a> /
<a href="https://cdn.jsdelivr.net/gh/FEAScript/FEAScript-core/dist/feascript.esm.js"
>JSDelivr CDN<img
src="https://upload.wikimedia.org/wikipedia/commons/4/44/Icon_External_Link.svg"
alt="External Link Icon"
style="
width: 16px;
height: 16px;
vertical-align: middle;
margin-left: 2px;
margin-bottom: 4px;
" /></a
>)
</li>
<li>
Interactive JavaScript playgrounds (e.g.
<a href="https://codepen.io/FEAScript"
>CodePen<img
src="https://upload.wikimedia.org/wikipedia/commons/4/44/Icon_External_Link.svg"
alt="External Link Icon"
style="
width: 16px;
height: 16px;
vertical-align: middle;
margin-left: 2px;
margin-bottom: 4px;
"
/></a>
and
<a href="https://hub.scribbler.live/portfolio/#!nikoscham/FEAScript-Scribbler-examples"
>Scribbler<img
src="https://upload.wikimedia.org/wikipedia/commons/4/44/Icon_External_Link.svg"
alt="External Link Icon"
style="
width: 16px;
height: 16px;
vertical-align: middle;
margin-left: 2px;
margin-bottom: 4px;
" /></a
>)
</li>
<!-- <li>
No-code interface with
<a href="https://platform.feascript.com/">FEAScript Studio</a>
visual editor
</li> -->
<li>
Server-side runtime (<a href="https://www.npmjs.com/package/feascript"
>npm<img
src="https://upload.wikimedia.org/wikipedia/commons/4/44/Icon_External_Link.svg"
alt="External Link Icon"
style="
width: 16px;
height: 16px;
vertical-align: middle;
margin-left: 2px;
margin-bottom: 4px;
" /></a
>)
</li>
</ul>
</li>
</ul>
<div style="margin-top: 0.5em"></div>
<h2 id="tutorials"><a name="Tutorials"></a>Tutorials</h2>
<p>
Below you can explore tutorials that provide a step-by-step introduction to FEAScript. These tutorials
show how to use the FEAScript API directly by writing JavaScript code, either to integrate finite
element simulations into your own websites and applications or to run them in interactive JavaScript
playgrounds such as
<a href="https://codepen.io/FEAScript"
>CodePen<img
src="https://upload.wikimedia.org/wikipedia/commons/4/44/Icon_External_Link.svg"
alt="External Link Icon"
style="width: 16px; height: 16px; vertical-align: middle; margin-left: 2px; margin-bottom: 4px"
/></a>
and
<a href="https://hub.scribbler.live/portfolio/#!nikoscham/FEAScript-Scribbler-examples"
>Scribbler<img
src="https://upload.wikimedia.org/wikipedia/commons/4/44/Icon_External_Link.svg"
alt="External Link Icon"
style="
width: 16px;
height: 16px;
vertical-align: middle;
margin-left: 2px;
margin-bottom: 4px;
" /></a
>. Each tutorial include different variations that demonstrate the same physical problem under different
configurations, ranging from simple examples to advanced setups using external meshes or multiple
threads.
</p>
<ul class="tutorials-list">
<li>
<div class="tutorial-card-content">
<span class="tutorial-name">Advection-Diffusion with Gaussian Source</span>
<p class="tutorial-description">
<em
>1D steady-state scalar transport governed by the advection-diffusion equation with a localized
Gaussian source term</em
>
</p>
<div class="tutorial-card-badges">
<a href="https://feascript.com/tutorials/advection-diffusion-1d.html" class="badge badge-basic"
>Basic HTML</a
>
<a href="https://codepen.io/FEAScript/pen/azNbeJw" class="badge badge-codepen"
>CodePen<img
src="https://upload.wikimedia.org/wikipedia/commons/4/44/Icon_External_Link.svg"
alt="External Link Icon"
style="
width: 16px;
height: 16px;
vertical-align: middle;
margin-left: 2px;
margin-bottom: 4px;
"
/></a>
<a
href="https://app.scribbler.live/?jsnb=github:nikoscham/FEAScript-Scribbler-examples/generalFormPDEScript/advection-diffusion-1d.jsnb"
class="badge badge-scribbler"
>Scribbler<img
src="https://upload.wikimedia.org/wikipedia/commons/4/44/Icon_External_Link.svg"
alt="External Link Icon"
style="
width: 16px;
height: 16px;
vertical-align: middle;
margin-left: 2px;
margin-bottom: 4px;
"
/></a>
</div>
</div>
<img
class="tutorial-card-image"
src="./assets/advection-diffusion-1d-results.png"
alt="Advection-diffusion with Gaussian source results"
loading="lazy"
/>
</li>
<li>
<div class="tutorial-card-content">
<span class="tutorial-name">Heat Conduction in a 2D Fin</span>
<p class="tutorial-description">
<em
>2D steady-state heat conduction in a cooling fin with mixed boundary conditions including
constant temperature, symmetry, and convective cooling</em
>
</p>
<div class="tutorial-card-badges">
<a href="https://feascript.com/tutorials/heat-conduction-2d-fin.html" class="badge badge-basic"
>Basic HTML</a
>
<a
href="https://feascript.com/tutorials/heat-conduction-2d-fin-worker.html"
class="badge badge-mt"
>Multi-threaded</a
>
<a
href="https://feascript.com/tutorials/heat-conduction-2d-fin-gmsh.html"
class="badge badge-gmsh"
>Gmsh mesh</a
>
<a
href="https://feascript.com/tutorials/heat-conduction-2d-rhom-fin-gmsh.html"
class="badge badge-gmsh"
>Rhomboid fin (Gmsh mesh)</a
>
<a href="https://codepen.io/FEAScript/pen/WbrzwPG" class="badge badge-codepen"
>CodePen<img
src="https://upload.wikimedia.org/wikipedia/commons/4/44/Icon_External_Link.svg"
alt="External Link Icon"
style="
width: 16px;
height: 16px;
vertical-align: middle;
margin-left: 2px;
margin-bottom: 4px;
"
/></a>
<a
href="https://app.scribbler.live/?jsnb=github:nikoscham/FEAScript-Scribbler-examples/heatConductionScript/heat-conduction-2d-fin.jsnb"
class="badge badge-scribbler"
>Scribbler<img
src="https://upload.wikimedia.org/wikipedia/commons/4/44/Icon_External_Link.svg"
alt="External Link Icon"
style="
width: 16px;
height: 16px;
vertical-align: middle;
margin-left: 2px;
margin-bottom: 4px;
"
/></a>
</div>
</div>
<img
class="tutorial-card-image"
src="./assets/heat-conduction-2d-fin-results.png"
alt="Heat conduction in a 2D fin results"
loading="lazy"
/>
</li>
<li>
<div class="tutorial-card-content">
<span class="tutorial-name">Heat Conduction Through a Wall</span>
<p class="tutorial-description">
<em
>1D steady-state heat conduction across a wall with convection boundary condition at one end and
constant temperature at the other</em
>
</p>
<div class="tutorial-card-badges">
<a href="https://feascript.com/tutorials/heat-conduction-1d-wall.html" class="badge badge-basic"
>Basic HTML</a
>
<!-- <a href="https://feascript.com/tutorials/heat-conduction-1d-wall-platform.html" class="badge badge-visual"
>Visual editor</a
> -->
<a href="https://codepen.io/FEAScript/pen/ZYQrqJK" class="badge badge-codepen"
>CodePen<img
src="https://upload.wikimedia.org/wikipedia/commons/4/44/Icon_External_Link.svg"
alt="External Link Icon"
style="
width: 16px;
height: 16px;
vertical-align: middle;
margin-left: 2px;
margin-bottom: 4px;
"
/></a>
<a
href="https://app.scribbler.live/?jsnb=github:nikoscham/FEAScript-Scribbler-examples/heatConductionScript/heat-conduction-1d-wall.jsnb"
class="badge badge-scribbler"
>Scribbler<img
src="https://upload.wikimedia.org/wikipedia/commons/4/44/Icon_External_Link.svg"
alt="External Link Icon"
style="
width: 16px;
height: 16px;
vertical-align: middle;
margin-left: 2px;
margin-bottom: 4px;
"
/></a>
</div>
</div>
<img
class="tutorial-card-image"
src="./assets/heat-conduction-1d-wall-results.png"
alt="Heat conduction through a wall results"
loading="lazy"
/>
</li>
<li>
<div class="tutorial-card-content">
<span class="tutorial-name">Creeping Flow on a Lid-Driven 2D Cavity</span>
<p class="tutorial-description">
<em
>Stokes flow in a square 2D cavity driven by a moving lid, with velocity and pressure fields
resolved</em
>
</p>
<div class="tutorial-card-badges">
<a
href="https://feascript.com/tutorials/lid-driven-cavity-2d-creeping-flow.html"
class="badge badge-basic"
>Basic HTML</a
>
<a
href="https://feascript.com/tutorials/lid-driven-cavity-2d-creeping-flow-worker.html"
class="badge badge-mt"
>Multi-threaded</a
>
<a href="https://codepen.io/FEAScript/pen/XJKGmRz" class="badge badge-codepen"
>CodePen<img
src="https://upload.wikimedia.org/wikipedia/commons/4/44/Icon_External_Link.svg"
alt="External Link Icon"
style="
width: 16px;
height: 16px;
vertical-align: middle;
margin-left: 2px;
margin-bottom: 4px;
"
/></a>
</div>
</div>
<img
class="tutorial-card-image"
src="./assets/lid-driven-cavity-2d-stokes-u-results.png"
alt="Creeping flow on a lid-driven 2D cavity results"
loading="lazy"
/>
</li>
<li>
<div class="tutorial-card-content">
<span class="tutorial-name">Solidification Front Propagation in a 2D Domain</span>
<p class="tutorial-description">
<em
>Transient simulation of a solidification front advancing through a 2D domain using the eikonal
equation</em
>
</p>
<div class="tutorial-card-badges">
<a href="https://feascript.com/tutorials/solidification-front-2d.html" class="badge badge-basic"
>Basic HTML</a
>
<a
href="https://feascript.com/tutorials/solidification-front-2d-worker.html"
class="badge badge-mt"
>Multi-threaded</a
>
<a href="https://codepen.io/FEAScript/pen/dPMxaLq" class="badge badge-codepen"
>CodePen<img
src="https://upload.wikimedia.org/wikipedia/commons/4/44/Icon_External_Link.svg"
alt="External Link Icon"
style="
width: 16px;
height: 16px;
vertical-align: middle;
margin-left: 2px;
margin-bottom: 4px;
"
/></a>
<a
href="https://app.scribbler.live/?jsnb=github:nikoscham/FEAScript-Scribbler-examples/frontPropagationScript/solidification-front-2d.jsnb"
class="badge badge-scribbler"
>Scribbler<img
src="https://upload.wikimedia.org/wikipedia/commons/4/44/Icon_External_Link.svg"
alt="External Link Icon"
style="
width: 16px;
height: 16px;
vertical-align: middle;
margin-left: 2px;
margin-bottom: 4px;
"
/></a>
</div>
</div>
<img
class="tutorial-card-image"
src="./assets/solidification-front-2d-results.png"
alt="Solidification front propagation results"
loading="lazy"
/>
</li>
</ul>
<p>
Please report any feedback on the tutorials above to the GitHub
<a href="https://github.com/orgs/FEAScript/discussions">Discussions</a> or
<a href="https://github.com/FEAScript/FEAScript-core/issues">Issues</a>.
</p>
<h2 id="documentation"><a name="Documentation"></a>Documentation</h2>
<p>
The documentation for FEAScript is currently under development. In the meantime, for information on the
numerical methods used in FEAScript and other technical resources, please visit the
<a href="https://blog.feascript.com">FEAScript blog</a>.
</p>
<h2 id="licensing"><a name="Licensing"></a>Licensing</h2>
<p>
The core library of FEAScript is distributed under the terms of the
<a href="https://github.com/FEAScript/FEAScript-core/blob/main/LICENSE">MIT license</a>. This website is
licensed under the
<a href="https://github.com/FEAScript/FEAScript-website/blob/main/LICENSE"
>Creative Commons Attribution 4.0 License</a
>.
</p>
<footer>
<p>© 2023-<span id="currentYear"></span> FEAScript</p>
</footer>
<script>
// Update copyright year
document.getElementById("currentYear").innerHTML = new Date().getFullYear();
// Fetch GitHub stars
fetch("https://api.github.com/repos/FEAScript/FEAScript-core")
.then((response) => response.json())
.then((data) => {
const starCount = data.stargazers_count;
const starsElement = document.getElementById("github-stars");
if (starsElement && starCount) {
starsElement.innerHTML = `★ ${starCount}`;
}
})
.catch((error) => console.error("Error fetching GitHub stars:", error));
</script>
</body>
</html>