OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
hm_read_eos_linear.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_eos_linear ../starter/source/materials/eos/hm_read_eos_linear.f
25!||--- called by ------------------------------------------------------
26!|| hm_read_eos ../starter/source/materials/eos/hm_read_eos.F
27!||--- calls -----------------------------------------------------
28!|| hm_get_floatv ../starter/source/devtools/hm_reader/hm_get_floatv.f
29!|| hm_option_is_encrypted ../starter/source/devtools/hm_reader/hm_option_is_encrypted.F
30!||--- uses -----------------------------------------------------
31!|| message_mod ../starter/share/message_module/message_mod.F
32!|| submodel_mod ../starter/share/modules1/submodel_mod.F
33!||====================================================================
34 SUBROUTINE hm_read_eos_linear(IOUT,PM,UNITAB,IUNIT,LSUBMODEL,IMIDEOS)
35C-----------------------------------------------
36C M o d u l e s
37C-----------------------------------------------
38 USE unitab_mod
39 USE submodel_mod
40 USE message_mod
41C-----------------------------------------------
42C D e s c r i p t i o n
43C-----------------------------------------------
44C reading parameters for
45C LINEAR EQUATION OF STATE
46C-----------------------------------------------
47C C o m m e n t s
48C-----------------------------------------------
49C RHOI = PM(89) -> provided by /MAT
50C RHOR = PM(01) -> provided by /MAT (can be erased by EOS if present : obsolete)
51C => MU0 = RHO/RHOR-1.
52C PM(31) = P(MU0,E0) -> will be used to initialize diagonal of stress tensor SIG(1:3,*)
53C-----------------------------------------------
54C I m p l i c i t T y p e s
55C-----------------------------------------------
56#include "implicit_f.inc"
57C-----------------------------------------------
58C D u m m y A r g u m e n t s
59C-----------------------------------------------
60 TYPE (UNIT_TYPE_),INTENT(IN) ::UNITAB
61 INTEGER IIN,IOUT,IUNIT
62 my_real pm(npropm)
63 TYPE(submodel_data), DIMENSION(NSUBMOD), INTENT(IN) :: LSUBMODEL
64 INTEGER,INTENT(IN) :: IMIDEOS
65C-----------------------------------------------
66C C o m m o n B l o c k s
67C-----------------------------------------------
68#include "param_c.inc"
69C-----------------------------------------------
70C L o c a l V a r i a b l e s
71C-----------------------------------------------
72 my_real c0, c1, c2, c3, c4, c5, psh, rho0,rhor,mu0, fac_l,fac_t,fac_m,fac_c,rhoi,g0,ssp0,dpdmu
73 LOGICAL :: IS_ENCRYPTED, IS_AVAILABLE , IS_AVAILABLE_RHO0
74C-----------------------------------------------
75C S o u r c e L i n e s
76C-----------------------------------------------
77 is_encrypted = .false.
78 is_available = .false.
79 is_available_rho0 = .false.
80
81 CALL hm_option_is_encrypted(is_encrypted)
82
83 CALL hm_get_floatv('LAW5_P0', c0, is_available,lsubmodel,unitab)
84 CALL hm_get_floatv('MAT_BULK', c1, is_available,lsubmodel,unitab)
85 CALL hm_get_floatv('LAW5_PSH', psh, is_available,lsubmodel,unitab)
86 CALL hm_get_floatv('Refer_Rho', rho0, is_available_rho0,lsubmodel,unitab)
87
88 rhor = pm(1)
89 rhoi = pm(89)
90
91 IF(rho0 > zero) THEN
92 rhor = rho0
93 pm(1)= rho0
94 ELSE
95 rho0=rhor
96 ENDIF
97
98 pm( 23)=zero
99 pm(104)=c0-psh
100 pm( 32)=c1
101 pm( 33)=zero
102 pm( 34)=zero
103 pm( 35)=zero
104 pm( 36)=zero
105 pm( 88)=psh
106 IF(pm(79)==zero)pm(79)=three100
107
108 !initial pressure for stress tensor
109 IF(rhoi == zero)THEN
110 mu0 = zero ! error 683 already displayed
111 ELSE
112 IF(rhor /= zero)THEN
113 mu0 = rhoi/rhor-one
114 ELSE
115 mu0 = zero ! error 683 already displayed
116 ENDIF
117 ENDIF
118
119 pm(31)=c0-psh+c1*mu0
120
121 !SSP0
122 ssp0 = zero
123 g0 = pm(22)
124 rhoi = pm(89)
125 dpdmu = c1
126
127 dpdmu=max(zero,dpdmu)
128 IF(rhor > zero) ssp0 = sqrt((dpdmu + two_third*g0)/rhor)
129 pm(27)=ssp0
130
131 WRITE(iout,1000)
132 IF(is_encrypted)THEN
133 WRITE(iout,'(5X,A,//)')'CONFIDENTIAL DATA'
134 ELSE
135 WRITE(iout,1500)c0,c1,psh
136 IF(is_available_rho0)WRITE(iout,1501)pm(1)
137 ENDIF
138
139 RETURN
140 1000 FORMAT(
141 & 5x,' LINEAR EOS ',/,
142 & 5x,' ---------- ',/)
143 1500 FORMAT(
144 & 5x,'INITIAL PRESSURE. . . . . . . . . . . . .=',1pg20.13/,
145 & 5x,'BULK MODULUS. . . . . . . . . . . . . . .=',1pg20.13/,
146 & 5x,'PRESSURE SHIFT. . . . . . . . . . . . . .=',1pg20.13)
147 1501 FORMAT(
148 & 5x,'EOS REFERENCE DENSITY . . . . . . . . . .=',1pg20.13)
149
150 RETURN
151 END
#define my_real
Definition cppsort.cpp:32
subroutine hm_get_floatv(name, rval, is_available, lsubmodel, unitab)
subroutine hm_option_is_encrypted(is_encrypted)
subroutine hm_read_eos_linear(iout, pm, unitab, iunit, lsubmodel, imideos)
#define max(a, b)
Definition macros.h:21
program starter
Definition starter.F:39