OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
sensor_energy_bilan.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!||====================================================================
25!|| sensor_energy_bilan ../engine/source/tools/sensor/sensor_energy_bilan.F
26!||--- called by ------------------------------------------------------
27!|| c3bilan ../engine/source/elements/sh3n/coque3n/c3bilan.F
28!|| cbilan ../engine/source/elements/shell/coque/cbilan.F
29!|| ige3dbilan ../engine/source/elements/ige3d/ige3dbilan.F
30!|| pbilan ../engine/source/elements/beam/pbilan.F
31!|| qbilan ../engine/source/elements/solid_2d/quad/qbilan.F
32!|| r3bilan ../engine/source/elements/spring/r3bilan.F
33!|| r5bilan ../engine/source/elements/spring/r5bilan.F
34!|| rbilan ../engine/source/elements/spring/rbilan.F
35!|| s10bilan ../engine/source/elements/solid/solide10/s10bilan.F
36!|| s16bilan ../engine/source/elements/thickshell/solide16/s16bilan.F
37!|| s20bilan ../engine/source/elements/solid/solide20/s20bilan.F
38!|| s4bilan ../engine/source/elements/solid/solide4/s4bilan.F
39!|| s6cbilan ../engine/source/elements/thickshell/solide6c/s6cbilan.F
40!|| s8bilan ../engine/source/elements/solid/solide8/s8bilan.F
41!|| sbilan ../engine/source/elements/solid/solide/sbilan.F
42!|| sr8bilan ../engine/source/elements/solid/solide8/sr8bilan.F
43!|| srbilan ../engine/source/elements/solid/solide/srbilan.F
44!|| tbilan ../engine/source/elements/truss/tbilan.F
45!||--- calls -----------------------------------------------------
46!|| sum_6_float ../engine/source/system/parit.F
47!||--- uses -----------------------------------------------------
48!|| sensor_mod ../common_source/modules/sensor_mod.F90
49!||====================================================================
50 SUBROUTINE sensor_energy_bilan(JFT,JLT,EI,EK,OFF,IPART,ITASK,SENSORS)
51C-----------------------------------------------
52C M o d u l e s
53C-----------------------------------------------
54 USE sensor_mod
55C-----------------------------------------------
56C I m p l i c i t T y p e s
57C-----------------------------------------------
58#include "implicit_f.inc"
59C-----------------------------------------------
60C G l o b a l P a r a m e t e r s
61C-----------------------------------------------
62#include "mvsiz_p.inc"
63C-----------------------------------------------
64C C o m m o n B l o c k s
65C-----------------------------------------------
66#include "parit_c.inc"
67C-----------------------------------------------
68C D u m m y A r g u m e n t s
69C-----------------------------------------------
70 INTEGER, INTENT(in) :: JFT,JLT
71 INTEGER, INTENT(in) :: ITASK
72 INTEGER, DIMENSION(*), INTENT(in) :: IPART
73C REAL
74 my_real, DIMENSION(*), INTENT(in) :: ei,ek
75 my_real, DIMENSION(*), INTENT(in) :: off
76 type (sensors_),INTENT(INOUT) :: SENSORS
77C-----------------------------------------------
78C L o c a l V a r i a b l e s
79C-----------------------------------------------
80 INTEGER I,MX,II,J,IC,NEL,IJK
81 INTEGER :: K,IPART_SENS,LOCAL_INDEX
82 my_real, DIMENSION(MVSIZ,2) :: fstparit
83 INTEGER :: NGR_SENSOR
84C-----------------------------------------------
85 ngr_sensor=sensors%NGR_SENSOR(itask+1)
86 IF(iparit>0) THEN
87 IF(sensors%SENS_GROUP(ngr_sensor)%NUM_PART>0) THEN
88 IF(sensors%SENS_GROUP(ngr_sensor)%NUM_PART==1) THEN
89 DO i=jft,jlt
90 IF( off(i)/=zero ) THEN
91 fstparit(i,1) = ei(i)
92 fstparit(i,2) = ek(i)
93 ELSE
94 fstparit(i,1) = zero
95 fstparit(i,2) = zero
96 ENDIF
97 ENDDO
98 nel = jlt-jft+1
99 k = sensors%SENS_GROUP(ngr_sensor)%PART(1,3) ! id of the sensor
100 ijk = itask+1
101 CALL sum_6_float(1,nel,fstparit(1,1),sensors%SENSOR_STRUCT(k)%FBSAV6_SENS(1,1,ijk),2)
102 CALL sum_6_float(1,nel,fstparit(1,2),sensors%SENSOR_STRUCT(k)%FBSAV6_SENS(2,1,ijk),2)
103 ELSEIF(sensors%SENS_GROUP(ngr_sensor)%NUM_PART>1) THEN
104
105 DO j=1,sensors%SENS_GROUP(ngr_sensor)%NUM_PART
106 ipart_sens = sensors%SENS_GROUP(ngr_sensor)%PART(j,1) ! id of the part linked to the sensor
107 local_index = 0
108 DO i=jft,jlt
109 mx=ipart(i)
110 IF( (ipart_sens==mx).AND.(off(i)/=zero) ) THEN
111 local_index = local_index + 1
112 fstparit(local_index,1) = ei(i)
113 fstparit(local_index,2) = ek(i)
114 ENDIF
115 ENDDO
116
117 k = sensors%SENS_GROUP(ngr_sensor)%PART(j,3) ! id of the sensor
118 ijk = itask+1
119 CALL sum_6_float(1,local_index,fstparit(1,1),sensors%SENSOR_STRUCT(k)%FBSAV6_SENS(1,1,ijk),2)
120 CALL sum_6_float(1,local_index,fstparit(1,2),sensors%SENSOR_STRUCT(k)%FBSAV6_SENS(2,1,ijk),2)
121 ENDDO
122 ENDIF
123 ENDIF
124 ENDIF
125C---
126 RETURN
127 END SUBROUTINE sensor_energy_bilan
#define my_real
Definition cppsort.cpp:32
subroutine sum_6_float(jft, jlt, f, f6, n)
Definition parit.F:64
subroutine sensor_energy_bilan(jft, jlt, ei, ek, off, ipart, itask, sensors)