OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
add_mass_stat.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!|| add_mass_stat ../starter/source/tools/admas/add_mass_stat.F
25!||--- called by ------------------------------------------------------
26!|| lectur ../starter/source/starter/lectur.F
27!||--- calls -----------------------------------------------------
28!||--- uses -----------------------------------------------------
29!|| message_mod ../starter/share/message_module/message_mod.f
30!||====================================================================
31 SUBROUTINE add_mass_stat(MS,IN,STIFN,STIFR,ITAB,TOTMAS)
32C-----------------------------------------------
33C M o d u l e s
34C-----------------------------------------------
35 USE my_alloc_mod
37 USE message_mod
38C-----------------------------------------------
39C TRI DES DT NODAUX ET IMPRESSIONS
40C-----------------------------------------------
41C I m p l i c i t T y p e s
42C-----------------------------------------------
43#include "implicit_f.inc"
44C-----------------------------------------------
45C D u m m y A r g u m e n t s
46C-----------------------------------------------
47 INTEGER ITAB(*)
49 . ms(numnod),in(numnod),stifn(numnod),stifr(numnod),totmas
50C-----------------------------------------------
51C C o m m o n B l o c k s
52C-----------------------------------------------
53#include "com04_c.inc"
54#include "units_c.inc"
55#include "scr18_c.inc"
56C-----------------------------------------------
57C L o c a l V a r i a b l e s
58C-----------------------------------------------
59 INTEGER I,N,COMPT,K,NVAL
60 INTEGER :: IERROR
61 INTEGER, DIMENSION(:), ALLOCATABLE :: PERM
62 my_real, DIMENSION(:), ALLOCATABLE,TARGET ::
63 . dt
64 my_real, DIMENSION(:),POINTER ::
65 . tmp
66 my_real dtsca,target_dt_tab(20),per_adm_tab(20),target_dt_tab2(20),summ,sumk
67C=======================================================================
68C
69C--------------------------------------------------------------------------------------
70C DUPLICATED FROM OUTRIN - STATS ON ADDED MASS + TARGET NODAL TIME STEP ESTIMATION
71C--------------------------------------------------------------------------------------
72C
73 ALLOCATE(dt(2*numnod))
74 CALL my_alloc(perm,numnod)
75 mass0_start = totmas
76 dtsca = zep9
77C
78 tmp => dt(numnod+1:numnod*2)
79C
80 DO i=1,numnod
81 IF((ms(i)/=zero).AND.(stifn(i)>em20))THEN
82 dt(i)=ms(i)/stifn(i)
83 ELSE
84 dt(i)=ep30 ! -1- free nodes dt=1e30 instead of dt=1416=sqrt(1e6).
85 ! -2- nodal time step from VOID elem (stifn<em20) is dt=EP30 too.
86 ENDIF
87 ENDDO
88C
89C --- Sorting
90C
91 summ = zero
92 sumk = zero
93
94 DO i=1,numnod
95 tmp(i)=i
96 perm(i) = i
97 IF (dt(i) < ep30) THEN
98 summ = summ + ms(i)
99 sumk = sumk + stifn(i)
100 ENDIF
101 ENDDO
102C
103 CALL myqsort(numnod,dt,perm,ierror)
104 tmp(1:numnod) = perm(1:numnod)
105
106 DEALLOCATE( perm )
107C
108 nval = 20
109 DO i=1,20
110 per_adm_tab(i) = 0.005*i
111 ENDDO
112C
113C----- Step 1 - determination target time step for targeted added mass (from 1% to 10%) - dtsca = 0.9
114C
115 dtsca = zep9
116 CALL find_dt_target(ms,stifn,target_dt_tab,per_adm_tab,dt,tmp,dtsca,totmas,nval,numnod)
117C
118C----- Step 2 - determination target time step for targeted added mass (from 1% to 10%) - dtsca = 0.67
119C
120 dtsca = zep67
121 CALL find_dt_target(ms,stifn,target_dt_tab2,per_adm_tab,dt,tmp,dtsca,totmas,nval,numnod)
122C
123C -------------------------------------------------------------------------------------------------------------------------
124C
125 IF (dt(1) < ep20) THEN
126C
127C----- Visual output of added mass estimation - only if nodal time step is significant
128C
129 WRITE(iout,2001)
130 WRITE(iout,2002)
131 CALL plot_curve(target_dt_tab, per_adm_tab, 20, input_size_x=60, input_size_y=24,
132 . input_txt_x="TARGET TIME STEP",input_txt_y="DM/M - at first cycle - scaling factor = 0.9",input_symbol="*")
133C
134 WRITE(iout,3000) ' DM/M at first cycle ','Target time step - scaling factor = 0.9',
135 . 'Target time step - scaling factor = 0.67'
136 WRITE(IOUT,3000) ' -------------------------------------','---------------------------------------',
137 . '---------------------------------------'
138C
139 DO I=1,5
140 K = 2*I
141 WRITE(IOUT,3001) PER_ADM_TAB(K),TARGET_DT_TAB(K),TARGET_DT_TAB2(K)
142 ENDDO
143C
144 WRITE(IOUT,4001)
145 WRITE(IOUT,4002)
146C
147 ENDIF
148
149C-----------
150 DEALLOCATE( DT)
151
152C-----------
153 2001 FORMAT(//,' initial added mass estimation for /dt/noda/cst')
154 2002 FORMAT( ' ----------------------------------------------',//)
155C
156 3000 FORMAT(2X,A,2X,'|',2x,a,2x,'|',2x,a)
157 3001 FORMAT(17x,1pg9.3,17x,'|',17x,1pg9.3,17x,'|',17x,1pg9.3)
158C
159 4001 FORMAT(//,' WARNING : These added mass estimations are valid at first cycle only.')
160 4002 FORMAT(' Because of element deformation or contacts the added mass can increase during the run',//)
161C----------
162
163 RETURN
164 END
subroutine add_mass_stat(ms, in, stifn, stifr, itab, totmas)
#define my_real
Definition cppsort.cpp:32
subroutine find_dt_target(ms, stifn, target_dt_tab, per_adm_tab, dt, tmp, dtsca, totmas, nval, nnod)
for(i8=*sizetab-1;i8 >=0;i8--)
subroutine myqsort(n, a, perm, error)
Definition myqsort.F:51
program starter
Definition starter.F:39