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/.
23C
24!||====================================================================
25!|| qdlen2 ../starter/source/elements/solid_2d/quad/qdlen2.F
26!||--- called by ------------------------------------------------------
27!|| binit2 ../starter/source/ale/bimat/binit2.F
28!|| multifluid_init2 ../starter/source/multifluid/multifluid_init2.F
29!|| q4init2 ../starter/source/elements/solid_2d/quad4/q4init2.F
30!|| qinit2 ../starter/source/elements/solid_2d/quad/qinit2.F
31!||--- calls -----------------------------------------------------
32!|| loi_fluid ../starter/source/fluid/loi_fluid.F
33!||--- uses -----------------------------------------------------
34!||====================================================================
35 SUBROUTINE qdlen2(IPARG,
36 . AIRE, DELTAX,
37 . Y1, Y2, Y3, Y4,
38 . Z1, Z2, Z3, Z4)
39C-----------------------------------------------
40C M o d u l e s
41C-----------------------------------------------
42 USE ale_mod
43C-----------------------------------------------
44C I m p l i c i t T y p e s
45C-----------------------------------------------
46#include "implicit_f.inc"
47C-----------------------------------------------
48C G l o b a l P a r a m e t e r s
49C-----------------------------------------------
50#include "mvsiz_p.inc"
51C-----------------------------------------------
52C C o m m o n B l o c k s
53C-----------------------------------------------
54#include "vect01_c.inc"
55#include "com01_c.inc"
56C-----------------------------------------------
57C E x t e r n a l
58C-----------------------------------------------
59 LOGICAL,EXTERNAL :: LOI_FLUID
60C-----------------------------------------------
61C D u m m y A r g u m e n t s
62C-----------------------------------------------
63 INTEGER IPARG(63:63)
64 my_real
65 . AIRE(*), DELTAX(*),
66 . y1(*), y2(*), y3(*), y4(*),
67 . z1(*), z2(*), z3(*), z4(*)
68C-----------------------------------------------
69C L o c a l V a r i a b l e s
70C-----------------------------------------------
71 INTEGER I, NFAC, ISFLUID
72 my_real
73 . AL1(MVSIZ), AL2(MVSIZ), AL3(MVSIZ), AL4(MVSIZ),
74 . almx(mvsiz),
75 . xoff(mvsiz), atest(mvsiz)
76C--------------------------------------------------------------------
77C
78 DO i=lft,llt
79 xoff(i)=one
80 END DO
81
82 isfluid = 0
83 IF(loi_fluid(mtn))isfluid=1
84
85 IF(ale%GLOBAL%ICAA==1 .AND. n2d==2 .AND. isfluid==1 .AND. mtn/=5)THEN
86 DO i=lft,llt
87 al1(i)=(z3(i)-z1(i))*(z3(i)-z1(i))+(y3(i)-y1(i))*(y3(i)-y1(i))
88 al2(i)=(z4(i)-z2(i))*(z4(i)-z2(i))+(y4(i)-y2(i))*(y4(i)-y2(i))
89 almx(i)=fourth*(al1(i)+al2(i))
90 ENDDO
91 ELSE
92 DO i=lft,llt
93 al1(i)=(z2(i)-z1(i))*(z2(i)-z1(i))+
94 . (y2(i)-y1(i))*(y2(i)-y1(i))
95 al2(i)=(z3(i)-z2(i))*(z3(i)-z2(i))+
96 . (y3(i)-y2(i))*(y3(i)-y2(i))
97 al3(i)=(z4(i)-z3(i))*(z4(i)-z3(i))+
98 . (y4(i)-y3(i))*(y4(i)-y3(i))
99 al4(i)=(z4(i)-z1(i))*(z4(i)-z1(i))+
100 . (y4(i)-y1(i))*(y4(i)-y1(i))
101
102 almx(i)= max(al1(i),al2(i),al3(i),al4(i))
103
104 al1(i)=(z3(i)-z1(i))*(z3(i)-z1(i))+
105 . (y3(i)-y1(i))*(y3(i)-y1(i))
106 al2(i)=(z4(i)-z2(i))*(z4(i)-z2(i))+
107 . (y4(i)-y2(i))*(y4(i)-y2(i))
108
109 almx(i)= max(al1(i),al2(i),almx(i))
110 END DO
111 IF(ale%GLOBAL%ICAA==0)THEN
112 DO i=lft,llt
113 atest(i)=em4*almx(i)
114 nfac=0
115 IF(al1(i)<atest(i)) nfac=nfac+1
116 IF(al2(i)<atest(i)) nfac=nfac+1
117 IF(al3(i)<atest(i)) nfac=nfac+1
118 IF(al4(i)<atest(i)) nfac=nfac+1
119 IF(nfac>=2) xoff(i)=ep03
120 END DO
121 ENDIF
122 ENDIF
123
124 DO i=lft,llt
125 deltax(i)=aire(i)*xoff(i)/sqrt(almx(i))
126 END DO
127
128 RETURN
129
130 END
#define max(a, b)
Definition macros.h:21
type(ale_) ale
Definition ale_mod.F:249
subroutine qdlen2(iparg, aire, deltax, y1, y2, y3, y4, z1, z2, z3, z4)
Definition qdlen2.F:39