OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
qdlen2.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!|| qdlen2 ../engine/source/elements/solid_2d/quad/qdlen2.F
25!||--- called by ------------------------------------------------------
26!|| bforc2 ../engine/source/ale/bimat/bforc2.F
27!|| q4forc2 ../engine/source/elements/solid_2d/quad4/q4forc2.F
28!|| qforc2 ../engine/source/elements/solid_2d/quad/qforc2.F
29!||--- uses -----------------------------------------------------
30!|| ale_mod ../common_source/modules/ale/ale_mod.F
31!||====================================================================
32 SUBROUTINE qdlen2(Y1,Y2,Y3,Y4,Z1,Z2,Z3,Z4,AIRE,DELTAX,IPARG)
33C-----------------------------------------------
34C M o d u l e s
35C-----------------------------------------------
36 USE ale_mod
37C-----------------------------------------------
38C I m p l i c i t T y p e s
39C-----------------------------------------------
40#include "implicit_f.inc"
41C-----------------------------------------------
42C G l o b a l P a r a m e t e r s
43C-----------------------------------------------
44#include "mvsiz_p.inc"
45C-----------------------------------------------
46C C o m m o n B l o c k s
47C-----------------------------------------------
48#include "com01_c.inc"
49#include "vect01_c.inc"
50C-----------------------------------------------
51C D u m m y A r g u m e n t s
52C-----------------------------------------------
53 INTEGER IPARG(63:63)
55 . y1(*),y2(*),y3(*),y4(*),z1(*),z2(*),z3(*),z4(*),
56 . aire(*),deltax(*)
57C-----------------------------------------------
58 INTEGER I, NFAC, ISFLUID
60 . al1(mvsiz), al2(mvsiz), al3(mvsiz), al4(mvsiz), almx(mvsiz),
61 . xoff(mvsiz), atest(mvsiz)
62C-----------------------------------------------
63C
64 DO i=lft,llt
65 xoff(i)=one
66 ENDDO
67C
68 isfluid=iparg(63)
69
70 IF(ale%GLOBAL%ICAA==1 .AND. n2d==2 .AND. isfluid==1 .AND. jeul+jale/=0)THEN
71 DO i=lft,llt
72 al1(i)=(z3(i)-z1(i))*(z3(i)-z1(i))+(y3(i)-y1(i))*(y3(i)-y1(i))
73 al2(i)=(z4(i)-z2(i))*(z4(i)-z2(i))+(y4(i)-y2(i))*(y4(i)-y2(i))
74 almx(i)=fourth*(al1(i)+al2(i))
75 ENDDO
76 ELSE
77 DO i=lft,llt
78 al1(i)=(z2(i)-z1(i))*(z2(i)-z1(i))+(y2(i)-y1(i))*(y2(i)-y1(i))
79 al2(i)=(z3(i)-z2(i))*(z3(i)-z2(i))+(y3(i)-y2(i))*(y3(i)-y2(i))
80 al3(i)=(z4(i)-z3(i))*(z4(i)-z3(i))+(y4(i)-y3(i))*(y4(i)-y3(i))
81 al4(i)=(z4(i)-z1(i))*(z4(i)-z1(i))+(y4(i)-y1(i))*(y4(i)-y1(i))
82 ENDDO
83C
84 DO i=lft,llt
85 almx(i) = max(al1(i),al2(i),al3(i),al4(i))
86 ENDDO
87C
88 DO i=lft,llt
89 al1(i)=(z3(i)-z1(i))*(z3(i)-z1(i))+(y3(i)-y1(i))*(y3(i)-y1(i))
90 al2(i)=(z4(i)-z2(i))*(z4(i)-z2(i))+(y4(i)-y2(i))*(y4(i)-y2(i))
91 ENDDO
92C
93 DO i=lft,llt
94 almx(i) = max(al1(i),al2(i),almx(i))
95 ENDDO
96C
97 IF(ale%GLOBAL%ICAA==0 .OR. jeul+jale==0)THEN
98 DO i=lft,llt
99 atest(i)=em4*almx(i)
100 ENDDO
101 DO i=lft,llt
102 nfac=0
103 IF(al1(i)<atest(i)) nfac=nfac+1
104 IF(al2(i)<atest(i)) nfac=nfac+1
105 IF(al3(i)<atest(i)) nfac=nfac+1
106 IF(al4(i)<atest(i)) nfac=nfac+1
107 IF(nfac>=2) xoff(i)=ep03
108 ENDDO
109 ENDIF
110C
111 ENDIF
112 DO i=lft,llt
113 deltax(i)=aire(i)*xoff(i)/sqrt(almx(i))
114 ENDDO
115C
116 RETURN
117 END
#define my_real
Definition cppsort.cpp:32
subroutine qdlen2(y1, y2, y3, y4, z1, z2, z3, z4, aire, deltax, iparg)
Definition qdlen2.F:33
#define max(a, b)
Definition macros.h:21
type(ale_) ale
Definition ale_mod.F:249