OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
sensor_gauge.F File Reference
#include "implicit_f.inc"
#include "param_c.inc"
#include "com08_c.inc"
#include "units_c.inc"
#include "comlock.inc"
#include "task_c.inc"
#include "lockon.inc"
#include "lockoff.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine sensor_gauge (sensor, gauge)

Function/Subroutine Documentation

◆ sensor_gauge()

subroutine sensor_gauge ( type (sensor_str_) sensor,
dimension(llgauge,*) gauge )

Definition at line 31 of file sensor_gauge.F.

32C-----------------------------------------------
33C M o d u l e s
34C-----------------------------------------------
35 USE sensor_mod
36C-----------------------------------------------
37C I m p l i c i t T y p e s
38C-----------------------------------------------
39#include "implicit_f.inc"
40C-----------------------------------------------
41C C o m m o n B l o c k s
42C-----------------------------------------------
43#include "param_c.inc"
44#include "com08_c.inc"
45#include "units_c.inc"
46#include "comlock.inc"
47#include "task_c.inc"
48C-----------------------------------------------
49C D u m m y A r g u m e n t s
50C-----------------------------------------------
51 my_real, DIMENSION(LLGAUGE,*) :: gauge
52 TYPE (SENSOR_STR_) :: SENSOR
53C----------------------------------------------------------
54C Local Variables
55C----------------------------------------------------------
56 INTEGER I,J,NGAUGE,IGAU,ICRIT
57c
58 my_real :: pmin,tmin,tstart,tdelay,infinity,maxp
59 parameter(infinity = 1.0e20)
60C=======================================================================
61 IF (sensor%STATUS == 1) RETURN ! already activated
62c
63 tdelay = sensor%TDELAY
64 ngauge = sensor%IPARAM(1)
65
66 j = 0
67 maxp = - infinity
68 DO i = 1,ngauge
69 icrit = 0
70 igau = sensor%IPARAM(i+1)
71 pmin = sensor%RPARAM(j+1)
72 tmin = sensor%RPARAM(j+2)
73 tstart = sensor%RPARAM(j+3)
74 IF (abs(gauge(30,igau)) > pmin) icrit = 1
75 IF(abs(gauge(30,igau)) > maxp) maxp = abs(gauge(30,igau))
76c----------------------------------------------------------------
77c check activation status
78c----------------------------------------------------------------
79 IF (sensor%TCRIT + tmin > tt) THEN
80 IF (icrit == 0) THEN
81 sensor%TCRIT = infinity
82 ELSE IF (sensor%TCRIT == infinity) THEN
83 sensor%TCRIT = min(sensor%TCRIT, tt)
84 END IF
85 ELSE IF (sensor%RPARAM(j+3) == infinity) THEN
86 sensor%RPARAM(j+3) = sensor%TCRIT + tmin + tdelay
87 END IF
88 IF (sensor%RPARAM(j+3) <= tt) THEN ! sensor activation
89 sensor%STATUS = 1
90 sensor%TSTART = sensor%RPARAM(j+3)
91 END IF
92c
93 IF (sensor%STATUS == 1 .and. ispmd == 0) THEN
94#include "lockon.inc"
95 WRITE (istdo,1100) sensor%SENS_ID,sensor%TSTART
96 WRITE (iout ,1100) sensor%SENS_ID,sensor%TSTART
97 WRITE (iout ,1200) pmin,abs(gauge(30,igau))
98#include "lockoff.inc"
99 ENDIF
100 j = j + 3
101 END DO
102 sensor%RESULTS(1) = maxp
103c-----------------------------------------------------------------------
1041100 FORMAT(' SENSOR NUMBER ',i10,' ,ACTIVATED AT TIME ',1pe12.5)
1051200 FORMAT(' TARGET PRESSURE = ',1pe12.5,/
106 . ' CURRENT PRESSURE AFTER TMIN AND TDELAY = ',1pe12.5)
107c-----------------------------------------------------------------------
108 RETURN
#define my_real
Definition cppsort.cpp:32
#define min(a, b)
Definition macros.h:20