Skip to content

Commit b29edd8

Browse files
committed
Fix 1D convection and nonzero front values; check boundary conditions
- Fix the sign of the 1D convection (Robin) condition: the wall surface temperature now matches the analytical solution (7.6087 °C instead of 10.294 °C in the 1D wall example). Update the regression test values. - Impose front propagation Dirichlet values as Newton-Raphson increments, for both the matrix and frontal solvers, so nonzero constantValue boundaries converge. Add the u(0) = 1 case to the planar front test. - Reuse the compute engine passed to solveAsync instead of ignoring it; without one, a temporary engine is created as before. - Report unknown boundary condition types when solving, wrap plain-string conditions in an array with a warning, and report beam conditions that are not an array of conditions. Add boundaryConditions unit test. - Use ["zeroGradient"] in the general form examples and tests. - Replace the deprecated "constantTemp" in the README and examples, and link the documentation from the README.
1 parent 1af81fa commit b29edd8

33 files changed

Lines changed: 322 additions & 81 deletions

‎README.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ You can run simulations with FEAScript by calling its functions from JavaScript
4545
2. **[In JavaScript playgrounds](#use-feascript-in-javascript-playgrounds)** – Try FEAScript in interactive JavaScript playgrounds such as [CodePen](https://codepen.io/FEAScript) or [Scribbler](https://hub.scribbler.live/portfolio/#!nikoscham/FEAScript-Scribbler-examples).
4646
3. **[With Node.js](#use-feascript-with-nodejs)** – Use FEAScript in server-side JavaScript applications.
4747

48+
📖 The **[FEAScript documentation](https://docs.feascript.com)** covers installation, the physical models and their equations, meshes, boundary conditions, solvers and the full API reference.
49+
4850
#### Use FEAScript in the Browser
4951

5052
You can use FEAScript in browser environments in three ways:
@@ -153,7 +155,7 @@ Here is a minimal browser-based example using the FEAScript API. Adapt paths, ph
153155
**Note:** The code above uses placeholder values that you should replace with appropriate options, e.g.:
154156

155157
- "physicsModel" should be replaced with an actual solver type such as "heatConductionScript" for heat conduction problems
156-
- "conditionType" should be replaced with an actual boundary condition type such as "constantTemp"
158+
- "conditionType" should be replaced with an actual boundary condition type such as "constantTemperature"
157159
- "boundaryIndex" should be replaced with a string identifying the boundary
158160

159161
Furthermore, the scripts under `examples/` contain Node.js examples. You can run them from the `FEAScript-core/` directory as follows:

‎dist/feascript-worker.esm.js‎

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/feascript-worker.esm.js.map‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/feascript.cjs.js‎

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/feascript.cjs.js.map‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/feascript.esm.js‎

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/feascript.esm.js.map‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/feascript.umd.js‎

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎dist/feascript.umd.js.map‎

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎examples/generalFormPDEScript/advectionDiffusion1D/advectionDiffusion1D.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ model.setMeshConfig({
3636

3737
// Define boundary conditions
3838
model.addBoundaryCondition("0", ["constantValue", 1]); // Left boundary
39-
model.addBoundaryCondition("1", "zeroGradient"); // Right boundary
39+
model.addBoundaryCondition("1", ["zeroGradient"]); // Right boundary
4040

4141
// Set solver method
4242
model.setSolverMethod("lusolve");

0 commit comments

Comments
 (0)