OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
detcord0.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!|| detcord0 ../starter/source/initial_conditions/detonation/detcord0.F
25!||--- called by ------------------------------------------------------
26!|| read_dfs_detcord ../starter/source/initial_conditions/detonation/read_dfs_detcord.F
27!||--- uses -----------------------------------------------------
28!|| detonators_mod ../starter/share/modules1/detonators_mod.F
29!||====================================================================
30 SUBROUTINE detcord0(DETONATOR_CORD,ALT,X,VDET2,IOPT)
31C-----------------------------------------------
32C M o d u l e s
33C-----------------------------------------------
35C-----------------------------------------------
36C I m p l i c i t T y p e s
37C-----------------------------------------------
38#include "implicit_f.inc"
39C-----------------------------------------------
40C D u m m y A r g u m e n t s
41C-----------------------------------------------
42 INTEGER :: IOPT
43 my_real :: alt,vdet2,x(3,*)
44 TYPE(detonator_cord_struct_)::DETONATOR_CORD
45C-----------------------------------------------
46C L o c a l V a r i a b l e s
47C-----------------------------------------------
48 INTEGER :: J,I,NOD_ID,NNOD
49 my_real :: xlp1,xlp2,ylp1,ylp2,zlp1,zlp2,d,xl0,yl0,zl0
50C-----------------------------------------------
51C P r e - C o n d i t i o n
52C-----------------------------------------------
53 IF(iopt == 0) RETURN
54C-----------------------------------------------
55C S o u r c e L i n e s
56C-----------------------------------------------
57
58
59 nnod = detonator_cord%NUMNOD
60
61 IF(iopt == 1)THEN
62 detonator_cord%TDET_PATH(1) = alt
63 DO j=1,nnod-1
64 !first point
65 nod_id = detonator_cord%NODES(j)
66 xlp1 = x(1,nod_id)
67 ylp1 = x(2,nod_id)
68 zlp1 = x(3,nod_id)
69 !second point
70 nod_id = detonator_cord%NODES(j+1)
71 xlp2 = x(1,nod_id)
72 ylp2 = x(2,nod_id)
73 zlp2 = x(3,nod_id)
74 !distance P1-P2
75 xl0 = (xlp1-xlp2)
76 yl0 = (ylp1-ylp2)
77 zl0 = (zlp1-zlp2)
78 d = xl0**2 + yl0**2 + zl0**2
79 d = sqrt(d)
80 detonator_cord%TDET_PATH(j+1) = detonator_cord%TDET_PATH(j) + d/vdet2
81 ENDDO
82 ELSE
83 detonator_cord%TDET_PATH(1:nnod) = alt
84 ENDIF
85
86
87C-----------------------------------------------
88 RETURN
89 END
#define my_real
Definition cppsort.cpp:32
subroutine detcord0(detonator_cord, alt, x, vdet2, iopt)
Definition detcord0.F:31