OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
detcord0.F File Reference
#include "implicit_f.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine detcord0 (detonator_cord, alt, x, vdet2, iopt)

Function/Subroutine Documentation

◆ detcord0()

subroutine detcord0 ( type(detonator_cord_struct_) detonator_cord,
alt,
x,
vdet2,
integer iopt )

Definition at line 30 of file detcord0.F.

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
#define my_real
Definition cppsort.cpp:32