OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_read_mat11_k_eps.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!|| hm_read_mat11_k_eps ../starter/source/materials/mat/mat011/hm_read_mat11_k_eps.F
25!||--- called by ------------------------------------------------------
26!|| hm_read_mat ../starter/source/materials/mat/hm_read_mat.F90
27!||--- calls -----------------------------------------------------
28!|| ancmsg ../starter/source/output/message/message.f
29!|| hm_get_floatv ../starter/source/devtools/hm_reader/hm_get_floatv.F
30!|| hm_get_floatv_dim ../starter/source/devtools/hm_reader/hm_get_floatv_dim.F
31!|| hm_get_intv ../starter/source/devtools/hm_reader/hm_get_intv.F
32!|| hm_option_is_encrypted ../starter/source/devtools/hm_reader/hm_option_is_encrypted.F
33!|| init_mat_keyword ../starter/source/materials/mat/init_mat_keyword.F
34!||--- uses -----------------------------------------------------
35!|| elbuftag_mod ../starter/share/modules1/elbuftag_mod.F
36!|| message_mod ../starter/share/message_module/message_mod.f
37!|| submodel_mod ../starter/share/modules1/submodel_mod.F
38!||====================================================================
39 SUBROUTINE hm_read_mat11_k_eps(LSUBMODEL, MTAG, UNITAB, IPM, PM,
40 . MAT_ID, TITR, MATPARAM)
41C-----------------------------------------------
42C M o d u l e s
43C-----------------------------------------------
44 USE unitab_mod
45 USE elbuftag_mod
46 USE message_mod
47 USE submodel_mod
48 USE alefvm_mod
49 USE ale_mod
50 USE matparam_def_mod
52C-----------------------------------------------
53C I m p l i c i t T y p e s
54C-----------------------------------------------
55#include "implicit_f.inc"
56C-----------------------------------------------
57C C o m m o n B l o c k s
58C-----------------------------------------------
59#include "units_c.inc"
60#include "param_c.inc"
61C-----------------------------------------------
62C D u m m y A r g u m e n t s
63C-----------------------------------------------
64 TYPE (UNIT_TYPE_),INTENT(IN) ::UNITAB
65 INTEGER, INTENT(IN) :: MAT_ID
66 CHARACTER(LEN=NCHARTITLE) ,INTENT(IN) :: TITR
67 TYPE(submodel_data), DIMENSION(*),INTENT(IN) :: LSUBMODEL
68 TYPE(MLAW_TAG_), INTENT(INOUT) :: MTAG
69 INTEGER, DIMENSION(NPROPMI) ,INTENT(INOUT) :: IPM
70 my_real, DIMENSION(NPROPM) ,INTENT(INOUT) :: pm
71 TYPE(matparam_struct_),INTENT(INOUT) :: MATPARAM
72C-----------------------------------------------
73C D e s c r i p t i o n
74C-----------------------------------------------
75C
76C INITIALISATION MATERIAU 11 LOI SPECIALE CONDITIONS AUX LIMITES
77C ISENTHALPIQUES FLUIDES PARFAIT
78C
79C ITYP = 0 - (GAS) INLET USING STAGNATION POINT STATE
80C ITYP = 1 - (LIQUID)INLET USING STAGNATION POINT STATE
81C ITYP = 2 - GENERAL INLET/OUTLET APPLYING USER FUNCTIONS
82C ITYP = 3 - NON RFLECTING FRONTIER (NRF)
83C
84C-----------------------------------------------
85C L o c a l V a r i a b l e s
86C-----------------------------------------------
87 INTEGER IFR, IFP , IFE , IFT, IFQ, ITYP, INOD, ICOMP
88 INTEGER ID,JTUR,IFK,IFS
90 . gam, vcrt2, gamrp, gam1, p0, c1, ssp2, ef,
91 . rho0, psh, carl, gam2, e0, vcrt, rcrt, pcrt, ssp,
92 . t0, dc, alp0, rhoc,
93 . tscal, tref,gama,rhor,
94 . fac_length_, fac_time_,
95 . rk0,re0,ctm,sk,se,rpr
96 LOGICAL :: IS_ENCRYPTED, IS_AVAILABLE
97C-----------------------------------------------
98C S o u r c e L i n e s
99C-----------------------------------------------
100
101 is_encrypted = .false.
102 is_available = .false.
103 fac_length_ = one
104 fac_time_ = one
105
106C Check input encryption
107 CALL hm_option_is_encrypted(is_encrypted)
108C Initial and reference density
109 CALL hm_get_floatv('MAT_RHO' ,rho0 ,is_available, lsubmodel, unitab)
110 CALL hm_get_floatv('Refer_Rho' ,rhor ,is_available, lsubmodel, unitab)
111 IF (rhor == zero) THEN
112 rhor = rho0
113 ENDIF
114 pm(1) = rhor
115 pm(89) = rho0
116 ale%GLOBAL%IS_BOUNDARY_MATERIAL = .true.
117C
118 carl = zero
119 t0 = zero
120 gam = zero
121 vcrt2 = zero
122 gamrp = zero
123 gam1 = zero
124 p0 = zero
125 c1 = zero
126 ssp = zero
127 ssp2 = zero
128 ef = zero
129 e0 = zero
130 dc = zero
131 rhoc = zero
132 alp0 = infinity
133 ifr = 0
134 ifp = 0
135 ife = 0
136 ift = 0
137 ifq = 0
138 ityp = 0
139 inod = 0
140 icomp = 0
141
142C Formulation type
143 CALL hm_get_intv('Itype', ityp, is_available, lsubmodel)
144C
145 CALL hm_get_floatv('MAT_PSH', psh, is_available, lsubmodel, unitab)
146 CALL hm_get_floatv('SCALE', tscal, is_available, lsubmodel, unitab)
147 CALL hm_get_floatv_dim('SCALE', fac_time_, is_available, lsubmodel, unitab)
148 CALL hm_get_floatv_dim('h', fac_length_, is_available, lsubmodel, unitab)
149
150C Switch according to input type
151 SELECT CASE(ityp)
152 CASE (0)
153 CALL hm_get_intv('NODE1', inod, is_available, lsubmodel)
154 CALL hm_get_floatv('GAMMA', gam, is_available, lsubmodel, unitab)
155 CALL hm_get_floatv('K_cdi', dc, is_available, lsubmodel, unitab)
156
157 CALL hm_get_intv('FUN_A1', ifr, is_available, lsubmodel)
158
159 CALL hm_get_intv('FUN_A2', ifp, is_available, lsubmodel)
160 CALL hm_get_floatv('MAT_PScale', p0, is_available, lsubmodel, unitab)
161 CASE (1)
162 CALL hm_get_intv('NODE1', inod, is_available, lsubmodel)
163 CALL hm_get_floatv('MAT_C1', c1, is_available, lsubmodel, unitab)
164 CALL hm_get_floatv('K_cdi', dc, is_available, lsubmodel, unitab)
165
166 CALL hm_get_intv('FUN_A1', ifr, is_available, lsubmodel)
167
168 CALL hm_get_intv('FUN_A2', ifp, is_available, lsubmodel)
169 CALL hm_get_floatv('mat_pscale', P0, IS_AVAILABLE, LSUBMODEL, UNITAB)
170
171 CALL HM_GET_INTV('fun_a6', IFE, IS_AVAILABLE, LSUBMODEL)
172 CALL HM_GET_FLOATV('mat_e0', E0, IS_AVAILABLE, LSUBMODEL, UNITAB)
173 CASE (2)
174 CALL HM_GET_INTV('fun_a1', IFR, IS_AVAILABLE, LSUBMODEL)
175
176 CALL HM_GET_INTV('fun_a2', IFP, IS_AVAILABLE, LSUBMODEL)
177 CALL HM_GET_FLOATV('mat_pscale', P0, IS_AVAILABLE, LSUBMODEL, UNITAB)
178
179 CALL HM_GET_INTV('fun_a6', IFE, IS_AVAILABLE, LSUBMODEL)
180 CALL HM_GET_FLOATV('mat_e0', E0, IS_AVAILABLE, LSUBMODEL, UNITAB)
181 CASE (3)
182 CALL HM_GET_FLOATV('mat_c0', SSP, IS_AVAILABLE, LSUBMODEL, UNITAB)
183 CALL HM_GET_FLOATV('h', carl, is_available, lsubmodel, unitab)
184 IF(carl*ssp==zero)THEN
185 CALL ancmsg(msgid=304,
186 . msgtype=msgerror,
187 . anmode=aninfo,
188 . i2=mat_id,
189 . c1=titr)
190 ENDIF
191 CASE DEFAULT
192 CALL ancmsg(msgid=1665, msgtype=msgerror, anmode=aninfo,
193 . i1=mat_id,
194 . i2 = ityp,
195 . c1=titr)
196 END SELECT
197
198 CALL hm_get_intv('Xt_fun', ift, is_available, lsubmodel)
199 CALL hm_get_intv('Yt_fun', ifq, is_available, lsubmodel)
200
201 !turbulency
202 CALL hm_get_floatv('RHO0_k0', rk0, is_available, lsubmodel, unitab)
203 CALL hm_get_floatv('RHO0_EPS0', re0, is_available, lsubmodel, unitab)
204 CALL hm_get_intv('funct_IDk', ifk, is_available, lsubmodel)
205 CALL hm_get_intv('fun_IDeps', ifs, is_available, lsubmodel)
206
207 CALL hm_get_floatv('C_mu', ctm, is_available, lsubmodel, unitab)
208 CALL hm_get_floatv('SIGMA_k', sk, is_available, lsubmodel, unitab)
209 CALL hm_get_floatv('SIGMA_EPS', se, is_available, lsubmodel, unitab)
210 CALL hm_get_floatv('Pr/Prt', rpr, is_available, lsubmodel, unitab)
211
212 jtur=pm(70)
213 !JTHE=PM(71)
214
215C----------------------
216C DEFAULT VALUES
217C----------------------
218 IF(carl==zero)carl = em01 * fac_length_
219 IF(t0==zero) t0 = three100
220 IF(tscal == zero) tscal = one * fac_time_
221 SELECT CASE(ityp)
222 CASE (0)
223 gam1 = one/(gam - one)
224 gam2 = half/gam
225 gamrp= gam2*(gam-one)
226 e0 = gam1*(p0+psh)
227 ef = gam1*(psh)
228 ssp2 = gam*p0/rho0
229 vcrt2= two*gam*(p0+psh)/rho0/(gam + one)
230 vcrt = sqrt(vcrt2)
231 rcrt = (one-gamrp*rho0*vcrt2/(p0+psh))**gam1
232 pcrt = (p0+psh)*rcrt**gam
233 rcrt = rho0*rcrt
234 CASE (1)
235 ssp2 = c1/rho0
236 gam1 = one
237 CASE (2)
238 gam1 = one
239 ssp2 = ssp**2
240 CASE (3)
241 IF(carl>zero)alp0=half*ssp/carl
242 rhoc=rho0*ssp
243 CASE DEFAULT
244C Already exited at input reading
245 END SELECT
246 IF(jtur /= 0)THEN
247 IF(ctm==zero)ctm=nineem2
248 IF(sk==zero)sk=one
249 IF(se==zero)se=onep3
250 IF(rpr==zero)rpr=seven_over_9
251 ENDIF
252C----------------------
253C PRINTOUT
254C----------------------
255 WRITE(iout,800)trim(titr),mat_id,11
256 IF(is_encrypted)THEN
257 WRITE(iout,900)
258 WRITE(iout,'(5X,A,//)')'CONFIDENTIAL DATA'
259 ELSE
260 WRITE(iout,1000)ityp,psh,tscal
261 WRITE(iout,850) rho0,rhor
262 SELECT CASE(ityp)
263 CASE(0)
264 WRITE(iout,1100)gam,p0,e0,vcrt,rcrt,pcrt,inod
265 WRITE(iout,1350)ef,dc
266 WRITE(iout,1300)ifr,ifp
267 CASE(1)
268 WRITE(iout,1200)c1,p0,e0,inod
269 WRITE(iout,1349)dc
270 WRITE(iout,1301)ifr,ifp,ife
271 CASE(2)
272 WRITE(iout,1400)p0,e0
273 WRITE(iout,1302)ifr,ifp,ife
274 CASE(3)
275 WRITE(iout,1353)ssp,carl,inod
276 CASE DEFAULT
277C Already exited at input reading
278 END SELECT
279 IF(ityp/=3)WRITE(iout,2001) ift,ifq
280 IF(jtur /= 0)THEN
281 WRITE(iout,1500)rk0,re0,ifk,ifs
282 WRITE(iout,1600)ctm,sk,se,rpr
283 ENDIF
284 ENDIF
285
286C----------------------
287C STORAGE
288C----------------------
289 ipm(11) = ifr
290 ipm(12) = ifp
291 ipm(13) = ife
292 ipm(14) = ift
293 ipm(15) = ifk
294 ipm(16) = ifs
295 ipm(17) = ifq
296
297 pm(23) = e0
298 pm(25) = gam
299 pm(27) = vcrt2
300 pm(28) = gamrp
301 pm(29) = gam1
302 pm(31) = p0
303 pm(32) = c1
304 pm(33) = re0/rho0
305 pm(34) = -half*ssp2/carl**2
306 pm(37) = ef
307 pm(40) = one/tscal
308 pm(50) = ityp
309 pm(51) = inod ! USR2SYS APRES FSDCOD, IF(IFORM8==2) INOD=USR2SYS(INOD,ITABM1,MESS)
310 pm(79) = t0
311 pm(80) = ep30
312 pm(81) = ctm
313 pm(85) = sk
314 pm(86) = se
315 pm(87) = rk0/rho0
316 pm(88) = psh
317 pm(95) = rpr
318 pm(97) = rhoc
319 pm(98) = alp0
320 pm(99) = dc+one
321
322C----------------------
323C MATERIAL BUFFER
324C----------------------
325 mtag%G_RK = 1
326 mtag%G_RE = 1
327 mtag%L_RK = 1 ! NB10
328 mtag%L_TEMP = 1 ! NB11
329 mtag%L_RE = 1 ! NB12
330 mtag%L_VK = 1 ! NB13
331 mtag%L_EINS = 1 ! NB14
332
333 ! EOS/Thermo keyword for pressure treatment in elements
334 CALL init_mat_keyword(matparam,"HYDRO_EOS")
335
336 CALL init_mat_keyword(matparam,"INCOMPRESSIBLE")
337
338 ! Properties compatibility
339 CALL init_mat_keyword(matparam,"SOLID_ISOTROPIC")
340C--------------------------------
341 RETURN
342
343C----------------------
344C FORMAT
345C----------------------
346 800 FORMAT(/
347 & 5x,a,/,
348 & 5x,'MATERIAL NUMBER. . . . . . . . . . . . . . .=',i10/,
349 & 5x,'MATERIAL LAW . . . . . . . . . . . . . . . .=',i10/)
350 850 FORMAT(
351 & 5x,'INITIAL DENSITY . . . . . . . . . . . .=',1pg20.13/,
352 & 5x,'REFERENCE DENSITY . . . . . . . . . . .=',1pg20.13/)
353 900 FORMAT(
354 & 5x,40h law for fluid boundary elements ,/,
355 & 5x,40h ------------------------------- ,/)
356 1000 FORMAT(
357 & 5x,40h law for fluid boundary elements ,/,
358 & 5x,40h ------------------------------- ,/,
359 & 5x,40hityp. . . . . . . . . . . . . . . . . .=,i10/,
360 & 5x,'ITYP = 0 : GAS INLET',/,
361 & 5x,'ITYP = 1 : LIQUID INLET',/,
362 & 5x,'ITYP = 2 : IMPOSED INLET/OUTLET - TIME DEPENDENT',/,
363 & 5x,'ITYP = 3 : NON-REFLECTING BOUNDARY',/,
364 & 5x,'PSH: PRESSURE SHIFT . . . . . . . . . .=',1pg20.13/,
365 & 5x,'TIME SCALE FACTOR . . . . . . . . . . .=',1pg20.13/)
366 1100 FORMAT(
367 & 5x,40hgamma constant. . . . . . . . . . . . .=,e12.4/,
368 & 5x,40hstagnation pressure . . . . . . . . . .=,e12.4/,
369 & 5x,40hstagnation energy . . . . . . . . . . .=,e12.4/,
370 & 5x,40hcritical velocity . . . . . . . . . . .=,e12.4/,
371 & 5x,40hcritical density. . . . . . . . . . . .=,e12.4/,
372 & 5x,40hcritical pressure . . . . . . . . . . .=,e12.4/,
373 & 5x,40hreference node(velocity) . . . . . . .=,i10/)
374 1200 FORMAT(
375 & 5x,40hbulk modulus. . . . . . . . . . . . . .=,e12.4/,
376 & 5x,40hstagnation pressure . . . . . . . . . .=,e12.4/,
377 & 5x,40hstagnation energy . . . . . . . . . . .=,e12.4/,
378 & 5x,40hreference node(velocity) . . . . . . .=,i10/)
379 1300 FORMAT(
380 & 5x,40hstagnation density load curve. . . . .=,i10/,
381 & 5x,40hstagnation pressure load curve. . . . .=,i10/)
382 1301 FORMAT(
383 & 5x,40hstagnation density load curve. . . . .=,i10/,
384 & 5x,40hstagnation pressure load curve. . . . .=,i10/,
385 & 5x,40hstagnation energy load curve. . . . .=,i10/)
386 1302 FORMAT(
387 & 5x,40hdensity load curve . . . . . . . . .=,i10/,
388 & 5x,40hpressure load curve . . . . . . . . .=,i10/,
389 & 5x,40henergy load curve . . . . . . . . .=,i10/)
390 1349 FORMAT(
391 & 5x,40hdischarge coefficient(entry loss). . .=,e12.4/)
392 1350 FORMAT(
393 & 5x,40hfinal stagnation energy . . . . . . . .=,e12.4/,
394 & 5x,40hdischarge coefficient (entry loss). . .=,e12.4/)
395 1353 FORMAT(
396 & 5x,40hcharacteristic sound speed. . . . . . .=,e12.4/,
397 & 5x,40hcharacteristic length . . . . . . . . .=,e12.4/,
398 & 5x,40hreference node(velocity) . . . . . . .=,i10/)
399 1400 FORMAT(
400 & 5x,40hinitial pressure(p-psh) . . . . . . . .=,e12.4/,
401 & 5x,40hinitial energy. . . . . . . . . . . . .=,e12.4/)
402 1500 FORMAT(
403 & 5x,40hinitial k . . . . . . . . . . . . . . .=,e12.4/,
404 & 5x,40hinitial epsilon . . . . . . . . . . . .=,e12.4/,
405 & 5x,40hk energy load curve . . . . . . . . .=,i10/,
406 & 5x,40hepsilon load curve . . . . . . . . .=,i10/)
407 1600 FORMAT(
408 & 5x,'CMU TURBULENT VISCOSITY COEFFICIENT . .=',1pg20.13/,
409 & 5x,'SK K DIFFUSION COEFFICIENT . . . . . .=',1pg20.13/,
410 & 5x,'SE EPSILON DIFFUSION COEFFICIENT . . .=',1pg20.13/,
411 & 5x,'PR/PRT LAM./TURB. PRANDTL NUMBER RATIO.=',1pg20.13/)
412 2001 FORMAT(
413 & 5x,' THERMAL BOUNDARY ',/,
414 & 5x,' ---------------- ',/,
415 & 5x,'TEMPERATURE LOAD CURVE. . . . . . . . .=',i10/,
416 & 5x,'FLUX LOAD CURVE. . . . . . . . . . . .=',i10/)
417C-----------
418 RETURN
419 END
#define my_real
Definition cppsort.cpp:32
subroutine hm_get_floatv(name, rval, is_available, lsubmodel, unitab)
subroutine hm_get_floatv_dim(name, dim_fac, is_available, lsubmodel, unitab)
subroutine hm_get_intv(name, ival, is_available, lsubmodel)
subroutine hm_option_is_encrypted(is_encrypted)
subroutine hm_read_mat11_k_eps(lsubmodel, mtag, unitab, ipm, pm, mat_id, titr, matparam)
subroutine init_mat_keyword(matparam, keyword)
for(i8=*sizetab-1;i8 >=0;i8--)
type(ale_) ale
Definition ale_mod.F:249
integer, parameter nchartitle
subroutine ancmsg(msgid, msgtype, anmode, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, r1, r2, r3, r4, r5, r6, r7, r8, r9, c1, c2, c3, c4, c5, c6, c7, c8, c9, prmode)
Definition message.F:889
program starter
Definition starter.F:39