|
1D Heat Equation Solver 1.0
Computational Methods Assignment 2025
|
Analytical solution for the 1D heat equation. More...
#include <analytical.hpp>

Static Public Member Functions | |
| static double | solve (double t, double x, const PhysParams &phys) |
| Compute the exact temperature at a given time and position. | |
| static std::vector< double > | get_profile (double t, const std::vector< double > &x_grid, const PhysParams &phys) |
| Generate a full temperature profile for a set of grid points. | |
Analytical solution for the 1D heat equation.
Problem: dT/dt = D * d^2T/dx^2 IC: T(x, 0) = Tin BC: T(0, t) = T(L, t) = Tsur
Solution (Series expansion): T(x,t) = Tsur + (Tin - Tsur) * 4/pi * Sum_{k=0,1,...} [ 1/(2k+1) * sin((2k+1)*pi*x/L) * exp(-D*((2k+1)*pi/L)^2 * t) ]
Definition at line 18 of file analytical.hpp.
|
static |
Generate a full temperature profile for a set of grid points.
| t | Time [h] |
| x_grid | Vector of positions |
| phys | Physical parameters |
Definition at line 37 of file analytical.cpp.


|
static |
Compute the exact temperature at a given time and position.
| t | Time [h] |
| x | Position [cm] |
| phys | Physical parameters (L, D, Tin, Tsur) |
Definition at line 6 of file analytical.cpp.
