OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
pblast_2.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_2 (output, 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_2()

subroutine pblast_2 ( type(output_), intent(inout) output,
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_2.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
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 TYPE(OUTPUT_), INTENT(INOUT) :: OUTPUT
79 INTEGER,INTENT(IN) :: LLOADP(SLLOADP)
80 INTEGER,INTENT(INOUT) :: ILOADP(SIZLOADP,NLOADP)
81 INTEGER,INTENT(IN) :: IADC(*)
82 INTEGER, INTENT(IN) :: ITAB(NUMNOD),NL
83 my_real,INTENT(INOUT) :: dtmin_loc
84 DOUBLE PRECISION,INTENT(INOUT) :: WFEXT_LOC
85 my_real,INTENT(IN) :: v(3,numnod),x(3,numnod)
86 my_real,INTENT(INOUT) :: fac(lfacload,nloadp)
87 my_real,INTENT(INOUT) :: a(3,numnod),fsky(8,sfsky/8)
88 my_real,INTENT(INOUT) :: fext(3,numnod)
89 my_real,INTENT(INOUT) :: noda_surf(numnod)
90 my_real,INTENT(INOUT) :: noda_pext(numnod)
91 TYPE(H3D_DATABASE),INTENT(IN) :: H3D_DATA
92 TYPE (TH_SURF_) , INTENT(INOUT) :: TH_SURF
93 INTEGER, INTENT(INOUT) :: NSEGPL
94 TYPE(PBLAST_),INTENT(INOUT) :: PBLAST
95C-----------------------------------------------
96C L o c a l V a r i a b l e s
97C-----------------------------------------------
98 INTEGER :: N1, N2, N3, N4, IL, IS, IAD, I, IANIM_OR_H3D,IZ_UPDATE,ABAC_ID,ISIZ_SEG,IERR1,ID, ITA_SHIFT,NS,KSURF
99 INTEGER :: NDT,IMODEL,NN(4)
100 INTEGER :: ISHAPE
101 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.
102 my_real :: zx,zy,zz,norm,nx,ny,nz,nnx,nny,nnz,hz,area
103 my_real :: lambda,cos_theta, alpha_inci, alpha_refl, p_inci,p_refl,z
104 my_real :: i_inci,i_refl,dt_0,t_a,wave_refl,wave_inci, w13
105 my_real :: xdet,ydet,zdet,tdet,wtnt,pmin,t_stop,p,fac_m_bb, fac_l_bb, fac_t_bb, fac_p_bb, fac_i_bb, ta_first, tt_star
106 my_real :: z1_
107 my_real :: decay_inci,decay_refl
108 my_real :: cst_255_div_ln_z1_on_zn, log10_, npt, ff(3)
109 my_real :: projz(3), tmp(3), lg, zg, hc
110 my_real :: base_x,base_y,base_z
111 my_real :: ta_inf_loc,zeta
112 my_real :: dnorm, dx, dy, dz
113 my_real :: surf_patch
114 TYPE(FRIEDLANDER_PARAMS_) :: FRIEDLANDER_PARAMS
115 LOGICAL,SAVE :: IS_UPDATED
116 LOGICAL :: IS_DECAY_TO_BE_COMPUTED
117
118 CHARACTER(LEN=NCHARLINE) :: MSGOUT1,MSGOUT2
119
120 DATA cst_255_div_ln_z1_on_zn/-38.147316611455952998/
121 DATA log10_ /2.30258509299405000000/
122
123C-----------------------------------------------
124C D e s c r i p t i o n
125C-----------------------------------------------
126C This subroutines is applying pressure load to a segment submitted to a blast wave (SURFACE BURST model).
127C Preussre time histories are built from "UFC 3-340-02, Dec. 5th 2008" tables which are hardcoded in unit system {g, cm, mus}
128C (table sampling : 256 points ; see pblast_mod.F)
129C
130C T* = T + TA_INF (shift with first arrival time for all pblast option, TA_INF=0. if ita_shift/=2)
131C If request made to update blast profile (iz_update==2) then it is made once on T*=TDET
132C
133C-----------------------------------------------
134C P r e - C o n d i t i o n
135C-----------------------------------------------
136 !--- subroutine not relevant if no /LOAD/PBLAST option
137 IF(pblast%NLOADP_B == 0)RETURN
138
139 !--- time step
140 ta_first = fac(07,nl) ! arrival time for first segment to be loaded
141 il= nl-nloadp_f
142 tt_star = tt + pblast%PBLAST_DT%TA_INF
143 iz_update = iloadp(06,nl)
144 tdet = fac(01,nl)
145 ta_first = fac(07,nl) + pblast%PBLAST_DT%TA_INF ! arrival time for first segment to be loaded
146 IF(iz_update ==1)THEN
147 !if no update during engine
148 dtmin_loc = (one+em06)*(ta_first - tt)
149 dtmin_loc=max(pblast%PBLAST_TAB(il)%DTMIN, dtmin_loc) !go directly to arrival time but avoid too
150 IF(tt_star<ta_first)RETURN ! (nothing to load for now)
151 ELSE
152 IF(tdet > tt)THEN
153 dtmin_loc = (one+em06)*(tdet - tt)
154 dtmin_loc=max(pblast%PBLAST_TAB(il)%DTMIN, dtmin_loc)!go directly to arrival time but avoid too
155 ELSE
156 dtmin_loc = pblast%PBLAST_TAB(il)%DTMIN
157 ENDIF
158 IF(tt_star<tdet)RETURN ! (nothing to update for now)
159 ENDIF
160C-----------------------------------------------,
161C S o u r c e C o d e
162C-----------------------------------------------
163 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
164
165 !Index Bijection
166 z1_ = 0.500000000000000
167
168 !translation from Working unit System to {big bang} unit system
169 fac_m_bb = fac_mass*ep03
170 fac_l_bb = fac_length*ep02
171 fac_t_bb = fac_time*ep06
172 fac_p_bb = fac_m_bb/fac_l_bb/fac_t_bb/fac_t_bb
173 fac_i_bb = fac_p_bb*fac_t_bb
174 fac_i_bb = fac_m_bb/fac_l_bb/fac_t_bb
175
176 is_updated = .false.
177 CALL my_barrier
178
179 !-----------------------------------------------
180 ! FREE AIR BURST
181 !-----------------------------------------------
182 il = nl-nloadp_f
183 tdet = fac(01,nl)
184 xdet = fac(02,nl)
185 ydet = fac(03,nl)
186 zdet = fac(04,nl)
187 wtnt = fac(05,nl)
188 pmin = fac(06,nl)
189 ta_first = fac(07,nl)
190 nnx = fac(08,nl)
191 nny = fac(09,nl)
192 nnz = fac(10,nl)
193 hc = fac(11,nl)
194 t_stop = fac(13,nl)
195 is = iloadp(02,nl)
196 ishape = iloadp(03,nl)
197 iz_update = iloadp(06,nl)
198 abac_id = iloadp(07,nl)
199 id = iloadp(08,nl) !user_id
200 ita_shift = iloadp(09,nl)
201 ndt = iloadp(10,nl)
202 imodel = iloadp(11,nl)
203 isiz_seg = iloadp(01,nl)/4
204 ierr1 = 0
205 w13 = (wtnt*fac_m_bb)**third ! '*FAC_M' g->work unit '/FAC_M' : WORK_UNIT -> g
206 z = zero
207 ta_inf_loc = ep20
208
209 is_decay_to_be_computed = .false.
210 IF(imodel == 2)is_decay_to_be_computed=.true.
211 nwarn = 0
212
213 !---------------------------------------------
214 ! LOOP ON SEGMENTS (4N or 3N)
215 !---------------------------------------------
216
217!$OMP DO SCHEDULE(GUIDED,MVSIZ)
218 DO i = 1,isiz_seg
219 n1=lloadp(iloadp(4,nl)+4*(i-1))
220 n2=lloadp(iloadp(4,nl)+4*(i-1)+1)
221 n3=lloadp(iloadp(4,nl)+4*(i-1)+2)
222 n4=lloadp(iloadp(4,nl)+4*(i-1)+3)
223 nn(1)=n1
224 nn(2)=n2
225 nn(3)=n3
226 nn(4)=n4
227
228 IF(n4 == 0 .OR. n3 == n4 )THEN
229 !3-NODE-SEGMENT
230 pblast%PBLAST_TAB(il)%NPt(i) = three
231 npt = three
232 !Centroid segment
233 zx = x(1,n1)+x(1,n2)+x(1,n3)
234 zy = x(2,n1)+x(2,n2)+x(2,n3)
235 zz = x(3,n1)+x(3,n2)+x(3,n3)
236 zx = zx*third
237 zy = zy*third
238 zz = zz*third
239 !Normal vector : (NX,NY,NZ) = 2*S*n where |n|=1.0
240 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))
241 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))
242 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))
243 !NORM = 2*S
244 norm = sqrt(nx*nx+ny*ny+nz*nz)
245 ELSE
246 !4-NODE-SEGMENT
247 pblast%PBLAST_TAB(il)%NPt(i) = four
248 npt = four
249 !Centroid side
250 zx = x(1,n1)+x(1,n2)+x(1,n3)+x(1,n4)
251 zy = x(2,n1)+x(2,n2)+x(2,n3)+x(2,n4)
252 zz = x(3,n1)+x(3,n2)+x(3,n3)+x(3,n4)
253 zx = zx*fourth
254 zy = zy*fourth
255 zz = zz*fourth
256 !Normal vector (NX,NY,NZ) = 2*S*n where |n|=1.0
257 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))
258 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))
259 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))
260 !NORM = 2*S
261 norm = sqrt(nx*nx+ny*ny+nz*nz)
262 ENDIF
263
264 pblast%PBLAST_TAB(il)%N(1,i) = n1
265 pblast%PBLAST_TAB(il)%N(2,i) = n2
266 pblast%PBLAST_TAB(il)%N(3,i) = n3
267 pblast%PBLAST_TAB(il)%N(4,i) = n4
268
269 !Determine Height of centroid (structure face)
270 ! Basis = DETPOINT
271 ! NN is ground vector
272 hz = ( nnx*zx + nny*zy + nnz*zz - nnx*xdet - nny*ydet - nnz*zdet )
273
274 !--------------------------------------------!
275 ! Update Wave parameters !
276 ! (experimental) !
277 ! If requested. Otherwise use Starter param. !
278 ! Default : do not update:use Starter param. !
279 !--------------------------------------------!
280 IF(iz_update == 2)THEN
281
282 dtmin_loc = ep20
283
284 IF(hz >= -em10 .OR. ishape == 2)THEN
285
286 !OVER GROUND
287
288 !Planar Wave : angle with targeted face
289 base_x = xdet
290 base_y = ydet
291 base_z = zdet
292 lambda = (base_x-zx)*nnx + (base_y-zy)*nny + (base_z-zz)*nnz
293
294 projz(1) = zx + lambda*nnx
295 projz(2) = zy + lambda*nny
296 projz(3) = zz + lambda*nnz
297
298 tmp(1) = (projz(1)-xdet)
299 tmp(2) = (projz(2)-ydet)
300 tmp(3) = (projz(3)-zdet)
301 lg = sqrt(tmp(1)*tmp(1)+tmp(2)*tmp(2)+tmp(3)*tmp(3))
302 zg = lg*fac_l_bb/w13 !scaled horizontal distance (ground) {g,cm,mus}
303
304
305 ! scaled distance
306 cos_theta = 0
307 SELECT CASE(ishape)
308 CASE (1,2)
309 ! Dist
310 dx = (xdet - zx)*fac_l_bb
311 dy = (ydet - zy)*fac_l_bb
312 dz = (zdet - zz)*fac_l_bb
313 dnorm = sqrt(dx*dx+dy*dy+dz*dz) ! *FAC_L_bb cm->work unit /FAC_L_bb : WORK_UNIT -> cm
314 z = dnorm / w13 !spherical
315 !Angle from Detonation Point
316 cos_theta = dx*nx + dy*ny + dz*nz
317 cos_theta = cos_theta/max(em20,norm*dnorm)
318 CASE(3)
319 z = zg !cylindrical - in abac unit ID g,cm,mus
320 ! Angle from Detonation Point
321 cos_theta = (xdet-projz(1))*nx + (ydet-projz(2))*ny + (zdet-projz(3))*nz
322 cos_theta = cos_theta/max(em20,lg*norm)
323 END SELECT
324
325 !checking bounds
326 IF(z > 0.5 .AND. z < 400.) then
327 !Ground Distance inside the interpolation table
328
329 elseif(z <= 0.5 .AND. pblast%PBLAST_TAB(il)%TAGMSG(i) == 0)then
330 write(iout, fmt='(A,I0,A)') "Warning : /LOAD/PBLAST id=",id," Rg/W**(1/3) < 0.5 cm/g**(1/3)"
331 write(istdo,fmt='(A,I0,A)') "Warning : /LOAD/PBLAST id=",id," Rg/W**(1/3) < 0.5 cm/g**(1/3)"
332 write(iout, fmt='(A)') " Horizontal Distance on Ground (Rg) is too close to the charge"
333 write(istdo,fmt='(A)') " Horizontal Distance on Ground (Rg) is too close to the charge"
334 if (n4 == 0 .OR. n3 == n4)then
335 write(iout, fmt='(A,3I11)') " -> Segment nodes : ",itab(n1),itab(n2),itab(n3)
336 write(istdo,fmt='(A,3I11)') " -> Segment nodes : ",itab(n1),itab(n2),itab(n3)
337 else
338 write(iout, fmt='(A,4I11)') " -> Segment nodes : ",itab(n1),itab(n2),itab(n3),itab(n4)
339 write(istdo,fmt='(A,4I11)') " -> Segment nodes : ",itab(n1),itab(n2),itab(n3),itab(n4)
340 endif
341 pblast%PBLAST_TAB(il)%TAGMSG(i) = 1
342
343 elseif(z > 400. .AND. pblast%PBLAST_TAB(il)%TAGMSG(i) == 0)then
344 write(iout, fmt='(A,I0,A)') "Warning : /LOAD/PBLAST id=",id," Rg/W**(1/3) > 400. cm/g**(1/3)"
345 write(istdo,fmt='(a,i0,a)') "warning : /load/pblast id=",id," rg/w**(1/3) > 400. cm/g**(1/3)"
346 write(iout, fmt='(A)') " Horizontal Distance on Ground (Rg) is too far from the charge"
347 write(istdo,fmt='(A)') " Horizontal Distance on Ground (Rg) is too far from the charge"
348 if (n4 == 0 .OR. n3 == n4)then
349 write(iout, fmt='(A,3I11)') " -> Segment nodes : ",itab(n1),itab(n2),itab(n3)
350 write(istdo,fmt='(A,3I11)') " -> Segment nodes : ",itab(n1),itab(n2),itab(n3)
351 else
352 write(iout, fmt='(A,4I11)') " -> Segment nodes : ",itab(n1),itab(n2),itab(n3),itab(n4)
353 write(istdo,fmt='(A,4I11)') " -> Segment nodes : ",itab(n1),itab(n2),itab(n3),itab(n4)
354 endif
355 pblast%PBLAST_TAB(il)%TAGMSG(i) = 1
356
357 endif
358
359 !------------------------------------------------------------------!
360 CALL pblast_parameters__surface_burst( pblast,
361 + z, w13, tdet,
362 + fac_p_bb, fac_i_bb, fac_t_bb,
363 + is_decay_to_be_computed,
364 + friedlander_params, nwarn )
365 p_inci = friedlander_params%P_inci
366 p_refl = friedlander_params%P_refl
367 i_inci = friedlander_params%I_inci
368 i_refl = friedlander_params%I_refl
369 t_a = friedlander_params%T_A
370 dt_0 = friedlander_params%DT_0
371 decay_inci = friedlander_params%decay_inci
372 decay_refl = friedlander_params%decay_refl
373 !------------------------------------------------------------------!
374
375 ta_inf_loc = min(ta_inf_loc, t_a)
376
377 !update wave parameters
378 pblast%PBLAST_TAB(il)%cos_theta(i) = cos_theta
379 pblast%PBLAST_TAB(il)%P_inci(i) = p_inci
380 pblast%PBLAST_TAB(il)%P_refl(i) = p_refl
381 pblast%PBLAST_TAB(il)%ta(i) = t_a
382 pblast%PBLAST_TAB(il)%t0(i) = dt_0
383 pblast%PBLAST_TAB(il)%decay_inci(i) = decay_inci
384 pblast%PBLAST_TAB(il)%decay_refl(i) = decay_refl
385
386 ELSE
387 !nothing to compute underground
388 z=zero
389 cos_theta = zero
390 p_inci = zero
391 p_refl = zero
392 t_a = ep20
393 dt_0 = ep20
394 decay_inci = zero
395 decay_refl = zero
396 ENDIF
397
398 dtmin_loc = min(dtmin_loc,dt_0/ndt)
399 iz_update = 1 !update done
400 iloadp(06,nl) = iz_update
401 is_updated=.true.
402
403 else! => IZ_UPDATE=1
404
405 !use wave parameters from Starter
406 z = zero ! ZG not used here since all wave characteristics are stored.
407 cos_theta = pblast%PBLAST_TAB(il)%cos_theta(i)
408 p_inci = pblast%PBLAST_TAB(il)%P_inci(i)
409 p_refl = pblast%PBLAST_TAB(il)%P_refl(i)
410 t_a = pblast%PBLAST_TAB(il)%ta(i)
411 dt_0 = pblast%PBLAST_TAB(il)%t0(i)
412 decay_inci = pblast%PBLAST_TAB(il)%decay_inci(i)
413 decay_refl = pblast%PBLAST_TAB(il)%decay_refl(i)
414 dtmin_loc = pblast%PBLAST_TAB(il)%DTMIN
415
416 ENDIF !IF(IZ_UPDATE == 2)
417
418 !Coefficients for wave superimposition
419 !PressureLoad = Reflected_Pressure * cos2X + IncidentPressure * (1 + cos2X -2 cosX)
420 IF(cos_theta<=zero)THEN
421 !Surface not facing the point of explosion
422 alpha_refl = zero
423 alpha_inci = one
424 ELSE
425 alpha_refl = cos_theta**2 ! cos**2 a
426 alpha_inci = one + cos_theta - two * alpha_refl ! 1 + cos a -2 cos**2 a
427 ENDIF
428
429 !Building pressure waves from Friedlander model. (Modified model can bu introduced later if needed)
430 wave_inci = zero
431 wave_refl = zero
432 IF(tt_star>=t_a)THEN
433 wave_inci = p_inci*(one-(tt_star-t_a)/dt_0)*exp(-decay_inci*(tt_star-t_a)/dt_0)
434 wave_refl = p_refl*(one-(tt_star-t_a)/dt_0)*exp(-decay_refl*(tt_star-t_a)/dt_0)
435 ELSE
436 wave_inci = zero
437 wave_refl = zero
438 ENDIF
439 p = alpha_refl * wave_refl + alpha_inci * wave_inci
440 p = max(p,pmin)
441 pblast%PBLAST_TAB(il)%PRES(i) = p
442
443 !!Expand Pressure load to nodes
444 ! FF is nodal force which applied on each node N1,N2,N3, and also N4 if relevant
445 ! FF = FF_elem / NPT = Pload.S.n / NPT where n is the unitary normal vector
446 ! NX,NY,NZ = 2S.n (in all cases:quadrangles & triangles)
447 surf_patch = half*sqrt(nx*nx+ny*ny+nz*nz) / npt
448 ff(1) = -p * half*nx / npt ! -P*S/NPT . nx
449 ff(2) = -p * half*ny / npt ! -P*S/NPT . ny
450 ff(3) = -p * half*nz / npt ! -P*S/NPT . nz
451 !storing force for one node of the current face (for assembly below)
452 pblast%PBLAST_TAB(il)%FX(i) = ff(1)
453 pblast%PBLAST_TAB(il)%FY(i) = ff(2)
454 pblast%PBLAST_TAB(il)%FZ(i) = ff(3)
455 pblast%PBLAST_TAB(il)%SURF_PATCH(i) = surf_patch
456
457 !External Force work
458 ! on a given node : DW = <F,V>*dt
459 ! for this current 4-node or 3-node face : DW = sum( <F_k,V_k>*dt k=1,NPT) where F_k=Fel/NPT
460 wfext_loc=wfext_loc+dt1*(ff(1)*sum(v(1,nn(1:nint(npt)))) +ff(2)*sum(v(2,nn(1:nint(npt)))) +ff(3)*sum(v(3,nn(1:nint(npt)))))
461
462C----- /TH/SURF -------
463 IF(th_surf%LOADP_FLAG > 0 ) THEN
464 nsegpl = nsegpl + 1
465 area = surf_patch*npt
466 DO ns=th_surf%LOADP_KSEGS(nsegpl) +1,th_surf%LOADP_KSEGS(nsegpl+1)
467 ksurf = th_surf%LOADP_SEGS(ns)
468 th_surf%channels(4,ksurf)= th_surf%channels(4,ksurf) + area*p ! mean pressure
469 th_surf%channels(5,ksurf)= th_surf%channels(5,ksurf) + area ! surface where pressure is applied
470 ENDDO
471 ENDIF
472
473
474 enddo!next I
475!$OMP END DO
476
477 IF(imodel == 2 .AND. nwarn > 0)THEN
478 msgout1=''
479 WRITE(msgout1,fmt='(I0,A)') nwarn,
480 . ' SEGMENT(S) HAS EXCESSIVE POSITIVE IMPULSE REGARDING THE PEAK PRESSURE AND POSITIVE DURATION.'
481 msgout2=''
482 msgout2='A TRIANGULAR WAVEFORM WILL BE USED INSTEAD TO MAXIMIZE THE IMPULSE. DEFINING A PMIN VALUE IS STRONGLY RECOMMENDED'
483 write(iout , fmt='(A,I10,/A,/A)') "Updated parameters for /LOAD/PBLAST id=", id, msgout1, msgout2
484 write(istdo, fmt='(A,I10,/A,/A)') "Updated parameters for /LOAD/PBLAST id=", id, msgout1, msgout2
485 ENDIF
486
487 CALL my_barrier
488 IF(is_updated)THEN
489#include "lockon.inc"
490 !---arrival time
491 zeta = fac(07,nl)
492 fac(07,nl) = min(ta_inf_loc, fac(07,nl)) !smp min value
493 !---time step
494 dtmin_loc = (one+em06)*(fac(07,nl) - tt) ! go directly to trigger time
495 dtmin_loc=max(pblast%PBLAST_TAB(il)%DTMIN, dtmin_loc)
496 !---no update on next cycle
497 iz_update = 1 !update done
498 iloadp(06,nl) = iz_update
499#include "lockoff.inc"
500!$OMP SINGLE
501 write(*,fmt='(A,I10,A,E16.8,A,E16.8)') "Updated parameters for /LOAD/PBLAST id=",
502 . id,' previous first arrival time :',zeta,
503 . ' is now updated to :',fac(07,nl)
504!$OMP END SINGLE
505 ENDIF
506
507 !-------------------------------------------------------------------!
508 ! FORCE ASSEMBLY !
509 ! /PARITH/OFF : F directly added in A(1:3,1:NUMNOD). !
510 ! /PARITH/ON : F added FSKY & and automatically treated later !
511 !-------------------------------------------------------------------!
512 ! SPMD/SMP Parith/OFF
513 IF(iparit==0) THEN
514!$OMP SINGLE
515 DO i = 1,isiz_seg
516 n1=lloadp(iloadp(4,nl)+4*(i-1))
517 n2=lloadp(iloadp(4,nl)+4*(i-1)+1)
518 n3=lloadp(iloadp(4,nl)+4*(i-1)+2)
519 n4=lloadp(iloadp(4,nl)+4*(i-1)+3)
520 a(1,n1)=a(1,n1)+pblast%PBLAST_TAB(il)%FX(i)
521 a(2,n1)=a(2,n1)+pblast%PBLAST_TAB(il)%FY(i)
522 a(3,n1)=a(3,n1)+pblast%PBLAST_TAB(il)%FZ(i)
523 a(1,n2)=a(1,n2)+pblast%PBLAST_TAB(il)%FX(i)
524 a(2,n2)=a(2,n2)+pblast%PBLAST_TAB(il)%FY(i)
525 a(3,n2)=a(3,n2)+pblast%PBLAST_TAB(il)%FZ(i)
526 a(1,n3)=a(1,n3)+pblast%PBLAST_TAB(il)%FX(i)
527 a(2,n3)=a(2,n3)+pblast%PBLAST_TAB(il)%FY(i)
528 a(3,n3)=a(3,n3)+pblast%PBLAST_TAB(il)%FZ(i)
529 IF(pblast%PBLAST_TAB(il)%NPt(i) == four)THEN
530 a(1,n4)=a(1,n4)+pblast%PBLAST_TAB(il)%FX(i)
531 a(2,n4)=a(2,n4)+pblast%PBLAST_TAB(il)%FY(i)
532 a(3,n4)=a(3,n4)+pblast%PBLAST_TAB(il)%FZ(i)
533 ENDIF
534 ENDDO
535!$OMP END SINGLE
536 ELSE
537!$OMP DO SCHEDULE(GUIDED,MVSIZ)
538 DO i = 1,isiz_seg
539 iad =iadc(iloadp(4,nl)+4*(i-1))
540 fsky(1,iad) =pblast%PBLAST_TAB(il)%FX(i)
541 fsky(2,iad) =pblast%PBLAST_TAB(il)%FY(i)
542 fsky(3,iad) =pblast%PBLAST_TAB(il)%FZ(i)
543 iad =iadc(iloadp(4,nl)+4*(i-1)+1)
544 fsky(1,iad) =pblast%PBLAST_TAB(il)%FX(i)
545 fsky(2,iad) =pblast%PBLAST_TAB(il)%FY(i)
546 fsky(3,iad) =pblast%PBLAST_TAB(il)%FZ(i)
547 iad =iadc(iloadp(4,nl)+4*(i-1)+2)
548 fsky(1,iad) =pblast%PBLAST_TAB(il)%FX(i)
549 fsky(2,iad) =pblast%PBLAST_TAB(il)%FY(i)
550 fsky(3,iad) =pblast%PBLAST_TAB(il)%FZ(i)
551 IF(pblast%PBLAST_TAB(il)%NPt(i) == four)THEN
552 iad =iadc(iloadp(4,nl)+4*(i-1)+3)
553 fsky(1,iad) =pblast%PBLAST_TAB(il)%FX(i)
554 fsky(2,iad) =pblast%PBLAST_TAB(il)%FY(i)
555 fsky(3,iad) =pblast%PBLAST_TAB(il)%FZ(i)
556 ENDIF
557 ENDDO
558!$OMP END DO
559 ENDIF !IPARIT
560
561
562 !-------------------------------------------!
563 ! ANIMATION FILE /ANIM/VECT/FEXT !
564 ! H3D FILE /H3D/NODA/FEXT !
565 !-------------------------------------------!
566!$OMP SINGLE
567 IF(ianim_or_h3d > 0) THEN
568 DO i = 1,isiz_seg
569 n1=pblast%PBLAST_TAB(il)%N(1,i)
570 n2=pblast%PBLAST_TAB(il)%N(2,i)
571 n3=pblast%PBLAST_TAB(il)%N(3,i)
572 n4=pblast%PBLAST_TAB(il)%N(4,i)
573 fext(1,n1) = fext(1,n1)+pblast%PBLAST_TAB(il)%FX(i)
574 fext(2,n1) = fext(2,n1)+pblast%PBLAST_TAB(il)%FY(i)
575 fext(3,n1) = fext(3,n1)+pblast%PBLAST_TAB(il)%FZ(i)
576 fext(1,n2) = fext(1,n2)+pblast%PBLAST_TAB(il)%FX(i)
577 fext(2,n2) = fext(2,n2)+pblast%PBLAST_TAB(il)%FY(i)
578 fext(3,n2) = fext(3,n2)+pblast%PBLAST_TAB(il)%FZ(i)
579 fext(1,n3) = fext(1,n3)+pblast%PBLAST_TAB(il)%FX(i)
580 fext(2,n3) = fext(2,n3)+pblast%PBLAST_TAB(il)%FY(i)
581 fext(3,n3) = fext(3,n3)+pblast%PBLAST_TAB(il)%FZ(i)
582 IF(pblast%PBLAST_TAB(il)%NPt(i)==four)THEN
583 fext(1,n4) = fext(1,n4)+pblast%PBLAST_TAB(il)%FX(i)
584 fext(2,n4) = fext(2,n4)+pblast%PBLAST_TAB(il)%FY(i)
585 fext(3,n4) = fext(3,n4)+pblast%PBLAST_TAB(il)%FZ(i)
586 ENDIF
587 ENDDO
588 ENDIF
589 IF(th_has_noda_pext > 0 .OR. output%DATA%ANIM_HAS_NODA_PEXT > 0 .OR. output%DATA%H3D_HAS_NODA_PEXT > 0) THEN
590 DO i = 1,isiz_seg
591 n1 = pblast%PBLAST_TAB(il)%N(1,i)
592 n2 = pblast%PBLAST_TAB(il)%N(2,i)
593 n3 = pblast%PBLAST_TAB(il)%N(3,i)
594 n4 = pblast%PBLAST_TAB(il)%N(4,i)
595 surf_patch = pblast%PBLAST_TAB(il)%SURF_PATCH(i)
596 noda_surf(n1) = noda_surf(n1) + surf_patch
597 noda_surf(n2) = noda_surf(n2) + surf_patch
598 noda_surf(n3) = noda_surf(n3) + surf_patch
599 p = pblast%PBLAST_TAB(il)%PRES(i) * surf_patch
600 noda_pext(n1) = noda_pext(n1) + p
601 noda_pext(n2) = noda_pext(n2) + p
602 noda_pext(n3) = noda_pext(n3) + p
603 IF(pblast%PBLAST_TAB(il)%NPT(i) == four)THEN
604 noda_surf(n4) = noda_surf(n4) + surf_patch
605 noda_pext(n4) = noda_pext(n4) + p
606 ENDIF
607 ENDDO
608 ENDIF
609!$OMP END SINGLE
610
611 RETURN
612
613C-----------------------------------------------
614 IF (ierr1/=0) THEN
615 WRITE(iout,*)' ** ERROR IN MEMORY ALLOCATION - PBLAST LOADING'
616 WRITE(istdo,*)' ** ERROR IN MEMORY ALLOCATION - PBLAST LOADING'
617 CALL arret(2)
618 END IF
619C-----------------------------------------------
620
#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:61
character *2 function nl()
Definition message.F:2360
subroutine arret(nn)
Definition arret.F:86
subroutine my_barrier
Definition machine.F:31