OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
ecran1.F
Go to the documentation of this file.
1Copyright> OpenRadioss
2Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3Copyright>
4Copyright> This program is free software: you can redistribute it and/or modify
5Copyright> it under the terms of the GNU Affero General Public License as published by
6Copyright> the Free Software Foundation, either version 3 of the License, or
7Copyright> (at your option) any later version.
8Copyright>
9Copyright> This program is distributed in the hope that it will be useful,
10Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12Copyright> GNU Affero General Public License for more details.
13Copyright>
14Copyright> You should have received a copy of the GNU Affero General Public License
15Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16Copyright>
17Copyright>
18Copyright> Commercial Alternative: Altair Radioss Software
19Copyright>
20Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21Copyright> software under a commercial license. Contact Altair to discuss further if the
22Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23!||====================================================================
24!|| ecran1 ../starter/source/initial_conditions/detonation/ecran1.f
25!||--- called by ------------------------------------------------------
26!|| m5in2 ../starter/source/initial_conditions/detonation/m5in2.F
27!|| m5in2t ../starter/source/initial_conditions/detonation/m5in2t.F
28!||--- calls -----------------------------------------------------
29!|| ancmsg ../starter/source/output/message/message.F
30!|| iombr ../starter/source/initial_conditions/detonation/iombr.F
31!||--- uses -----------------------------------------------------
32!|| detonators_mod ../starter/share/modules1/detonators_mod.F
33!|| message_mod ../starter/share/message_module/message_mod.F
34!||====================================================================
35 SUBROUTINE ecran1(DETONATOR,X,VDET)
36C-----------------------------------------------
37 USE message_mod
39C-----------------------------------------------
40C I m p l i c i t T y p e s
41C-----------------------------------------------
42#include "implicit_f.inc"
43C-----------------------------------------------
44C D u m m y A r g u m e n t s
45C-----------------------------------------------
46 my_real x(3,numnod)
47 my_real,INTENT(IN)::vdet
48 TYPE(detonator_wave_shaper_struct_),TARGET :: DETONATOR
49C-----------------------------------------------
50C C o m m o n B l o c k s
51C-----------------------------------------------
52#include "scr11_c.inc"
53#include "com04_c.inc"
54C-----------------------------------------------
55C L o c a l V a r i a b l e s
56C-----------------------------------------------
57 INTEGER I, II, J, JJ, JJJ,NPE
58 my_real dtomin, ddmx, d2
59 INTEGER,POINTER,DIMENSION(:) :: IECR, IORDR, IFLG
60 my_real,POINTER,DIMENSION(:) :: dtime
61C-----------------------------------------------
62C E x t e r n a l F u n c t i o n s
63C-----------------------------------------------
64 INTEGER,EXTERNAL :: IOMBR
65C-----------------------------------------------
66
67 npe=detonator%NUMNOD
68 iecr => detonator%NODES(1:)
69 iordr => detonator%IORDR(1:)
70 iflg => detonator%FLAG(1:)
71 dtime => detonator%TIME(1:)
72C---------------------------------------
73C COMPUTING DETONATION TIMES OF THE SCREEN POINTS
74C---------------------------------------
75C 1) LIGHTENING FROM DETONATION ORIGIN
76C check if the target can be directly lightened from detonation origin.
77C yes if no crossing with the screen (IOMBR returns 0)
78C no otherwise (IOMBR return 1)
79C---------------------------------------
80 dtomin=ep20
81 iordr(1)=0
82
83 DO i=1,npe
84 ddmx =ep20
85 iflg(i)=0
86 ii=iecr(i)
87 yl=x(2,ii)
88 zl=x(3,ii)
89 IF(iombr(detonator,x,iecr,ddmx,vdet) == 0)THEN !Vdet is optional velocity from origin (default is material velocity VDTO)
90 dtime(i)=dto !DT0 is lightening time from function IOMBR
91 IF(dtime(i) <= dtomin)THEN
92 iordr(1)=i
93 dtomin=dtime(i)
94 ENDIF
95 ELSE
96 dtime(i)=ep20
97 ENDIF
98 END DO !I=1,NPE
99
100 IF(iordr(1) == 0)THEN
101 CALL ancmsg(msgid=422,
102 . msgtype=msgerror,
103 . anmode=aninfo)
104 ENDIF
105
106C-----------------------------------------
107C 2) LIGHTENING SCREEN POINTS FROM SCREEN POINTS THEMSELVES
108C-----------------------------------------
109 DO j=1,npe-1
110 jj=iordr(j)
111 jjj=iecr(jj)
112 !define J as a new source. (J from N-1, N-2, ..., 1 ; first point is the nearest one from detonation origin)
113 yd=x(2,jjj)
114 zd=x(3,jjj)
115 dto0=dtime(jj)
116 iflg(jj)=1
117 dtomin=ep20
118 DO i=1,npe
119 ! check if I can be lightened from J (I from 1,2,...,N ; first node is the farthest one from detonation origin)
120 IF(iflg(i) == 1)cycle !I
121 ddmx =ep20
122 ii=iecr(i)
123 yl=x(2,ii)
124 zl=x(3,ii)
125 IF(iabs(i-jj) == 1)THEN
126 d2 =(yd-yl)**2+(zd-zl)**2
127 dto=dto0+sqrt(d2)/vdto
128 dtime(i)= min(dtime(i),dto)
129 ELSEIF(iombr(detonator,x,iecr,ddmx,vdto) == 0)THEN
130 dtime(i)= min(dtime(i),dto)
131 ENDIF
132 IF(dtime(i) <= dtomin)THEN
133 iordr(j+1)=i
134 dtomin=dtime(i)
135 ENDIF
136 END DO !I=1,NPE
137 END DO !J=1,NPE-1
138
139 RETURN
140 END
#define my_real
Definition cppsort.cpp:32
subroutine ecran1(detonator, x, vdet)
Definition ecran1.F:36
#define min(a, b)
Definition macros.h:20
subroutine ancmsg(msgid, msgtype, anmode, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, r1, r2, r3, r4, r5, r6, r7, r8, r9, c1, c2, c3, c4, c5, c6, c7, c8, c9, prmode)
Definition message.F:889
program starter
Definition starter.F:39