1D Heat Equation Solver 1.0
Computational Methods Assignment 2025
Loading...
Searching...
No Matches
types.hpp
Go to the documentation of this file.
1#pragma once
2/**
3 * @file types.hpp
4 * @brief Basic physical and numerical parameter types for the 1D heat problem.
5 */
6
7/**
8 * @brief Physical parameters of the wall heat conduction problem.
9 */
10struct PhysParams {
11 double L_cm = 31.0; ///< Wall thickness [cm]
12 double D_cm2h = 93.0; ///< Thermal diffusivity [cm^2/h]
13 double Tin = 38.0; ///< Initial temperature [°C]
14 double Tsur = 149.0; ///< Surface (Dirichlet) temperature [°C]
15};
16
17/**
18 * @brief Numerical parameters controlling the discretization and output.
19 */
20struct NumParams {
21 double dx = 0.05; ///< Spatial step [cm]
22 double dt = 0.01; ///< Time step [h]
23 double tEnd = 0.5; ///< Final time [h]
24 double outEvery = 0.1; ///< Output interval [h]
25};
Numerical parameters controlling the discretization and output.
Definition types.hpp:20
double dx
Spatial step [cm].
Definition types.hpp:21
double outEvery
Output interval [h].
Definition types.hpp:24
double tEnd
Final time [h].
Definition types.hpp:23
double dt
Time step [h].
Definition types.hpp:22
Physical parameters of the wall heat conduction problem.
Definition types.hpp:10
double Tin
Initial temperature [°C].
Definition types.hpp:13
double D_cm2h
Thermal diffusivity [cm^2/h].
Definition types.hpp:12
double L_cm
Wall thickness [cm].
Definition types.hpp:11
double Tsur
Surface (Dirichlet) temperature [°C].
Definition types.hpp:14