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

Go to the source code of this file.

Functions/Subroutines

subroutine read_sensor_gauge (sensor_ptr, sens_id, titr, lgauge, unitab, lsubmodel)

Function/Subroutine Documentation

◆ read_sensor_gauge()

subroutine read_sensor_gauge ( type (sensor_str_) sensor_ptr,
integer, intent(in) sens_id,
character(len=nchartitle) titr,
integer, dimension(3,*), intent(in) lgauge,
type (unit_type_), intent(in) unitab,
type (submodel_data), dimension(nsubmod) lsubmodel )

Definition at line 38 of file read_sensor_gauge.F.

40C-----------------------------------------------
41C M o d u l e s
42C-----------------------------------------------
43 USE unitab_mod
44 USE message_mod
45 USE submodel_mod
46 USE sensor_mod
49C-----------------------------------------------
50C I m p l i c i t T y p e s
51C-----------------------------------------------
52#include "implicit_f.inc"
53C-----------------------------------------------
54C C o m m o n B l o c k s
55C-----------------------------------------------
56#include "com04_c.inc"
57#include "units_c.inc"
58C-----------------------------------------------
59C D u m m y A r g u m e n t s
60C-----------------------------------------------
61 INTEGER ,INTENT(IN) :: SENS_ID
62 INTEGER ,DIMENSION(3,*) ,INTENT(IN) :: LGAUGE
63 CHARACTER(LEN=NCHARTITLE)::TITR
64 TYPE (SENSOR_STR_) :: SENSOR_PTR
65 TYPE (SUBMODEL_DATA) ,DIMENSION(NSUBMOD) :: LSUBMODEL
66 TYPE (UNIT_TYPE_) ,INTENT(IN) ::UNITAB
67C-----------------------------------------------
68C L o c a l V a r i a b l e s
69C-----------------------------------------------
70 INTEGER :: I,J,NGAU,NPARIS,NPARRS,NVAR,SENS_TYPE
71 my_real :: tdel
72 INTEGER ,DIMENSION(6) :: IGAU,G_ID
73 my_real ,DIMENSION(6) :: pres,tmin
74 LOGICAL :: IS_AVAILABLE
75C--------------------------------
76C SENSOR : PRESSURE GAUGE LIST
77C=======================================================================
78 is_available = .false.
79 sens_type = 10
80c--------------------------------------------------
81card1
82 CALL hm_get_floatv('Tdelay' ,tdel ,is_available,lsubmodel,unitab)
83card2
84 CALL hm_get_intv ('NIP' ,ngau ,is_available,lsubmodel)
85card3...
86 DO i=1,min(ngau,6)
87 CALL hm_get_int_array_index ('GaugeArrayIds',g_id(i),i,is_available,lsubmodel)
88 CALL hm_get_float_array_index('Fporp' ,pres(i),i,is_available,lsubmodel,unitab)
89 CALL hm_get_float_array_index('Fport' ,tmin(i),i,is_available,lsubmodel,unitab)
90 ENDDO
91c--------------------------------------------------
92 IF (ngau > 6) THEN
93 CALL ancmsg(msgid=833, msgtype=msgerror, anmode=aninfo, i1=sens_id,c1=titr)
94 ENDIF
95c
96 DO i=1,ngau
97 igau(i) = 0
98 DO j = 1,nbgauge
99 IF (g_id(i) == lgauge(2,j)) THEN
100 igau(i) = j
101 EXIT
102 ENDIF
103 ENDDO
104 IF (igau(i) == 0) THEN
105 CALL ancmsg(msgid=834, msgtype=msgerror, anmode=aninfo_blind_2,
106 . i1=sens_id, c1=titr)
107 EXIT
108 END IF
109 ENDDO
110c--------------------------------------------------
111c
112 sensor_ptr%TYPE = sens_type
113 sensor_ptr%SENS_ID = sens_id
114 sensor_ptr%STATUS = 0 ! status = deactivated
115 sensor_ptr%TSTART = infinity
116 sensor_ptr%TCRIT = infinity
117 sensor_ptr%TMIN = zero ! TMIN global
118 sensor_ptr%TDELAY = tdel ! time delay before activation
119 sensor_ptr%VALUE = zero
120
121 nparis = ngau + 1
122 nparrs = ngau * 3
123 nvar = 0
124c
125 sensor_ptr%NPARI = nparis
126 sensor_ptr%NPARR = nparrs
127 sensor_ptr%NVAR = nvar
128c
129 ALLOCATE (sensor_ptr%IPARAM(nparis))
130 ALLOCATE (sensor_ptr%RPARAM(nparrs))
131 ALLOCATE (sensor_ptr%VAR(nvar))
132 sensor_ptr%VAR(:) = zero
133c
134 sensor_ptr%IPARAM(1) = ngau
135 DO i = 1,ngau
136 sensor_ptr%IPARAM(i+1) = igau(i)
137 END DO
138 j = 0
139 DO i = 1,ngau
140 sensor_ptr%RPARAM(j+1) = pres(i)
141 sensor_ptr%RPARAM(j+2) = tmin(i)
142 sensor_ptr%RPARAM(j+3) = infinity
143 j = j+3
144 END DO
145c------------------------------------------------------------
146 WRITE(iout, 1000) sens_id,tdel
147 WRITE(iout, 2000) ngau
148 DO i = 1,ngau
149 WRITE(iout, 3000) g_id(i),pres(i),tmin(i)
150 END DO
151c------------------------------------------------------------
152 1000 FORMAT(
153 . 5x,' SENSOR TYPE 10: PRESSURE GAUGE '/,
154 . 5x,' ------------------------------ '/,
155 . 5x,'SENSOR ID. . . . . . . . . . . . . . . . .=',i10/
156 . 5x,'TIME DELAY BEFORE ACTIVATION . . . . . . .=',e12.4)
157 2000 FORMAT(
158 . 5x,'NUMBER OF GAUGES . . . . . . . . . . . . .=',i10)
159 3000 FORMAT(
160 . 5x,' GAUGE ID . . . . . . . . . . . . . . .=',i10/
161 . 5x,' MIN PRESSURE FOR ACTIVATION . . . . . .=',e12.4/
162 . 5x,' MINIMUM PRES. DURATION FOR ACTIVATION .=',e12.4/)
163c-----------
164 RETURN
#define my_real
Definition cppsort.cpp:32
subroutine hm_get_float_array_index(name, rval, index, is_available, lsubmodel, unitab)
subroutine hm_get_floatv(name, rval, is_available, lsubmodel, unitab)
subroutine hm_get_int_array_index(name, ival, index, is_available, lsubmodel)
subroutine hm_get_intv(name, ival, is_available, lsubmodel)
#define min(a, b)
Definition macros.h:20
integer, parameter nchartitle
integer function nvar(text)
Definition nvar.F:32
subroutine ancmsg(msgid, msgtype, anmode, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, r1, r2, r3, r4, r5, r6, r7, r8, r9, c1, c2, c3, c4, c5, c6, c7, c8, c9, prmode)
Definition message.F:889