-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathelder_user_data.lua
More file actions
98 lines (81 loc) · 1.56 KB
/
elder_user_data.lua
File metadata and controls
98 lines (81 loc) · 1.56 KB
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
--------------------------------
-- User Data Functions 2D
--------------------------------
if dim == 2 then
function ConcentrationStart(x, y, t)
if y == 150 then
if x > 150 and x < 450 then
return 1.0
end
end
return 0.0
end
function PressureStart(x, y, t)
return 9810 * (150 - y)
end
function ConcentrationDirichletBnd(x, y, t)
if y == 150 then
if x > 150 and x < 450 then
return true, 1.0
end
end
if y == 0.0 then
return true, 0.0
end
return false, 0.0
end
function PressureDirichletBnd(x, y, t)
if y == 150 then
if x == 0.0 or x == 600 then
return true, 9810 * (150 - y)
end
end
return false, 0.0
end
function Porosity(x,y,t)
return 0.1
end
else
--------------------------------
-- User Data Functions 3D
--------------------------------
function ConcentrationStart(x, y, z, t)
if z == 150 then
if y > 150 and y < 450 then
if x > 150 and x < 450 then
return 1.0
end
end
end
return 0.0
end
function PressureStart(x, y, z, t)
return 9810 * (150 - z)
end
function ConcentrationDirichletBnd(x, y, z, t)
if z == 150 then
if y > 150 and y < 450 then
if x > 150 and x < 450 then
return true, 1.0
end
end
end
if z == 0.0 then
return true, 0.0
end
return false, 0.0
end
function PressureDirichletBnd(x, y, z, t)
if z == 150 then
if y == 0.0 or y == 600 then
if x == 0.0 or x == 600 then
return true, 9810 * (150 - z)
end
end
end
return false, 0.0
end
function Porosity(x,y,z,t)
return 0.1
end
end