OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
sms_gravit.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!|| sms_gravit ../engine/source/ams/sms_gravit.F
25!||--- called by ------------------------------------------------------
26!|| sms_mass_scale_2 ../engine/source/ams/sms_mass_scale_2.F
27!||--- calls -----------------------------------------------------
28!|| finter ../engine/source/tools/curve/finter.F
29!||--- uses -----------------------------------------------------
30!|| finter_mixed_mod ../engine/source/tools/finter_mixed.F90
31!|| python_funct_mod ../common_source/modules/python_mod.F90
32!|| sensor_mod ../common_source/modules/sensor_mod.F90
33!||====================================================================
34 SUBROUTINE sms_gravit(IGRV ,AGRV ,NPC ,TF ,A ,
35 2 V ,X ,SKEW ,MS ,SENSOR_TAB,
36 3 WEIGHT,IB ,ITASK,TAGSLV_RBY_SMS,NSENSOR, WFEXT,python)
37C-----------------------------------------------
38C M o d u l e s
39C-----------------------------------------------
40 USE python_funct_mod, ONLY : python_
41 use finter_mixed_mod, only : finter_mixed
42 USE sensor_mod
43C-----------------------------------------------
44C I m p l i c i t T y p e s
45C-----------------------------------------------
46#include "implicit_f.inc"
47#include "comlock.inc"
48C-----------------------------------------------
49C C o m m o n B l o c k s
50C-----------------------------------------------
51#include "com04_c.inc"
52!#include "com06_c.inc"
53#include "com08_c.inc"
54#include "task_c.inc"
55#include "param_c.inc"
56C-----------------------------------------------
57C D u m m y A r g u m e n t s
58C-----------------------------------------------
59 INTEGER NPC(*),NDDIM,NVDIM,NSENSOR
60 INTEGER IGRV(NIGRV,*),IB(*)
61 INTEGER WEIGHT(*), ITASK, TAGSLV_RBY_SMS(*)
63 . agrv(lfacgrv,*), tf(*), a(3,*), v(3,*), ms(*),
64 . x(3,*), skew(lskew,*)
65 TYPE (SENSOR_STR_) ,DIMENSION(NSENSOR) ,INTENT(IN) :: SENSOR_TAB
66 DOUBLE PRECISION,INTENT(INOUT) :: WFEXT
67 TYPE(python_), intent(inout) :: python
68C-----------------------------------------------
69C L o c a l V a r i a b l e s
70C-----------------------------------------------
71 INTEGER NL, N1, ISK, N2, IFUNC, K1, K2, K3, ISENS,K,NN,IAD,J, IADF, IADL
72 my_real NX, NY, NZ, AXI, A0, AA, VV, FX, FY, FZ, AX, TS,GAMA, WFEXTT,FCX,FCY
73 my_real,EXTERNAL :: finter
74C=======================================================================
75 wfextt=zero
76C
77 DO nl=1,ngrav
78 fcy = agrv(1,nl)
79 fcx = agrv(2,nl)
80 nn=igrv(1,nl)
81 isk=igrv(2,nl)/10
82 n2 =igrv(2,nl)-10*isk
83 ifunc=igrv(3,nl)
84 iad=igrv(4,nl)
85 iadf = iad+itask*nn/nthread
86 iadl = iad-1+(itask+1)*nn/nthread
87C
88 isens=0
89 DO k=1,nsensor
90 IF(igrv(6,nl)== sensor_tab(k)%SENS_ID) isens=k ! do it in starter !!!
91 ENDDO
92 IF(isens==0)THEN
93 ts=tt
94 ELSE
95 ts = tt-sensor_tab(isens)%TSTART
96 IF(ts<0.0)cycle
97 ENDIF
98C
99 IF (ifunc > 0) THEN
100 a0 = fcy*finter_mixed(python,nfunct,ifunc,(ts-dt1)*fcx,npc,tf)
101 gama = fcy*finter_mixed(python,nfunct,ifunc,ts*fcx,npc,tf)
102 ELSE
103 a0 = fcy
104 gama = fcy
105 ENDIF
106C
107 aa = gama
108 IF(isk<=1)THEN
109#include "vectorize.inc"
110 DO j=iadf,iadl
111 n1=iabs(ib(j))
112 IF(tagslv_rby_sms(n1)/=0) cycle
113 a(n2,n1)=a(n2,n1)+ms(n1)*aa
114 IF(ib(j)>0) wfextt=wfextt + half*(a0+aa)*ms(n1)*v(n2,n1)*dt1*weight(n1)
115 ENDDO
116 ELSE
117 k1=3*n2-2
118 k2=3*n2-1
119 k3=3*n2
120#include "vectorize.inc"
121 DO j=iadf,iadl
122 n1=iabs(ib(j))
123 IF(tagslv_rby_sms(n1)/=0) cycle
124 vv = skew(k1,isk)*v(1,n1)+skew(k2,isk)*v(2,n1)+skew(k3,isk)*v(3,n1)
125 a(1,n1)=a(1,n1)+skew(k1,isk)*ms(n1)*aa
126 a(2,n1)=a(2,n1)+skew(k2,isk)*ms(n1)*aa
127 a(3,n1)=a(3,n1)+skew(k3,isk)*ms(n1)*aa
128 IF(ib(j)>0) wfextt=wfextt+half*(a0+aa)*ms(n1)*vv*dt1*weight(n1)
129 ENDDO
130 ENDIF
131 END DO
132C
133!$OMP ATOMIC
134 wfext = wfext + wfextt
135C
136 RETURN
137 END
#define my_real
Definition cppsort.cpp:32
subroutine sms_gravit(igrv, agrv, npc, tf, a, v, x, skew, ms, sensor_tab, weight, ib, itask, tagslv_rby_sms, nsensor, wfext, python)
Definition sms_gravit.F:37