OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
lgmini_rby.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!|| lgmini_rby ../starter/source/tools/lagmul/lgmini_rby.F
25!||--- called by ------------------------------------------------------
26!|| initia ../starter/source/elements/initia/initia.F
27!||--- calls -----------------------------------------------------
28!|| ancmsg ../starter/source/output/message/message.F
29!|| fretitl2 ../starter/source/starter/freform.F
30!||--- uses -----------------------------------------------------
31!|| message_mod ../starter/share/message_module/message_mod.F
32!||====================================================================
33 SUBROUTINE lgmini_rby(NPBYL ,LPBYL ,RBYL ,MASS ,INER ,
34 . X ,V ,VR ,ITAB ,NOM_OPT)
35 USE message_mod
37C----------------------------------------------------------------
38C I m p l i c i t T y p e s
39C-----------------------------------------------
40#include "implicit_f.inc"
41C-----------------------------------------------
42C C o m m o n B l o c k s
43C-----------------------------------------------
44#include "param_c.inc"
45#include "lagmult.inc"
46#include "com04_c.inc"
47#include "scr17_c.inc"
48C-----------------------------------------------
49C D u m m y A r g u m e n t s
50C-----------------------------------------------
51 INTEGER NPBYL(NNPBY,*), LPBYL(*), ITAB(*)
52 my_real rbyl(nrby,*),mass(*),iner(*),x(3,*), v(3,*), vr(3,*)
53 INTEGER NOM_OPT(LNOPT1,*)
54C-----------------------------------------------
55C L o c a l V a r i a b l e s
56C-----------------------------------------------
57 INTEGER I,J,N,NN,M,IK,IC,MSL,NSL,TNSL,ICDG
58 my_real rx,ry,rz,masrb
59 INTEGER ID
60 CHARACTER(LEN=NCHARTITLE) :: TITR
61C======================================================================|
62 tnsl = 0
63 DO n=1,nrbylag
64 m = npbyl(1,n)
65 msl = npbyl(2,n)
66 icdg = npbyl(3,n)
67 nsl = msl - 1
68 mass(m) = mass(m) + rbyl(1,n)
69 iner(m) = iner(m) + rbyl(2,n)
70 id=nom_opt(1,nrbykin+n)
71 CALL fretitl2(titr, nom_opt(lnopt1-ltitr+1,nrbykin+n),ltitr)
72 IF(mass(m)==zero.OR.iner(m)==zero) THEN
73 CALL ancmsg(msgid=273,
74 . msgtype=msgwarning,
75 . anmode=aninfo_blind_1,
76 . i1=id,
77 . c1=titr)
78 ENDIF
79 IF(mass(m)==zero) mass(m)= em15
80 IF(iner(m)==zero) iner(m)= em15
81C----- CORRECTION DE LA CENTRE DE GRAVITE DU MAIN
82 IF(icdg==1)THEN
83C----- CDG TOTAL
84 masrb = mass(m)
85 DO j=1,3
86 x(j,m)=x(j,m)*mass(m)
87 ENDDO
88 DO i=1,nsl
89 nn = lpbyl(tnsl+i)
90 DO j=1,3
91 x(j,m) = x(j,m)+x(j,nn)*mass(nn)
92 ENDDO
93 masrb = masrb+mass(nn)
94 ENDDO
95 IF(masrb<=em30) THEN
96 CALL ancmsg(msgid=273,
97 . msgtype=msgwarning,
98 . anmode=aninfo_blind_1,
99 . i1=id,
100 . c1=titr)
101 RETURN
102 ENDIF
103 DO j=1,3
104 x(j,m)=x(j,m)/masrb
105 ENDDO
106 ELSEIF(icdg==2)THEN
107C----- CDG DES NOEUDS SECONDS
108 masrb=zero
109 DO j=1,3
110 x(j,m)=zero
111 ENDDO
112 DO i=1,nsl
113 nn = lpbyl(tnsl+i)
114 DO j=1,3
115 x(j,m) = x(j,m)+x(j,nn)*mass(nn)
116 ENDDO
117 masrb = masrb+mass(nn)
118 ENDDO
119C
120 IF(masrb<=em30) THEN
121 CALL ancmsg(msgid=273,
122 . msgtype=msgwarning,
123 . anmode=aninfo_blind_1,
124 . i1=id,
125 . c1=titr)
126 RETURN
127 ENDIF
128 DO j=1,3
129 x(j,m)=x(j,m)/masrb
130 ENDDO
131 masrb=masrb+mass(m)
132 ENDIF
133 IF(mass(m)==zero.OR.iner(m)==zero) THEN
134 CALL ancmsg(msgid=679,
135 . msgtype=msgerror,
136 . anmode=aninfo_blind_1,
137 . i1=id,
138 . c1=titr,
139 . c2='ON MAIN NODE')
140 ENDIF
141 tnsl = tnsl + 3*msl
142 ENDDO
143C-----------
144 RETURN
145 END
#define my_real
Definition cppsort.cpp:32
subroutine lgmini_rby(npbyl, lpbyl, rbyl, mass, iner, x, v, vr, itab, nom_opt)
Definition lgmini_rby.F:35
integer, parameter nchartitle
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
subroutine fretitl2(titr, iasc, l)
Definition freform.F:804