Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
1006 lines (942 loc) · 43.1 KB
/
Copy pathindex.html
File metadata and controls
1006 lines (942 loc) · 43.1 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
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<!--
* ════════════════════════════════════════════════════════════════
* FEAScript Website
* Finite Element Simulation in JavaScript
* Version: 0.3.1 | https://feascript.com
* CC BY 4.0 License © 2023–2026 FEAScript
* ════════════════════════════════════════════════════════════════
-->
<html lang="en" class="site">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>FEAScript: A JavaScript Finite Element Simulation Library</title>
<link rel="icon" type="image/x-icon" href="./assets/favicon.ico" />
<meta
name="description"
content="FEAScript is an 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"
/>
<script>
// Apply stored theme before first paint and enable JS-only styles
(function () {
var d = document.documentElement;
d.className += " js";
try {
var t = localStorage.getItem("feascript-theme");
if (t === "light" || t === "dark") d.setAttribute("data-theme", t);
} catch (e) {}
})();
</script>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400&family=Roboto:wght@300;400;500;700&display=swap"
rel="stylesheet"
/>
<link href="feascript-website.css" rel="stylesheet" type="text/css" />
<!-- Site name, logo and official profiles for search engines -->
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@graph": [
{
"@type": "WebSite",
"@id": "https://feascript.com/#website",
"url": "https://feascript.com/",
"name": "FEAScript",
"publisher": { "@id": "https://feascript.com/#organization" }
},
{
"@type": "Organization",
"@id": "https://feascript.com/#organization",
"name": "FEAScript",
"url": "https://feascript.com/",
"logo": "https://feascript.com/assets/feascript-logo.png",
"email": "[email protected]",
"sameAs": [
"https://github.com/FEAScript",
"https://www.youtube.com/@FEAScript",
"https://www.linkedin.com/company/feascript/",
"https://www.npmjs.com/package/feascript"
]
}
]
}
</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>
<a class="skip-link" href="#main">Skip to content</a>
<div class="announce label">
<span>Latest release</span>
<a href="https://github.com/FEAScript/FEAScript-core/releases/latest"
><img
src="https://img.shields.io/github/v/release/FEAScript/FEAScript-core?logo=github"
alt="GitHub release badge"
/></a>
<a href="https://www.npmjs.com/package/feascript"
><img src="https://img.shields.io/npm/v/feascript" alt="npm version badge"
/></a>
<a href="studio.html">Get early access to FEAScript Studio</a>
</div>
<!-- ───────────── NAVIGATION ───────────── -->
<header class="site-nav">
<div class="nav-inner">
<div class="nav-group">
<a class="nav-brand" href="index.html">
<svg viewBox="14 79 242 242" aria-hidden="true">
<polygon points="17,254 190,82 253,317" fill="#d4aa00" />
</svg>
<span
>FEAScrip<svg class="wm-t" viewBox="0 0 30 115" fill="none" stroke="currentColor">
<path stroke-width="5.9" d="M15 0V100A11.4 11.4 0 0 0 26.4 111.4H29.5" />
<path stroke-width="5.4" d="M0.4 16.9H29.6" /></svg
></span>
</a>
<nav class="nav-links label" aria-label="Main">
<a class="nav-link" href="#whyusefeascript"><span>Why FEAScript</span></a>
<a class="nav-link" href="#howtousefeascript"><span>How to use</span></a>
<a class="nav-link" href="#features"><span>Features</span></a>
<a class="nav-link" href="#tutorials"><span>Tutorials</span></a>
<a class="nav-link" href="#licensing"><span>Licensing</span></a>
<a class="nav-link nav-link-out" href="https://docs.feascript.com"><span>Documentation</span></a>
<a class="nav-link nav-link-out" href="studio.html"><span>Studio</span></a>
</nav>
</div>
<div class="nav-group">
<a
class="nav-icon nav-github"
href="https://github.com/FEAScript/FEAScript-core"
aria-label="FEAScript on GitHub"
title="FEAScript on GitHub"
>
<svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true">
<path
d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"
/>
</svg>
<span id="github-stars" class="label"></span>
</a>
<button
id="theme-toggle"
class="nav-icon theme-toggle"
type="button"
aria-label="Toggle colour theme"
>
<svg
class="icon-moon"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
aria-hidden="true"
>
<path
d="M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401"
/>
</svg>
<svg
class="icon-sun"
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
stroke-linejoin="round"
aria-hidden="true"
>
<circle cx="12" cy="12" r="4" />
<path
d="M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M4.93 19.07l1.41-1.41M17.66 6.34l1.41-1.41"
/>
</svg>
</button>
<a class="nav-cta" href="#howtousefeascript">Get started</a>
<button
id="nav-burger"
class="nav-icon nav-burger"
type="button"
aria-label="Open menu"
aria-expanded="false"
aria-controls="mobile-nav"
>
<svg
viewBox="0 0 24 24"
fill="none"
stroke="currentColor"
stroke-width="2"
stroke-linecap="round"
aria-hidden="true"
>
<path d="M4 6h16M4 12h16M4 18h16" />
</svg>
</button>
</div>
</div>
<nav id="mobile-nav" class="mobile-nav" aria-label="Mobile">
<a href="#whyusefeascript">Why use FEAScript</a>
<a href="#howtousefeascript">How to use FEAScript</a>
<a href="#features">Features</a>
<a href="#tutorials">Tutorials</a>
<a href="#licensing">Licensing</a>
<a class="nav-link-out" href="https://docs.feascript.com">Documentation</a>
<a class="nav-link-out" href="studio.html">FEAScript Studio</a>
</nav>
</header>
<main id="main">
<!-- ───────────── HERO ───────────── -->
<section class="hero">
<div class="hero-inner">
<canvas id="mesh-canvas" aria-hidden="true"></canvas>
<div class="hero-content">
<div class="wordmark-wrap">
<div class="wordmark" role="img" aria-label="FEAScript">
<svg viewBox="14 79 242 242" aria-hidden="true">
<polygon points="17,254 190,82 253,317" fill="#d4aa00" />
</svg>
<span aria-hidden="true"
>FEAScrip<svg class="wm-t" viewBox="0 0 30 115" fill="none" stroke="currentColor">
<path stroke-width="5.9" d="M15 0V100A11.4 11.4 0 0 0 26.4 111.4H29.5" />
<path stroke-width="5.4" d="M0.4 16.9H29.6" /></svg
></span>
</div>
</div>
<h1>A JavaScript finite element library, <span class="accent">for the web.</span></h1>
<p class="hero-lede">
FEAScript enables engineering simulations across both browser-based and server-side environments
without the overhead of traditional desktop software.
</p>
<div class="cmd">
<span class="cmd-prompt" aria-hidden="true">$</span>
<code>npm install feascript</code>
<button
class="cmd-copy"
type="button"
data-copy="npm install feascript"
aria-label="Copy command"
>
<svg
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>
<div class="hero-links label">
<a href="#howtousefeascript">Get started</a>
<a href="https://github.com/FEAScript/FEAScript-core">View on GitHub</a>
</div>
<div class="hero-meta label">
<span>MIT licensed</span>
<span>Browser and Node.js</span>
<a href="studio.html">Try FEAScript Studio</a>
</div>
</div>
</div>
</section>
<!-- ───────────── OUR GOAL ───────────── -->
<section id="ourgoal" class="section">
<div class="section-frame">
<div class="eyebrow label">
<p>Our goal</p>
</div>
<div class="section-head eq-head">
<h2 data-reveal>A powerful JavaScript <span class="accent">API for FEM.</span></h2>
<p data-reveal>
We are closing the gap between complex computational mechanics and the accessibility of the web,
empowering developers to build professional-grade simulation tools that work on any device,
anywhere.
</p>
<div class="eq" aria-hidden="true">
<span class="eq-1">−∇·(k∇T) = Q</span>
<span class="eq-2">Ku = F</span>
<span class="eq-3">∇·u = 0</span>
<span class="eq-4">μ∇²u − ∇p = f</span>
<span class="eq-5">|∇φ| = 1</span>
<span class="eq-6">u ≈ Σ Nᵢuᵢ</span>
<span class="eq-7">EI d⁴w/dx⁴ = q</span>
</div>
</div>
</div>
</section>
<!-- ───────────── 01 WHY ───────────── -->
<section id="whyusefeascript" class="section">
<div class="section-frame">
<div class="eyebrow label">
<p>Why use FEAScript</p>
</div>
<div class="section-head">
<h2 data-reveal>Engineering simulation, <span class="accent">without the barriers.</span></h2>
</div>
<div class="grid grid-3">
<article class="cell cell-pad" data-reveal>
<h3>No installation</h3>
<p class="desc">
Run simulations straight from the browser, with no setup, licenses or admin rights needed.
</p>
</article>
<article class="cell cell-pad" data-reveal>
<h3>Portability</h3>
<p class="desc">
Works everywhere JavaScript runs (Windows, macOS and Linux systems that use x64, IA-32, or ARM
processors).
</p>
</article>
<article class="cell cell-pad" data-reveal>
<h3>Open-source</h3>
<p class="desc">
The core library of FEAScript is open-source, removing the high cost barrier of traditional
FEA software.
</p>
</article>
</div>
</div>
</section>
<!-- ───────────── 02 HOW TO USE ───────────── -->
<section id="howtousefeascript" class="section">
<div class="section-frame">
<div class="eyebrow label">
<p>How to use FEAScript</p>
</div>
<div class="section-head">
<h2 data-reveal>Run a simulation with <span class="accent">a few lines.</span></h2>
<p class="prose" data-reveal>
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</a> and <a href="https://scribbler.live/">Scribbler</a>)
and server-side runtimes such as <a href="https://nodejs.org/en">Node.js</a>.
</p>
</div>
<div class="grid">
<p class="cell cell-note prose">
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, and the
<a href="https://docs.feascript.com">documentation</a> for every model, option and function of
the API.
</p>
<div class="cell quickstart" data-reveal>
<div class="code-block">
<div class="code-bar label">
<span class="file">index.html</span>
<div class="code-actions">
<button class="code-btn" id="copy-qs-btn" type="button" title="Copy code">
<svg
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>
<a
class="code-btn code-btn-video"
href="https://www.youtube.com/watch?v=35_aqDGPq50"
target="_blank"
rel="noopener"
>
<svg
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
</a>
<a
class="code-btn code-btn-codepen"
href="https://codepen.io/FEAScript/pen/ByzVveQ"
target="_blank"
rel="noopener"
>
<svg
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
</a>
</div>
</div>
<pre 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/plotly.js/2.35.3/plotly.min.js"></script>
</head>
<body>
<div id="resultsCanvas"></div>
<script type="module">
import {
FEAScriptModel,
importGmshMesh,
plotInterpolatedSolution,
} from "https://core.feascript.com/dist/feascript.esm.js";
window.addEventListener("DOMContentLoaded", async () => {
// 1. Create the model and select the physics
const model = new FEAScriptModel();
model.setModelConfig("heatConductionScript");
// 2. Load the Gmsh mesh (any hosted .msh file works)
const response = await fetch("https://feascript.com/tutorials/rect_with_hole.msh");
const meshFile = new File([await response.text()], "rect_with_hole.msh");
const mesh = await importGmshMesh(meshFile);
model.setMeshConfig({ parsedMesh: mesh });
// 3. Apply the boundary conditions (key = Gmsh physical group tag - 1)
model.addBoundaryCondition("0", ["constantTemperature", 200]); // Bottom
model.addBoundaryCondition("1", ["symmetry"]); // Left
model.addBoundaryCondition("2", ["convection", 1, 20]); // Top
model.addBoundaryCondition("3", ["constantTemperature", 200]); // Right
model.addBoundaryCondition("4", ["convection", 1, 20]); // Hole
// 4. Solve
model.setSolverMethod("lusolve");
const result = model.solve();
// 5. Plot the results
plotInterpolatedSolution(model, result, "contour", "resultsCanvas");
});
</script>
</body>
</html></pre
>
</div>
</div>
</div>
</div>
</section>
<!-- ───────────── 03 FEATURES ───────────── -->
<section id="features" class="section">
<div class="section-frame">
<div class="eyebrow label">
<p>Features</p>
</div>
<div class="section-head">
<h2 data-reveal>Everything you need, <span class="accent">in the browser.</span></h2>
<p data-reveal>
From physics and meshing to solvers and visualization, the following list highlights the key
FEAScript features.
</p>
</div>
<div class="grid grid-3">
<article class="cell cell-pad" data-reveal>
<h3>Physical modeling</h3>
<ul class="feature-list">
<li data-physics="flow">Creeping (Stokes) flow</li>
<li data-physics="structure">Euler-Bernoulli beam bending</li>
<li data-physics="front">Front propagation</li>
<li data-physics="heat">Heat conduction</li>
</ul>
</article>
<article class="cell cell-pad" data-reveal>
<h3>Geometry and meshing</h3>
<ul class="feature-list">
<li>Simple mesh generation (1D & 2D domains)</li>
<li>
Unstructured mesh import from <a href="https://gmsh.info/">Gmsh</a> (<code>.msh</code> file
format) with quadrilateral and triangular elements (linear and quadratic)
</li>
</ul>
</article>
<article class="cell cell-pad cell-tall" data-reveal>
<h3>Numerical methods</h3>
<ul class="feature-list">
<li>General form PDE (linear & nonlinear)</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</a>)</li>
</ul>
</li>
<li>Newton-Raphson method for nonlinear systems</li>
</ul>
</article>
<article class="cell cell-pad" data-reveal>
<h3>Performance & parallelization</h3>
<ul class="feature-list">
<li>Web worker support for multi-threaded computation</li>
</ul>
</article>
<article class="cell cell-pad" data-reveal>
<h3>Visualization & post-processing</h3>
<ul class="feature-list">
<li>
Interactive rendering with <a href="https://kitware.github.io/vtk-js/">vtk.js</a> and
<a href="https://plotly.com/javascript/">Plotly</a>
</li>
</ul>
</article>
<article class="cell cell-pad span-all" data-reveal>
<h3>Platform & deployment</h3>
<ul class="feature-list">
<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</a
>)
</li>
<li>
Interactive JavaScript playgrounds (e.g.
<a href="https://codepen.io/FEAScript">CodePen</a> and
<a href="https://hub.scribbler.live/portfolio/#!nikoscham/FEAScript-Scribbler-examples"
>Scribbler</a
>)
</li>
<li>Server-side runtime (<a href="https://www.npmjs.com/package/feascript">npm</a>)</li>
</ul>
</article>
<p class="cell cell-note prose" style="grid-column: 1 / -1">
<span class="tag">In development</span>
<strong
>FEAScript is currently under heavy development with new features being added
regularly.</strong
>
<a href="https://github.com/sponsors/FEAScript">Donations</a> help accelerate the next
generation of FEAScript's solvers, performance, documentation and tutorials. 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>
</div>
</div>
</section>
<!-- ───────────── 04 TUTORIALS ───────────── -->
<section id="tutorials" class="section">
<div class="section-frame">
<div class="eyebrow label">
<p>Tutorials</p>
</div>
<div class="section-head">
<h2 data-reveal>Learn by <span class="accent">running.</span></h2>
<p class="prose" data-reveal>
These tutorials provide a step-by-step introduction to FEAScript. They show how 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</a> and
<a href="https://hub.scribbler.live/portfolio/#!nikoscham/FEAScript-Scribbler-examples"
>Scribbler</a
>. Each tutorial includes different variations that demonstrate the same physical problem under
different configurations, ranging from simple examples to advanced setups using external meshes
or multiple threads. For the equations and options behind each example, see the
<a href="https://docs.feascript.com">documentation</a>.
</p>
</div>
<div class="grid grid-2">
<article class="cell tutorial" data-physics="general" data-reveal>
<img
class="tutorial-img"
src="./assets/advection-diffusion-1d-results.png"
alt="Advection-diffusion with Gaussian source results"
loading="lazy"
/>
<div class="tutorial-body">
<p class="fig-label">General-form PDE</p>
<h3>Advection-Diffusion with a Gaussian Source Term</h3>
<p>
1D steady-state scalar transport governed by the advection-diffusion equation with a
localized Gaussian source term
</p>
<div class="badges">
<a
class="badge badge-basic"
href="https://feascript.com/tutorials/advection-diffusion-1d.html"
>Basic HTML</a
>
<a class="badge badge-codepen" href="https://codepen.io/FEAScript/pen/azNbeJw">CodePen</a>
<a
class="badge badge-scribbler"
href="https://app.scribbler.live/?jsnb=github:nikoscham/FEAScript-Scribbler-examples/generalFormPDEScript/advection-diffusion-1d.jsnb"
>Scribbler</a
>
</div>
</div>
</article>
<article class="cell tutorial" data-physics="structure" data-reveal>
<img
class="tutorial-img"
src="./assets/cantilever-beam-1d-results.png"
alt="Cantilever beam under a tip load results"
loading="lazy"
/>
<div class="tutorial-body">
<p class="fig-label">Structural mechanics</p>
<h3>Cantilever Beam Under a Tip Load</h3>
<p>
1D Euler-Bernoulli cantilever beam bending under a concentrated tip load, with the finite
element solution verified against the classical analytical solution
</p>
<div class="badges">
<a class="badge badge-basic" href="https://feascript.com/tutorials/cantilever-beam-1d.html"
>Basic HTML</a
>
</div>
</div>
</article>
<article class="cell tutorial" data-physics="flow" data-reveal>
<img
class="tutorial-img"
src="./assets/lid-driven-cavity-2d-stokes-u-results.png"
alt="Creeping flow on a lid-driven 2D cavity results"
loading="lazy"
/>
<div class="tutorial-body">
<p class="fig-label">Creeping flow</p>
<h3>Creeping Flow in a 2D Lid-Driven Cavity</h3>
<p>
Stokes flow in a square 2D cavity driven by a moving lid, with velocity and pressure fields
resolved
</p>
<div class="badges">
<a
class="badge badge-basic"
href="https://feascript.com/tutorials/lid-driven-cavity-2d-creeping-flow.html"
>Basic HTML</a
>
<a
class="badge badge-mt"
href="https://feascript.com/tutorials/lid-driven-cavity-2d-creeping-flow-worker.html"
>Multi-threaded</a
>
<a class="badge badge-codepen" href="https://codepen.io/FEAScript/pen/XJKGmRz">CodePen</a>
<a
class="badge badge-scribbler"
href="https://app.scribbler.live/?jsnb=github:nikoscham/FEAScript-Scribbler-examples/creepingFlowScript/lid-driven-cavity-2d-creeping-flow.jsnb"
>Scribbler</a
>
</div>
</div>
</article>
<article class="cell tutorial" data-physics="heat" data-reveal>
<img
class="tutorial-img"
src="./assets/heat-conduction-2d-fin-results.png"
alt="Heat conduction in a 2D fin results"
loading="lazy"
/>
<div class="tutorial-body">
<p class="fig-label">Heat conduction</p>
<h3>Heat Conduction in a 2D Fin</h3>
<p>
2D steady-state heat conduction in a cooling fin with mixed boundary conditions including
constant temperature, symmetry, and convective cooling
</p>
<div class="badges">
<a
class="badge badge-basic"
href="https://feascript.com/tutorials/heat-conduction-2d-fin.html"
>Basic HTML</a
>
<a
class="badge badge-mt"
href="https://feascript.com/tutorials/heat-conduction-2d-fin-worker.html"
>Multi-threaded</a
>
<a
class="badge badge-gmsh"
href="https://feascript.com/tutorials/heat-conduction-2d-fin-gmsh.html"
>Gmsh mesh</a
>
<a
class="badge badge-gmsh"
href="https://feascript.com/tutorials/heat-conduction-2d-rhom-fin-gmsh.html"
>Rhomboid fin (Gmsh mesh)</a
>
<a class="badge badge-codepen" href="https://codepen.io/FEAScript/pen/WbrzwPG">CodePen</a>
<a
class="badge badge-scribbler"
href="https://app.scribbler.live/?jsnb=github:nikoscham/FEAScript-Scribbler-examples/heatConductionScript/heat-conduction-2d-fin.jsnb"
>Scribbler</a
>
</div>
</div>
</article>
<article class="cell tutorial" data-physics="heat" data-reveal>
<img
class="tutorial-img"
src="./assets/heat-conduction-1d-wall-results.png"
alt="Heat conduction through a wall results"
loading="lazy"
/>
<div class="tutorial-body">
<p class="fig-label">Heat conduction</p>
<h3>Heat Conduction Through a Wall</h3>
<p>
1D steady-state heat conduction across a wall with convection boundary condition at one end
and constant temperature at the other
</p>
<div class="badges">
<a
class="badge badge-basic"
href="https://feascript.com/tutorials/heat-conduction-1d-wall.html"
>Basic HTML</a
>
<a class="badge badge-codepen" href="https://codepen.io/FEAScript/pen/ZYQrqJK">CodePen</a>
<a
class="badge badge-scribbler"
href="https://app.scribbler.live/?jsnb=github:nikoscham/FEAScript-Scribbler-examples/heatConductionScript/heat-conduction-1d-wall.jsnb"
>Scribbler</a
>
</div>
</div>
</article>
<article class="cell tutorial" data-physics="front" data-reveal>
<img
class="tutorial-img"
src="./assets/solidification-front-2d-results.png"
alt="Solidification front propagation results"
loading="lazy"
/>
<div class="tutorial-body">
<p class="fig-label">Front propagation</p>
<h3>Solidification Front Propagation in a 2D Domain</h3>
<p>
Transient simulation of a solidification front advancing through a 2D domain using the
eikonal equation
</p>
<div class="badges">
<a
class="badge badge-basic"
href="https://feascript.com/tutorials/solidification-front-2d.html"
>Basic HTML</a
>
<a
class="badge badge-mt"
href="https://feascript.com/tutorials/solidification-front-2d-worker.html"
>Multi-threaded</a
>
<a class="badge badge-codepen" href="https://codepen.io/FEAScript/pen/dPMxaLq">CodePen</a>
<a
class="badge badge-scribbler"
href="https://app.scribbler.live/?jsnb=github:nikoscham/FEAScript-Scribbler-examples/frontPropagationScript/solidification-front-2d.jsnb"
>Scribbler</a
>
</div>
</div>
</article>
<p class="cell cell-note prose" style="grid-column: 1 / -1">
Please report any feedback or issues with the above tutorials to the
<a href="https://github.com/FEAScript/FEAScript-core/issues">FEAScript support</a>.
</p>
</div>
</div>
</section>
<!-- ───────────── POWERED BY FEASCRIPT ───────────── -->
<section id="poweredby" class="section">
<div class="section-frame">
<div class="eyebrow label">
<p>Powered by FEAScript</p>
</div>
<div class="section-head">
<h2 data-reveal>Built with <span class="accent">FEAScript.</span></h2>
</div>
<div class="grid">
<article class="cell cell-pad" data-reveal>
<div class="logo-row">
<img src="assets/better-building-logo.png" alt="BetterBuilding Logo" />
<p class="text-muted" style="max-width: 46rem">
<a class="link" href="https://betterbuilding.io/">Better Building</a> integrated FEAScript
to power their online
<a
class="link"
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.
</p>
</div>
</article>
</div>
</div>
</section>
<!-- ───────────── 05 DOCUMENTATION / LICENSING / SUPPORT ───────────── -->
<section id="documentation" class="section">
<div class="section-frame">
<div class="eyebrow label">
<p>Resources</p>
</div>
<div class="section-head">
<h2 data-reveal>Open, documented, <span class="accent">and growing.</span></h2>
</div>
<div class="grid grid-3">
<article class="cell cell-pad" data-reveal>
<h3>Documentation</h3>
<p class="desc prose" style="margin-top: 1rem">
The <a href="https://docs.feascript.com">FEAScript documentation</a> covers installation, a
first simulation, the finite element formulation, meshes, boundary conditions and solvers, every
physical model with its equations, and the full API reference. For more background on the
numerical methods, please also visit our <a href="https://blog.feascript.com">blog</a>.
</p>
</article>
<article id="licensing" class="cell cell-pad" data-reveal>
<h3>Licensing</h3>
<p class="desc prose" style="margin-top: 1rem">
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>.
</p>
</article>
<article class="cell cell-pad" data-reveal>
<h3>Help FEAScript grow</h3>
<p class="desc prose" style="margin-top: 1rem">
If you find FEAScript useful, please consider
<strong>supporting its development with a donation</strong>. Your support helps fund new
features, performance improvements, documentation and tutorials.
</p>
<div class="inline-media">
<a href="https://github.com/sponsors/FEAScript"
><img
src="https://img.shields.io/badge/Sponsor-GitHub%20Sponsors-ea4aaa?logo=githubsponsors&logoColor=white"
alt="GitHub Sponsors"
/></a>
<a href="https://liberapay.com/FEAScript/donate"
><img
src="https://img.shields.io/badge/Donate-Liberapay-F6C915?logo=liberapay&logoColor=black"
alt="Donate on Liberapay"
/></a>
</div>
</article>
</div>
</div>
</section>
<!-- ───────────── MAILING LIST ───────────── -->
<section id="maillist" class="section">
<div class="section-frame">
<div class="cta">
<p class="label text-faint">Stay in the loop</p>
<h2 data-reveal>Join the <span class="accent">mailing list.</span></h2>
<p class="lede">Receive project updates and news.</p>
<form
class="maillist-form"
action="https://feascript.us10.list-manage.com/subscribe/post?u=83b4dec50b84e136c2e82c6a4&id=4aa4a60f27&f_id=009362e3f0"
method="post"
id="mc-embedded-subscribe-form"
name="mc-embedded-subscribe-form"
target="_blank"
>
<label class="label" for="mce-EMAIL">Email address</label>
<div class="maillist-row">
<input type="email" name="EMAIL" id="mce-EMAIL" autocomplete="email" required value="" />
<input
type="submit"
name="subscribe"
id="mc-embedded-subscribe"
class="btn btn-solid"
value="Subscribe"
/>
</div>
<div id="mce-responses" aria-live="polite">
<div class="response" id="mce-error-response" style="display: none"></div>
<div class="response" id="mce-success-response" style="display: none"></div>
</div>
<div class="maillist-honeypot" aria-hidden="true">
<input type="text" name="b_83b4dec50b84e136c2e82c6a4_4aa4a60f27" tabindex="-1" value="" />
</div>
</form>
</div>
</div>
</section>
</main>
<!-- ───────────── FOOTER ───────────── -->
<footer class="footer">
<div class="footer-inner">
<div class="footer-grid">
<div class="footer-brand">
<a class="footer-wordmark" href="index.html">
<svg viewBox="14 79 242 242" aria-hidden="true">
<polygon points="17,254 190,82 253,317" fill="#d4aa00" />
</svg>
<span
>FEAScrip<svg class="wm-t" viewBox="0 0 30 115" fill="none" stroke="currentColor">
<path stroke-width="5.9" d="M15 0V100A11.4 11.4 0 0 0 26.4 111.4H29.5" />
<path stroke-width="5.4" d="M0.4 16.9H29.6" /></svg
></span>
</a>
<p class="footer-tagline">
Finite element simulation in JavaScript, for the browser and Node.js.
</p>
<a class="footer-mail" href="mailto:[email protected]">[email protected]</a>
</div>
<nav class="footer-col" aria-label="Product">
<h2>Product</h2>
<ul>
<li><a href="index.html#howtousefeascript">Get started</a></li>
<li><a href="studio.html">FEAScript Studio</a></li>
<li><a href="https://www.npmjs.com/package/feascript">npm package</a></li>
</ul>
</nav>
<nav class="footer-col" aria-label="Resources">
<h2>Resources</h2>
<ul>
<li><a href="index.html#tutorials">Tutorials</a></li>
<li><a href="https://docs.feascript.com">Documentation</a></li>
<li><a href="https://blog.feascript.com/">Blog</a></li>
<li><a href="https://github.com/FEAScript/FEAScript-core/issues">Support</a></li>
</ul>
</nav>
<nav class="footer-col" aria-label="Community">
<h2>Community</h2>
<ul>
<li><a href="https://discord.gg/3DVjNcuW4f">Discord</a></li>
<li><a href="https://github.com/FEAScript/FEAScript-core">GitHub</a></li>
<li><a href="https://www.youtube.com/@FEAScript">YouTube</a></li>
<li><a href="https://www.linkedin.com/company/feascript/">LinkedIn</a></li>
</ul>
</nav>
</div>
<div class="footer-bottom">
<span>© 2023-<span id="currentYear"></span> FEAScript</span>
<span>Core: MIT license · Website: CC BY 4.0</span>
</div>