36 1 TEMP ,NSENSOR ,SENSOR_TAB,FTHE ,IAD ,
37 2 FTHESKY, PYTHON ,GLOB_THERM)
47#include "implicit_f.inc"
58 type (glob_therm_) ,
intent(inout) :: glob_therm
59 INTEGER ,
INTENT(IN) :: NSENSOR
60 INTEGER NPC(*),IAD(4,*)
61 INTEGER IBCR(GLOB_THERM%NIRADIA,*)
64 . fradia(glob_therm%LFACTHER,*), tf(*), x(3,*),
65 . fthesky(lsky), temp(*), fthe(*)
66 TYPE (SENSOR_STR_) ,
DIMENSION(NSENSOR) ,
INTENT(IN) :: SENSOR_TAB
67 TYPE(PYTHON_) :: PYTHON
71 INTEGER NL, N1, N2, N3, N4, ISENS,
72 . IFUNC_OLD,IFUNC,IAD1,IAD2,IAD3,IAD4
74 my_real :: NX, NY, NZ, DYDX, TS, FLUX,
75 . ts_old, fcx, fcy, t_inf, te,
area,
76 . startt, stopt, fcy_old, emisig, offg
78 my_real :: heat_radia_l
80 INTEGER :: OMP_GET_THREAD_NUM,ITSK
81 EXTERNAL omp_get_thread_num
98 itsk = omp_get_thread_num()
103 DO nl=1,glob_therm%NUMRADIA
105 IF(offg <= zero) cycle
106 startt = fradia(4,nl)
110 ts = tt*glob_therm%THEACCFACT - startt
112 startt = startt + sensor_tab(isens)%TSTART
113 stopt = stopt + sensor_tab(isens)%TSTART
114 ts = tt*glob_therm%THEACCFACT -(startt + sensor_tab(isens)%TSTART)
117 IF(tt*glob_therm%THEACCFACT < startt) cycle
118 IF(tt*glob_therm%THEACCFACT > stopt ) cycle
130 IF(ifunc_old /= ifunc .OR. ts_old /= ts .OR. fcy_old /= fcy )
THEN
132 IF (ifunc > 0) ismooth = npc(2*nfunct+ifunc+1)
134 CALL python_call_funct1d(python, -ismooth,ts*fcx, t_inf)
137 t_inf = fcy*finter(ifunc, ts*fcx,npc,tf,dydx)
146 nx= (x(2,n3)-x(2,n1))*(x(3,n4)-x(3,n2))
147 + -(x(3,n3)-x(3,n1))*(x(2,n4)-x(2,n2))
148 ny= (x(3,n3)-x(3,n1))*(x(1,n4)-x(1,n2))
149 + -(x(1,n3)-x(1,n1))*(x(3,n4)-x(3,n2))
150 nz= (x(1,n3)-x(1,n1))*(x(2,n4)-x(2,n2))
151 + -(x(2,n3)-x(2,n1))*(x(1,n4)-x(1,n2))
153 te = fourth*(temp(n1) + temp(n2) + temp(n3) + temp(n4))
154 area = half*sqrt( nx*nx + ny*ny + nz*nz)
155 flux =
area*emisig*(t_inf**4 - te**4)*dt1*glob_therm%THEACCFACT
156 heat_radia_l = heat_radia_l + flux
159 fthe(s1*itsk+n1) = fthe(s1*itsk+n1) + flux
160 fthe(s1*itsk+n2) = fthe(s1*itsk+n2) + flux
161 fthe(s1*itsk+n3)= fthe(s1*itsk+n3) + flux
162 fthe(s1*itsk+n4)= fthe(s1*itsk+n4) + flux
167 nx= (x(2,n3)-x(2,n1))*(x(3,n3)-x(3,n2))
168 + -(x(3,n3)-x(3,n1))*(x(2,n3)-x(2,n2))
170 + -(x(1,n3)-x(1,n1))*(x(3,n3)-x(3,n2))
171 nz= (x(1,n3)-x(1,n1))*(x(2,n3)-x(2,n2))
172 + -(x(2,n3)-x(2,n1))*(x(1,n3)-x(1,n2))
174 te = third*(temp(n1) + temp(n2) + temp(n3) )
175 area = half*sqrt( nx*nx + ny*ny + nz*nz)
176 flux =
area*emisig*(t_inf**4 - te**4)*dt1*glob_therm%THEACCFACT
177 heat_radia_l = heat_radia_l + flux
180 fthe(s1*itsk+n1) = fthe(s1*itsk+n1) + flux
181 fthe(s1*itsk+n2) = fthe(s1*itsk+n2) + flux
182 fthe(s1*itsk+n3)= fthe(s1*itsk+n3) + flux
188 te = half*(temp(n1) + temp(n2) )
189 area = sqrt( ny*ny + nz*nz)
190 flux =
area*emisig*(t_inf**4 - te**4)*dt1*glob_therm%THEACCFACT
191 glob_therm%HEAT_RADIA = glob_therm%HEAT_RADIA + flux
194 fthe(s1*itsk+n1)=fthe(s1*itsk+n1) + flux
195 fthe(s1*itsk+n2)=fthe(s1*itsk+n2) + flux
202 glob_therm%HEAT_RADIA = glob_therm%HEAT_RADIA + heat_radia_l
211 DO nl=1,glob_therm%NUMRADIA
212 startt = fradia(4,nl)
217 ts = tt*glob_therm%THEACCFACT - startt
219 startt = startt + sensor_tab(isens)%TSTART
220 stopt = stopt + sensor_tab(isens)%TSTART
221 ts = tt*glob_therm%THEACCFACT -(startt + sensor_tab(isens)%TSTART)
224 IF(tt*glob_therm%THEACCFACT < startt) iflag = 0
225 IF(tt*glob_therm%THEACCFACT > stopt ) iflag = 0
226 IF(offg <= zero) iflag = 0
239 IF(ifunc_old /= ifunc .OR. ts_old /= ts
THEN
240 IF (ifunc > 0) ismooth = npc(2*nfunct+ifunc+1)
241 IF(ismooth < 0 .AND. ifunc > 0)
THEN
242 CALL python_call_funct1d(python,
244 t_inf = finter(ifunc,ts*fcx,npc,tf,dydx)
252 nx= (x(2,n3)-x(2,n1))*(x(3,n4)-x(3,n2))
253 + -(x(3,n3)-x(3,n1))*(x(2,n4)-x(2,n2))
254 ny= (x(3,n3)-x(3,n1))*(x(1,n4)-x(1,n2))
255 + -(x(1,n3)-x(1,n1))*(x(3,n4)-x(3,n2))
256 nz= (x(1,n3)-x(1,n1))*(x(2,n4)-x(2,n2))
257 + -(x(2,n3)-x(2,n1))*(x(1,n4)-x(1,n2))
258 te = fourth*(temp(n1) + temp(n2) + temp(n3) + temp(n4))
259 area = half*sqrt( nx*nx + ny*ny + nz*nz)
260 flux =
area*emisig*(t_inf**4 - te**4)*dt1*glob_therm%THEACCFACT
261 heat_radia_l = heat_radia_l + flux
275 nx= (x(2,n3)-x(2,n1))*(x(3,n3)-x(3,n2))
276 + -(x(3,n3)-x(3,n1))*(x(2,n3)-x(2,n2))
277 ny= (x(3,n3)-x(3,n1))*(x(1,n3)-x(1,n2))
278 + -(x(1,n3)-x(1,n1))*(x(3,n3)-x(3,n2))
279 nz= (x(1,n3)-x(1,n1))*(x(2,n3)-x(2,n2))
280 + -(x(2,n3)-x(2,n1))*(x(1,n3)-x(1,n2))
282 te = third*(temp(n1) + temp(n2) + temp(n3) )
283 area = half*sqrt( nx*nx + ny*ny + nz*nz)
284 flux =
area*emisig*(t_inf**4 - te**4)*dt1*glob_therm%THEACCFACT
285 heat_radia_l = heat_radia_l + flux
303 te = half*(temp(n1) + temp(n2) )
304 area = sqrt( ny*ny + nz*nz)
305 flux =
area*emisig*(t_inf**4 - te**4)*dt1*glob_therm%THEACCFACT
306 heat_radia_l = heat_radia_l + flux
335 glob_therm%HEAT_RADIA = glob_therm%HEAT_RADIA + heat_radia_l