OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
i2forces_2D.F File Reference
#include "implicit_f.inc"
#include "com04_c.inc"
#include "com08_c.inc"
#include "scr14_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine i2forces_2d (x, fs, fx, fy, fz, irect, nir, fsav, fncont, fncontp, ftcontp, weight, h3d_data, nsl, h)

Function/Subroutine Documentation

◆ i2forces_2d()

subroutine i2forces_2d ( dimension(3,numnod), intent(in) x,
dimension(3), intent(in) fs,
dimension(4), intent(in) fx,
dimension(4), intent(in) fy,
dimension(4), intent(in) fz,
integer, dimension(4), intent(in) irect,
integer, intent(in) nir,
dimension(6), intent(inout) fsav,
dimension(3,numnod), intent(inout) fncont,
dimension(3,numnod), intent(inout) fncontp,
dimension(3,numnod), intent(inout) ftcontp,
integer, dimension(numnod), intent(in) weight,
type(h3d_database), intent(in) h3d_data,
integer, intent(in) nsl,
dimension(4), intent(in) h )

Definition at line 31 of file i2forces_2D.F.

34C-----------------------------------------------
35C M o d u l e s
36C-----------------------------------------------
37 USE h3d_mod
38C-----------------------------------------------
39#include "implicit_f.inc"
40C-----------------------------------------------
41C D u m m y A r g u m e n t s
42C-----------------------------------------------
43 INTEGER , INTENT(IN) :: NSL,IRECT(4),NIR,WEIGHT(NUMNOD)
44 my_real , INTENT(IN) :: x(3,numnod),h(4)
45 my_real , INTENT(INOUT) :: fsav(6),fncont(3,numnod),fncontp(3,numnod),
46 . ftcontp(3,numnod)
47 my_real , INTENT(IN) :: fs(3),fx(4),fy(4),fz(4)
48 TYPE(H3D_DATABASE),INTENT(IN) :: H3D_DATA
49C-----------------------------------------------
50C C o m m o n B l o c k s
51C-----------------------------------------------
52#include "com04_c.inc"
53#include "com08_c.inc"
54#include "scr14_c.inc"
55C-----------------------------------------------
56C L o c a l V a r i a b l e s
57C-----------------------------------------------
58 INTEGER N1,N2,N3,N4,J,JJ
59C REAL
61 . xc0,yc0,zc0,xc,yc,zc,x0,x1,x2,y0,y1,y2,
62 . z0,z1,z2,xcdg,ycdg,zcdg,mcdg,
63 . sum,fnorm,vx,vy,vz,dt12m,fn(3),ft(3)
64C=======================================================================
65 IF (tt == zero) THEN
66 dt12m = one/dt2
67 ELSE
68 dt12m = one/dt12
69 ENDIF
70C
71 IF (weight(nsl)==1) THEN
72C
73 n1 = irect(1)
74 n2 = irect(2)
75C
76 x0 = x(1,nsl)
77 y0 = x(2,nsl)
78 z0 = x(3,nsl)
79 x1 = x(1,n1)
80 y1 = x(2,n1)
81 z1 = x(3,n1)
82 x2 = x(1,n2)
83 y2 = x(2,n2)
84 z2 = x(3,n2)
85C------------------------------------------------
86C direction of segment
87 vx = x1 - x2
88 vy = y1 - y2
89 vz = z1 - z2
90C------------------------------------------------
91 sum = one / sqrt(vx*vx + vy*vy + vz*vz)
92 vx = vx * sum
93 vy = vy * sum
94 vz = vz * sum
95C
96C composantes N/T de la forces nodale
97C
98 fnorm = vx*fs(1) + vy*fs(2) + vz*fs(3)
99 ft(1) = vx*fnorm
100 ft(2) = vy*fnorm
101 ft(3) = vz*fnorm
102C
103 fn(1) = fs(1) - ft(1)
104 fn(2) = fs(2) - ft(2)
105 fn(3) = fs(3) - ft(3)
106C
107C-------- print of forces in TH
108C
109 fsav(1) = fsav(1) + fn(1)*dt1
110 fsav(2) = fsav(2) + fn(2)*dt1
111 fsav(3) = fsav(3) + fn(3)*dt1
112 fsav(4) = fsav(4) + ft(1)*dt1
113 fsav(5) = fsav(5) + ft(2)*dt1
114 fsav(6) = fsav(6) + ft(3)*dt1
115C
116C-------- print of forces in ANIM / H3D
117C
118 IF(anim_v(13)+h3d_data%N_VECT_CONT2>0) THEN
119 fncont(1,nsl) = fncont(1,nsl) - fs(1)
120 fncont(2,nsl) = fncont(2,nsl) - fs(2)
121 fncont(3,nsl) = fncont(3,nsl) - fs(3)
122 DO jj=1,nir
123 j=irect(jj)
124 fncont(1,j) = fncont(1,j) + fx(jj)
125 fncont(2,j) = fncont(2,j) + fy(jj)
126 fncont(3,j) = fncont(3,j) + fz(jj)
127 ENDDO
128 ENDIF
129C
130 IF(anim_v(27)+h3d_data%N_VECT_PCONT2>0) THEN ! Normal/Tangential forces output
131 fncontp(1,nsl) = fncontp(1,nsl) - fs(1)
132 fncontp(2,nsl) = fncontp(2,nsl) - fs(2)
133 fncontp(3,nsl) = fncontp(3,nsl) - fs(3)
134 DO jj=1,nir
135 j=irect(jj)
136 fncontp(1,j) = fncontp(1,j) + fx(jj)
137 fncontp(2,j) = fncontp(2,j) + fy(jj)
138 fncontp(3,j) = fncontp(3,j) + fz(jj)
139 ENDDO
140
141 ftcontp(1,nsl) = vx
142 ftcontp(2,nsl) = vy
143 ftcontp(3,nsl) = vz
144 DO jj=1,nir
145 j=irect(jj)
146 ftcontp(1,j) = ftcontp(1,j) - ftcontp(1,nsl)*h(jj)
147 ftcontp(2,j) = ftcontp(2,j) - ftcontp(2,nsl)*h(jj)
148 ftcontp(3,j) = ftcontp(3,j) - ftcontp(3,nsl)*h(jj)
149 ENDDO
150 ENDIF
151C
152 ENDIF
153C---
154 RETURN
#define my_real
Definition cppsort.cpp:32