OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
read_viscparam.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!|| 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)
39C-----------------------------------------------
40C M o d u l e s
41C-----------------------------------------------
42 USE message_mod
43 USE visc_param_mod
45 USE my_alloc_mod
46C-----------------------------------------------
47C I m p l i c i t T y p e s
48C-----------------------------------------------
49#include "implicit_f.inc"
50C-----------------------------------------------
51C D u m m y A r g u m e n t s
52C-----------------------------------------------
53 TYPE(visc_param_) ,INTENT(INOUT) :: VISC
54C-----------------------------------------------
55C L o c a l V a r i a b l e s
56C-----------------------------------------------
57 INTEGER :: I,NUPARAM,NIPARAM,NUMTABL,IAD,LEN
58 INTEGER ,DIMENSION(NCHARTITLE) :: NAME
59 INTEGER ,DIMENSION(1) :: ILEN
60 INTEGER ,DIMENSION(:) ,ALLOCATABLE :: IBUF
61C-----------------------------------------------
62c read viscosity model parameters
63C=======================================================================
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
69c
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)
82c
83 DEALLOCATE( ibuf )
84
85 IF (visc%ILAW > 0) THEN
86c
87c 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
94c 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
106c
107c 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
114c
115 ELSE ! initialize VISC structure
116c
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
127c-----------
128 RETURN
129 END
integer, parameter nchartitle
subroutine read_db(a, n)
Definition read_db.F:88
subroutine read_mat_table(table, numtabl)
subroutine read_viscparam(visc)
void read_c_c(int *w, int *len)
void read_i_c(int *w, int *len)