OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_read_eos_linear.F File Reference
#include "implicit_f.inc"
#include "param_c.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine hm_read_eos_linear (iout, pm, unitab, iunit, lsubmodel, imideos, mat_param)

Function/Subroutine Documentation

◆ hm_read_eos_linear()

subroutine hm_read_eos_linear ( integer iout,
pm,
type (unit_type_), intent(in) unitab,
integer iunit,
type(submodel_data), dimension(nsubmod), intent(in) lsubmodel,
integer, intent(in) imideos,
type(matparam_struct_), intent(inout) mat_param )

Definition at line 34 of file hm_read_eos_linear.F.

35C-----------------------------------------------
36C M o d u l e s
37C-----------------------------------------------
38 USE unitab_mod
39 USE submodel_mod
40 USE message_mod
41 USE matparam_def_mod, ONLY : matparam_struct_
42C-----------------------------------------------
43C D e s c r i p t i o n
44C-----------------------------------------------
45C reading parameters for
46C LINEAR EQUATION OF STATE
47C-----------------------------------------------
48C C o m m e n t s
49C-----------------------------------------------
50C RHOI = PM(89) -> provided by /MAT
51C RHOR = PM(01) -> provided by /MAT (can be erased by EOS if present : obsolete)
52C => MU0 = RHO/RHOR-1.
53C PM(31) = P(MU0,E0) -> will be used to initialize diagonal of stress tensor SIG(1:3,*)
54C-----------------------------------------------
55C I m p l i c i t T y p e s
56C-----------------------------------------------
57#include "implicit_f.inc"
58C-----------------------------------------------
59C D u m m y A r g u m e n t s
60C-----------------------------------------------
61 TYPE (UNIT_TYPE_),INTENT(IN) ::UNITAB
62 INTEGER IOUT, IUNIT
63 my_real pm(npropm)
64 TYPE(SUBMODEL_DATA), DIMENSION(NSUBMOD), INTENT(IN) :: LSUBMODEL
65 TYPE(MATPARAM_STRUCT_),INTENT(INOUT) :: MAT_PARAM
66 INTEGER,INTENT(IN) :: IMIDEOS
67C-----------------------------------------------
68C C o m m o n B l o c k s
69C-----------------------------------------------
70#include "param_c.inc"
71C-----------------------------------------------
72C L o c a l V a r i a b l e s
73C-----------------------------------------------
74 my_real c0, c1, psh, rho0,rhor,mu0, fac_l,fac_t,fac_m,fac_c,rhoi,g0,ssp0,dpdmu
75 LOGICAL :: IS_ENCRYPTED, IS_AVAILABLE , IS_AVAILABLE_RHO0
76C-----------------------------------------------
77C S o u r c e L i n e s
78C-----------------------------------------------
79 is_encrypted = .false.
80 is_available = .false.
81 is_available_rho0 = .false.
82
83 CALL hm_option_is_encrypted(is_encrypted)
84
85 CALL hm_get_floatv('LAW5_P0', c0, is_available,lsubmodel,unitab)
86 CALL hm_get_floatv('MAT_BULK', c1, is_available,lsubmodel,unitab)
87 CALL hm_get_floatv('LAW5_PSH', psh, is_available,lsubmodel,unitab)
88 CALL hm_get_floatv('Refer_Rho', rho0, is_available_rho0,lsubmodel,unitab)
89
90 rhor = pm(1)
91 rhoi = pm(89)
92
93 IF(rho0 > zero) THEN
94 rhor = rho0
95 pm(1)= rho0
96 mat_param%RHO = rho0
97 ELSE
98 rho0=rhor
99 ENDIF
100
101 pm(23) =zero
102 pm(104)=c0-psh
103 pm(32) =c1
104 pm(88) =psh
105
106 mat_param%EOS%NUPARAM = 2
107 mat_param%EOS%NIPARAM = 0
108 mat_param%EOS%NFUNC = 0
109 mat_param%EOS%NTABLE = 0
110 CALL mat_param%EOS%CONSTRUCT() !allocations
111
112 mat_param%EOS%UPARAM(1) = c0-psh
113 mat_param%EOS%UPARAM(2) = c1
114 mat_param%EOS%PSH = psh
115 mat_param%EOS%E0 = zero
116 IF (mat_param%THERM%TINI == zero) THEN
117 mat_param%THERM%TINI =three100
118 pm(79) = three100
119 END IF
120
121 !initial pressure for stress tensor
122 IF(rhoi == zero)THEN
123 mu0 = zero ! error 683 already displayed
124 ELSE
125 IF(rhor /= zero)THEN
126 mu0 = rhoi/rhor-one
127 ELSE
128 mu0 = zero ! error 683 already displayed
129 ENDIF
130 ENDIF
131
132 pm(31)=c0-psh+c1*mu0
133
134 !SSP0
135 ssp0 = zero
136 g0 = pm(22)
137 rhoi = pm(89)
138 dpdmu = c1
139
140 dpdmu=max(zero,dpdmu)
141 IF(rhor > zero) ssp0 = sqrt((dpdmu + two_third*g0)/rhor)
142 pm(27)=ssp0
143
144 WRITE(iout,1000)
145 IF(is_encrypted)THEN
146 WRITE(iout,'(5X,A,//)')'CONFIDENTIAL DATA'
147 ELSE
148 WRITE(iout,1500)c0,c1,psh
149 IF(is_available_rho0)WRITE(iout,1501)pm(1)
150 ENDIF
151
152 RETURN
153 1000 FORMAT(
154 & 5x,' LINEAR EOS ',/,
155 & 5x,' ---------- ',/)
156 1500 FORMAT(
157 & 5x,'INITIAL PRESSURE. . . . . . . . . . . . .=',1pg20.13/,
158 & 5x,'BULK MODULUS. . . . . . . . . . . . . . .=',1pg20.13/,
159 & 5x,'PRESSURE SHIFT. . . . . . . . . . . . . .=',1pg20.13)
160 1501 FORMAT(
161 & 5x,'EOS REFERENCE DENSITY . . . . . . . . . .=',1pg20.13)
162
163 RETURN
#define my_real
Definition cppsort.cpp:32
subroutine hm_get_floatv(name, rval, is_available, lsubmodel, unitab)
subroutine hm_option_is_encrypted(is_encrypted)
#define max(a, b)
Definition macros.h:21