OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
iniebcs_nrf_tcar.F File Reference
#include "implicit_f.inc"
#include "param_c.inc"
#include "com04_c.inc"
#include "com01_c.inc"
#include "units_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine iniebcs_nrf_tcar (ebcs_tab, x, ixs, ixq, ixtg, pm, ipm, mat_param)
subroutine ebcs_set_tcarp (ebcs, tcar_p)

Function/Subroutine Documentation

◆ ebcs_set_tcarp()

subroutine ebcs_set_tcarp ( type(t_ebcs_nrf) ebcs,
tcar_p )

Definition at line 196 of file iniebcs_nrf_tcar.F.

197 USE ebcs_mod
198#include "implicit_f.inc"
199
200 TYPE(t_ebcs_nrf) :: EBCS
201 my_real :: tcar_p
202
203 IF(ebcs%TCAR_P == zero) ebcs%TCAR_P = tcar_p
204
#define my_real
Definition cppsort.cpp:32

◆ iniebcs_nrf_tcar()

subroutine iniebcs_nrf_tcar ( type(t_ebcs_tab), intent(inout) ebcs_tab,
dimension(3,numnod), intent(in) x,
integer, dimension(nixs,numels), intent(in), target ixs,
integer, dimension(nixq,numelq), intent(in), target ixq,
integer, dimension(nixtg,numeltg), intent(in), target ixtg,
dimension(npropm,nummat), intent(in) pm,
integer, dimension(npropmi,nummat), intent(in) ipm,
type(matparam_struct_), dimension(nummat), intent(in) mat_param )

Definition at line 32 of file iniebcs_nrf_tcar.F.

