OpenRadioss
2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
read_viscparam.F
Go to the documentation of this file.
1
Copyright> OpenRadioss
2
Copyright> Copyright (C) 1986-2025 Altair Engineering Inc.
3
Copyright>
4
Copyright> This program is free software: you can redistribute it and/or modify
5
Copyright> it under the terms of the GNU Affero General Public License as published by
6
Copyright> the Free Software Foundation, either version 3 of the License, or
7
Copyright> (at your option) any later version.
8
Copyright>
9
Copyright> This program is distributed in the hope that it will be useful,
10
Copyright> but WITHOUT ANY WARRANTY; without even the implied warranty of
11
Copyright> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
Copyright> GNU Affero General Public License for more details.
13
Copyright>
14
Copyright> You should have received a copy of the GNU Affero General Public License
15
Copyright> along with this program. If not, see <https://www.gnu.org/licenses/>.
16
Copyright>
17
Copyright>
18
Copyright> Commercial Alternative: Altair Radioss Software
19
Copyright>
20
Copyright> As an alternative to this open-source version, Altair also offers Altair Radioss
21
Copyright> software under a commercial license. Contact Altair to discuss further if the
22
Copyright> commercial version may interest you: https://www.altair.com/radioss/.
23
!||====================================================================
24
!|| read_viscparam ../engine/source/output/restart/read_viscparam.F
25
!||--- called by ------------------------------------------------------
26
!|| read_matparam ../engine/source/output/restart/read_matparam.F
27
!||--- calls -----------------------------------------------------
28
!|| read_c_c ../common_source/tools/input_output/write_routtines.c
29
!|| read_db ../common_source/tools/input_output/read_db.F
30
!|| read_i_c ../common_source/tools/input_output/write_routtines.c
31
!|| read_mat_table ../engine/source/materials/tools/read_mat_table.F
32
!||--- uses -----------------------------------------------------
33
!|| message_mod ../engine/share/message_module/message_mod.F
34
!|| my_alloc_mod ../common_source/tools/memory/my_alloc.F90
35
!|| names_and_titles_mod ../common_source/modules/names_and_titles_mod.F
36
!|| visc_param_mod ../common_source/modules/mat_elem/visc_param_mod.F90
37
!||====================================================================
38
SUBROUTINE
read_viscparam
(VISC)
39
C-----------------------------------------------
40
C M o d u l e s
41
C-----------------------------------------------
42
USE
message_mod
43
USE
visc_param_mod
44
USE
names_and_titles_mod
45
USE
my_alloc_mod
46
C-----------------------------------------------
47
C I m p l i c i t T y p e s
48
C-----------------------------------------------
49
#include "implicit_f.inc"
50
C-----------------------------------------------
51
C D u m m y A r g u m e n t s
52
C-----------------------------------------------
53
TYPE
(visc_param_) ,
INTENT(INOUT)
:: VISC
54
C-----------------------------------------------
55
C L o c a l V a r i a b l e s
56
C-----------------------------------------------
57
INTEGER
:: I,NUPARAM,NIPARAM,NUMTABL,IAD,LEN
58
INTEGER
,
DIMENSION(NCHARTITLE)
:: NAME
59
INTEGER
,
DIMENSION(1)
:: ILEN
60
INTEGER
,
DIMENSION(:)
,
ALLOCATABLE
:: IBUF
61
C-----------------------------------------------
62
c read viscosity model parameters
63
C=======================================================================
64
CALL
read_i_c
(ilen, 1)
65
len = ilen(1)
66
ALLOCATE
(ibuf(len) )
67
CALL
read_i_c
(ibuf, len)
68
iad = 0
69
c
70
iad = iad+1
71
visc%ILAW = ibuf(iad)
72
iad = iad+1
73
visc%NUPARAM = ibuf(iad)
74
iad = iad+1
75
visc%NIPARAM = ibuf(iad)
76
iad = iad+1
77
visc%NUVAR = ibuf(iad)
78
iad = iad+1
79
visc%NFUNC = ibuf(iad)
80
iad = iad+1
81
visc%NTABLE = ibuf(iad)
82
c
83
DEALLOCATE
( ibuf )
84
85
IF
(visc%ILAW > 0)
THEN
86
c
87
c read material title
88
89
CALL
read_c_c
(name,
nchartitle
)
90
DO
i=1,
nchartitle
91
visc%TITLE(i:i) = char(name(i))
92
END DO
93
94
c read viscosity parameter arrays
95
nuparam = visc%NUPARAM
96
niparam = visc%NIPARAM
97
CALL
my_alloc(visc%UPARAM ,nuparam)
98
CALL
my_alloc(visc%IPARAM ,niparam)
99
100
IF
(nuparam > 0)
THEN
101
CALL
read_db
(visc%UPARAM ,nuparam)
102
END IF
103
IF
(niparam > 0)
THEN
104
CALL
read_i_c
(visc%IPARAM ,niparam)
105
END IF
106
c
107
c read viscosity law function tables
108
109
numtabl = visc%NTABLE
110
IF
(numtabl
> 0)
THEN
111
ALLOCATE
(visc%TABLE(numtabl))
112
CALL
read_mat_table
(visc%TABLE, numtabl)
113
END IF
114
c
115
ELSE
! initialize VISC structure
116
c
117
visc%TITLE =
" "
118
len = 0
119
ALLOCATE
(visc%UPARAM(len))
120
ALLOCATE
(visc%IPARAM(len))
121
ALLOCATE
(visc%FUNC(len))
122
ALLOCATE
(visc%TABLE(len))
123
visc%UPARAM = 0
124
visc%IPARAM = 0
125
126
END IF
127
c-----------
128
RETURN
129
END
message_mod
Definition
message_mod.F:1249
names_and_titles_mod
Definition
names_and_titles_mod.F:997
names_and_titles_mod::nchartitle
integer, parameter nchartitle
Definition
names_and_titles_mod.F:1003
read_db
subroutine read_db(a, n)
Definition
read_db.F:88
read_mat_table
subroutine read_mat_table(table, numtabl)
Definition
read_mat_table.F:36
read_viscparam
subroutine read_viscparam(visc)
Definition
read_viscparam.F:39
read_c_c
void read_c_c(int *w, int *len)
Definition
write_routtines.c:857
read_i_c
void read_i_c(int *w, int *len)
Definition
write_routtines.c:805
engine
source
output
restart
read_viscparam.F
Generated by
1.15.0