Skip to content

Commit 00506aa

Browse files
committed
Update README files for front propagation and general form PDE examples
1 parent fdc7bf9 commit 00506aa

File tree

5 files changed

+67
-67
lines changed

5 files changed

+67
-67
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<img src="https://feascript.github.io/FEAScript-website/assets/feascript-logo.png" width="80" alt="FEAScript Logo">
2+
3+
# Front Propagation Examples
4+
5+
This directory contains Node.js examples demonstrating how to use the FEAScript library to solve front propagation problems using the eikonal equation.
6+
7+
## Examples
8+
9+
#### 1. Solidification Front Propagation in a 2D Domain
10+
11+
This example demonstrates solving an eikonal equation in a 2D domain to track the movement of a solidification interface. For detailed information on the model setup refer to the corresponding [tutorial](https://feascript.com/tutorials/solidification-front-2d.html) in the FEAScript website.
12+
13+
## Running the Examples
14+
15+
#### 1. Create package.json with ES module support:
16+
17+
```bash
18+
echo '{"type":"module"}' > package.json
19+
```
20+
21+
#### 2. Install dependencies:
22+
23+
```bash
24+
npm install feascript mathjs
25+
```
26+
27+
#### 3. Run the example:
28+
29+
```bash
30+
node SolidificationFront2D.js
31+
```

examples/frontPropagationScript/solidificationFront2D/README.md

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,4 @@
22

33
## Solidification Front Propagation in a 2D Domain
44

5-
This example demonstrates solving an eikonal equation in a 2D domain using the FEAScript library. The problem represents a typical solidification front propagation scenario, where the objective is to track the movement of an interface, such as in metal cooling or crystal growth processes.
6-
7-
### Instructions
8-
9-
This example requires the `feascript` npm package and its peer dependencies (`mathjs`). It imports FEAScript directly from the npm package and runs the simulation in a Node.js environment. To run the example, follow these instructions:
10-
11-
1. **Create package.json with ES module support:**
12-
13-
```bash
14-
echo '{"type":"module"}' > package.json
15-
```
16-
17-
2. **Install dependencies:**
18-
19-
```bash
20-
npm install feascript mathjs
21-
```
22-
23-
3. **Run the example:**
24-
25-
```bash
26-
node SolidificationFront2D.js
27-
```
28-
29-
**Note:** For detailed information on the model setup, boundary conditions, and simulation results, refer to the comments in the JavaScript files and the corresponding [tutorial](https://feascript.com/tutorials/SolidificationFront2D.html).
5+
This example demonstrates solving an eikonal equation in a 2D domain to track the movement of a solidification interface. For detailed information on the model setup refer to the corresponding [tutorial](https://feascript.com/tutorials/solidification-front-2d.html) in the FEAScript website.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<img src="https://feascript.github.io/FEAScript-website/assets/feascript-logo.png" width="80" alt="FEAScript Logo">
2+
3+
# General Form PDE Examples
4+
5+
This directory contains Node.js examples demonstrating how to use the FEAScript library to solve various partial differential equations in their general form.
6+
7+
## Examples
8+
9+
#### 1. Advection-Diffusion with Gaussian Source
10+
11+
This example demonstrates solving a one-dimensional advection-diffusion problem with a Gaussian source term. The problem models the transport of a substance under the effects of both diffusion and advection. For detailed information on the model setup refer to the corresponding [tutorial](https://feascript.com/tutorials/advection-diffusion-1d.html) in the FEAScript website.
12+
13+
## Running the Examples
14+
15+
#### 1. Create package.json with ES module support:
16+
17+
```bash
18+
echo '{"type":"module"}' > package.json
19+
```
20+
21+
#### 2. Install dependencies:
22+
23+
```bash
24+
npm install feascript mathjs
25+
```
26+
27+
#### 3. Run the example:
28+
29+
```bash
30+
node advectionDiffusion1D.js
31+
```

examples/generalFormPDEScript/advectionDiffusion1D/README.md

Lines changed: 1 addition & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,4 @@
22

33
## Advection-Diffusion with Gaussian Source
44

5-
This example demonstrates solving a one-dimensional advection-diffusion problem with a Gaussian source term using the FEAScript library. The problem models the transport equation:
6-
7-
$$
8-
\frac{d^2u}{dx^2} - 10 \frac{du}{dx} = 10 \cdot e^{-200 \cdot (x - 0.5)^2}
9-
$$
10-
11-
This can be written in the general form as:
12-
13-
$$
14-
\frac{d}{dx}\left(A(x)\frac{du}{dx}\right) + B(x)\frac{du}{dx} + C(x)u = D(x)
15-
$$
16-
17-
where:
18-
19-
- $A(x) = 1$ (diffusion coefficient)
20-
- $B(x) = -10$ (advection coefficient)
21-
- $C(x) = 0$ (no reaction term)
22-
- $D(x) = 10 \cdot e^{-200 \cdot (x - 0.5)^2}$ (Gaussian source term centered at x = 0.5)
23-
24-
### Instructions
25-
26-
This example requires the `feascript` npm package and its peer dependencies (`mathjs`). It imports FEAScript directly from the npm package and runs the simulation in a Node.js environment. To run the example, follow these instructions:
27-
28-
1. **Create package.json with ES module support:**
29-
30-
```bash
31-
echo '{"type":"module"}' > package.json
32-
```
33-
34-
2. **Install dependencies:**
35-
36-
```bash
37-
npm install feascript mathjs
38-
```
39-
40-
3. **Run the example:**
41-
```bash
42-
node advectionDiffusion1D.js
43-
```
5+
This example demonstrates solving a one-dimensional advection-diffusion problem with a Gaussian source term. The problem models the transport of a substance under the effects of both diffusion and advection. For detailed information on the model setup refer to the corresponding [tutorial](https://feascript.com/tutorials/advection-diffusion-1d.html) in the FEAScript website.

examples/heatConductionScript/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ This directory contains Node.js examples demonstrating how to use the FEAScript
88

99
#### 1. Heat Conduction Through a Wall
1010

11-
This example demonstrates a heat flow case through a building wall. For detailed information on the model setup refer to the corresponding [tutorial](https://feascript.com/tutorials/HeatConduction1DWall.html) in the FEAScript website.
11+
This example demonstrates a heat flow case through a building wall. For detailed information on the model setup refer to the corresponding [tutorial](https://feascript.com/tutorials/heat-conduction-1d-wall.html) in the FEAScript website.
1212

1313
#### 2. Heat Conduction in a 2D Fin
1414

15-
This example demonstrates a typical cooling fin scenario. There are two Node.js implementations:
15+
This example demonstrates a typical cooling fin scenario. For detailed information on the model setup refer to the corresponding [tutorial](https://feascript.com/tutorials/heat-conduction-2d-fin.html) in the FEAScript website. There are two Node.js implementations:
1616

1717
#### i. Standard Version (`heatConduction2DFin.js`)
1818

1919
Basic implementation using the FEAScriptModel class
2020

2121
#### ii. Gmsh Version (`heatConduction2DFinGmsh.js`)
2222

23-
Implementation using an unstructured mesh generated by [Gmsh](https://gmsh.info/) (the mesh file, `rect_quad_unstruct.msh`, is also located in the current directory). For detailed information on the model setup refer to the corresponding [tutorial](https://feascript.com/tutorials/HeatConduction2DFin.html) in the FEAScript website.
23+
Implementation using an unstructured mesh generated by [Gmsh](https://gmsh.info/) (the mesh file, `rect_quad_unstruct.msh`, is also located in the current directory).
2424

2525
## Running the Examples
2626

0 commit comments

Comments
 (0)