-
Notifications
You must be signed in to change notification settings - Fork 0
/
heat_diffusion.rs
52 lines (39 loc) · 999 Bytes
/
heat_diffusion.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
use serde::Serialize;
use crate::{
diagnostics::geometry_diagnostics::GeometryDiagnostics, simulation::Simulation,
utils::config_loading::Config,
};
pub mod heat_diffusion;
pub mod heat_diffusion_rework;
#[derive(Serialize)]
struct TemperatureData {
time: f64,
mean_temperature: f64,
maximum_temperature: f64,
}
pub struct HeatDiffusion {
simulation: Simulation,
geometry: GeometryDiagnostics,
config: Config,
fission_source_array: Vec<f64>,
simulation_directions: Vec<SimulationDirections>,
t_delta: f64,
t_end: f64,
time_steps: u64,
minimum_relevant_property_index: usize,
cell_volume: f64,
relevant_tuples: Vec<(usize, usize, usize)>,
material_index_array: Vec<usize>,
temperature_array: Vec<f64>,
temperature_array_new: Vec<f64>,
temperature_data_array: Vec<TemperatureData>,
source_term_constant: f64,
}
enum SimulationDirections {
North,
South,
East,
West,
Top,
Bottom,
}