OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
forcepinch.F File Reference
#include "implicit_f.inc"
#include "comlock.inc"
#include "param_c.inc"
#include "com04_c.inc"
#include "com06_c.inc"
#include "com08_c.inc"
#include "scr14_c.inc"
#include "scr16_c.inc"
#include "parit_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine forcepinch (ib, fac, npc, tf, a, v, x, skew, ar, vr, nsensor, sensor_tab, weight, tfexc, iadc, fsky, fskyv, fext, h3d_data, apinch, vpinch, python, wfext)

Function/Subroutine Documentation

◆ forcepinch()

subroutine forcepinch ( integer, dimension(nibcld,*) ib,
fac,
integer, dimension(*) npc,
tf,
a,
v,
x,
skew,
ar,
vr,
integer, intent(in) nsensor,
type (sensor_str_), dimension(nsensor) sensor_tab,
integer, dimension(*) weight,
tfexc,
integer, dimension(4,*) iadc,
fsky,
fskyv,
fext,
type(h3d_database) h3d_data,
apinch,
vpinch,
type(python_) python,
double precision, intent(inout) wfext )

Definition at line 41 of file forcepinch.F.

46C-----------------------------------------------
47C M o d u l e s
48C-----------------------------------------------
49 USE h3d_mod
50 USE pinchtype_mod
51 USE sensor_mod
52 USE python_funct_mod
53C-----------------------------------------------
54C I m p l i c i t T y p e s
55C-----------------------------------------------
56#include "implicit_f.inc"
57#include "comlock.inc"
58#include "param_c.inc"
59C-----------------------------------------------
60C C o m m o n B l o c k s
61C-----------------------------------------------
62#include "com04_c.inc"
63#include "com06_c.inc"
64#include "com08_c.inc"
65#include "scr14_c.inc"
66#include "scr16_c.inc"
67#include "parit_c.inc"
68C-----------------------------------------------
69C E x t e r n a l F u n c t i o n s
70C-----------------------------------------------
71 INTEGER GET_U_NUMSENS,GET_U_SENS_FPAR,GET_U_SENS_IPAR,
72 . GET_U_SENS_VALUE,SET_U_SENS_VALUE
75C-----------------------------------------------,
76C D u m m y A r g u m e n t s
77C-----------------------------------------------
78 INTEGER ,INTENT(IN) :: NSENSOR
79 INTEGER NPC(*)
80 INTEGER IB(NIBCLD,*)
81 INTEGER WEIGHT(*), IADC(4,*)
83 . fac(lfaccld,*), tf(*), a(3,*), v(3,*), ar(3,*), vr(3,*),
84 . x(3,*), skew(lskew,*), tfexc,
85 . fsky(8,lsky), fskyv(lsky,8),fext(3,*),
86 . apinch(3,*),vpinch(3,*)
87 TYPE(H3D_DATABASE) :: H3D_DATA
88 TYPE (SENSOR_STR_) ,DIMENSION(NSENSOR) :: SENSOR_TAB
89 TYPE(PYTHON_) :: PYTHON
90 DOUBLE PRECISION,INTENT(INOUT) :: WFEXT
91C-----------------------------------------------
92C L o c a l V a r i a b l e s
93C-----------------------------------------------
94 INTEGER NL, N1, ISK, N2, N3, N4, N5, K1, K2, K3, ISENS,K,LL,IERR,
95 . ICODE,IAD,N_OLD, Bric(2), Face(2), NumBric, IBRIC, IANIM,I,
96 . ISMOOTH
98 . nx, ny, nz, axi, aa, a0, vv, fx, fy, fz, ax, dydx, ts,
99 . sixth,wfextt,x_old, f1, f2,xsens,fcx,fcy
100 my_real finter, zfx,zfy,zfz, zzfx,zzfy,zzfz,ps, zx,zy,zz,finter_smooth
101 my_real
102 . fcypinch, fxpinch, fypinch, fzpinch, aapinch
103 EXTERNAL finter,finter_smooth
104
105C=======================================================================
106 sixth = one_over_6
107 tfexc = zero
108 wfextt = zero
109 n_old = 0
110 x_old = zero
111 ianim = anim_v(5)+outp_v(5)+h3d_data%N_VECT_FINT+
112 . anim_v(6)+outp_v(6)+h3d_data%N_VECT_FEXT
113C
114 DO 10 nl=nconld-nploadpinch+1,nconld
115 n1 = ib(1,nl)
116 n2 = ib(2,nl)
117 n3 = ib(3,nl)
118 n4 = ib(4,nl)
119 n5 = ib(5,nl)
120 fcy = fac(1,nl)
121 fcx = fac(2,nl)
122 fcypinch= fac(1,nl)
123C
124 isens = 0
125 xsens = one
126 DO k=1,nsensor
127 IF(ib(6,nl)==sensor_tab(k)%SENS_ID) isens=k
128 ENDDO
129 IF(isens==0)THEN
130 ts=tt
131 ELSE
132 ts = tt-sensor_tab(isens)%TSTART
133 IF(ts < zero) GOTO 10
134 ENDIF
135C----------------
136C PINCHING PRESSURE
137C----------------
138 IF(n_old/=n5.OR.x_old/=ts) THEN
139
140 ismooth = 0
141 IF (n5 > 0) ismooth = npc(2*nfunct+n5+1)
142!! F1 = FINTER(N5,TS*FCX,NPC,TF,DYDX)
143 IF (ismooth == 0) THEN
144 f1 = finter(n5,ts*fcx,npc,tf,dydx)
145 ELSE IF(ismooth > 0) THEN
146 f1 = finter_smooth(n5,ts*fcx,npc,tf,dydx)
147 ELSE
148 ismooth = -ismooth ! the id the python function is saved in the position of ISMOOTH in the NPC array
149 CALL python_call_funct1d(python, ismooth,(ts)*fcx, f1)
150 ENDIF ! IF (ISMOOTH == 0)
151 n_old = n5
152 x_old = ts
153 ENDIF
154 aapinch = fcypinch*f1*xsens
155C
156 IF(n4/=0)THEN
157 nx = (x(2,n3)-x(2,n1))*(x(3,n4)-x(3,n2)) - (x(3,n3)-x(3,n1))*(x(2,n4)-x(2,n2))
158 ny = (x(3,n3)-x(3,n1))*(x(1,n4)-x(1,n2)) - (x(1,n3)-x(1,n1))*(x(3,n4)-x(3,n2))
159 nz = (x(1,n3)-x(1,n1))*(x(2,n4)-x(2,n2)) - (x(2,n3)-x(2,n1))*(x(1,n4)-x(1,n2))
160C
161 fxpinch = aapinch*nx*one_over_8
162 fypinch = aapinch*ny*one_over_8
163 fzpinch = aapinch*nz*one_over_8
164C
165 apinch(1,n1) = apinch(1,n1) + fxpinch
166 apinch(2,n1) = apinch(2,n1) + fypinch
167 apinch(3,n1) = apinch(3,n1) + fzpinch
168C
169 apinch(1,n2) = apinch(1,n2) + fxpinch
170 apinch(2,n2) = apinch(2,n2) + fypinch
171 apinch(3,n2) = apinch(3,n2) + fzpinch
172C
173 apinch(1,n3) = apinch(1,n3) + fxpinch
174 apinch(2,n3) = apinch(2,n3) + fypinch
175 apinch(3,n3) = apinch(3,n3) + fzpinch
176C
177 apinch(1,n4) = apinch(1,n4) + fxpinch
178 apinch(2,n4) = apinch(2,n4) + fypinch
179 apinch(3,n4) = apinch(3,n4) + fzpinch
180C
181C
182 wfextt=wfextt+dt1*(fxpinch*(vpinch(1,n1)+vpinch(1,n2)+vpinch(1,n3)+vpinch(1,n4))
183 1 +fypinch*(vpinch(2,n1)+vpinch(2,n2)+vpinch(2,n3)+vpinch(2,n4))
184 2 +fzpinch*(vpinch(3,n1)+vpinch(3,n2)+vpinch(3,n3)+vpinch(3,n4)))
185
186 ELSE ![PM] 3 nodes : triangles (not implemented at the moment)
187 ! true triangles.
188 nx = (x(2,n3)-x(2,n1))*(x(3,n3)-x(3,n2)) - (x(3,n3)-x(3,n1))*(x(2,n3)-x(2,n2))
189 ny = (x(3,n3)-x(3,n1))*(x(1,n3)-x(1,n2)) - (x(1,n3)-x(1,n1))*(x(3,n3)-x(3,n2))
190 nz = (x(1,n3)-x(1,n1))*(x(2,n3)-x(2,n2)) - (x(2,n3)-x(2,n1))*(x(1,n3)-x(1,n2))
191C
192 fxpinch = aapinch*nx*sixth
193 fypinch = aapinch*ny*sixth
194 fzpinch = aapinch*nz*sixth
195C
196 apinch(1,n1)=apinch(1,n1)+fxpinch
197 apinch(2,n1)=apinch(2,n1)+fypinch
198 apinch(3,n1)=apinch(3,n1)+fzpinch
199C
200 apinch(1,n2)=apinch(1,n2)+fxpinch
201 apinch(2,n2)=apinch(2,n2)+fypinch
202 apinch(3,n2)=apinch(3,n2)+fzpinch
203C
204 apinch(1,n3)=apinch(1,n3)+fxpinch
205 apinch(2,n3)=apinch(2,n3)+fypinch
206 apinch(3,n3)=apinch(3,n3)+fzpinch
207C
208 ENDIF
209 10 CONTINUE
210C
211!$OMP ATOMIC
212 wfext = wfext + wfextt
213C
214 RETURN
#define my_real
Definition cppsort.cpp:32
integer nploadpinch
character *2 function nl()
Definition message.F:2354
integer function set_u_sens_value(nsens, ivar, var)
Definition usensor.F:138
integer function get_u_sens_ipar(nsens, ivar, var)
Definition usensor.F:346
integer function get_u_sens_value(nsens, ivar, var)
Definition usensor.F:190
integer function get_u_sens_fpar(nsens, ivar, var)
Definition usensor.F:289
integer function get_u_numsens(idsens)
Definition usensor.F:50