OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
sensor_time.F File Reference
#include "implicit_f.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_time (sensor, time, timestep)

Function/Subroutine Documentation

◆ sensor_time()

subroutine sensor_time ( type (sensor_str_), intent(inout) sensor,
intent(in) time,
intent(in) timestep )

Definition at line 32 of file sensor_time.F.

33C-----------------------------------------------
34C M o d u l e s
35C-----------------------------------------------
36 USE sensor_mod
37C-----------------------------------------------
38C I m p l i c i t T y p e s
39C-----------------------------------------------
40#include "implicit_f.inc"
41C-----------------------------------------------
42C C o m m o n B l o c k s
43C-----------------------------------------------
44#include "units_c.inc"
45#include "comlock.inc"
46#include "task_c.inc"
47C-----------------------------------------------
48C D u m m y A r g u m e n t s
49C-----------------------------------------------
50 my_real ,INTENT(IN) :: time,timestep
51 TYPE (SENSOR_STR_) ,INTENT(INOUT) :: SENSOR
52C----------------------------------------------------------
53C Local Variables
54C----------------------------------------------------------
55 INTEGER :: NSENS
56 my_real :: tdelay,tstop
57 DOUBLE PRECISION :: TDELAY_DP,TSTOP_DP,NEXT_CYCLE
58C=======================================================================
59 nsens = sensor%SENS_ID
60 tdelay = sensor%TDELAY
61 tstop = sensor%VALUE
62 next_cycle = time + timestep
63 tdelay_dp = tdelay
64 tstop_dp = tstop
65c
66 IF (next_cycle >= tdelay_dp .AND. sensor%STATUS == 0) THEN
67 sensor%STATUS = 1
68 sensor%TSTART = tdelay
69 IF (ispmd == 0) THEN
70#include "lockon.inc"
71 WRITE (iout ,1000) sensor%SENS_ID,tdelay
72 WRITE (istdo,1000) sensor%SENS_ID,tdelay
73#include "lockoff.inc"
74 ENDIF
75 ELSE IF (next_cycle >= tstop_dp .AND. sensor%STATUS == 1) THEN
76 sensor%STATUS = 0
77 sensor%TSTART = infinity
78 sensor%TDELAY = infinity
79 IF (ispmd == 0) THEN
80#include "lockon.inc"
81 WRITE (iout ,2000) sensor%SENS_ID,tstop
82 WRITE (istdo,2000) sensor%SENS_ID,tstop
83#include "lockoff.inc"
84 ENDIF
85 ENDIF
86c-----------------------------------------------------------------------
871000 FORMAT(' SENSOR (TIME) NUMBER ',i10,' ACTIVATED AT TIME ',1pe12.5)
882000 FORMAT(' SENSOR (TIME) NUMBER ',i10,' DESACTIVATED AT TIME ',1pe12.5)
89c-----------
90 RETURN
#define my_real
Definition cppsort.cpp:32