OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
th_surf_mod.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!> \brief OPTION /TH/SURF outputs of Pressure and Area needed Tabs
25
26!||====================================================================
27!|| th_surf_mod ../common_source/modules/interfaces/th_surf_mod.F
28!||--- called by ------------------------------------------------------
29!|| alemain ../engine/source/ale/alemain.F
30!|| dyna_ina ../engine/source/implicit/imp_dyna.F
31!|| dyna_wex ../engine/source/implicit/imp_dyna.F
32!|| ebcs10 ../engine/source/boundary_conditions/ebcs/ebcs10.F
33!|| ebcs11 ../engine/source/boundary_conditions/ebcs/ebcs11.F90
34!|| ebcs_main ../engine/source/boundary_conditions/ebcs/ebcs_main.F
35!|| force ../engine/source/loads/general/force.F90
36!|| force_imp ../engine/source/loads/general/force_imp.F
37!|| hist2 ../engine/source/output/th/hist2.F
38!|| imp_chkm ../engine/source/implicit/imp_solv.F
39!|| imp_solv ../engine/source/implicit/imp_solv.F
40!|| load_pressure ../engine/source/loads/general/load_pressure/load_pressure.F
41!|| multi_ebcs ../engine/source/multifluid/multi_ebcs.F
42!|| multi_inlet_ebcs ../engine/source/multifluid/multi_inlet_ebcs.F
43!|| multi_nrf_ebcs ../engine/source/multifluid/multi_nrf_ebcs.F
44!|| multi_propellant_ebcs ../engine/source/multifluid/multi_propellant_ebcs.F90
45!|| multi_timeevolution ../engine/source/multifluid/multi_timeevolution.F
46!|| pblast_1 ../engine/source/loads/pblast/pblast_1.F
47!|| pblast_2 ../engine/source/loads/pblast/pblast_2.F
48!|| pblast_3 ../engine/source/loads/pblast/pblast_3.F
49!|| pblast_load_computation ../engine/source/loads/pblast/pblast.F
50!|| pfluid ../engine/source/loads/general/pfluid/pfluid.F
51!|| resol ../engine/source/engine/resol.F
52!|| sortie_main ../engine/source/output/sortie_main.F
53!|| surf_mass_monv ../engine/source/output/th/surf_mass.F
54!|| th_surf_load_pressure ../starter/source/output/th/th_surf_load_pressure.F
55!|| thsurf ../engine/source/output/th/thsurf.F
56!|| time_history_mod ../common_source/modules/output/time_history_mod.F
57!|| w_th_surf_loadp ../starter/source/restart/ddsplit/w_th_surf_loadp.F
58!|| w_th_surf_pload ../starter/source/restart/ddsplit/w_th_surf_pload.F
59!||====================================================================
61C-----------------------------------------------
62C m y _ r e a l
63C-----------------------------------------------
64#include "my_real.inc"
65 implicit none
66! -----------------------------------------------
67! D e r i v e d T y p e D e f i n i t i o n s
68! -----------------------------------------------
69
70C----------------------------------------------
71C /TH/SURF outputs of Pressure and Area
72C needed Tabs
73C---------------------------------------------
74
76 INTEGER iok !< Flag for /TH/SURF + Load pressure
77 INTEGER nsurf !< Number of surfaces /TH/SURF
78 INTEGER pload_flag !< Flag if th surface include segments where /PLOAD is applied
79 INTEGER loadp_flag !< Flag if th surface include segments where /PFLUID or /PBLAST or /LOADP_HYD is applied
80
81 INTEGER nsegloadp !< Number of segments for which loadp Load_Pressure is applied
82 INTEGER nsegloadpf !< Number of segments for which loadp Pfluid is applied
83 INTEGER nsegloadpb !< Number of segments for which loadp Pblast is applied
84
85 INTEGER s_pload_ksegs !< Size table of ids of th surfaces to which each segment of pload is included
86 INTEGER s_pload_segs !< Size table of ids of th surfaces to which each segment of pload is included
87 INTEGER, DIMENSION(:), ALLOCATABLE :: pload_ksegs !< ids of th surfaces to which each segment of pload is included
88 INTEGER, DIMENSION(:), ALLOCATABLE :: pload_segs !< list of th surfaces to which each segment of pload is included
89
90 INTEGER s_loadp_ksegs !< Size table of ids of th surfaces to which each segment of load pressure is included
91 INTEGER s_loadp_segs !< Size table of ids of th surfaces to which each segment of load pressure is included
92 INTEGER, DIMENSION(:), ALLOCATABLE :: loadp_ksegs !< ids of th surfaces to which each segment of load pressure is included
93 INTEGER, DIMENSION(:), ALLOCATABLE :: loadp_segs !< list of th surfaces to which each segment of load pressure is included
94
95 my_real, DIMENSION(:,:), ALLOCATABLE :: channels !< channels for /TH/SURF output (1:TH_SURF_NUM_CHANNEL, 1:NSURF)
96 !
97 END TYPE th_surf_
98
99 INTEGER, PARAMETER :: th_surf_num_channel = 6 !< number of /TH/SURF channels : AREA, VELOCITY, MASSFLOW, P A, MASS
100
101 CONTAINS
102
103!> \brief Writing TH/SURF tabs in restart file
104
105!||====================================================================
106!|| thsurf_write_restart ../common_source/modules/interfaces/th_surf_mod.F
107!||--- called by ------------------------------------------------------
108!|| ddsplit ../starter/source/restart/ddsplit/ddsplit.F
109!|| wrrestp ../engine/source/output/restart/wrrestp.F
110!||--- calls -----------------------------------------------------
111!|| write_i_c ../common_source/tools/input_output/write_routtines.c
112!||====================================================================
113 SUBROUTINE thsurf_write_restart(TH_SURF,IFLAG)
114
115C-----------------------------------------------
116C I m p l i c i t T y p e s
117C-----------------------------------------------
118#include "implicit_f.inc"
119C-----------------------------------------------
120C D u m m y A r g u m e n t s
121C-----------------------------------------------
122 TYPE (TH_SURF_) , INTENT(IN) :: TH_SURF
123 INTEGER , INTENT(IN) :: IFLAG
124C-----------------------------------------------
125C Writing TH/SURF tabs in restart file
126C-----------------------------------------------
127
128 CALL write_i_c(th_surf%IOK,1)
129
130 IF(th_surf%IOK > 0) THEN
131
132 CALL write_i_c(th_surf%NSURF,1)
133C
134 CALL write_i_c(th_surf%PLOAD_FLAG,1)
135 CALL write_i_c(th_surf%LOADP_FLAG,1)
136C
137 CALL write_i_c(th_surf%NSEGLOADP,1)
138 CALL write_i_c(th_surf%NSEGLOADPF,1)
139 CALL write_i_c(th_surf%NSEGLOADPB,1)
140C
141
142 IF(iflag == 2 ) THEN
143 IF(th_surf%PLOAD_FLAG > 0) THEN
144 CALL write_i_c(th_surf%S_PLOAD_KSEGS,1)
145 IF(th_surf%S_PLOAD_KSEGS > 0) CALL write_i_c(th_surf%PLOAD_KSEGS,th_surf%S_PLOAD_KSEGS)
146 CALL write_i_c(th_surf%S_PLOAD_SEGS,1)
147 IF(th_surf%S_PLOAD_SEGS > 0) CALL write_i_c(th_surf%PLOAD_SEGS,th_surf%S_PLOAD_SEGS)
148 ENDIF
149 IF(th_surf%LOADP_FLAG > 0) THEN
150 CALL write_i_c(th_surf%S_LOADP_KSEGS,1)
151 IF(th_surf%S_LOADP_KSEGS > 0) CALL write_i_c(th_surf%LOADP_KSEGS,th_surf%S_LOADP_KSEGS)
152 CALL write_i_c(th_surf%S_LOADP_SEGS,1)
153 IF(th_surf%S_LOADP_SEGS > 0 ) CALL write_i_c(th_surf%LOADP_SEGS,th_surf%S_LOADP_SEGS)
154 ENDIF
155 ENDIF
156
157 ENDIF
158
159C-----------------------------------------------
160 RETURN
161 END SUBROUTINE thsurf_write_restart
162
163!> \brief Reading TH/SURF tabs in restart file
164
165!||====================================================================
166!|| thsurf_read_restart ../common_source/modules/interfaces/th_surf_mod.F
167!||--- called by ------------------------------------------------------
168!|| rdresb ../engine/source/output/restart/rdresb.F
169!||--- calls -----------------------------------------------------
170!|| read_i_c ../common_source/tools/input_output/write_routtines.c
171!||--- uses -----------------------------------------------------
172!|| message_mod ../engine/share/message_module/message_mod.F
173!||====================================================================
174 SUBROUTINE thsurf_read_restart(TH_SURF)
175C-----------------------------------------------
176C M o d u l e s
177C-----------------------------------------------
178 USE message_mod
179C-----------------------------------------------
180C I m p l i c i t T y p e s
181C-----------------------------------------------
182#include "implicit_f.inc"
183C-----------------------------------------------
184C D u m m y A r g u m e n t s
185C-----------------------------------------------
186 TYPE (TH_SURF_) , INTENT(INOUT) :: TH_SURF
187C-----------------------------------------------
188C READ TH/SURF tabs in restart file
189C-----------------------------------------------
190
191 CALL read_i_c(th_surf%IOK,1)
192
193 IF(th_surf%IOK > 0) THEN
194
195 CALL read_i_c(th_surf%NSURF,1)
196 CALL read_i_c(th_surf%PLOAD_FLAG,1)
197 CALL read_i_c(th_surf%LOADP_FLAG,1)
198
199 CALL read_i_c(th_surf%NSEGLOADP,1)
200 CALL read_i_c(th_surf%NSEGLOADPF,1)
201 CALL read_i_c(th_surf%NSEGLOADPB,1)
202
203 IF(th_surf%PLOAD_FLAG > 0) THEN
204 CALL read_i_c(th_surf%S_PLOAD_KSEGS,1)
205 IF(th_surf%S_PLOAD_KSEGS > 0) THEN
206 ALLOCATE(th_surf%PLOAD_KSEGS(th_surf%S_PLOAD_KSEGS))
207 CALL read_i_c(th_surf%PLOAD_KSEGS,th_surf%S_PLOAD_KSEGS)
208 ENDIF
209 CALL read_i_c(th_surf%S_PLOAD_SEGS,1)
210 IF(th_surf%S_PLOAD_SEGS > 0) THEN
211 ALLOCATE(th_surf%PLOAD_SEGS(th_surf%S_PLOAD_SEGS))
212 CALL read_i_c(th_surf%PLOAD_SEGS,th_surf%S_PLOAD_SEGS)
213 ENDIF
214 ENDIF
215
216 IF(th_surf%LOADP_FLAG > 0) THEN
217 CALL read_i_c(th_surf%S_LOADP_KSEGS,1)
218 IF(th_surf%S_LOADP_KSEGS > 0) THEN
219 ALLOCATE(th_surf%LOADP_KSEGS(th_surf%S_LOADP_KSEGS))
220 CALL read_i_c(th_surf%LOADP_KSEGS,th_surf%S_LOADP_KSEGS)
221 ENDIF
222 CALL read_i_c(th_surf%S_LOADP_SEGS,1)
223 IF(th_surf%S_LOADP_SEGS > 0) THEN
224 ALLOCATE(th_surf%LOADP_SEGS(th_surf%S_LOADP_SEGS))
225 CALL read_i_c(th_surf%LOADP_SEGS,th_surf%S_LOADP_SEGS)
226 ENDIF
227 ENDIF
228 ELSE ! initialization to 0
229 th_surf%NSURF = 0
230 th_surf%PLOAD_FLAG = 0
231 th_surf%LOADP_FLAG = 0
232 th_surf%NSEGLOADP = 0
233 th_surf%NSEGLOADPF = 0
234 th_surf%NSEGLOADPB = 0
235
236 ENDIF
237
238C-----------------------------------------------
239 RETURN
240 END SUBROUTINE thsurf_read_restart
241
242C
243 END MODULE th_surf_mod
#define my_real
Definition cppsort.cpp:32
OPTION /TH/SURF outputs of Pressure and Area needed Tabs.
Definition th_surf_mod.F:60
integer, parameter th_surf_num_channel
number of /TH/SURF channels : AREA, VELOCITY, MASSFLOW, P A, MASS
Definition th_surf_mod.F:99
subroutine thsurf_read_restart(th_surf)
Reading TH/SURF tabs in restart file.
subroutine thsurf_write_restart(th_surf, iflag)
Writing TH/SURF tabs in restart file.
void write_i_c(int *w, int *len)
void read_i_c(int *w, int *len)