OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
nlocal_init_sta.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!|| nlocal_init_sta ../starter/source/materials/fail/nlocal_init_sta.F
25!||--- calls -----------------------------------------------------
26!|| ancmsg ../starter/source/output/message/message.F
27!|| c3fint_reg_ini ../starter/source/elements/sh3n/coque3n/c3fint_reg_ini.F
28!|| cbafint_reg_ini ../starter/source/elements/shell/coqueba/cbafint_reg_ini.F
29!|| cdkfint_reg_ini ../starter/source/elements/sh3n/coquedk/cdkfint_reg_ini.F
30!|| cfint_reg_ini ../starter/source/elements/shell/coque/cfint_reg_ini.F
31!||--- uses -----------------------------------------------------
32!|| message_mod ../starter/share/message_module/message_mod.F
33!||====================================================================
34 SUBROUTINE nlocal_init_sta(ELBUF_TAB,NLOC_DMG ,IPARG ,IXC ,
35 . IXS ,IXTG ,AREA ,X ,
36 . XREFS ,XREFC ,XREFTG ,IPM ,
37 . BUFMAT )
38C-----------------------------------------------
39C M o d u l e s
40C-----------------------------------------------
41 USE elbufdef_mod
42 USE message_mod
44 USE message_mod
45 use element_mod , only : nixs,nixc,nixtg
46C-----------------------------------------------
47C I m p l i c i t T y p e s
48C-----------------------------------------------
49#include "implicit_f.inc"
50C-----------------------------------------------
51C C o m m o n B l o c k s
52C-----------------------------------------------
53#include "param_c.inc"
54#include "com01_c.inc"
55#include "com04_c.inc"
56C-----------------------------------------------
57C D u m m y A r g u m e n t s
58C-----------------------------------------------
59 TYPE(elbuf_struct_), TARGET, DIMENSION(NGROUP) :: ELBUF_TAB
60 TYPE (NLOCAL_STR_) , TARGET :: NLOC_DMG
61 INTEGER IPARG(NPARG,NGROUP),IXS(NIXS,*),IXC(NIXC,*),IXTG(NIXTG,*),
62 . ipm(npropmi,*)
63 my_real ,DIMENSION(NUMELC+NUMELTG),INTENT(IN) ::
64 . area
66 . x(3,*),xrefc(4,3,*),xreftg(3,3,*),xrefs(8,3,*),bufmat(*)
67C-----------------------------------------------
68C L o c a l V a r i a b l e s
69C-----------------------------------------------
70 LOGICAL :: CONVERGED,FAILURE
71 INTEGER :: L_NLOC,NG,ILOC,NEL,NFT,ITY,FORMU
72 my_real
73 . dt_nl,time,norm_1,norm,d
74 my_real,
75 . PARAMETER :: tol1 = 5.0d-4
76 my_real,
77 . PARAMETER :: tol2 = 1.0d-8
78 my_real,
79 . DIMENSION(:), POINTER :: fnl,unl,vnl,dnl,mnl
80
81 ! Initialization of the convergence flag
82 converged = .false.
83 ! Initialization of the failure flag
84 failure = .false.
85 ! Size of the non-local vectors
86 l_nloc = nloc_dmg%L_NLOC
87 ! Pointing the non-local forces vector
88 fnl => nloc_dmg%FNL(1:l_nloc,1)
89 vnl => nloc_dmg%VNL(1:l_nloc)
90 dnl => nloc_dmg%DNL(1:l_nloc)
91 unl => nloc_dmg%UNL(1:l_nloc)
92 mnl => nloc_dmg%MASS(1:l_nloc)
93 ! Initialization of the non-local time step
94 dt_nl = hundred
95 fnl = zero
96 vnl = zero
97 dnl = zero
98 unl = zero
99 time = zero
100 ! Loop of the initialization
101 DO WHILE (.NOT.converged)
102 ! Loop over the element groups
103 DO ng = 1,ngroup
104 ! Non-local flag
105 iloc = iparg(78,ng)
106 ! If the group is non-local
107 IF (iloc>0) THEN
108 ! Number of elements in the group
109 nel = iparg(2,ng)
110 ! NFT value
111 nft = iparg(3,ng)
112 ! Type of elements
113 ity = iparg(5,ng)
114 ! Formulation of the element
115 formu = iparg(23,ng)
116 ! If the elements are shells
117 IF (ity == 3) THEN
118 IF ((formu>10).AND.(formu<29)) THEN
119 CALL cbafint_reg_ini(elbuf_tab,nloc_dmg ,area ,ixc ,
120 . dt_nl ,x ,xrefc ,nft ,
121 . nel ,ng ,ipm ,bufmat ,
122 . time ,failure )
123 ELSE
124 CALL cfint_reg_ini(elbuf_tab,nloc_dmg ,area ,ixc ,
125 . dt_nl ,x ,xrefc ,nft ,
126 . nel ,ng ,ipm ,bufmat ,
127 . time ,failure )
128 ENDIF
129 ELSEIF (ity == 7) THEN
130 IF ((formu==1).OR.(formu==2)) THEN
131 CALL c3fint_reg_ini(elbuf_tab,nloc_dmg ,area ,ixtg ,
132 . dt_nl ,x ,xreftg ,nft ,
133 . nel ,ng ,ipm ,bufmat ,
134 . time ,failure )
135 ELSEIF ((formu==30).OR.(formu==31)) THEN
136 CALL cdkfint_reg_ini(elbuf_tab,nloc_dmg ,area ,ixtg ,
137 . dt_nl ,x ,xreftg ,nft ,
138 . nel ,ng ,ipm ,bufmat ,
139 . time ,failure )
140 ENDIF
141 ENDIF
142 ENDIF
143 ENDDO
144 ! Computation of the accelerations
145 fnl = fnl / mnl
146 ! Computation of the velocities
147 vnl = vnl + dt_nl*fnl
148 ! Resetting the forces
149 fnl = zero
150 ! Norm of the previous increment
151 norm_1 = sqrt(dot_product(dnl,dnl))
152 ! Computation of the increments
153 dnl = dt_nl*vnl
154 ! Norm of the current increment
155 norm = sqrt(dot_product(dnl,dnl))
156 ! Computation of the cumulated variable
157 unl = unl + dnl
158 ! Convergence criterion
159 converged = ((norm<tol1).AND.(abs(norm-norm_1)<tol2).AND.(time/=zero))
160 d = (sqrt(dot_product(dnl,dnl)))
161 IF (d .NE. d) THEN
162 CALL ancmsg(msgid=1765,msgtype=msgerror,
163 . anmode=aninfo_blind_1)
164 EXIT
165 ENDIF
166 ! Updating time
167 time = time + dt_nl
168 ENDDO
169 ! Resetting the non-local vectors
170 fnl = zero
171 vnl = zero
172 dnl = zero
173 ! Checking failure
174 IF (failure) THEN
175 CALL ancmsg(msgid=1767,msgtype=msgwarning,
176 . anmode=aninfo_blind_1)
177 ENDIF
178c-----------
179 END
subroutine c3fint_reg_ini(elbuf_tab, nloc_dmg, area, ixtg, dt_nl, x, xreftg, nft, nel, ng, ipm, bufmat, time, failure)
subroutine cbafint_reg_ini(elbuf_tab, nloc_dmg, area, ixc, dt_nl, x, xrefc, nft, nel, ng, ipm, bufmat, time, failure)
subroutine cdkfint_reg_ini(elbuf_tab, nloc_dmg, area, ixtg, dt_nl, x, xreftg, nft, nel, ng, ipm, bufmat, time, failure)
subroutine cfint_reg_ini(elbuf_tab, nloc_dmg, area, ixc, dt_nl, x, xrefc, nft, nel, ng, ipm, bufmat, time, failure)
#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)
subroutine nlocal_init_sta(elbuf_tab, nloc_dmg, iparg, ixc, ixs, ixtg, area, x, xrefs, xrefc, xreftg, ipm, bufmat)
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