Examples¶
Ready-to-follow tutorials demonstrating common Elementa workflows.
Example 1 — Parallel Plate Capacitor (2-D Electrostatics)¶
Goal: Compute the electric potential and field between two parallel conducting plates separated by vacuum.
Setup¶
| Parameter | Value |
|---|---|
| Plate width | 0.1 m |
| Plate height | 0.01 m |
| Gap | 0.02 m |
| Voltage | ±50 V |
Steps¶
- New project → 2D, Electrostatics, Stationary.
- Parameters:
W=0.1,H=0.01,gap=0.02. - Geometry:
- Rectangle
domain:dx=0.15,dy=0.1,cx=0,cy=0 - Rectangle
plate_top:dx=W,dy=H,cx=0,cy=gap/2+H/2 - Rectangle
plate_bot:dx=W,dy=H,cx=0,cy=-gap/2-H/2 - Mesh: element size
0.004. - Boundary Conditions:
plate_topboundaries → Electric Potential,value = 50plate_botboundaries → Electric Potential,value = -50- outer
domainboundaries → Ground - Solve.
- Results: surface plot of φ, arrow plot of E.
Expected Result¶
The potential varies linearly between the plates. The electric field magnitude in the gap is approximately:
\[|E| \approx \frac{\Delta V}{d} = \frac{100 \text{ V}}{0.02 \text{ m}} = 5000 \text{ V/m}\]
Example 2 — Heat Conduction Through a Wall (2-D Heat Transfer)¶
Goal: Compute the steady-state temperature distribution through a composite wall with fixed temperatures on each face.
Setup¶
| Parameter | Value |
|---|---|
| Wall thickness | 0.3 m |
| Wall height | 1.0 m |
| Inner temperature | 293 K (20 °C) |
| Outer temperature | 253 K (−20 °C) |
| Thermal conductivity | 0.04 W/(m·K) (insulation) |
Steps¶
- New project → 2D, Heat Transfer, Stationary.
- Parameters:
L=0.3,H=1.0,k=0.04. - Geometry: Rectangle
wall:dx=L,dy=H,cx=0,cy=0. - Physics config: set Thermal Conductivity to
k. - Mesh: element size
0.02. - Boundary Conditions:
- Left edge (
wall_edge_3) → Temperature,value = 293.15 - Right edge (
wall_edge_1) → Temperature,value = 253.15 - Top/bottom edges → Thermal Insulation
- Solve.
- Results: surface plot of T, arrow plot of heat flux q.
Expected Result¶
A linear temperature gradient from 293 K to 253 K across the wall. Heat flux:
\[q = k \frac{\Delta T}{L} = 0.04 \times \frac{40}{0.3} \approx 5.3 \text{ W/m}^2\]
Example 3 — Transient Heating of a Block (2-D Heat Transfer, Time Dependent)¶
Goal: Simulate heating of a solid block from an initial temperature of 20 °C when one face is held at 100 °C.
Steps¶
- New project → 2D, Heat Transfer, Time Dependent.
- Parameters:
L=0.1,rho=2700,cp=900,k=200(aluminium). - Geometry: Square block
block:dx=L,dy=L. - Physics config:
- Thermal Conductivity:
k - Density:
rho - Heat Capacity:
cp - Study → Time Dependent:
t_start=0,t_end=100,dt=5. - Boundary Conditions:
- Left face → Temperature,
value = 373.15(100 °C) - Others → Thermal Insulation
- Solve.
- Results: Use the time slider in the plot panel to animate the temperature field evolution.
Example 4 — Sphere with Surface Charge (3-D Electrostatics)¶
Goal: Verify the analytical electric potential outside a uniformly charged sphere.
Steps¶
- New project → 3D, Electrostatics, Stationary.
- Parameters:
R=0.05,R_ext=0.2. - Geometry:
- Sphere
inner:r=R - Sphere
outer:r=R_ext - Boolean Difference
domain=outer−inner - Boundary Conditions:
- Inner sphere surface → Surface Charge Density,
value = 1e-6 - Outer sphere surface → Ground
- Mesh: element size
0.02. - Solve.
- Results: surface plot of φ, verify against Coulomb's law.