OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
read_dfs_wave_shaper.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!|| read_dfs_wave_shaper ../starter/source/initial_conditions/detonation/read_dfs_wave_shaper.f
25!||--- called by ------------------------------------------------------
26!|| read_detonators ../starter/source/initial_conditions/detonation/read_detonators.F
27!||--- calls -----------------------------------------------------
28!|| ancmsg ../starter/source/output/message/message.F
29!|| hm_get_floatv ../starter/source/devtools/hm_reader/hm_get_floatv.F
30!|| hm_get_intv ../starter/source/devtools/hm_reader/hm_get_intv.F
31!|| hm_option_is_encrypted ../starter/source/devtools/hm_reader/hm_option_is_encrypted.F
32!|| hm_option_read_key ../starter/source/devtools/hm_reader/hm_option_read_key.F
33!|| hm_option_start ../starter/source/devtools/hm_reader/hm_option_start.F
34!|| ifrontplus ../starter/source/spmd/node/frontplus.F
35!|| nintri ../starter/source/system/nintrr.F
36!|| nodgrnr5 ../starter/source/starter/freform.F
37!|| unused_mat_detonator ../starter/source/initial_conditions/detonation/unused_mat_detonator.F
38!|| usr2sys ../starter/source/system/sysfus.F
39!||--- uses -----------------------------------------------------
40!|| detonators_mod ../starter/share/modules1/detonators_mod.F
41!|| format_mod ../starter/share/modules1/format_mod.F90
42!|| hm_option_read_mod ../starter/share/modules1/hm_option_read_mod.F
43!|| message_mod ../starter/share/message_module/message_mod.F
44!|| submodel_mod ../starter/share/modules1/submodel_mod.F
45!||====================================================================
46 SUBROUTINE read_dfs_wave_shaper(DETONATORS,IGRNOD,IPM,ITABM1,UNITAB,LSUBMODEL,ITAB)
47C-----------------------------------------------
48C M o d u l e s
49C-----------------------------------------------
50 USE unitab_mod
51 USE message_mod
53 USE groupdef_mod
55 USE submodel_mod
58 USE format_mod , ONLY : fmw_10i
59C-----------------------------------------------
60C I m p l i c i t T y p e s
61C-----------------------------------------------
62#include "implicit_f.inc"
63C-----------------------------------------------
64C C o m m o n B l o c k s
65C-----------------------------------------------
66#include "com04_c.inc"
67#include "units_c.inc"
68#include "param_c.inc"
69#include "tabsiz_c.inc"
70C-----------------------------------------------
71C D u m m y A r g u m e n t s
72C-----------------------------------------------
73 TYPE (UNIT_TYPE_),INTENT(IN) :: UNITAB
74 INTEGER,INTENT(IN) :: ITABM1(SITABM1),ITAB(NUMNOD)
75 INTEGER,INTENT(IN) :: IPM(NPROPMI,NUMMAT)
76 TYPE(submodel_data),INTENT(IN) :: LSUBMODEL(NSUBMOD)
77 TYPE(detonators_struct_),INTENT(INOUT),TARGET :: DETONATORS
78 TYPE (GROUP_),DIMENSION(NGRNOD),INTENT(IN) :: IGRNOD
79C-----------------------------------------------
80C L o c a l V a r i a b l e s
81C-----------------------------------------------
82 INTEGER :: I, MAT, J, K,IGU,IGS,JJ,MDET,DET_ID,IDET
83 INTEGER :: IBID, NODE_ID1, NODE_ID2,uID1,uID2, IOPT, IUNIT, UID
84 INTEGER :: FLAG_FMT,IMAT,IFLAGUNIT,UNUSED
85 INTEGER :: STAT,NPE
86 my_real :: xc, yc, zc, alt, xc1, yc1, zc1, xc2, yc2, zc2, nx, ny, nz, bid, vcj, vdet
87 CHARACTER*40 :: MESS
88 CHARACTER*64 :: chain1,chain2
89 CHARACTER(LEN=NCHARKEY) :: KEY, KEY2
90 CHARACTER(LEN=NCHARTITLE) :: TITR
91 LOGICAL :: IS_ENCRYPTED, IS_AVAILABLE
92 INTEGER,POINTER,DIMENSION(:) :: IECRAN
93 my_real,POINTER,DIMENSION(:) :: decran
94 INTEGER :: NDETPS,NDETSG,NECRAN,NDETPL,NDETCORD
95C-----------------------------------------------
96C E x t e r n a l F u n c t i o n s
97C-----------------------------------------------
98 INTEGER,EXTERNAL :: NODGRNR5, USR2SYS, NINTRI
99 INTEGER :: UNUSED_MAT_DETONATOR
100 DATA mess/'DETONATORS DEFINITION '/
101C-----------------------------------------------
102C S o u r c e L i n e s
103C-----------------------------------------------
104
105 CALL hm_option_start('/DFS/WAV_SHA')
106
107 DO idet=1,detonators%N_DET_WAVE_SHAPER
108
109 CALL hm_option_read_key(lsubmodel,option_id=det_id, unit_id=uid,keyword2=key,keyword3=key2)
110 IF (len_trim(key) > 0) key = key(1:7)
111 IF (len_trim(key2) > 0) key2 = key2(1:4)
112
113 iecran => detonators%WAVE_SHAPER(idet)%NODES(1:)
114 decran => detonators%WAVE_SHAPER(idet)%TIME(1:)
115
116 is_encrypted= .false.
117 is_available = .false.
118 CALL hm_option_is_encrypted(is_encrypted)
119 !---------------------------------!
120 ! READING !
121 !---------------------------------!
122 CALL hm_get_floatv('rad_det_locationA_X', vdet, is_available, lsubmodel, unitab)
123 CALL hm_get_floatv('rad_det_locationA_Y', yc1, is_available, lsubmodel, unitab)
124 CALL hm_get_floatv('rad_det_locationA_Z', zc1, is_available, lsubmodel, unitab)
125 CALL hm_get_floatv('rad_det_time', alt, is_available, lsubmodel,unitab)
126 CALL hm_get_intv('rad_det_materialid', mat, is_available, lsubmodel)
127 CALL hm_get_intv('entityid', igu, is_available, lsubmodel)
128 !---------------------------------!
129 ! CHECKING USER FLAGS !
130 ! +INTERNAL ID !
131 !---------------------------------!
132 mdet=mat !bak
133 IF (alt > infinity) alt=infinity
134 IF(mat > 0)unused=unused_mat_detonator(mat,nummat,ipm)
135 unused=0
136 IF (mat < 0) THEN
137 CALL ancmsg(msgid=102,msgtype=msgerror,anmode=aninfo,
138 . i1=det_id,
139 . c1='DETONATOR IS REFERRING TO A NEGATIVE MATERIAL ID',
140 . c2='/DFS/WAV_SHA',
141 . i2=mdet)
142 ELSEIF (unused==1) THEN
143 CALL ancmsg(msgid=102,msgtype=msgerror,anmode=aninfo,
144 . i1=det_id,
145 . c1='DETONATOR IS REFERRING TO AN UNKNOWN MATERIAL ID',
146 . c2='/DFS/WAV_SHA',
147 . i2=mdet)
148 ELSEIF (unused==2) THEN
149 CALL ancmsg(msgid=102,msgtype=msgerror,anmode=aninfo,
150 . i1=det_id,
151 . c1='DETONATOR MUST REFER TO A JWL MATERIAL LAW (LAWS 5, 51, 97, 151)',
152 . c2='/DFS/WAV_SHA',
153 . i2=mdet)
154 ELSE
155 !---------------------------------!
156 ! LISTING PRINTOUT !
157 !---------------------------------!
158 npe = nodgrnr5(igu ,igs,iecran(1),igrnod ,itabm1 ,mess)
159 !Nodes in group are ordered from 1 to NPE. last point is the nearest from the detonation origin. Points are composing the screen lines (guard lines). Screen lines is the boundary of the obstacle (shadow area
160 IF(is_encrypted) WRITE(iout,1001)
161 IF(.NOT.is_encrypted)WRITE(iout,1550) det_id,vdet,yc1,zc1,alt,mdet,igu,npe
162 IF(.NOT.is_encrypted)WRITE(iout,fmt=fmw_10i) (itab(iecran(i)),i=1,npe)
163 DO i=1,npe
164 CALL ifrontplus(iecran(i),1)
165 END DO
166 detonators%WAVE_SHAPER(idet)%TDET = alt
167 detonators%WAVE_SHAPER(idet)%MAT = mat
168 detonators%WAVE_SHAPER(idet)%VDET = vdet
169 detonators%WAVE_SHAPER(idet)%XDET = zero
170 detonators%WAVE_SHAPER(idet)%YDET = yc1
171 detonators%WAVE_SHAPER(idet)%ZDET = zc1
172 detonators%WAVE_SHAPER(idet)%NUMNOD = npe
173 END IF
174
175 ENDDO !next IDET
176C-----------------------------------------------
177C O u t p u t F o r m a t
178C-----------------------------------------------
179 1001 FORMAT(///5x,
180 & 'SHADOW LINE DETONATION ',i10,/5x,
181 & '---------------------- ',/5x,
182 & 'CONFIDENTIAL DATA')
183 1550 FORMAT(///5x,
184 & 'SHADOW LINE DETONATION =',i10,/5x,
185 & '---------------------- ',/5x,
186 & 'OPTIONAL VELOCITY =',1pg20.13,/5x,
187 & 'Y-COORDINATE =',1pg20.13,/5x,
188 & 'Z-COORDINATE =',1pg20.13,/5x,
189 & 'LIGHTING TIME =',1pg20.13,/5x,
190 & 'explosive material number =',I10,/5X,
191 & 'shadow line node group id =',I10,/5X,
192 & 'number of points(shadow) =',I10,/5X,
193 & 'shadow line definition : ')
194
195C-----------------------------------------------
196 END SUBROUTINE
#define my_real
Definition cppsort.cpp:32
subroutine ifrontplus(n, p)
Definition frontplus.F:100
subroutine hm_get_floatv(name, rval, is_available, lsubmodel, unitab)
subroutine hm_get_intv(name, ival, is_available, lsubmodel)
subroutine hm_option_is_encrypted(is_encrypted)
subroutine hm_option_start(entity_type)
initmumps id
integer, parameter nchartitle
integer, parameter ncharkey
subroutine read_dfs_wave_shaper(detonators, igrnod, ipm, itabm1, unitab, lsubmodel, itab)
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