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