OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
spadah.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!|| spadah ../engine/source/elements/sph/spadah.F
25!||--- called by ------------------------------------------------------
26!|| forintp ../engine/source/elements/forintp.F
27!||--- calls -----------------------------------------------------
28!|| ancmsg ../engine/source/output/message/message.F
29!|| arret ../engine/source/system/arret.F
30!||--- uses -----------------------------------------------------
31!|| message_mod ../engine/share/message_module/message_mod.F
32!||====================================================================
33 SUBROUTINE spadah(
34 1 X ,V ,MS ,SPBUF ,ITAB ,
35 2 KXSP ,IXSP ,NOD2SP ,WA ,WASPACT ,
36 3 ITASK ,IPARTSP ,IPART)
37C-----------------------------------------------
38C M o d u l e s
39C-----------------------------------------------
40 USE message_mod
41C-----------------------------------------------
42C I m p l i c i t T y p e s
43C-----------------------------------------------
44#include "implicit_f.inc"
45C-----------------------------------------------
46C C o m m o n B l o c k s
47C-----------------------------------------------
48#include "com08_c.inc"
49#include "sphcom.inc"
50#include "task_c.inc"
51#include "scr17_c.inc"
52C-----------------------------------------------
53C D u m m y A r g u m e n t s
54C-----------------------------------------------
55 INTEGER KXSP(NISP,*),IXSP(KVOISPH,*),NOD2SP(*),ITAB(*),
56 . WASPACT(*),ITASK,IPARTSP(*),IPART(LIPART1,*)
57C REAL
59 . x(3,*) ,v(3,*) ,ms(*) ,spbuf(nspbuf,*) ,wa(kwasph,*)
60C-----------------------------------------------
61C L o c a l V a r i a b l e s
62C-----------------------------------------------
63 INTEGER N,INOD,NVOIS,NS,IPRT,IPROP,H_FLAG
64 my_real
65 . XI,YI,ZI,DI,DIVV,COEFF,GET_U_GEO,
66 . hmin,hmax,h_new,di0
67C-----------------------------------------------
68 EXTERNAL get_u_geo
69C-----------------------------------------------
70 DO ns=itask+1,nsphact,nthread
71 n=waspact(ns)
72 inod =kxsp(3,n)
73 nvois=kxsp(4,n)
74 xi=x(1,inod)
75 yi=x(2,inod)
76 zi=x(3,inod)
77 di =spbuf(1,n)
78 di0 = spbuf(14,n)
79 divv =wa(13,n)
80 iprt =ipartsp(n)
81 iprop=ipart(2,iprt)
82 coeff = get_u_geo(8,iprop)
83 h_flag=nint(get_u_geo(9,iprop))
84 hmin = get_u_geo(10,iprop)
85 hmax = get_u_geo(11,iprop)
86C-- H_FLAG = 0 -> 3D dilatation of H : GET_U_GEO(8,IPROP) = 1/3 - HMIN=0 HMAX=EP20
87C-- H_FLAG = 1 -> 1D dilatation of H : GET_U_GEO(8,IPROP) = 1 - HMIN=0 HMAX=EP20
88C-- H_FLAG = 2 -> Constant H : GET_U_GEO(8,IPROP) = 0 - HMIN=0 HMAX=EP20
89C-- H_FLAG = 3 -> 3D dilatation of H with bounds hmin*h0 < H < hmax*h0
90 h_new=di*(one+divv*dt1*coeff)
91 IF (h_flag==3) THEN
92 h_new=max(hmin*di0,h_new)
93 h_new=min(hmax*di0,h_new)
94 ENDIF
95 spbuf(1,n)= h_new
96 IF(spbuf(1,n)<em20)THEN
97 CALL ancmsg(msgid=174,anmode=aninfo,
98 . i1=kxsp(nisp,n))
99 CALL arret(2)
100 ENDIF
101 ENDDO
102C-----------------------------------------------
103 RETURN
104 END
#define my_real
Definition cppsort.cpp:32
#define min(a, b)
Definition macros.h:20
#define max(a, b)
Definition macros.h:21
subroutine spadah(x, v, ms, spbuf, itab, kxsp, ixsp, nod2sp, wa, waspact, itask, ipartsp, ipart)
Definition spadah.F:37
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 arret(nn)
Definition arret.F:87