OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
cutfunce.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!|| cutfunce ../engine/source/tools/sect/cutfunce.F
25!||--- called by ------------------------------------------------------
26!|| genani ../engine/source/output/anim/generate/genani.F
27!||--- calls -----------------------------------------------------
28!|| initbuf ../engine/share/resol/initbuf.F
29!|| write_r_c ../common_source/tools/input_output/write_routines.c
30!||--- uses -----------------------------------------------------
31!|| elbufdef_mod ../common_source/modules/mat_elem/elbufdef_mod.F90
32!|| element_mod ../common_source/modules/elements/element_mod.F90
33!|| initbuf_mod ../engine/share/resol/initbuf.F
34!||====================================================================
35 SUBROUTINE cutfunce(NC ,NUMEL,ELBUF_TAB,IFUNC ,
36 . IPARG,PM ,IXS )
37C-----------------------------------------------
38C M o d u l e s
39C-----------------------------------------------
40 USE initbuf_mod
41 USE elbufdef_mod
42 use element_mod , only : nixs
43C-----------------------------------------------
44C I m p l i c i t T y p e s
45C-----------------------------------------------
46#include "implicit_f.inc"
47C-----------------------------------------------
48C C o m m o n B l o c k s
49C-----------------------------------------------
50#include "vect01_c.inc"
51#include "com01_c.inc"
52#include "param_c.inc"
53C-----------------------------------------------
54C D u m m y A r g u m e n t s
55C-----------------------------------------------
56C REAL
58 . pm(npropm,*)
59 INTEGER IPARG(NPARG,*),NC(5,*),IXS(NIXS,*)
60 INTEGER NUMEL,IFUNC
61 TYPE (ELBUF_STRUCT_), DIMENSION(NGROUP), TARGET :: ELBUF_TAB
62C-----------------------------------------------
63 INTEGER I,J,N,IC,IL,IL_OLD,NG,NEL,MLW,JTURB,MT,II(6)
64C REAL
66 . off, p, vonm2, vonm, s1, s2, s3, VALUE
67 REAL R4
68 TYPE(g_bufel_) ,POINTER :: GBUF
69 TYPE(l_bufel_) ,POINTER :: LBUF
70 TYPE(buf_mat_) ,POINTER :: MBUF
71C=======================================================================
72 il_old = -1
73 VALUE = zero
74 DO ic=1,numel
75 il = nc(5,ic)
76 IF(il/=il_old)THEN
77 il_old = il
78C
79 DO 490 ng=1,ngroup
80 CALL initbuf(iparg ,ng ,
81 2 mlw ,nel ,nft ,iad ,ity ,
82 3 npt ,jale ,ismstr ,jeul ,jtur ,
83 4 jthe ,jlag ,jmult ,jhbe ,jivf ,
84 5 nvaux ,jpor ,jcvt ,jclose ,jplasol ,
85 6 irep ,iint ,igtyp ,israt ,isrot ,
86 7 icsen ,isorth ,isorthg ,ifailure,jsms )
87 IF (ity/=1) GOTO 490
88 IF (nel+nft<il) GOTO 490
89C-----------------------------------------------
90C SOLID ELEMENT
91C-----------------------------------------------
92 gbuf => elbuf_tab(ng)%GBUF
93 lbuf => elbuf_tab(ng)%BUFLY(1)%LBUF(1,1,1)
94 mbuf => elbuf_tab(ng)%BUFLY(1)%MAT(1,1,1)
95 i = il - nft
96 llt = nel
97 jturb=iparg(12,ng)*(iparg(7,ng)+iparg(11,ng))
98C
99 n = i + nft
100 off = gbuf%OFF(i)
101!
102 DO j=1,6
103 ii(j) = nel*(j-1)
104 ENDDO
105!
106c-----------
107 IF (ifunc==1 .AND. gbuf%G_PLA > 0) THEN
108 VALUE = gbuf%PLA(i)
109c-----------
110 ELSEIF (ifunc == 2) THEN
111 VALUE = gbuf%RHO(i)
112c-----------
113 ELSEIF (ifunc == 3) THEN
114 VALUE = gbuf%EINT(i)
115c-----------
116 ELSEIF(ifunc==4 .AND. jthe > 0) THEN
117 VALUE = gbuf%TEMP(i)
118c-----------
119 ELSEIF(ifunc==6.OR.ifunc==7)THEN
120 p = - (gbuf%SIG(ii(1)+i)
121 . + gbuf%SIG(ii(2)+i)
122 . + gbuf%SIG(ii(3)+i)) / three
123 VALUE = p
124 IF (ifunc==7) THEN
125 s1 = gbuf%SIG(ii(1)+i) + p
126 s2 = gbuf%SIG(ii(2)+i) + p
127 s3 = gbuf%SIG(ii(3)+i) + p
128 vonm2 = three*(gbuf%SIG(ii(4)+i)**2 +
129 . gbuf%SIG(ii(5)+i)**2 +
130 . gbuf%SIG(ii(6)+i)**2 +
131 . half*(s1*s1+s2*s2+s3*s3))
132 vonm= sqrt(vonm2)
133 VALUE = vonm
134 ENDIF
135c-----------
136 ELSEIF (ifunc==8 . and. jturb/=0) THEN
137C TURBULENT ENERGY
138 VALUE = gbuf%RK(i)
139 ELSEIF (ifunc==9) THEN
140C TURBULENT VISCOSITY
141 IF((mlw==6 .OR. mlw==17).AND.jturb/=0)THEN
142 mt=ixs(1,n)
143 VALUE=pm(81,mt)*gbuf%RK(i)**2/
144 . max(em15,gbuf%RE(i))
145 ELSEIF (mlw==46 .OR. mlw==47)THEN
146 VALUE = mbuf%VAR(i)
147 ELSE
148 VALUE = zero
149 ENDIF
150C
151 ELSEIF(ifunc==10)THEN
152C VORTICITY
153 IF(mlw==6 .OR. mlw==17)THEN
154 VALUE = lbuf%VK(i)
155 ELSEIF(mlw==46 .OR. mlw==47)THEN
156 VALUE = mbuf%VAR(i)
157 ELSE
158 VALUE = zero
159 ENDIF
160C
161 ELSEIF(ifunc>=14.AND.ifunc<=19)THEN
162 VALUE = gbuf%SIG(ii(ifunc - 13) + i)
163 ELSE
164 VALUE = zero
165 ENDIF
166 GOTO 500
167C
168 490 CONTINUE
169 500 CONTINUE
170 ENDIF
171C-----------------------------------------------
172 r4 = VALUE
173 CALL write_r_c(r4,1)
174 ENDDO
175C-----------------------------------------------
176 RETURN
177 END
#define my_real
Definition cppsort.cpp:32
subroutine cutfunce(nc, numel, elbuf_tab, ifunc, iparg, pm, ixs)
Definition cutfunce.F:37
#define max(a, b)
Definition macros.h:21
subroutine initbuf(iparg, ng, mtn, llt, nft, iad, ity, npt, jale, ismstr, jeul, jtur, jthe, jlag, jmult, jhbe, jivf, mid, jpor, jcvt, jclose, jpla, irep, iint, igtyp, israt, isrot, icsen, isorth, isorthg, ifailure, jsms)
Definition initbuf.F:261
void write_r_c(float *w, int *len)