OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_read_preload.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!|| hm_read_preload ../starter/source/loads/general/preload/hm_read_preload.F
25!||--- called by ------------------------------------------------------
26!|| lectur ../starter/source/starter/lectur.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_read_key ../starter/source/devtools/hm_reader/hm_option_read_key.F
32!|| hm_option_start ../starter/source/devtools/hm_reader/hm_option_start.F
33!|| sectarea ../starter/source/loads/bolt/sectarea.F
34!||--- uses -----------------------------------------------------
35!|| hm_option_read_mod ../starter/share/modules1/hm_option_read_mod.F
36!|| message_mod ../starter/share/message_module/message_mod.F
37!|| submodel_mod ../starter/share/modules1/submodel_mod.F
38!||====================================================================
39 SUBROUTINE hm_read_preload(IXS ,IXS10,IPRELOAD ,PRELOAD ,IFLAG_BPRELOAD,
40 . NSTRF ,SENSORS ,UNITAB ,X ,
41 . ISOLNOD ,ITAB ,LSUBMODEL ,
42 . SNPC ,NPC ,IPRELOAD_FUN )
43C-----------------------------------------------
44C M o d u l e s
45C-----------------------------------------------
46 USE unitab_mod
47 USE message_mod
48 USE sensor_mod
50 USE submodel_mod
52 use element_mod , only : nixs
53C-----------------------------------------------
54C I m p l i c i t T y p e s
55C-----------------------------------------------
56#include "implicit_f.inc"
57C-----------------------------------------------
58C C o m m o n B l o c k s
59C-----------------------------------------------
60#include "units_c.inc"
61#include "com04_c.inc"
62#include "boltpr_c.inc"
63C-----------------------------------------------
64C D u m m y A r g u m e n t s
65C-----------------------------------------------
66 TYPE (UNIT_TYPE_),INTENT(IN) ::UNITAB
67 INTEGER IXS(NIXS,*), IXS10(6,*), IPRELOAD(3,*), IFLAG_BPRELOAD(*)
68 INTEGER NSTRF(*),ITAB(*),ISOLNOD(*)
69 INTEGER ,INTENT(IN) :: SNPC
70 INTEGER ,DIMENSION(SNPC), INTENT(IN) :: NPC
71 INTEGER ,DIMENSION(2,NPRELOAD), INTENT(INOUT) :: IPRELOAD_FUN
72 my_real preload(6,*),x(3,*)
73 TYPE (SENSORS_) ,INTENT(IN) :: SENSORS
74 TYPE(submodel_data) LSUBMODEL(*)
75
76C-----------------------------------------------
77C L o c a l V a r i a b l e s
78C-----------------------------------------------
79 INTEGER ISEC, K, I1, I2, I, ISENS,NPR0,NN,ID,J,UID,IFLAGUNIT,JS,SENSNUM
80 INTEGER IUGRP(NPRELOAD),IDSENSOR(NPRELOAD)
81 INTEGER K0,K1,K2,K3,IS,IE,II,NS,NI,ITYPE,IN1,IN2,IN3,IFUN,FUN_ID
82 my_real lval(npreload),ts(npreload),te(npreload),nx(npreload),ny(npreload),nz(npreload)
83 my_real tdeb,tfin, loadval,x1,y1,z1,x2,y2,z2,x3,y3,z3,n3,area(npreload)
84 CHARACTER MESS*40
85 CHARACTER(LEN=NCHARTITLE) :: TITR
86 CHARACTER(LEN=NCHARLINE) ::KEY
87C-----------------------------------------------
88 LOGICAL IS_AVAILABLE
89C-----------------------------------------------
90C E x t e r n a l F u n c t i o n s
91C-----------------------------------------------
92 DATA mess/'BOLT PRELOADING DEFINITION '/
93C=======================================================================
94 is_available = .false.
95C-----------------------------------------------
96 CALL hm_option_start('/PRELOAD')
97C-----------------------------------------------
98 npr0=npreload
99 k=0
100 area(1:npreload)=zero
101
102 DO i=1,npr0
103 ! Read title, ID and Unit ID
104 titr = ''
105 CALL hm_option_read_key(lsubmodel,
106 . option_id = id,
107 . unit_id = uid,
108 . option_titr = titr,
109 . keyword2 = key)
110C
111 iugrp(i) = 0
112 IF (key(1:len_trim(key))=='AXIAL') cycle
113 ! Checking unit ID
114 iflagunit = 0
115C
116 DO j=1,unitab%NUNITS
117 IF (unitab%UNIT_ID(j) == uid) THEN
118 iflagunit = 1
119 EXIT
120 ENDIF
121 ENDDO
122 IF (uid/=0.AND.iflagunit==0) THEN
123 CALL ancmsg(msgid=659,anmode=aninfo,msgtype=msgerror,
124 . i2=uid,i1=id,c1='BOLT PRELOAD',
125 . c2='BOLT PRELOAD',
126 . c3=titr)
127 ENDIF
128
129
130 !read card line
131 CALL hm_get_intv('sect_ID' ,isec ,is_available,lsubmodel)
132 CALL hm_get_intv('sens_ID' ,isens ,is_available,lsubmodel)
133 CALL hm_get_intv('Itype' ,itype ,is_available,lsubmodel)
134 CALL hm_get_intv('curveid' ,ifun ,is_available,lsubmodel)
135
136 CALL hm_get_floatv('Preload',loadval,is_available, lsubmodel, unitab)
137 CALL hm_get_floatv('Tstart' ,tdeb ,is_available, lsubmodel, unitab)
138 CALL hm_get_floatv('Tstop' ,tfin ,is_available, lsubmodel, unitab)
139
140
141 IF (itype == 0) itype = 1 ! Default to effort preloading
142
143
144 IF(loadval <= zero .AND. ifun==0) THEN
145 CALL ancmsg(msgid=1255,msgtype=msgwarning,
146 . anmode=aninfo_blind_1,
147 . c1='BOLT PRELOAD',
148 . i1=id,
149 . c2=titr)
150! LOADVAL = ZERO
151 ENDIF
152 IF (tfin == zero) tfin=ep30
153!
154 fun_id = 0
155 IF (ifun>0) THEN
156 DO j=1,nfunct
157 IF(npc(nfunct+j+1)==ifun) fun_id=j
158 ENDDO
159 IF(fun_id==0)THEN
160 CALL ancmsg(msgid=154,anmode=aninfo,msgtype=msgerror,i2=ifun,i1=id,c1=titr)
161 ENDIF
162 END IF !(IFUN>0) THEN
163 IF (fun_id>0) THEN ! Tstart,Tstop will be updated in Engin
164 tdeb = zero
165 tfin = ep30
166 END IF !(IFUN>0) THEN
167c
168 sensnum = 0
169 IF (isens > 0) THEN
170 DO js=1,sensors%NSENSOR
171 IF (isens == sensors%SENSOR_TAB(js)%SENS_ID) THEN
172 sensnum = js ! not used - not stored
173 EXIT
174 ENDIF
175 ENDDO
176 IF (sensnum == 0) THEN
177 isens = 0
178 CALL ancmsg(msgid=1252,anmode=aninfo,msgtype=msgerror,
179 . c1='BOLT PRELOAD',
180 . c2='BOLT PRELOAD',
181 . i2=isens,i1=id,c3=titr)
182 END IF
183 ENDIF !(ISENS > 0)
184c
185 nn = 0
186 IF (isec > 0) THEN !ISEC=sect_ID input is mandatory
187 k0=31
188 DO is=1,nsect
189 IF (isec==nstrf(k0+23)) THEN
190 iugrp(i) = isec
191 lval(i) = loadval
192 idsensor(i) = isens
193 ts(i) = tdeb
194 te(i) = tfin
195 IF (fun_id>0) THEN ! for printout
196 ts(i) = -ifun
197 te(i) = ifun
198 END IF
199 nn = nstrf(k0+6)
200 ns = nstrf(k0+7)
201 ni = nstrf(k0+14)
202 k1 = k0+30
203 k2 = k1+ni
204 k3 = k2+nn
205 in1 = nstrf(k0+3)
206 in2 = nstrf(k0+4)
207 in3 = nstrf(k0+5)
208 x1=x(1,in2)-x(1,in1)
209 y1=x(2,in2)-x(2,in1)
210 z1=x(3,in2)-x(3,in1)
211 x2=x(1,in3)-x(1,in1)
212 y2=x(2,in3)-x(2,in1)
213 z2=x(3,in3)-x(3,in1)
214 x3=y1*z2-z1*y2
215 y3=z1*x2-z2*x1
216 z3=x1*y2-x2*y1
217 n3=x3*x3+y3*y3+z3*z3
218c
219 IF(n3 < em20) THEN
220 CALL ancmsg(msgid=1244,anmode=aninfo,msgtype=msgerror,
221 . c1='BOLT PRELOAD',
222 . c2='BOLT PRELOAD',
223 . i2=isec,i1=id,c3=titr)
224 ELSE
225 n3 = sqrt(n3)
226 x3 = x3/n3
227 y3 = y3/n3
228 z3 = z3/n3
229 nx(i) = x3
230 ny(i) = y3
231 nz(i) = z3
232 ENDIF
233 IF(ns == 0) THEN
234 CALL ancmsg(msgid=1251,anmode=aninfo,msgtype=msgerror,
235 . c1='BOLT PRELOAD',
236 . c2='BOLT PRELOAD',
237 . i2=isec,i1=id,c3=titr)
238 ELSE
239 ! calculation of section area
240 CALL sectarea(ixs,ixs10,x,nstrf(k3),ns,isolnod,area(i),itab) !
241 IF (itype == 1) THEN
242 IF (area(i) > 1.e-30) loadval = loadval/area(i)
243 ENDIF
244 DO ie=1,ns
245 k=k+1
246 ii=(k3-1)+2*ie-1
247 ipreload(1,k) = nstrf(ii) ! Num. interne avant tri
248 ipreload(2,k) = isens ! Sensor
249 ipreload(3,k) = ixs(11,nstrf(ii)) ! User Id.
250 !IFLAG_BPRELOAD(NSTRF(II)) = 1 ! Flag sur element precontraint
251 iflag_bpreload(nstrf(ii)) = i ! flag on prestressed element
252
253
254 preload(1,k) = tdeb ! pretension start time
255 preload(2,k) = tfin ! pretension end time
256 preload(3,k) = loadval ! pretension stress
257 preload(4,k) = x3 ! Pretension Direction
258 preload(5,k) = y3
259 preload(6,k) = z3
260 ENDDO
261 ENDIF !IF(NS == 0)
262 GOTO 100
263 ENDIF !IF (ISEC==NSTRF(K0+23))
264 k0=nstrf(k0+24)
265 ENDDO
266 ENDIF
267 CALL ancmsg(msgid=1243,anmode=aninfo,msgtype=msgerror,
268 . c1='BOLT PRELOAD',
269 . c2='BOLT PRELOAD',
270 . i2=isec,i1=id,c3=titr)
271100 CONTINUE
272 ipreload_fun(1,i) = fun_id
273 ipreload_fun(2,i) = sensnum
274
275 ENDDO
276 i1=1
277 i2=min0(50,npreload)
278c-----------------------------output------------------------------------------
279 90 WRITE (iout,2000)
280 DO i=i1,i2
281 IF (iugrp(i)==0) cycle
282 IF (ts(i)<zero) THEN
283 ts(i) = zero
284 ifun = nint(te(i))
285 te(i)=ep30
286 WRITE (iout,'(I10,1X,I10,1X,1PE10.3,1X,I10,6(1X,1PE10.3),I10)') i,
287 . iugrp(i), area(i), idsensor(i), nx(i), ny(i), nz(i), lval(i), ts(i), te(i),ifun
288 ELSE
289 ifun = 0
290 WRITE (iout,'(I10,1X,I10,1X,1PE10.3,1X,I10,6(1X,1PE10.3),I10)') i,
291 . iugrp(i), area(i), idsensor(i), nx(i), ny(i), nz(i), lval(i), ts(i), te(i),ifun
292 END IF
293 ENDDO
294 IF(i2==npreload)GOTO 200
295 i1=i1+50
296 i2=min0(i2+50,npreload)
297 GOTO 90
298
299c-------------------------
300 200 RETURN
301c-------------------------
302 2000 FORMAT(//
303 .' BOLT PRELOADINGS '/
304 .' ---------------- '/
305 .' ID SECTION AREA SENSOR NX NY
306 . NZ PRELOAD START-T END-T IFUNC')
307C-----------
308 RETURN
309 END
#define my_real
Definition cppsort.cpp:32
subroutine hm_get_floatv(name, rval, is_available, lsubmodel, unitab)
subroutine hm_get_intv(name, ival, is_available, lsubmodel)
subroutine hm_option_start(entity_type)
subroutine hm_read_preload(ixs, ixs10, ipreload, preload, iflag_bpreload, nstrf, sensors, unitab, x, isolnod, itab, lsubmodel, snpc, npc, ipreload_fun)
subroutine area(d1, x, x2, y, y2, eint, stif0)
integer, parameter nchartitle
integer, parameter ncharline
subroutine sectarea(ixs, ixs10, x, ibuf, nele, isolnod, area, itab)
Definition sectarea.F:32
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:895