-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathheat.lua
77 lines (76 loc) · 1.56 KB
/
heat.lua
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
73
74
75
76
77
dx = 2 / 50
simulation = {
mesh = {
index_extents = {51, 51},
domain_bounds = {2, 2}
},
domain_boundaries = {
xmin = "dirichlet",
xmax = "dirichlet",
ymin = "dirichlet",
ymax = "dirichlet"
},
shapes = {
{
type = "sphere",
center = {16 / 17, 25 / 22},
radius = math.sqrt(3) / 10,
boundary_condition = "floating"
}
},
scheme = {
order = 2,
type = "E2"
},
system = {
type = "heat",
diffusivity = 1 / 30
},
integrator = {
type = "rk4"
},
step_controller = {
max_time = 0.3,
cfl = {
parabolic = 0.5
}
},
manufactured_solution = {
type = "gaussian",
--[[
{
center = {0.4, 0.5},
variance = {0.5, 0.2},
amplitude = 2,
frequency = 0.5
},
{
center = {0.2, 2},
variance = {1 / 3, 0.8},
amplitude = 0.5,
frequency = 1
},
{
center = {1.5, 1.6},
variance = {0.3, 0.8},
amplitude = -1.2,
frequency = 0.8
},
{
center = {1.8, 0.3},
variance = {2 / 3, 0.9},
amplitude = 3,
frequency = 0.2
}
]]
{
center = {1, 1},
variance = {1, 1},
amplitude = 2,
frequency = 0.5
}
},
io = {
write_every_time = 0.01
}
}