OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
pblast_3.F File Reference
#include "implicit_f.inc"
#include "comlock.inc"
#include "param_c.inc"
#include "com04_c.inc"
#include "com08_c.inc"
#include "parit_c.inc"
#include "scr14_c.inc"
#include "scr16_c.inc"
#include "mvsiz_p.inc"
#include "units_c.inc"
#include "sysunit.inc"
#include "tabsiz_c.inc"
#include "lockon.inc"
#include "lockoff.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine pblast_3 (pblast, iloadp, fac, a, v, x, iadc, fsky, lloadp, fext, noda_surf, noda_pext, itab, h3d_data, nl, dtmin_loc, wfext_loc, th_surf, nsegpl)

Function/Subroutine Documentation

◆ pblast_3()

subroutine pblast_3 ( type(pblast_), intent(inout) pblast,
integer, dimension(sizloadp,nloadp), intent(inout) iloadp,
dimension(lfacload,nloadp), intent(inout) fac,
dimension(3,numnod), intent(inout) a,
dimension(3,numnod), intent(in) v,
dimension(3,numnod), intent(in) x,
integer, dimension(*), intent(in) iadc,
dimension(8,sfsky/8), intent(inout) fsky,
integer, dimension(slloadp), intent(in) lloadp,
dimension(3,numnod), intent(inout) fext,
dimension(numnod), intent(inout) noda_surf,
dimension(numnod), intent(inout) noda_pext,
integer, dimension(numnod), intent(in) itab,
type(h3d_database), intent(in) h3d_data,
integer, intent(in) nl,
intent(inout) dtmin_loc,
double precision, intent(inout) wfext_loc,
type (th_surf_), intent(inout) th_surf,
integer, intent(inout) nsegpl )

Definition at line 41 of file pblast_3.F.

