-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathheat_transfer_user_inputs_classic.py
72 lines (70 loc) · 3.14 KB
/
heat_transfer_user_inputs_classic.py
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
"""
This module is responsible for defining information we want to get from user.
"""
class UserInputServiceClassic:
def __init__(self):
self.number_parameters_to_get_from_user = [
{"name": "Simulation step",
"description": "How big steps to take when simulating. The larger, the quicker the simulation.",
"input_name": "simulation_step_input_seconds",
"variable_name": "dt",
"default_value": 90,
"parse_function": float,
"multiplicate_to_SI": 1,
"unit": "seconds",
"unit_abbrev": "s"},
{"name": "Object length",
"description": "The length of the 1D object we are simulating.",
"input_name": "object_length_input_centimetres",
"variable_name": "object_length",
"default_value": 1,
"parse_function": float,
"multiplicate_to_SI": 0.01,
"unit": "centimeters",
"unit_abbrev": "cm"},
{"name": "Position of interest",
"description": "The distance in which we should determine the temperature.",
"input_name": "place_position_input_centimetres",
"variable_name": "place_of_interest",
"default_value": 0.445,
"parse_function": float,
"multiplicate_to_SI": 0.01,
"unit": "centimetres",
"unit_abbrev": "cm"},
{"name": "Number of elements",
"description": "How granular should be the simulation.",
"input_name": "number_of_elements_input",
"variable_name": "number_of_elements",
"default_value": 36,
"parse_function": int,
"multiplicate_to_SI": 1,
"unit": "",
"unit_abbrev": "-"},
{"name": "Plotting period",
"description": "How frequently to update the plot (in simulation seconds).",
"input_name": "plotting_period_input",
"variable_name": "callback_period",
"default_value": 1000,
"parse_function": int,
"multiplicate_to_SI": 1,
"unit": "seconds",
"unit_abbrev": "s"},
{"name": "Theta",
"description": "Determines explicitness (0) and implicitness (1) of the algorithm approach.",
"input_name": "theta_input",
"variable_name": "theta",
"default_value": 0.5,
"parse_function": float,
"multiplicate_to_SI": 1,
"unit": "",
"unit_abbrev": "-"},
{"name": "Robin Alpha",
"description": "Defines the convection heat transfer coeficient.",
"input_name": "robin_alpha_input",
"variable_name": "robin_alpha",
"default_value": 13.5,
"parse_function": float,
"multiplicate_to_SI": 1,
"unit": "Watt/Kelvin",
"unit_abbrev": "W/K"}
]