Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
1179 lines (1108 loc) · 54.5 KB
/
Copy pathindex.html
File metadata and controls
1179 lines (1108 loc) · 54.5 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
* 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 · 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."
/>
<!-- Link previews (LinkedIn, Bluesky and others); cards from scripts/generate-social-cards.py -->
<link rel="canonical" href="https://feascript.com/" />
<meta property="og:type" content="website" />
<meta property="og:site_name" content="FEAScript" />
<meta property="og:title" content="FEAScript · JavaScript finite element simulation library" />
<meta property="og: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 property="og:url" content="https://feascript.com/" />
<meta property="og:image" content="https://feascript.com/assets/social-home.png" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta name="twitter:card" content="summary_large_image" />
<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": "info@feascript.com",
"sameAs": [
"https://github.com/FEAScript",
"https://www.youtube.com/@FEAScript",
"https://www.linkedin.com/company/feascript/",
"https://bsky.app/profile/feascript.com",
"https://www.npmjs.com/package/feascript"
]
}
]
}
</script>
<!-- Cloudflare Web Analytics (no cookies) -->
<script
type="module"
src="https://static.cloudflareinsights.com/beacon.min.js"
data-cf-beacon='{"token": "b688c1274c374e5a95647253cf19085e"}'
></script>
</head>
<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="#verification"><span>Verification</span></a>
<a class="nav-link" href="#tutorials"><span>Tutorials</span></a>
<a class="nav-link nav-link-out" href="https://docs.feascript.com" data-icon="documentation"><span>Documentation</span></a>
<a class="nav-link nav-link-out" href="studio.html" data-icon="studio"><span>Studio</span></a>
<a class="nav-link nav-link-out nav-link-lab" href="https://lab.feascript.com/" data-icon="tris-lab"><span>Tri's Lab</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 color 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="#maillist">Join mailing list</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 FEAScript</a>
<a href="#howtousefeascript">How to use</a>
<a href="#features">Features</a>
<a href="#verification">Verification</a>
<a href="#tutorials">Tutorials</a>
<a class="nav-link-out" href="https://docs.feascript.com" data-icon="documentation">Documentation</a>
<a class="nav-link-out" href="studio.html" data-icon="studio">FEAScript Studio</a>
<a class="nav-link-out nav-link-lab" href="https://lab.feascript.com/" data-icon="tris-lab">Tri's Lab by FEAScript</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="hero-actions">
<a class="cmd cmd-link" href="#howtousefeascript">
<span class="cmd-prompt" aria-hidden="true">→</span>
<span>Try it live in your browser</span>
</a>
<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>
<div class="hero-meta label">
<span>MIT licensed</span>
<a href="https://github.com/FEAScript/FEAScript-core">View on GitHub</a>
<span
>Prefer no code? Try <a href="https://lab.feascript.com/">Tri's Lab</a> or
<a href="#studio">FEAScript Studio</a></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 eq-head">
<h2 data-reveal>Engineering simulation, <span class="accent">without the barriers.</span></h2>
<p data-reveal>
FEAScript brings the finite element method to the web. You set up the model, solve it and plot the
results in JavaScript, in a browser or in Node.js, and you can build the simulation into your own
web pages and applications.
</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 class="grid grid-3">
<article class="cell cell-pad" data-reveal>
<h3>Nothing to install in the browser</h3>
<p class="desc">
A web page loads FEAScript from a URL, so simulations run with no setup, licenses or admin
rights. In Node.js, FEAScript is one npm package.
</p>
</article>
<article class="cell cell-pad" data-reveal>
<h3>Runs where JavaScript runs</h3>
<p class="desc">
In current web browsers on desktops, tablets and phones, and in Node.js on Windows, macOS and
Linux.
</p>
</article>
<article id="licensing" class="cell cell-pad" data-reveal>
<h3>Open source</h3>
<p class="desc">
The core library is free to use, change and build on under the
<a href="https://github.com/FEAScript/FEAScript-core/blob/main/LICENSE">MIT license</a>, with no
license fees.
</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 class="h2-wide" data-reveal>
Run a simulation with a few lines,<br />
<span class="accent">or let your AI assistant do it.</span>
</h2>
<p class="prose" data-reveal>
Call FEAScript from JavaScript in a web page, in a playground such as CodePen or Scribbler, or in
Node.js. The example below solves heat conduction in a 2D fin with a hole, live in this page: move
a slider and both the code and the result change. Save the code as an HTML file to run it
yourself.
</p>
</div>
<div class="grid">
<div class="cell quickstart" data-reveal>
<div class="qs-layout">
<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-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("heatConduction", { solver: { method: "lusolve" } });
// 2. Load the Gmsh mesh (any hosted .msh file works)
const response = await fetch("https://feascript.com/tutorials/rect_with_hole_quad_quadratic.msh");
const meshFile = new File([await response.text()], "rect_with_hole_quad_quadratic.msh");
const mesh = await importGmshMesh(meshFile);
model.setMesh(mesh);
// 3. Apply the boundary conditions, keyed by the names of the Gmsh physical groups
model.addBoundaryCondition("bottom", { type: "constantTemperature", temperature: 200 }); // Bottom
model.addBoundaryCondition("left", { type: "symmetry" }); // Left
model.addBoundaryCondition("top", { type: "convection", h: 1, ambientTemperature: 20 }); // Top
model.addBoundaryCondition("right", { type: "constantTemperature", temperature: 200 }); // Right
model.addBoundaryCondition("hole", { type: "convection", h: 1, ambientTemperature: 20 }); // Hole
// 4. Solve
const result = model.solve();
// 5. Plot the results
plotInterpolatedSolution(model, result, "contour", "resultsCanvas");
});
</script>
</body>
</html></pre
>
</div>
<!-- The example above, solved live in this page (feascript-website.js) -->
<figure class="qs-live" id="qs-live">
<div class="qs-bar label">
<span class="qs-dot" aria-hidden="true"></span>
<span>Result, solved in your browser</span>
<button class="qs-toggle" id="qs-mesh" type="button" aria-pressed="false" disabled>Show mesh</button>
</div>
<div class="qs-body">
<div class="qs-plot" id="qs-plot">
<p class="qs-wait">The simulation runs when this part of the page comes into view.</p>
</div>
<div class="qs-controls">
<label class="qs-control">
<span class="qs-name">Temperature, bottom and right <output id="qs-temp-out">200 °C</output></span>
<input type="range" id="qs-temp" min="50" max="400" step="10" value="200" disabled />
</label>
<label class="qs-control">
<span class="qs-name">h/k, top and hole <output id="qs-hk-out">1 m⁻¹</output></span>
<input type="range" id="qs-hk" min="0" max="8" step="1" value="3" disabled />
<span class="qs-hint">Heat transfer coefficient h (W/m²·K) over thermal conductivity k (W/m·K)</span>
</label>
<label class="qs-control">
<span class="qs-name">External temperature <output id="qs-ext-out">20 °C</output></span>
<input type="range" id="qs-ext" min="-20" max="100" step="5" value="20" disabled />
</label>
</div>
</div>
<figcaption class="qs-status label" id="qs-status" aria-live="polite"></figcaption>
</figure>
</div>
</div>
<article id="ai-assistants" class="cell cell-pad callout" data-reveal>
<p class="callout-tag label">AI-ready</p>
<h3>Or describe it to your <span class="accent">AI assistant.</span></h3>
<p class="desc prose">
FEAScript needs no installation, so an AI assistant can write a complete simulation that runs
in your browser: just describe the problem. Give ChatGPT, Claude, Copilot or any other
assistant <a href="https://docs.feascript.com/llms.txt">llms.txt</a>, a one-file summary of the
FEAScript API, so the code it writes uses the actual models and options. Save its answer as an
HTML file and open it, or run it on CodePen.
</p>
<div class="cmd cmd-ai">
<span class="cmd-prompt" aria-hidden="true">→</span>
<code>docs.feascript.com/llms.txt</code>
<button
class="cmd-copy"
type="button"
data-copy="https://docs.feascript.com/llms.txt"
aria-label="Copy the llms.txt link"
>
<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>
</article>
</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>What it <span class="accent">solves.</span></h2>
<p data-reveal>
FEAScript currently solves 1D and 2D problems with linear and quadratic elements.
</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>
<li data-physics="general">General-form PDE (linear and nonlinear)</li>
</ul>
</article>
<article class="cell cell-pad" data-reveal>
<h3>Geometry and meshing</h3>
<ul class="feature-list">
<li>
Built-in mesh generation with named boundaries for lines, rectangles and polygons
with holes (quadrilateral or triangular elements; triangulation built on
<a href="https://github.com/mapbox/delaunator">Delaunator</a> and
<a href="https://github.com/kninnug/Constrainautor">Constrainautor</a>)
</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>
Linear system solvers:
<ul>
<li>Frontal</li>
<li>Jacobi (CPU and 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 and 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 and 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>
<p class="cell cell-note prose" style="grid-column: 1 / -1">
<span class="tag">In development</span>
<strong>FEAScript is in development, and each release adds features.</strong> See
<a href="#whatsnew">what's new</a> for the latest release and the roadmap. To contribute code,
read the
<a href="https://github.com/FEAScript/FEAScript-core/blob/main/CONTRIBUTING.md"
>contribution guidelines</a
>.
</p>
</div>
</div>
</section>
<!-- ───────────── VERIFICATION ───────────── -->
<section id="verification" class="section">
<div class="section-frame">
<div class="eyebrow label">
<p>Verification</p>
</div>
<div class="section-head">
<h2 data-reveal>Checked against <span class="accent">known answers.</span></h2>
<p data-reveal>
FEAScript is checked in three ways: against values published for standard problems, against
exact solutions, and against other finite element software on the same meshes. Each result links to
the test or run that produced it, so you can check it and run it yourself.
</p>
</div>
<div class="grid grid-3">
<article class="cell cell-pad" data-reveal>
<h3>Published benchmarks</h3>
<p class="verify-value">18.26 °C</p>
<p class="verify-ref label text-faint">NAFEMS T4 target: 18.3 °C</p>
<dl class="verify-list prose">
<div>
<dt>NAFEMS T4, convection <span class="verify-qualifier">temperature at point E</span></dt>
<dd>18.26 °C</dd>
</div>
<div>
<dt>Code_Aster TPLP302, heated strip <span class="verify-qualifier">largest error at 7 reference points</span></dt>
<dd>±1.6e-4 °C</dd>
</div>
<div>
<dt>Code_Aster TPLP01, L-shaped domain <span class="verify-qualifier">largest deviation at 12 of 13 reference points</span></dt>
<dd>0.24 %</dd>
</div>
</dl>
<p class="verify-link prose">
<a href="https://github.com/FEAScript/FEAScript-core/tree/main/tests/verification/benchmark"
>Benchmark tests</a
>
</p>
</article>
<article class="cell cell-pad" data-reveal>
<h3>Closed-form solutions</h3>
<p class="verify-value">Exact</p>
<p class="verify-ref label text-faint">At the nodes, to about 15 digits</p>
<dl class="verify-list prose">
<div><dt>Couette flow</dt><dd>exact</dd></div>
<div><dt>Cantilever beam, tip load</dt><dd>exact</dd></div>
<div><dt>Heat conduction, varying conductivity</dt><dd>exact</dd></div>
</dl>
<p class="verify-link prose">
<a href="https://github.com/FEAScript/FEAScript-core/tree/main/tests/verification"
>Verification tests</a
>
· <a href="https://docs.feascript.com/verification/overview">All cases in the docs</a>
</p>
</article>
<article class="cell cell-pad" data-reveal>
<h3>Other finite element software</h3>
<p class="verify-value">11 digits</p>
<p class="verify-ref label text-faint">Same meshes, node by node, up to 51,681 nodes</p>
<dl class="verify-list prose">
<div>
<dt><a href="https://github.com/kinnala/scikit-fem">scikit-fem</a>, 2D fin <span class="verify-qualifier">largest temperature difference</span></dt>
<dd>1.9e-10 °C</dd>
</div>
<div>
<dt><a href="https://www.elmerfem.org/">Elmer</a>, 2D fin <span class="verify-qualifier">largest temperature difference</span></dt>
<dd>2.0e-10 °C</dd>
</div>
<div>
<dt><a href="https://github.com/kinnala/scikit-fem">scikit-fem</a>, lid-driven cavity <span class="verify-qualifier">largest velocity difference, relative to the lid speed</span></dt>
<dd>4.0e-13</dd>
</div>
</dl>
<p class="verify-link prose">
<a
href="https://github.com/FEAScript/FEAScript-benchmark/tree/main/heatConduction2DFin/reports/amd-ryzen-5-9600x/0.4.0"
>Benchmark results</a
>
</p>
</article>
</div>
<p class="verify-note label text-faint">
NAFEMS T4 and the Code_Aster cases are reproduced independently. FEAScript is not affiliated with
NAFEMS, EDF or the Code_Aster project.
</p>
</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>
Step-by-step tutorials, each with the full code to run in a web page, on CodePen or in Scribbler.
Four to start with, one for each kind of physics:
</p>
</div>
<div class="grid grid-2">
<article class="cell cell-pad callout" style="grid-column: 1 / -1" data-reveal>
<p class="callout-tag label">New to finite elements?</p>
<h3>Learn the method <span class="accent">by playing.</span></h3>
<p class="desc prose">
Start with <a href="https://lab.feascript.com/">Tri's Lab by FEAScript</a>, where you learn the
finite element method through games and block-based missions, with no code to write.
</p>
<a class="cmd cmd-link cmd-ai" href="https://lab.feascript.com/">
<span class="cmd-prompt" aria-hidden="true">→</span>
<span>lab.feascript.com</span>
</a>
</article>
<article class="cell tutorial" data-physics="heat" data-reveal>
<img
class="tutorial-img"
src="tutorials/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"
>Tutorial</a
>
<a
class="badge badge-gmsh"
href="https://feascript.com/tutorials/heat-conduction-2d-fin-gmsh.html"
>Gmsh mesh</a
>
<a
class="badge badge-triangle"
href="https://feascript.com/tutorials/heat-conduction-2d-fin-triangle-mesh.html"
>Built-in triangle 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:FEAScript/FEAScript-Scribbler-examples/heatConduction/heat-conduction-2d-fin.jsnb"
>Scribbler</a
>
</div>
</div>
</article>
<article class="cell tutorial" data-physics="flow" data-reveal>
<img
class="tutorial-img"
src="tutorials/creeping-flow-2d-pillar-array-results.png"
alt="Creeping flow through a 2D pillar array results"
loading="lazy"
/>
<div class="tutorial-body">
<p class="fig-label">Creeping flow</p>
<h3>Creeping flow through a 2D pillar array</h3>
<p>
Stokes flow in a channel with a staggered array of pillars, on an unstructured Gmsh mesh of
quadratic triangles with Taylor-Hood elements
</p>
<div class="badges">
<a
class="badge badge-basic"
href="https://feascript.com/tutorials/creeping-flow-2d-pillar-array.html"
>Tutorial</a
>
<a
class="badge badge-scribbler"
href="https://app.scribbler.live/?jsnb=github:FEAScript/FEAScript-Scribbler-examples/creepingFlow/creeping-flow-2d-pillar-array.jsnb"
>Scribbler</a
>
</div>
</div>
</article>
<article class="cell tutorial" data-physics="structure" data-reveal>
<img
class="tutorial-img"
src="tutorials/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"
>Tutorial</a
>
<a
class="badge badge-scribbler"
href="https://app.scribbler.live/?jsnb=github:FEAScript/FEAScript-Scribbler-examples/eulerBernoulliBeam/cantilever-beam-1d.jsnb"
>Scribbler</a
>
</div>
</div>
</article>
<article class="cell tutorial" data-physics="front" data-reveal>
<img
class="tutorial-img"
src="tutorials/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"
>Tutorial</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:FEAScript/FEAScript-Scribbler-examples/frontPropagation/solidification-front-2d.jsnb"
>Scribbler</a
>
</div>
</div>
</article>
<p class="cell cell-note" style="grid-column: 1 / -1">
<a class="btn btn-solid btn-sm" href="tutorials/index.html"
>All tutorials <span aria-hidden="true">→</span></a
>
</p>
</div>
</div>
</section>
<!-- ───────────── POWERED BY FEASCRIPT ───────────── -->
<section id="poweredby" class="section">
<div class="section-frame">
<div class="eyebrow label">
<p>FEAScript in use</p>
</div>
<div class="section-head">
<h2 data-reveal>FEAScript <span class="accent">use cases.</span></h2>
</div>
<div class="grid">
<article class="cell cell-pad case-study showcase showcase-compact" data-reveal>
<div class="case-study-main">
<div class="case-study-head">
<a href="https://betterbuilding.io/" class="case-study-logo">
<img src="assets/better-building-logo.png" alt="Better Building" />
</a>
</div>
<h3>Heat Transfer Simulator</h3>
<p class="desc">
Better Building's free Heat Transfer Simulator lets architects and engineers draw a building
detail and compute U-values and ψ-values in the browser. For complex and curved geometries,
higher-order elements, batch runs and custom web applications, its documentation recommends
continuing in FEAScript.
</p>
<div class="case-study-actions">
<a
class="btn btn-solid btn-sm"
href="https://docs.betterbuilding.io/user-guide/tools-and-plugins/heat-transfer-simulator#feascript-integration"
>Read their FEAScript guide <span aria-hidden="true">→</span></a
>
<a class="btn btn-outline btn-sm" href="https://betterbuilding.io/">Visit Better Building</a>
</div>
</div>
<figure class="showcase-shot">
<img
src="assets/better-building-heat-transfer-simulator.png"
alt="Better Building's Heat Transfer Simulator: a wall corner drawn from material layers, with its temperature field and isotherms"
width="1278"
height="944"
loading="lazy"
/>
<figcaption class="label text-faint">Screenshot courtesy of Better Building.</figcaption>
</figure>
</article>
<article class="cell cell-pad case-study showcase showcase-compact" data-reveal>
<div class="case-study-main">
<div class="case-study-head">
<a href="https://hassaanmaqsood.github.io/opencad/" class="case-study-logo">
<img class="logo-light" src="assets/opencad-logo.svg" alt="OpenCAD" />
<img class="logo-dark" src="assets/opencad-logo-dark.svg" alt="OpenCAD" />
</a>
</div>
<h3>CAD to FEM thermal loop</h3>
<p class="desc">
OpenCAD is a CAD kernel that runs in the browser. In this demo, a part sketched in OpenCAD goes
straight to FEAScript, which meshes it and solves steady heat conduction. The curve names in the
sketch become the boundary names, and the temperatures go back to OpenCAD to color the 3D part.
</p>
<div class="case-study-actions">
<a class="btn btn-solid btn-sm" href="https://hassaanmaqsood.github.io/opencad/feascript-demo"
>Open the live demo <span aria-hidden="true">→</span></a
>
<a class="btn btn-outline btn-sm" href="https://hassaanmaqsood.github.io/opencad/">Visit OpenCAD</a>
</div>
</div>
<figure class="showcase-shot">
<img
src="assets/opencad-feascript-thermal-demo.png"
alt="OpenCAD and FEAScript demo: a cooling plate with a bore, colored by the temperature field FEAScript computed"
width="1280"
height="914"
loading="lazy"
/>
<figcaption class="label text-faint">The OpenCAD × FEAScript live demo.</figcaption>
</figure>
</article>
</div>
<p class="verify-note label text-faint">
Need a calculator like this for your own product?
<a href="work-with-feascript.html">Work with FEAScript</a>.
</p>
</div>
</section>
<!-- ───────────── FEASCRIPT STUDIO ───────────── -->
<section id="studio" class="section">
<div class="section-frame">
<div class="eyebrow label">
<p>FEAScript Studio</p>
</div>
<div class="section-head">
<h2 data-reveal>Turn models into <span class="accent">web applications.</span></h2>
</div>
<div class="grid">
<article class="cell cell-pad case-study showcase" data-reveal>
<div class="case-study-main">
<div class="case-study-head">
<span class="tag">In development</span>
</div>
<h3>Build an app from a FEAScript model</h3>
<p class="desc">
FEAScript Studio builds a model from connected blocks, then turns it into a focused
application: you choose which inputs users can change and which results they see. The apps
run in the browser and can be shared by link or embedded in another website. Any model can
be exported as plain FEAScript code.
</p>
<div class="case-study-actions">
<a class="btn btn-solid btn-sm" href="studio.html"
>See FEAScript Studio and join the waitlist <span aria-hidden="true">→</span></a
>
</div>
</div>
<figure class="showcase-shot">
<img
src="assets/feascript-studio-app.png"
alt="Cooling fin calculator app built in FEAScript Studio, with sliders for the inputs, the coldest temperature and a temperature plot"
width="1600"
height="956"
loading="lazy"
/>
<figcaption class="label text-faint">Development version. The interface may change.</figcaption>
</figure>
</article>
</div>