46C-----------------------------------------------
47C M o d u l e s
48C-----------------------------------------------
49 USE h3d_mod
50 USE pblast_mod
51 USE groupdef_mod
52 USE h3d_inc_mod
53 USE th_surf_mod , ONLY : th_surf_
55 USE th_mod ,ONLY : th_has_noda_pext
56 USE output_mod , ONLY : h3d_has_noda_pext, anim_has_noda_pext
57C-----------------------------------------------
58C I m p l i c i t T y p e s
59C-----------------------------------------------
60#include "implicit_f.inc"
61#include "comlock.inc"
62#include "param_c.inc"
63C-----------------------------------------------
64C C o m m o n B l o c k s
65C-----------------------------------------------
66#include "com04_c.inc"
67#include "com08_c.inc"
68#include "parit_c.inc"
69#include "scr14_c.inc"
70#include "scr16_c.inc"
71#include "mvsiz_p.inc"
72#include "units_c.inc"
73#include "sysunit.inc"
74#include "tabsiz_c.inc"
75C-----------------------------------------------
76C D u m m y A r g u m e n t s
77C-----------------------------------------------
78 INTEGER,INTENT(IN) :: LLOADP(SLLOADP)
79 INTEGER,INTENT(INOUT) :: ILOADP(SIZLOADP,NLOADP)
80 INTEGER,INTENT(IN) :: IADC(*)
81 INTEGER, INTENT(IN) :: ITAB(NUMNOD),NL
82 my_real,INTENT(INOUT) :: dtmin_loc
83 DOUBLE PRECISION,INTENT(INOUT) :: WFEXT_LOC
84 my_real,INTENT(IN) :: v(3,numnod),x(3,numnod)
85 my_real,INTENT(INOUT) :: fac(lfacload,nloadp)
86 my_real,INTENT(INOUT) :: a(3,numnod),fsky(8,sfsky/8)
87 my_real,INTENT(INOUT) :: fext(3,numnod)
88 my_real,INTENT(INOUT) :: noda_surf(numnod)
89 my_real,INTENT(INOUT) :: noda_pext(numnod)
90 TYPE(H3D_DATABASE),INTENT(IN) :: H3D_DATA
91 TYPE (TH_SURF_) , INTENT(INOUT) :: TH_SURF
92 INTEGER, INTENT(INOUT) :: NSEGPL
93 TYPE(PBLAST_),INTENT(INOUT) :: PBLAST
94C-----------------------------------------------
95C L o c a l V a r i a b l e s
96C-----------------------------------------------
97 CHARACTER(LEN=NCHARLINE) :: MSGOUT1,MSGOUT2
98 TYPE(FRIEDLANDER_PARAMS_) :: FRIEDLANDER_PARAMS
99 INTEGER N1, N2, N3, N4,IL,IS,IAD,I,IANIM_OR_H3D,IZ_UPDATE,ABAC_ID,ISIZ_SEG,IERR1
100 INTEGER ID, ITA_SHIFT,IMODEL
101 INTEGER :: NS,KSURF
102 INTEGER :: curve_id1, curve_id2, NN(4), NDT
103 LOGICAL :: BOOL_UNDERGROUND_CURRENT_SEG, IS_DECAY_TO_BE_COMPUTED
104 LOGICAL,SAVE :: IS_UPDATED
105 INTEGER :: NWARN !< number of segment for which it is not possible to correlate the positive impulse. It may happen that for a given Pmax and dt0 value even building a triangle shape leads to a lower impulse that the targeted one.
106
107 my_real :: zx,zy,zz,norm,nx,ny,nz ! target face centroid and normal vector
108 my_real nnx,nny,nnz,norm_nn, norm2_nn, tmp_var ! ground vector
109 my_real hz ! height of centroid
110 my_real lg,zg ! ground distance and scaled ground distance(SHDC : scaled horizontal distance from charge)
111 my_real zc ! scaled height of charge, and its value in ft/(lb**1/3)caled height of triple point
112 my_real angle_g ! angle of incidence at groundh front incident pressure and refelcted pressurese
113 my_real projz(3),projdet(3), tmp(3)
114 my_real z_struct ! scaled height for target face
115 my_real alpha_zc ! interpolation between curves Scaled Height of Charge
116
117 my_real cos_theta, alpha_inci, alpha_refl,p_inci,p_refl,z,
118 . i_inci,i_refl,dt_0,t_a,wave_refl,wave_inci, w13
119 my_real dnorm,xdet,ydet,zdet,tdet,wtnt,pmin,t_stop,dx,dy,dz,p,
120 . fac_m_bb, fac_l_bb, fac_t_bb, fac_p_bb, fac_i_bb, ta_first, tt_star
121 my_real hc ! height of charge
122 my_real z1_
123 my_real decay_inci,decay_refl,area
124 my_real npt
125 my_real :: ta_inf_loc, zeta
126 my_real :: surf_patch
127
128 my_real pi_
129 DATA pi_/3.141592653589793238462643d0/
130
131 my_real dzc
132 DATA dzc /0.07058823500000000/
133
134 my_real :: cst_255_div_ln_z1_on_zn
135 DATA cst_255_div_ln_z1_on_zn/-38.147316611455952998/
136
137 my_real ::log10_
138 DATA log10_ /2.30258509299405000000/
139
140 my_real :: cst_180
141 DATA cst_180 /180.000000000000000000/
142
143 INTEGER,EXTERNAL :: DICHOTOMIC_SEARCH_R_DESC,DICHOTOMIC_SEARCH_R_ASC
144
145 my_real fac_unit ! convert scaled distance from cm/g^1/3 to ft/lb^1/3
146 DATA fac_unit/3.966977216838196139019/
147
148C-----------------------------------------------
149C D e s c r i p t i o n
150C-----------------------------------------------
151C This subroutines is applying pressure load to a segment submitted to a blast wave (AIR BURST model).
152C Preussre time histories are built from "UFC 3-340-02, Dec. 5th 2008" tables which are hardcoded in unit system {g, cm, mus}
153C (table sampling : 256 points ; see pblast_mod.F)
154C
155C T* = T + TA_INF (shift with first arrival time for all pblast option, TA_INF=0. if ita_shift/=2)
156C If request made to update blast profile (iz_update==2) then it is made once on T*=TDET
157C
158C-----------------------------------------------
159C P r e - C o n d i t i o n
160C-----------------------------------------------
161 !--- subroutine not relevant if no /LOAD/PBLAST option
162 IF(pblast%NLOADP_B==0)RETURN
163
164 !--- time step
165 ta_first = fac(07,nl) ! arrival time for first segment to be loaded
166 il= nl-nloadp_f
167 tt_star = tt + pblast%PBLAST_DT%TA_INF
168 iz_update = iloadp(06,nl)
169 tdet = fac(01,nl)
170 ta_first = fac(07,nl) + pblast%PBLAST_DT%TA_INF ! arrival time for first segment to be loaded
171 IF(iz_update ==1)THEN
172 !if no update during engine
173 dtmin_loc = (one+em06)*(ta_first - tt)
174 dtmin_loc=max(pblast%PBLAST_TAB(il)%DTMIN, dtmin_loc) !go directly to arrival time but avoid too
175 IF(tt_star<ta_first)RETURN ! (nothing to load for now)
176 ELSE
177 IF(tdet > tt)THEN
178 dtmin_loc = (one+em06)*(tdet - tt)
179 dtmin_loc=max(pblast%PBLAST_TAB(il)%DTMIN, dtmin_loc)!go directly to arrival time but avoid too
180 ELSE
181 dtmin_loc = pblast%PBLAST_TAB(il)%DTMIN
182 ENDIF
183 IF(tt_star<tdet)RETURN ! (nothing to update for now)
184 ENDIF
185C-----------------------------------------------,
186C S o u r c e C o d e
187C-----------------------------------------------
188 wfext_loc = zero
189 ianim_or_h3d = anim_v(5)+outp_v(5)+h3d_data%N_VECT_FINT + anim_v(6)+outp_v(6)+h3d_data%N_VECT_FEXT !output
190
191 !Z Range (tables)
192 z1_ = 0.500000000000000
193 !ZN = 400.000
194
195 !translation from Working unit System to {big bang} unit system
196 fac_m_bb = fac_mass*ep03
197 fac_l_bb = fac_length*ep02
198 fac_t_bb = fac_time*ep06
199 fac_p_bb = fac_m_bb/fac_l_bb/fac_t_bb/fac_t_bb
200 fac_i_bb = fac_p_bb*fac_t_bb !/FAC_M_bb**THIRD
201
202 is_updated=.false.
203 CALL my_barrier
204
205 !-----------------------------------------------,
206 ! AIR BURST
207 !-----------------------------------------------
208 il = nl-nloadp_f
209 tdet = fac(01,nl)
210 xdet = fac(02,nl)
211 ydet = fac(03,nl)
212 zdet = fac(04,nl)
213 wtnt = fac(05,nl)
214 pmin = fac(06,nl)
215 ta_first = fac(07,nl)
216 nnx = fac(08,nl)
217 nny = fac(09,nl)
218 nnz = fac(10,nl)
219 hc = fac(11,nl)
220 alpha_zc = fac(12,nl) !curve_id1+alpha_zc
221 t_stop = fac(13,nl)
222 isiz_seg = iloadp(01,nl)/4
223 is = iloadp(02,nl)
224 iz_update = iloadp(06,nl)
225 abac_id = iloadp(07,nl)
226 id = iloadp(08,nl) !user_id
227 ita_shift = iloadp(09,nl)
228 ndt = iloadp(10,nl)
229 imodel = iloadp(11,nl)
230 ta_inf_loc = ep20
231
232 is_decay_to_be_computed = .false.
233 IF(imodel == 2)is_decay_to_be_computed=.true.
234 nwarn = 0
235
236 !curve_id1+alpha_zc
237 curve_id1=int(alpha_zc)
238 curve_id2=min(10,curve_id1+1)
239 alpha_zc = alpha_zc - curve_id1
240
241 ierr1 = 0
242 w13 = (wtnt*fac_m_bb)**third ! '*FAC_M' g->work unit '/FAC_M' : WORK_UNIT -> g
243 z = zero
244 norm2_nn=nnx*nnx+nny*nny+nnz*nnz
245 norm_nn =sqrt(norm2_nn)
246
247 !---------------------------------------------
248 ! LOOP ON SEGMENTS (4N or 3N)
249 !---------------------------------------------
250!$OMP DO SCHEDULE(GUIDED,MVSIZ)
251 DO i = 1,isiz_seg
252
253 bool_underground_current_seg = .false.
254
255 n1=lloadp(iloadp(4,nl)+4*(i-1))
256 n2=lloadp(iloadp(4,nl)+4*(i-1)+1)
257 n3=lloadp(iloadp(4,nl)+4*(i-1)+2)
258 n4=lloadp(iloadp(4,nl)+4*(i-1)+3)
259
260 IF(n4 == 0 .OR. n3 == n4)THEN
261 !3-NODE-SEGMENT
262 pblast%PBLAST_TAB(il)%NPt(i) = three
263 npt = three
264 !Segment centroid
265 zx = x(1,n1)+x(1,n2)+x(1,n3)
266 zy = x(2,n1)+x(2,n2)+x(2,n3)
267 zz = x(3,n1)+x(3,n2)+x(3,n3)
268 zx = zx*third
269 zy = zy*third
270 zz = zz*third
271 !Normal vector (NX,NY,NZ) = 2*S*n where |n|=1.0
272 nx = (x(2,n3)-x(2,n1))*(x(3,n3)-x(3,n2)) - (x(3,n3)-x(3,n1))*(x(2,n3)-x(2,n2))
273 ny = (x(3,n3)-x(3,n1))*(x(1,n3)-x(1,n2)) - (x(1,n3)-x(1,n1))*(x(3,n3)-x(3,n2))
274 nz = (x(1,n3)-x(1,n1))*(x(2,n3)-x(2,n2)) - (x(2,n3)-x(2,n1))*(x(1,n3)-x(1,n2))
275 !NORM = 2*S
276 norm = sqrt(nx*nx+ny*ny+nz*nz)
277 ELSE
278 !4-NODE-SEGMENT
279 pblast%PBLAST_TAB(il)%NPt(i) = four
280 npt = four
281 !Segment centroid
282 zx = x(1,n1)+x(1,n2)+x(1,n3)+x(1,n4)
283 zy = x(2,n1)+x(2,n2)+x(2,n3)+x(2,n4)
284 zz = x(3,n1)+x(3,n2)+x(3,n3)+x(3,n4)
285 zx = zx*fourth
286 zy = zy*fourth
287 zz = zz*fourth
288 !normal vector(nx,ny,nz) = 2*s*n where |n|=1.0
289 nx = (x(2,n3)-x(2,n1))*(x(3,n4)-x(3,n2)) - (x(3,n3)-x(3,n1))*(x(2,n4)-x(2,n2))
290 ny = (x(3,n3)-x(3,n1))*(x(1,n4)-x(1,n2)) - (x(1,n3)-x(1,n1))*(x(3,n4)-x(3,n2))
291 nz = (x(1,n3)-x(1,n1))*(x(2,n4)-x(2,n2)) - (x(2,n3)-x(2,n1))*(x(1,n4)-x(1,n2))
292 !NORM = 2*S
293 norm = sqrt(nx*nx+ny*ny+nz*nz)
294 ENDIF
295 nn(1)=n1
296 nn(2)=n2
297 nn(3)=n3
298 nn(4)=n4
299 pblast%PBLAST_TAB(il)%N(1,i) = n1
300 pblast%PBLAST_TAB(il)%N(2,i) = n2
301 pblast%PBLAST_TAB(il)%N(3,i) = n3
302 pblast%PBLAST_TAB(il)%N(4,i) = n4
303
304!------------------------------- ---
305
306 !--------------------------------------------!
307 ! Update Wave parameters !
308 ! (experimental) !
309 ! If requested. Otherwise use Starter param. !
310 ! Default : do not update:use Starter param. !
311 !--------------------------------------------!
312 IF(iz_update == 2)THEN
313
314 dtmin_loc = ep20
315
316 !Dist
317 dx = (xdet - zx)*fac_l_bb ! => working unit to cm
318 dy = (ydet - zy)*fac_l_bb ! => ... to cm
319 dz = (zdet - zz)*fac_l_bb ! => ... to cm
320 dnorm = sqrt(dx*dx+dy*dy+dz*dz)
321
322 !scaled distance
323 z = dnorm / w13 !in abac unit ID g,cm,mus
324
325 !Determine Height of centroid (structure face)
326 ! Basis = DETPOINT - NN
327 projdet(1)=xdet + nnx
328 projdet(2)=ydet + nny
329 projdet(3)=zdet + nnz
330 !Height is length Proj->Det. Storing Det->Proj into NN array
331 hz=-(nnx*zx + nnx*zy + nnz*zz - nnx*projdet(1)-nnx*projdet(2)-nnz*projdet(3))/hc
332
333 cos_theta = zero
334
335 IF(hz < zero)THEN
336
337 !underground segment (nothing to compute)
338 p_inci = zero
339 i_inci = zero
340 p_refl = zero
341 i_refl = zero
342 dt_0 = ep20
343 t_a = ep20
344 decay_refl = one
345 decay_inci = one
346 bool_underground_current_seg = .true.
347
348 ELSE
349
350 z_struct = hz*fac_l_bb/w13 ! scaled value in same unit system as hardcoded tables {g,cm,mus,Mbar}
351
352 !Scaled Height of Charge
353 zc = hc * fac_l_bb/w13! scaled value in same unit system as hardcoded tables {g,cm,mus,Mbar}
354 zc = zc/fac_unit ! ft/lb**0.3333 (fig 2-13 : 10 plots, one for a given ZC value)
355
356 !Horizontal Distance between Charge and Centroid : LG
357 ! ZG = scaled distance |ProjC->ProjZ|
358 projz(1) = zx + hz*nnx/hc
359 projz(2) = zy + hz*nny/hc
360 projz(3) = zz + hz*nnz/hc
361 tmp(1) = (projz(1)-projdet(1))
362 tmp(2) = (projz(2)-projdet(2))
363 tmp(3) = (projz(3)-projdet(3))
364 lg = sqrt(tmp(1)*tmp(1)+tmp(2)*tmp(2)+tmp(3)*tmp(3))
365 zg = lg*fac_l_bb/w13 !scaled horizontal distance (ground) ; same unit system as hardcoded tables {g,cm,mus,Mbar}
366
367 !Angle of structural face (mach wave is planar wave)
368 cos_theta = (projdet(1)-projz(1))*nx + (projdet(2)-projz(2))*ny + (projdet(3)-projz(3))*nz
369 cos_theta = cos_theta/max(em20,lg*norm)
370
371 !determine angle of incidence at ground (AANGLE_g) and interpolation factor (alpha_angle)
372 tmp(1)=xdet-projz(1)
373 tmp(2)=ydet-projz(2)
374 tmp(3)=zdet-projz(3)
375 tmp_var=sqrt( tmp(1)*tmp(1) + tmp(2)*tmp(2) + tmp(3)*tmp(3) )
376 angle_g = -( nnx*tmp(1) + nny*tmp(2) + nnz*tmp(3) ) /hc/tmp_var !must be between [-PI_,PI_]
377 angle_g = min(one,max(-one,angle_g)) ! bound it to expected range (epsilon)
378 angle_g = acos(angle_g)
379 angle_g = cst_180/pi_*angle_g !debug purpose
380 IF(angle_g < zero .AND. pblast%PBLAST_TAB(il)%TAGMSG(i) == 0 )THEN
381 write(iout,*) 'Warning : /LOAD/PBLAST id=',id,' NEGATIVE ANGLE,',angle_g
382 write(istdo,*) 'Warning : /LOAD/PBLAST id=',id,' NEGATIVE ANGLE,',angle_g
383 if(n4 == 0 .or. n3 == n4)then
384 write(iout,fmt= '(A,3I11)')' FACE:',itab((/n1,n2,n3/)),' SEEMS TO BE BELOW THE GROUND'
385 write(istdo,fmt='(A,3I11)')' FACE:',itab((/n1,n2,n3/)),' SEEMS TO BE BELOW THE GROUND'
386 else
387 write(iout,fmt= '(A,4I11)')' FACE:',itab((/n1,n2,n3,n4/)),' SEEMS TO BE BELOW THE GROUND'
388 write(istdo,fmt='(A,4I11)')' FACE:',itab((/n1,n2,n3,n4/)),' SEEMS TO BE BELOW THE GROUND'
389 endif
390 angle_g = zero
391 pblast%PBLAST_TAB(il)%TAGMSG(i) = 1
392 ELSEIF(angle_g > 85.00000 .AND. pblast%PBLAST_TAB(il)%TAGMSG(i) == 0)THEN
393 write(iout, fmt='(A,I0,A,E10.4)')'Warning : /LOAD/PBLAST id=',id,' ANGLE IS OVER THE UPPER BOUND,',angle_g
394 write(istdo,fmt='(A,I0,A,E10.4)')'Warning : /LOAD/PBLAST id=',id,' ANGLE IS OVER THE UPPER BOUND,',angle_g
395 if(n4 == 0 .or. n3 == n4)then
396 write(iout, fmt='(A,3I11)') ' ANGLE SET TO 85.00 FOR FACE:',itab((/n1,n2,n3/))
397 write(istdo,fmt='(A,3I11)') ' ANGLE SET TO 85.00 FOR FACE:',itab((/n1,n2,n3/))
398 else
399 write(iout, fmt='(A,4I11)') ' ANGLE SET TO 85.00 FOR FACE:',itab((/n1,n2,n3,n4/))
400 write(istdo,fmt='(A,4I11)') ' ANGLE SET TO 85.00 FOR FACE:',itab((/n1,n2,n3,n4/))
401 endif
402
403 angle_g = 85.00000
404 pblast%PBLAST_TAB(il)%TAGMSG(i) = 1
405 ENDIF
406
407
408 !------------------------------------------------------------------!
409 CALL pblast_parameters__air_burst( pblast,
410 + z_struct, zc, zg, angle_g, w13, tdet,
411 + fac_p_bb, fac_i_bb, fac_t_bb,
412 + is_decay_to_be_computed,
413 + id,'LOAD',.true.,
414 + friedlander_params,nwarn)
415 p_inci = friedlander_params%P_inci
416 p_refl = friedlander_params%P_refl
417 i_inci = friedlander_params%I_inci
418 i_refl = friedlander_params%I_refl
419 t_a = friedlander_params%T_A
420 dt_0 = friedlander_params%DT_0
421 decay_inci = friedlander_params%decay_inci
422 decay_refl = friedlander_params%decay_refl
423 !------------------------------------------------------------------!
424
425 ta_inf_loc = min(ta_inf_loc, t_a)
426
427 !update wave parameters
428 pblast%PBLAST_TAB(il)%cos_theta(i) = cos_theta
429 pblast%PBLAST_TAB(il)%P_inci(i) = p_inci
430 pblast%PBLAST_TAB(il)%P_refl(i) = p_refl
431 pblast%PBLAST_TAB(il)%ta(i) = t_a
432 pblast%PBLAST_TAB(il)%t0(i) = dt_0
433 pblast%PBLAST_TAB(il)%decay_inci(i) = decay_inci
434 pblast%PBLAST_TAB(il)%decay_refl(i) = decay_refl
435
436 ENDIF !HZ
437
438 dtmin_loc = min(dtmin_loc,dt_0/ndt)
439 iz_update = 1 !update done
440 iloadp(06,nl) = iz_update
441 is_updated=.true.
442
443 ELSE
444
445 !Use wave parameters from Starter
446 cos_theta = pblast%PBLAST_TAB(il)%cos_theta(i)
447 p_inci = pblast%PBLAST_TAB(il)%P_inci(i)
448 p_refl = pblast%PBLAST_TAB(il)%P_refl(i)
449 t_a = pblast%PBLAST_TAB(il)%ta(i)
450 dt_0 = pblast%PBLAST_TAB(il)%t0(i)
451 decay_inci = pblast%PBLAST_TAB(il)%decay_inci(i)
452 decay_refl = pblast%PBLAST_TAB(il)%decay_refl(i)
453 dtmin_loc = pblast%PBLAST_TAB(il)%DTMIN
454
455 ENDIF ! IZ_UPDATE
456
457!------------------------------- ---
458
459 !Coefficients for wave superimposition
460 !PressureLoad = Reflected_Pressure * cos2X + IncidentPressure * (1 + cos2X -2 cosX)
461 IF(cos_theta<=zero)THEN
462 !Surface not facing the point of explosion
463 alpha_refl = zero
464 alpha_inci = one
465 ELSE
466 alpha_refl = cos_theta**2 ! cos**2 a
467 alpha_inci = one + cos_theta - two * alpha_refl ! 1 + cos a -2 cos**2 a
468 ENDIF
469
470 !Building pressure waves from Friedlander model. (Modified model can bu introduced later if needed)
471 wave_inci = zero
472 wave_refl = zero
473 IF(tt_star >= t_a)THEN
474 wave_inci = p_inci*(one-(tt_star-t_a)/dt_0)*exp(-decay_inci*(tt_star-t_a)/dt_0)
475 wave_refl = p_refl*(one-(tt_star-t_a)/dt_0)*exp(-decay_refl*(tt_star-t_a)/dt_0)
476 ELSE
477 wave_inci = zero
478 wave_refl = zero
479 ENDIF
480 p = alpha_refl * wave_refl + alpha_inci * wave_inci
481 p = max(p,pmin)
482 pblast%PBLAST_TAB(il)%PRES(i) = p
483
484 !Expand Pressure load to nodes
485 surf_patch = half*sqrt(nx*nx+ny*ny+nz*nz) / npt
486 pblast%PBLAST_TAB(il)%FX(i)= -p * half*nx / npt
487 pblast%PBLAST_TAB(il)%FY(i)= -p * half*ny / npt
488 pblast%PBLAST_TAB(il)%FZ(i)= -p * half*nz / npt
489 pblast%PBLAST_TAB(il)%SURF_PATCH(i) = surf_patch
490
491 !External Force work
492 ! on a given node : DW = <F,V>*dt
493 ! for this current 4-node or 3-node face : DW = sum( <F_k,V_k>*dt k=1,NPT) where F_k=Fel/NPT
494 wfext_loc=wfext_loc+dt1*( pblast%PBLAST_TAB(il)%FX(i) * sum( v( 1, nn(1:nint(npt)) ) )
495 + + pblast%PBLAST_TAB(il)%FY(i) * sum( v( 2, nn(1:nint(npt)) ) )
496 + + pblast%PBLAST_TAB(il)%FZ(i) * sum( v( 3, nn(1:nint(npt)) ) )
497 + )
498
499C----- /TH/SURF -------
500 IF(th_surf%LOADP_FLAG > 0 ) THEN
501 nsegpl = nsegpl + 1
502 area = surf_patch*npt
503 DO ns=th_surf%LOADP_KSEGS(nsegpl) +1,th_surf%LOADP_KSEGS(nsegpl+1)
504 ksurf = th_surf%LOADP_SEGS(ns)
505 th_surf%channels(4,ksurf)= th_surf%channels(4,ksurf) + area*p ! mean pressure
506 th_surf%channels(5,ksurf)= th_surf%channels(5,ksurf) + area ! surface where pressure is applied
507 ENDDO
508 ENDIF
509
510
511 enddo!next I
512!$OMP END DO
513
514 IF(imodel == 2 .AND. nwarn > 0)THEN
515 msgout1=''
516 WRITE(msgout1,fmt='(I0,A)') nwarn,
517 . ' SEGMENT(S) HAS EXCESSIVE POSITIVE IMPULSE REGARDING THE PEAK PRESSURE AND POSITIVE DURATION.'
518 msgout2=''
519 msgout2='A TRIANGULAR WAVEFORM WILL BE USED INSTEAD TO MAXIMIZE THE IMPULSE. DEFINING A PMIN VALUE IS STRONGLY RECOMMENDED'
520 write(iout , fmt='(A,I10,/A,/A)') "Updated parameters for /LOAD/PBLAST id=", id, msgout1, msgout2
521 write(istdo, fmt='(A,I10,/A,/A)') "Updated parameters for /LOAD/PBLAST id=", id, msgout1, msgout2
522 ENDIF
523
524 CALL my_barrier
525 IF(is_updated)THEN
526#include "lockon.inc"
527 !---arrival time
528 zeta = fac(07,nl)
529 fac(07,nl) = min(ta_inf_loc, fac(07,nl)) !smp min value
530 !---time step
531 dtmin_loc = (one+em06)*(fac(07,nl) - tt) ! go directly to trigger time
532 dtmin_loc=max(pblast%PBLAST_TAB(il)%DTMIN, dtmin_loc)
533 !---no update on next cycle
534 iz_update = 1 !update done
535 iloadp(06,nl) = iz_update
536#include "lockoff.inc"
537!$OMP SINGLE
538 write(iout ,fmt='(A,I10,A,E16.8,A,E16.8)') "Updated parameters for /LOAD/PBLAST id=",
539 . id,' previous first arrival time :',zeta,
540 . ' is now updated to :',fac(07,nl)
541 write(istdo,fmt='(A,I10,A,E16.8,A,E16.8)') "Updated parameters for /LOAD/PBLAST id=",
542 . id,' previous first arrival time :',zeta,
543 . ' is now updated to :',fac(07,nl)
544!$OMP END SINGLE
545 ENDIF
546
547 !-------------------------------------------------------------------!
548 ! FORCE ASSEMBLY !
549 ! /PARITH/OFF : F directly added in A(1:3,1:NUMNOD). !
550 ! /PARITH/ON : F added FSKY & and automatically treated later !
551 !-------------------------------------------------------------------!
552 ! SPMD/SMP Parith/OFF
553 IF(iparit==0) THEN
554!$OMP SINGLE
555 DO i = 1,isiz_seg
556 n1=lloadp(iloadp(4,nl)+4*(i-1))
557 n2=lloadp(iloadp(4,nl)+4*(i-1)+1)
558 n3=lloadp(iloadp(4,nl)+4*(i-1)+2)
559 n4=lloadp(iloadp(4,nl)+4*(i-1)+3)
560 a(1,n1)=a(1,n1)+pblast%PBLAST_TAB(il)%FX(i)
561 a(2,n1)=a(2,n1)+pblast%PBLAST_TAB(il)%FY(i)
562 a(3,n1)=a(3,n1)+pblast%PBLAST_TAB(il)%FZ(i)
563 a(1,n2)=a(1,n2)+pblast%PBLAST_TAB(il)%FX(i)
564 a(2,n2)=a(2,n2)+pblast%PBLAST_TAB(il)%FY(i)
565 a(3,n2)=a(3,n2)+pblast%PBLAST_TAB(il)%FZ(i)
566 a(1,n3)=a(1,n3)+pblast%PBLAST_TAB(il)%FX(i)
567 a(2,n3)=a(2,n3)+pblast%PBLAST_TAB(il)%FY(i)
568 a(3,n3)=a(3,n3)+pblast%PBLAST_TAB(il)%FZ(i)
569 IF(pblast%PBLAST_TAB(il)%NPt(i) == four)THEN
570 a(1,n4)=a(1,n4)+pblast%PBLAST_TAB(il)%FX(i)
571 a(2,n4)=a(2,n4)+pblast%PBLAST_TAB(il)%FY(i)
572 a(3,n4)=a(3,n4)+pblast%PBLAST_TAB(il)%FZ(i)
573 ENDIF
574 ENDDO
575!$OMP END SINGLE
576 ELSE
577!$OMP DO SCHEDULE(GUIDED,MVSIZ)
578 DO i = 1,isiz_seg
579 iad =iadc(iloadp(4,nl)+4*(i-1))
580 fsky(1,iad) =pblast%PBLAST_TAB(il)%FX(i)
581 fsky(2,iad) =pblast%PBLAST_TAB(il)%FY(i)
582 fsky(3,iad) =pblast%PBLAST_TAB(il)%FZ(i)
583 iad =iadc(iloadp(4,nl)+4*(i-1)+1)
584 fsky(1,iad) =pblast%PBLAST_TAB(il)%FX(i)
585 fsky(2,iad) =pblast%PBLAST_TAB(il)%FY(i)
586 fsky(3,iad) =pblast%PBLAST_TAB(il)%FZ(i)
587 iad =iadc(iloadp(4,nl)+4*(i-1)+2)
588 fsky(1,iad) =pblast%PBLAST_TAB(il)%FX(i)
589 fsky(2,iad) =pblast%PBLAST_TAB(il)%FY(i)
590 fsky(3,iad) =pblast%PBLAST_TAB(il)%FZ(i)
591 IF(pblast%PBLAST_TAB(il)%NPt(i) == four)THEN
592 iad =iadc(iloadp(4,nl)+4*(i-1)+3)
593 fsky(1,iad) =pblast%PBLAST_TAB(il)%FX(i)
594 fsky(2,iad) =pblast%PBLAST_TAB(il)%FY(i)
595 fsky(3,iad) =pblast%PBLAST_TAB(il)%FZ(i)
596 ENDIF
597 ENDDO
598!$OMP END DO
599 ENDIF !IPARIT
600
601
602 !-------------------------------------------!
603 ! ANIMATION FILE /ANIM/VECT/FEXT !
604 ! H3D FILE /H3D/NODA/FEXT !
605 !-------------------------------------------!
606
607!$OMP SINGLE
608 IF(ianim_or_h3d > 0) THEN
609 DO i = 1,isiz_seg
610 n1=pblast%PBLAST_TAB(il)%N(1,i)
611 n2=pblast%PBLAST_TAB(il)%N(2,i)
612 n3=pblast%PBLAST_TAB(il)%N(3,i)
613 n4=pblast%PBLAST_TAB(il)%N(4,i)
614 fext(1,n1) = fext(1,n1)+pblast%PBLAST_TAB(il)%FX(i)
615 fext(2,n1) = fext(2,n1)+pblast%PBLAST_TAB(il)%FY(i)
616 fext(3,n1) = fext(3,n1)+pblast%PBLAST_TAB(il)%FZ(i)
617 fext(1,n2) = fext(1,n2)+pblast%PBLAST_TAB(il)%FX(i)
618 fext(2,n2) = fext(2,n2)+pblast%PBLAST_TAB(il)%FY(i)
619 fext(3,n2) = fext(3,n2)+pblast%PBLAST_TAB(il)%FZ(i)
620 fext(1,n3) = fext(1,n3)+pblast%PBLAST_TAB(il)%FX(i)
621 fext(2,n3) = fext(2,n3)+pblast%PBLAST_TAB(il)%FY(i)
622 fext(3,n3) = fext(3,n3)+pblast%PBLAST_TAB(il)%FZ(i)
623 IF(pblast%PBLAST_TAB(il)%NPt(i)==four)THEN
624 fext(1,n4) = fext(1,n4)+pblast%PBLAST_TAB(il)%FX(i)
625 fext(2,n4) = fext(2,n4)+pblast%PBLAST_TAB(il)%FY(i)
626 fext(3,n4) = fext(3,n4)+pblast%PBLAST_TAB(il)%FZ(i)
627 ENDIF
628 ENDDO
629 ENDIF
630 IF(th_has_noda_pext > 0 .OR. anim_has_noda_pext > 0 .OR. h3d_has_noda_pext > 0) THEN
631 DO i = 1,isiz_seg
632 n1 = pblast%PBLAST_TAB(il)%N(1,i)
633 n2 = pblast%PBLAST_TAB(il)%N(2,i)
634 n3 = pblast%PBLAST_TAB(il)%N(3,i)
635 n4 = pblast%PBLAST_TAB(il)%N(4,i)
636 surf_patch = pblast%PBLAST_TAB(il)%SURF_PATCH(i)
637 noda_surf(n1) = noda_surf(n1) + surf_patch
638 noda_surf(n2) = noda_surf(n2) + surf_patch
639 noda_surf(n3) = noda_surf(n3) + surf_patch
640 p = pblast%PBLAST_TAB(il)%PRES(i) * surf_patch
641 noda_pext(n1) = noda_pext(n1) + p
642 noda_pext(n2) = noda_pext(n2) + p
643 noda_pext(n3) = noda_pext(n3) + p
644 IF(pblast%PBLAST_TAB(il)%NPT(i) == four)THEN
645 noda_surf(n4) = noda_surf(n4) + surf_patch
646 noda_pext(n4) = noda_pext(n4) + p
647 ENDIF
648 ENDDO
649 ENDIF
650!$OMP END SINGLE
651
652 RETURN
653
654C-----------------------------------------------
655 IF (ierr1/=0) THEN
656 write(iout,*)' ** ERROR IN MEMORY ALLOCATION - PBLAST LOADING'
657 write(istdo,*)' ** ERROR IN MEMORY ALLOCATION - PBLAST LOADING'
658 CALL arret(2)
659 END IF
660C-----------------------------------------------
661
#define my_real
Definition cppsort.cpp:32
norm(diag(diag(diag(inv(mat))) -id.SOL), 2) % destroy mumps instance id.JOB
subroutine area(d1, x, x2, y, y2, eint, stif0)
#define min(a, b)
Definition macros.h:20
#define max(a, b)
Definition macros.h:21
initmumps id
integer, parameter ncharline
integer th_has_noda_pext
Definition th_mod.F:121
OPTION /TH/SURF outputs of Pressure and Area needed Tabs.
Definition th_surf_mod.F:60
character *2 function nl()
Definition message.F:2354
subroutine arret(nn)
Definition arret.F:87
subroutine my_barrier
Definition machine.F:31