Solver Inputs
This page keeps a single-column flow. The calculator fields below use a responsive three, two, and one-column arrangement.
Formula Used
This solver handles the steady one-dimensional diffusion equation with a linearized source term over uniform control volumes.
d/dx ( Γ A dφ/dx ) + A(Su + Spφ) = 0
For each interior control volume, the algebraic finite-volume form is:
aP φP = aW φW + aE φE + b
- Δx = L / N
- De = ΓA / Δx
- aW = De
- aE = De
- aP = aW + aE - Sp(AΔx)
- b = Su(AΔx)
The boundary cells use half-cell distances, so each Dirichlet boundary contributes 2De to the source and diagonal coefficient.
The resulting tridiagonal system is solved by the Thomas algorithm, also called TDMA.
How to Use This Calculator
- Enter a case label and choose the scalar name.
- Set the domain length, number of control volumes, and area.
- Enter the diffusion coefficient Γ for your physics problem.
- Add source terms Su and Sp if generation or sink exists.
- Specify the left and right boundary values.
- Choose the displayed decimal precision.
- Click Solve with FVM to compute the field.
- Review the summary cards, graph, and nodewise table.
- Download CSV for spreadsheets or PDF for reporting.
Example Data Table
Example case: L = 1, N = 6, A = 1, Γ = 1.2, Su = 0, Sp = 0, left = 100, right = 200.
| Node | x | Example Field | Interpretation |
|---|---|---|---|
| 1 | 0.0833 | 108.3333 | Near the left boundary. |
| 2 | 0.2500 | 125.0000 | Linear rise continues. |
| 3 | 0.4167 | 141.6667 | Mid-domain value. |
| 4 | 0.5833 | 158.3333 | Symmetric linear trend. |
| 5 | 0.7500 | 175.0000 | Approaches right boundary. |
| 6 | 0.9167 | 191.6667 | Last cell center value. |
FAQs
1) What equation does this solver handle?
It solves the steady one-dimensional diffusion equation with a linearized source term. This covers simplified heat conduction, scalar transport, electric potential, and similar physics models on a uniform grid.
2) What do Su and Sp represent?
Su is the constant source term per unit volume. Sp multiplies the local scalar value. Together they model generation, absorption, or linearized physics contributions inside each control volume.
3) Why is a negative Sp often recommended?
A non-positive Sp usually strengthens diagonal dominance in the algebraic system. That improves stability and keeps the resulting matrix better behaved for diffusion-dominated steady problems.
4) Why does the solver use a uniform grid?
A uniform mesh keeps the formulation transparent and easy to verify. It is ideal for learning, quick estimates, and many smooth one-dimensional problems without geometric stretching.
5) What do the residuals show?
Residuals measure how closely each control-volume equation is balanced after solving. Values near zero mean the discrete conservation equations are satisfied well at that node.
6) Can I use this for temperature, concentration, or voltage?
Yes. The variable is written as a generic scalar φ. You can interpret it as temperature, concentration, potential, or another diffusing quantity.
7) Does this model transient behavior?
No. This page solves steady-state conditions only. Time-dependent diffusion would need an added transient storage term and time-marching scheme.
8) When should I increase the number of control volumes?
Use more cells when gradients are steep, source terms are strong, or you need smoother plots. Grid refinement also helps confirm that the solution is mesh independent.