35C-----------------------------------------------
36C M o d u l e s
37C-----------------------------------------------
38 USE elbufdef_mod
39 USE inigrav
40 USE ebcs_mod
41 USE matparam_def_mod, ONLY : matparam_struct_
42 use element_mod , only : nixs,nixq,nixtg
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 "param_c.inc"
51#include "com04_c.inc"
52#include "com01_c.inc"
53#include "units_c.inc"
54C-----------------------------------------------
55C D u m m y A r g u m e n t s
56C-----------------------------------------------
57 TYPE(t_ebcs_tab), INTENT(INOUT) :: EBCS_TAB
58 INTEGER,INTENT(IN),TARGET :: IXS(NIXS,NUMELS),IXQ(NIXQ,NUMELQ), IXTG(NIXTG,NUMELTG)
59 my_real, INTENT(IN) :: x(3,numnod)
60 my_real,INTENT(IN) :: pm(npropm,nummat)
61 INTEGER,INTENT(IN) :: IPM(NPROPMI,NUMMAT)
62 TYPE(MATPARAM_STRUCT_) ,DIMENSION(NUMMAT) ,INTENT(IN) :: MAT_PARAM
63C-----------------------------------------------
64C L o c a l V a r i a b l e s
65C-----------------------------------------------
66 INTEGER :: IMAT,MLN,IADBUF,IMAT_SUB,NIX,NELS,NBPHASE
67 INTEGER :: TAGMAT(NUMMAT+1),II, NBMAT, KK
68 my_real :: tcp_ref,xmin,ymin,zmin,xmax,ymax,zmax,ssp0,ssp0max,lc,lc0max
69 INTEGER, DIMENSION(:, :), POINTER :: IX
70C-----------------------------------------------
71C S o u r c e L i n e s
72C-----------------------------------------------
73
74 ssp0 = zero
75 tagmat(1:nummat) = 0
76 nels = -huge(nels)
77 nix = -huge(nix)
78 ix => null()
79 IF(numels>0)THEN
80 nels = numels
81 nix=nixs
82 ix => ixs(1:nix, 1:nels)
83 ELSEIF(numelq >0)THEN
84 nels = numelq
85 nix=nixq
86 ix => ixq(1:nix, 1:nels)
87 ELSEIF(n2d /=0 .AND. numeltg >0)THEN
88 nels = numeltg
89 nix=nixtg
90 ix => ixtg(1:nix, 1:nels)
91 ENDIF
92
93 !-----------------------------!
94 ! CALCULATION OF SSP0MAX !
95 !-----------------------------!
96 nbphase = 0
97 DO ii=1,nels
98 imat = ix(1,ii)
99 IF(imat == 0)cycle
100 IF(tagmat(imat)==1)cycle
101 tagmat(imat)=1
102 mln = ipm(2,imat)
103 iadbuf = ipm(7,imat)
104 IF(mln == 51)THEN
105 ssp0=pm(27,imat)
106 nbphase=max(nbphase,4)
107 ELSEIF(mln == 151)THEN
108 nbmat = mat_param(imat)%MULTIMAT%NB
109 nbphase = max(nbphase,nbmat)
110 imat_sub = mat_param(imat)%MULTIMAT%MID(1)
111 ssp0 = ipm(27,imat_sub)
112 DO kk=2,nbmat
113 imat_sub = mat_param(imat)%MULTIMAT%MID(kk)
114 ssp0=max(ssp0,pm(27,imat_sub))
115 ENDDO
116 ELSE
117 ssp0=pm(27,imat)
118 ENDIF
119 ENDDO
120 ssp0max = ssp0
121
122 !-----------------------------!
123 ! LC ESTIMATOR !
124 !-----------------------------!
125 xmin = x(1,1)
126 ymin = x(2,1)
127 zmin = x(3,1)
128 xmax = x(1,1)
129 ymax = x(2,1)
130 zmax = x(3,1)
131 DO ii=1,numnod
132 xmin = min(xmin,x(1,ii))
133 ymin = min(ymin,x(2,ii))
134 zmin = min(zmin,x(3,ii))
135 xmax = max(xmax,x(1,ii))
136 ymax = max(ymax,x(2,ii))
137 zmax = max(zmax,x(3,ii))
138 ENDDO
139 lc = xmax-xmin
140 lc = max(lc,ymax-ymin)
141 lc = max(lc,zmax-zmin)
142 lc0max = lc
143
144 !-----------------------------!
145 ! CALCULATION AND ASSIGNMENT : Tcp !
146 !-----------------------------!
147 IF(ssp0max == zero)THEN
148 tcp_ref = ep20
149 ELSE
150 tcp_ref = lc0max/two/ssp0max/log(two)
151 ENDIF
152 DO kk=1,ebcs_tab%NEBCS
153 select type (twf => ebcs_tab%tab(kk)%poly)
154 type is (t_ebcs_nrf)
155 CALL ebcs_set_tcarp(twf,tcp_ref)
156 end select
157 ENDDO
158
159 !-----------------------------!
160 ! ALLOCATION BUFFER VOL FRAC !
161 !-----------------------------!
162 !EBCS%NBMAT= NBPHASE
163 !IF(NBPHASE > 0)THEN
164 ! ALLOCATE(EBCS%PHASE_ALPHA(NBPHASE,EBCS%NB_ELEM))
165 ! EBCS%PHASE_ALPHA(1:NBPHASE,1:EBCS%NB_ELEM) = ZERO
166 !ENDIF
167
168 !-----------------------------!
169 ! OUTPUT !
170 !-----------------------------!
171 WRITE (iout,1001)lc0max,ssp0max,tcp_ref
172
173
174 1001 FORMAT(
175 .//
176 .' NON REFLECTING FRONTIERS (EBCS) '/
177 .' ------------------------------- '/
178 & 5x,'INITIALIZATION OF GLOBAL PARAMETERS ',/
179 & 5x,'CHARACTERISTIC LENGTH. . . . . . . . . .=',e12.4/
180 & 5x,'REFERENCE SOUND SPEED. . . . . . . . . =',e12.4/
181 & 5x,'CHARACTERISTIC TIME (TCP). . . . . . . .=',e12.4//)
182
183
subroutine ebcs_set_tcarp(ebcs, tcar_p)
subroutine ymax(idn, fac, npc, pld, stiffmin, stiffmax, stiffini, stiffavg)
Definition law100_upd.F:274
#define min(a, b)
Definition macros.h:20
#define max(a, b)
Definition macros.h:21