OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
segvar_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!|| segvar_mod ../engine/share/modules/segvar_mod.F
25!||--- called by ------------------------------------------------------
26!|| aconve ../engine/source/ale/aconve.F
27!|| afluxt ../engine/source/ale/ale51/afluxt.F
28!|| ale51_antidiff2 ../engine/source/ale/ale51/ale51_antidiff2.F
29!|| ale51_antidiff3 ../engine/source/ale/ale51/ale51_antidiff3.F
30!|| ale51_gradient_reconstruction ../engine/source/ale/alemuscl/ale51_gradient_reconstruction.F
31!|| ale51_gradient_reconstruction2 ../engine/source/ale/alemuscl/ale51_gradient_reconstruction2.F
32!|| alefvm_main ../engine/source/ale/alefvm/alefvm_main.F
33!|| alemain ../engine/source/ale/alemain.F
34!|| alemuscl_upwind ../engine/source/ale/alemuscl/alemuscl_upwind.F
35!|| alemuscl_upwind2 ../engine/source/ale/alemuscl/alemuscl_upwind2.F
36!|| alethe ../engine/source/ale/alethe.F
37!|| ebcs0_gradp0 ../engine/source/boundary_conditions/ebcs/ebcs0_gradp0.F
38!|| ebcs10_nrf ../engine/source/boundary_conditions/ebcs/ebcs10_nrf.F
39!|| ebcs11_propellant ../engine/source/boundary_conditions/ebcs/ebcs11_propellant.F90
40!|| ebcs123_pres ../engine/source/boundary_conditions/ebcs/ebcs123_pres.F
41!|| ebcs12_cyclic ../engine/source/boundary_conditions/ebcs/ebcs12_cyclic.F90
42!|| ebcs4_vel ../engine/source/boundary_conditions/ebcs/ebcs4_vel.F
43!|| ebcs5_normv ../engine/source/boundary_conditions/ebcs/ebcs5_normv.F
44!|| ebcs6_inip ../engine/source/boundary_conditions/ebcs/ebcs6_inip.F
45!|| ebcs7_iniv ../engine/source/boundary_conditions/ebcs/ebcs7_iniv.F
46!|| ebcs8_inlet ../engine/source/boundary_conditions/ebcs/ebcs8_inlet.F90
47!|| ebcs_main ../engine/source/boundary_conditions/ebcs/ebcs_main.F
48!|| ebcs_vol2seg ../engine/source/boundary_conditions/ebcs/ebcs_vol2seg.F
49!|| gradient_reconstruction ../engine/source/ale/alemuscl/gradient_reconstruction.F
50!|| gradient_reconstruction2 ../engine/source/ale/alemuscl/gradient_reconstruction2.F
51!|| i12m2s ../engine/source/interfaces/interf/i12m2s.F
52!|| i12nod3 ../engine/source/interfaces/interf/i12nod3.F
53!|| i12s2m ../engine/source/interfaces/interf/i12s2m.F
54!|| intti0 ../engine/source/interfaces/interf/intti0.F
55!|| intti12a ../engine/source/interfaces/interf/intti12.F
56!|| radioss2 ../engine/source/engine/radioss2.F
57!|| resol ../engine/source/engine/resol.F
58!|| resol_head ../engine/source/engine/resol_head.F
59!|| restalloc ../engine/source/output/restart/arralloc.F
60!|| seggetv ../engine/source/interfaces/interf/seggetv.F
61!|| spmd_segcom ../engine/source/mpi/fluid/spmd_cfd.F
62!||====================================================================
64C-----------------------------------------------
65C I m p l i c i t T y p e s
66C-----------------------------------------------
67#include "my_real.inc"
68C-----------------------------------------------
69C C o m m o n B l o c k s
70C-----------------------------------------------
72 INTEGER :: nseg
73 INTEGER :: nbmat !NUMBER OF PHASES
74 LOGICAL :: has_rho = .false.
75 LOGICAL :: has_eint = .false.
76 LOGICAL :: has_rk = .false.
77 LOGICAL :: has_re = .false.
78 LOGICAL :: has_uvar = .false.
79 LOGICAL :: has_phase_alpha = .false.
80 LOGICAL :: has_phase_rho = .false.
81 LOGICAL :: has_phase_eint = .false.
82 my_real,ALLOCATABLE,DIMENSION(:) :: rho
83 my_real,ALLOCATABLE,DIMENSION(:) :: eint
84 my_real,ALLOCATABLE,DIMENSION(:) :: rk
85 my_real,ALLOCATABLE,DIMENSION(:) :: re
86 my_real,ALLOCATABLE,DIMENSION(:) :: uvar
87 my_real,ALLOCATABLE,DIMENSION(:,:) :: phase_alpha
88 my_real,ALLOCATABLE,DIMENSION(:,:) :: phase_rho
89 my_real,ALLOCATABLE,DIMENSION(:,:) :: phase_eint
90 CONTAINS
91 PROCEDURE, pass :: destroy => segvar_destroy
92 PROCEDURE, pass :: create => segvar_create
93 END TYPE t_segvar
94
95 CONTAINS
96
97!||====================================================================
98!|| segvar_destroy ../engine/share/modules/segvar_mod.F
99!||====================================================================
100 SUBROUTINE segvar_destroy(this)
101 IMPLICIT NONE
102 CLASS(t_segvar), INTENT(INOUT) :: this
103 IF(ALLOCATED(this%RHO)) DEALLOCATE(this%RHO)
104 IF(ALLOCATED(this%EINT)) DEALLOCATE(this%EINT)
105 IF(ALLOCATED(this%RK)) DEALLOCATE(this%RK)
106 IF(ALLOCATED(this%RE)) DEALLOCATE(this%RE)
107 IF(ALLOCATED(this%UVAR)) DEALLOCATE(this%UVAR)
108 IF(ALLOCATED(this%PHASE_ALPHA)) DEALLOCATE(this%PHASE_ALPHA)
109 IF(ALLOCATED(this%PHASE_ALPHA)) DEALLOCATE(this%PHASE_RHO)
110 IF(ALLOCATED(this%PHASE_ALPHA)) DEALLOCATE(this%PHASE_EINT)
111 END SUBROUTINE segvar_destroy
112
113!||====================================================================
114!|| segvar_create ../engine/share/modules/segvar_mod.F
115!||--- uses -----------------------------------------------------
116!|| ale_mod ../common_source/modules/ale/ale_mod.F
117!||====================================================================
118 SUBROUTINE segvar_create(this,NBMAT)
119 USE ale_mod
120 IMPLICIT NONE
121#include "constant.inc"
122#include "../includes/com04_c.inc"
123 CLASS(t_segvar), INTENT(INOUT) :: this
124 INTEGER,INTENT(IN) :: NBMAT
125 this%NSEG=nsegflu
126 this%NBMAT=nbmat
127 IF(this%NSEG > 0)THEN
128 IF(ale%GLOBAL%NVCONV >= 1)this%HAS_RHO=.true.
129 IF(ale%GLOBAL%NVCONV >= 2)this%HAS_EINT=.true.
130 IF(ale%GLOBAL%NVCONV >= 3)this%HAS_RK=.true.
131 IF(ale%GLOBAL%NVCONV >= 4)this%HAS_RE=.true.
132 IF(ale%GLOBAL%NVCONV >= 5)this%HAS_UVAR=.true.
133 IF(this%HAS_RHO)THEN
134 ALLOCATE(this%RHO(this%NSEG))
135 this%RHO(1:this%NSEG)=zero
136 ENDIF
137 IF(this%HAS_EINT)THEN
138 ALLOCATE(this%EINT(this%NSEG))
139 this%EINT(1:this%NSEG)=zero
140 ENDIF
141 IF(this%HAS_RK)THEN
142 ALLOCATE(this%RK(this%NSEG))
143 this%RK(1:this%NSEG)=zero
144 ENDIF
145 IF(this%HAS_RE)THEN
146 ALLOCATE(this%RE(this%NSEG))
147 this%RE(1:this%NSEG)=zero
148 ENDIF
149 IF(this%HAS_UVAR)THEN
150 ALLOCATE(this%UVAR(this%NSEG))
151 this%UVAR(1:this%NSEG)=zero
152 ENDIF
153 IF(nbmat > 0)THEN
154 this%HAS_PHASE_ALPHA = .true.
155 ALLOCATE(this%PHASE_ALPHA(this%NBMAT,this%NSEG))
156 this%PHASE_ALPHA(1:this%NBMAT,1:this%NSEG) = zero
157 this%HAS_PHASE_RHO = .true.
158 ALLOCATE(this%PHASE_RHO(this%NBMAT,this%NSEG))
159 this%PHASE_RHO(1:this%NBMAT,1:this%NSEG) = zero
160 this%HAS_PHASE_EINT = .true.
161 ALLOCATE(this%PHASE_EINT(this%NBMAT,this%NSEG))
162 this%PHASE_EINT(1:this%NBMAT,1:this%NSEG) = zero
163 ENDIF
164 ENDIF
165 END SUBROUTINE segvar_create
166
167 END MODULE segvar_mod
#define my_real
Definition cppsort.cpp:32
type(ale_) ale
Definition ale_mod.F:253
subroutine segvar_destroy(this)
Definition segvar_mod.F:101
subroutine segvar_create(this, nbmat)
Definition segvar_mod.F:119