OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
damping_vref.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!|| damping_vref ../engine/source/assembly/damping_vref.F
25!||--- called by ------------------------------------------------------
26!|| damping51 ../engine/source/assembly/damping.F
27!||--- calls -----------------------------------------------------
28!|| dampvref_sum6 ../engine/source/assembly/dampvref_sum6.F
29!|| spmd_exch_fr6 ../engine/source/mpi/kinematic_conditions/spmd_exch_fr6.F
30!|| spmd_fr_poff ../engine/source/mpi/kinematic_conditions/spmd_fr_poff.F
31!||--- uses -----------------------------------------------------
32!|| groupdef_mod ../common_source/modules/groupdef_mod.F
33!||====================================================================
34 SUBROUTINE damping_vref(IGRNOD,V,A,MS,DAMPR,
35 . WEIGHT,V_REF,A_REF,NDAMP_VREL,ID_DAMP_VREL,
36 . FR_DAMP_VREL,NGRNOD,NUMNOD,NDAMP,NRDAMP,
37 . NSPMD,IPARIT,ISPMD)
38C-----------------------------------------------
39C M o d u l e s
40C-----------------------------------------------
41 USE groupdef_mod
42C-----------------------------------------------
43C I m p l i c i t T y p e s
44C-----------------------------------------------
45#include "implicit_f.inc"
46#include "comlock.inc"
47C-----------------------------------------------
48C D u m m y A r g u m e n t s
49C-----------------------------------------------
50 INTEGER, INTENT(IN) :: WEIGHT(NUMNOD),NDAMP_VREL,ID_DAMP_VREL(NDAMP_VREL)
51 INTEGER, INTENT(IN) :: FR_DAMP_VREL(NSPMD+2,NDAMP_VREL)
52 INTEGER, INTENT(IN) :: NGRNOD,NUMNOD,NDAMP,NRDAMP,NSPMD,IPARIT,ISPMD
53 my_real, INTENT(IN) :: a(3,numnod),v(3,numnod),ms(numnod)
54 my_real, INTENT(IN) :: dampr(nrdamp,ndamp)
55 my_real, INTENT(OUT) :: a_ref(3,ndamp),v_ref(3,ndamp)
56C-----------------------------------------------
57 TYPE (GROUP_),DIMENSION(NGRNOD), INTENT(IN) :: IGRNOD
58C-----------------------------------------------
59C L o c a l V a r i a b l e s
60C-----------------------------------------------
61 INTEGER I,N,ND,IGR,NNOD,ID
62 my_real :: INV_MAS
63 DOUBLE PRECISION SUML6(7,6,NDAMP_VREL),SUML(7,NDAMP_VREL)
64C-----------------------------------------------
65C
66C======================================================================|
67C Computation of reference velocity for /DAMP/VREF with no rbody
68C======================================================================|
69
70 IF (iparit == 1) THEN
71C
72C-- Parith/ON assembling
73C
74 DO nd = 1, ndamp_vrel
75 id = id_damp_vrel(nd)
76 igr = nint(dampr(2,id))
77 suml6(1:7,1:6,nd) = zero
78 nnod = igrnod(igr)%NENTITY
79 CALL dampvref_sum6(igrnod,v,a,ms,weight,
80 . nd,nnod,igr,suml6,ngrnod,
81 . numnod,ndamp)
82 ENDDO
83C
84 DO nd = 1, ndamp_vrel
85 id = id_damp_vrel(nd)
86 IF ((nspmd>1).AND.(fr_damp_vrel(ispmd+1,nd)==1)) THEN
87 CALL spmd_exch_fr6(fr_damp_vrel(1,nd),suml6(1,1,nd),7*6)
88 ENDIF
89C
90 inv_mas=one/max(em20,(suml6(7,1,nd)+suml6(7,2,nd)+suml6(7,3,nd)+
91 . suml6(7,4,nd)+suml6(7,5,nd)+suml6(7,6,nd)))
92C
93 v_ref(1,id)=inv_mas*(suml6(1,1,nd)+suml6(1,2,nd)+suml6(1,3,nd)+
94 . suml6(1,4,nd)+suml6(1,5,nd)+suml6(1,6,nd))
95 v_ref(2,id)=inv_mas*(suml6(2,1,nd)+suml6(2,2,nd)+suml6(2,3,nd)+
96 . suml6(2,4,nd)+suml6(2,5,nd)+suml6(2,6,nd))
97 v_ref(3,id)=inv_mas*(suml6(3,1,nd)+suml6(3,2,nd)+suml6(3,3,nd)+
98 . suml6(3,4,nd)+suml6(3,5,nd)+suml6(3,6,nd))
99 a_ref(1,id)=inv_mas*(suml6(4,1,nd)+suml6(4,2,nd)+suml6(4,3,nd)+
100 . suml6(4,4,nd)+suml6(4,5,nd)+suml6(4,6,nd))
101 a_ref(2,id)=inv_mas*(suml6(5,1,nd)+suml6(5,2,nd)+suml6(5,3,nd)+
102 . suml6(5,4,nd)+suml6(5,5,nd)+suml6(5,6,nd))
103 a_ref(3,id)=inv_mas*(suml6(6,1,nd)+suml6(6,2,nd)+suml6(6,3,nd)+
104 . suml6(6,4,nd)+suml6(6,5,nd)+suml6(6,6,nd))
105 ENDDO
106C
107 ELSE
108C
109C-- Parith/OFF assembling
110C
111 DO nd = 1, ndamp_vrel
112 id = id_damp_vrel(nd)
113 suml(1:7,nd) = zero
114 igr = nint(dampr(2,id))
115 DO n=1,igrnod(igr)%NENTITY
116 i=igrnod(igr)%ENTITY(n)
117 suml(1,nd) = suml(1,nd) + ms(i)*v(1,i)*weight(i)
118 suml(2,nd) = suml(2,nd) + ms(i)*v(2,i)*weight(i)
119 suml(3,nd) = suml(3,nd) + ms(i)*v(3,i)*weight(i)
120 suml(4,nd) = suml(4,nd) + ms(i)*a(1,i)*weight(i)
121 suml(5,nd) = suml(5,nd) + ms(i)*a(2,i)*weight(i)
122 suml(6,nd) = suml(6,nd) + ms(i)*a(3,i)*weight(i)
123 suml(7,nd) = suml(7,nd) + ms(i)*weight(i)
124 ENDDO
125 ENDDO
126C
127 DO nd = 1, ndamp_vrel
128 id = id_damp_vrel(nd)
129 IF ((nspmd>1).AND.(fr_damp_vrel(ispmd+1,nd)==1)) THEN
130 CALL spmd_fr_poff(fr_damp_vrel(1,nd),suml(1,nd),7)
131 ENDIF
132 inv_mas = one/max(em20,suml(7,nd))
133 v_ref(1,id) = suml(1,nd)*inv_mas
134 v_ref(2,id) = suml(2,nd)*inv_mas
135 v_ref(3,id) = suml(3,nd)*inv_mas
136 a_ref(1,id) = suml(4,nd)*inv_mas
137 a_ref(2,id) = suml(5,nd)*inv_mas
138 a_ref(3,id) = suml(6,nd)*inv_mas
139 ENDDO
140C
141 ENDIF
142C
143 RETURN
144C
145 END
#define my_real
Definition cppsort.cpp:32
subroutine damping_vref(igrnod, v, a, ms, dampr, weight, v_ref, a_ref, ndamp_vrel, id_damp_vrel, fr_damp_vrel, ngrnod, numnod, ndamp, nrdamp, nspmd, iparit, ispmd)
subroutine dampvref_sum6(igrnod, v, a, ms, weight, nd, nnod, igr, suml6, ngrnod, numnod, ndamp)
#define max(a, b)
Definition macros.h:21
subroutine spmd_exch_fr6(fr, fs6, len)
subroutine spmd_fr_poff(fr_wall, fs, len)