-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmod_material.f90
More file actions
271 lines (243 loc) · 8.71 KB
/
Copy pathmod_material.f90
File metadata and controls
271 lines (243 loc) · 8.71 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
!!!#################################################################################################
!!! Module for material properties.
!!! This module contains the subroutines:
!!! - material, which takes the material type and returns the material properties.
!!! This module contains the variables:
!!! - imaterial_type, the material type.
!!! - TC, the temperature of the material.
!!! - kappa, the thermal conductivity of the material.
!!! - kappa3D, the thermal conductivity of the material in 3D.
!!! - h_conv, the convective heat transfer coefficient.
!!! - heat_capacity, the heat capacity of the material.
!!! - rho, the density of the material.
!!! - sound_speed, the speed of sound in the material.
!!! - tau, the relaxation time of the material.
!!! Author: Harry Mclean, Frank Davies, Steven Hepplestone
!!!#################################################################################################
module materials
use constants, only: real12, int12
use inputs, only: input_materials, grid
implicit none
contains
!!!#########################################################################
!!! Subroutine to get the material properties
!!! This subroutine takes the material type and returns the material properties.
!!! The material properties are:
!!! - kappa, the thermal conductivity of the material.
!!! - kappa3D, the thermal conductivity of the material in 3D.
!!! - h_conv, the convective heat transfer coefficient.
!!! - heat_capacity, the heat capacity of the material.
!!! - rho, the density of the material.
!!! - sound_speed, the speed of sound in the material.
!!! - tau, the relaxation time of the material.
!!! - em, the emissivity of the material.
!!! The material type is an integer that corresponds to a material in the input_materials array.
!!! If the material type is less than 100, the material properties are taken from the ...
!!! ...input_materials array.
!!! If the material type is greater than 100, the material properties are taken from a default case.
!!! If the material type is not found, an error message is printed and the program exits.
!!! The material properties are returned as arguments.
!!! Arguments:
!!! - imaterial_type, the material type.
!!! - kappa, the thermal conductivity of the material.
!!! - kappa3D, the thermal conductivity of the material in 3D.
!!! - h_conv, the convective heat transfer coefficient.
!!! - heat_capacity, the heat capacity of the material.
!!! - rho, the density of the material.
!!! - sound_speed, the speed of sound in the material.
!!! - tau, the relaxation time of the material.
!!! - em, the emissivity of the material.
!!!#########################################################################
subroutine material(imaterial_type,kappa,heat_capacity,rho,tau, em)
integer(int12), intent(in) ::imaterial_type
integer(int12) :: i, tmp
real(real12), intent(inout) :: kappa, heat_capacity, rho, tau
real(real12), intent(inout) :: em
logical :: found
real(real12) :: kappa3D, h_conv, sound_speed !Not currently used
!!!=============================================
!!! notes ::
!!! 140 - silicon
!!! 3001 - air (convection - h 50)
!!! 3002 - air (convection - h 100)
!!! 3003 - air (convection - h 200)
!!! 3004 - air (convection - h 0)
!!!
!!! 9001 - Muscle !values provided by A. Ghita
!!! 9002 - epidermis !values provided by A. Ghita
!!! 9003 - fat !values provided by A. Ghita
!!!=============================================
!print*, grid%imaterial_type
! Error for unsutable imaterial_type
if (imaterial_type .le. 0) then
write(6,*) 'Error: imaterial_type not recognized:', imaterial_type
write(6,*) ' imaterial_type cannot be zero or negative'
call exit
end if
!-------------------------------------------------
! an if to test if material
!-------------------------------------------------
mat: if (imaterial_type .le. 99) then
found = .false.
mat_loop: do i=1, size(input_materials%index)
tmp=input_materials(i)%index
if (tmp .eq. imaterial_type) then
found = .true.
heat_capacity = input_materials(i)%heat_capacity
!h_conv = input_materials(i)%h_conv
kappa = input_materials(i)%kappa
!kappa3D = input_materials(i)%kappa3D
rho = input_materials(i)%rho
!sound_speed = input_materials(i)%sound_speed
tau = input_materials(i)%tau
em = input_materials(i)%em
exit mat_loop
end if
end do mat_loop
! Error for unfound imaterial_type
if (.not. found) then
write(6,*) 'Error: imaterial_type not recognized:', imaterial_type
call exit
end if
end if mat
!^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
!-------------------------------------------------
! if to test if material is a default
!-------------------------------------------------
if (imaterial_type .gt. 99) then
select case(imaterial_type)
!!!air
case(100)
heat_capacity=1.0!0.718 !730.0
h_conv=21.4 !engineering toolbox, v~1[m/s]
! heat_diffusion=1.0 !9.909090909e-07
kappa=1.0!0.02587 ! engineering toolbox at 20c
kappa3D=0.02587
rho=1.0!1.225
tau= 0.0
!!1-1000 are reserved for solids.
!!1-120 are elemental solids
!!1001-2000 are for liquids,
!!2001-3000 are for gases
!!3001+ are for miscelanneous
!^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
!!!Solids
!!! 140 - silicon
!!! Gases
!!! 3001 - air
!!!Sample case is Silicon (ai bees)
case(140)
heat_capacity=4200.0!! all sources
h_conv=0 !moving bee at 5m/s
! heat_diffusion=1.0 !9.909090909e-07
kappa=130.0
kappa3D=130.0 !from www.ioffe.ru thermal properties of silicon
rho=2328.0 ! from all sources
sound_speed=8433.0 !...
!plastic
case(3001)
heat_capacity=840.0
h_conv=0.0 !!ranges between 10 and 100
kappa=0.19
kappa3D=0.19
rho=941.0
sound_speed=1000.0
!soil 1
case(3002)
heat_capacity=1100.0 !this is 40% wet soil from engineering toolbox
h_conv=0.0 !!ranges between 10 and 100
kappa=1.42
kappa3D=1.42
rho=1700.0
sound_speed=1000.0
!soil 2
case(3003)
heat_capacity=1400.0
h_conv=0 !!ranges between 10 and 100
kappa=1.59
kappa3D=1.59
rho=1800.0
sound_speed=1000.0
!clay
case(3004)
heat_capacity=2300.0
h_conv=0 !!ranges between 10 and 100
kappa=1.25
kappa3D=1.25
rho=2300.0
sound_speed=1000.0 !approx.
!muscle
case(9001)
heat_capacity=3421.0
h_conv=0.0 !!ranges between 10 and 100
kappa=0.6
kappa3D=0.0
rho=1090.0
sound_speed=3.0
!epidermis
case(9002)
heat_capacity=3391.0
h_conv=0.0 !!ranges between 10 and 100
kappa=0.209
kappa3D=0.0
rho=1109.0
sound_speed=3.0
!fat
case(9003)
heat_capacity=2348.0
h_conv=0.0
kappa=0.317
kappa3D=0.0
rho=911.0
sound_speed=3.0 !380.0
!Si
case(310)
heat_capacity= 700.0
h_conv = 0.0
kappa = 130.0
kappa3D = 130.0
rho = 2329.0
sound_speed = 8433.0
!SiO2
case(320)
heat_capacity= 720.0
h_conv = 0.0
kappa = 1.4
kappa3D = 1.4
rho = 2400.0
sound_speed=5970.0
tau = 1.0
!Silver
case(330)
heat_capacity = 236.0
h_conv = 0.0
kappa = 427.0
kappa3D = 429.0
rho = 10524.0
sound_speed = 3650.0
!SU8
case(340)
heat_capacity= 1500.0 !https://doi.org/10.1016/j.ijheatmasstransfer.2021.122346
h_conv = 0.0
kappa = 0.2 !kayaku am data sheet for SU8 3000 series
kappa3D = 0.2
rho = 1153.0 !kayaku am data sheet for SU8 3000 series
sound_speed= 8433.0 !UNKNOWN, TAKEN FROM Si
tau = 1.0
!ITO
case(350)
heat_capacity= 361.0
h_conv = 0.0
kappa = 10.2
kappa3D = 10.2
rho = 7140.0
sound_speed= 3650.0 !UNKNOWN, TAKEN FROM Ag
tau = 1.0
case default
write(6,*) 'Error: imaterial_type not recognized:', imaterial_type
call exit
end select
end if
end subroutine material
!!!#########################################################################
end module materials