OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
read_sensor_rwall.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!|| read_sensor_rwall ../starter/source/tools/sensor/read_sensor_rwall.F
25!||--- called by ------------------------------------------------------
26!|| hm_read_sensors ../starter/source/tools/sensor/hm_read_sensors.F
27!||--- calls -----------------------------------------------------
28!|| ancmsg ../starter/source/output/message/message.F
29!|| hm_get_floatv ../starter/source/devtools/hm_reader/hm_get_floatv.F
30!|| hm_get_intv ../starter/source/devtools/hm_reader/hm_get_intv.F
31!|| hm_get_string ../starter/source/devtools/hm_reader/hm_get_string.F
32!||--- uses -----------------------------------------------------
33!|| hm_option_read_mod ../starter/share/modules1/hm_option_read_mod.F
34!|| message_mod ../starter/share/message_module/message_mod.F
35!|| submodel_mod ../starter/share/modules1/submodel_mod.F
36!||====================================================================
37 SUBROUTINE read_sensor_rwall(SENSOR_PTR ,SENS_ID ,TITR ,
38 . UNITAB ,LSUBMODEL )
39C-----------------------------------------------
40C M o d u l e s
41C-----------------------------------------------
42 USE unitab_mod
43 USE message_mod
44 USE submodel_mod
45 USE sensor_mod
48C-----------------------------------------------
49C I m p l i c i t T y p e s
50C-----------------------------------------------
51#include "implicit_f.inc"
52C-----------------------------------------------
53C C o m m o n B l o c k s
54C-----------------------------------------------
55#include "units_c.inc"
56C-----------------------------------------------
57C D u m m y A r g u m e n t s
58C-----------------------------------------------
59 INTEGER ,INTENT(IN) :: SENS_ID
60 CHARACTER(LEN=NCHARTITLE)::TITR
61 TYPE (SENSOR_STR_) :: SENSOR_PTR
62 TYPE (SUBMODEL_DATA) ,DIMENSION(NSUBMOD) :: LSUBMODEL
63 TYPE (UNIT_TYPE_) ,INTENT(IN) :: UNITAB
64C-----------------------------------------------
65C L o c a l V a r i a b l e s
66C-----------------------------------------------
67 INTEGER :: RWALL_ID,IDIR,NPARIS,NPARRS,NVAR,SENS_TYPE
68 my_real :: tdel,tmin,fmin,fmax
69 CHARACTER(LEN=NCHARKEY) :: DIR
70 LOGICAL :: IS_AVAILABLE
71C--------------------------------
72C SENSOR BASED ON RIGID WALL FORCE
73C=======================================================================
74 is_available = .false.
75 sens_type = 7
76c--------------------------------------------------
77card1
78 CALL hm_get_floatv('Tdelay' ,tdel ,is_available,lsubmodel,unitab)
79card2
80 CALL hm_get_intv ('RWALL_ID' ,rwall_id ,is_available,lsubmodel)
81 CALL hm_get_string('DIR ' ,dir ,ncharfield,is_available)
82 CALL hm_get_floatv('Fmin' ,fmin ,is_available,lsubmodel,unitab)
83 CALL hm_get_floatv('Fmax' ,fmax ,is_available,lsubmodel,unitab)
84 CALL hm_get_floatv('Tmin' ,tmin ,is_available,lsubmodel,unitab)
85c--------------------------------------------------
86c Check input data
87c--------------------------------------------------
88 idir = 0
89 IF (dir(1:1) == 'X' .OR. dir(1:1) == 'x') idir=1
90 IF (dir(1:1) == 'Y' .OR. dir(1:1) == 'Y') idir=2
91 IF (dir(1:1) == 'Z' .OR. dir(1:1) == 'Z') idir=4
92 IF (dir(1:2) == 'NF' .OR. dir(1:2) == 'nf') idir=5
93 IF (dir(1:2) == 'FN' .OR. dir(1:2) == 'fn') idir=5
94 IF (dir(1:2) == 'TF' .OR. dir(1:2) == 'tf') idir=6
95 IF (dir(1:2) == 'FT' .OR. dir(1:2) == 'ft') idir=6
96 IF (idir == 0 .AND. len_trim(dir) /= 0 ) THEN
97 CALL ancmsg(msgid=1594, msgtype=msgerror, anmode=aninfo_blind,
98 . i1=sens_id, c1=titr, c2=dir)
99 END IF
100c--------------------------------------------------
101c
102 sensor_ptr%TYPE = sens_type
103 sensor_ptr%SENS_ID = sens_id
104 sensor_ptr%STATUS = 0 ! status = deactivated
105 sensor_ptr%TSTART = infinity
106 sensor_ptr%TCRIT = infinity
107 sensor_ptr%TMIN = tmin
108 sensor_ptr%TDELAY = tdel ! time delay before activation
109 sensor_ptr%VALUE = zero
110
111 nparis = 2
112 nparrs = 2
113 nvar = 0
114c
115 sensor_ptr%NPARI = nparis
116 sensor_ptr%NPARR = nparrs
117 sensor_ptr%NVAR = nvar
118c
119 ALLOCATE (sensor_ptr%IPARAM(nparis))
120 ALLOCATE (sensor_ptr%RPARAM(nparrs))
121 ALLOCATE (sensor_ptr%VAR(nvar))
122 sensor_ptr%VAR(:) = zero
123
124 sensor_ptr%IPARAM(1) = rwall_id
125 sensor_ptr%IPARAM(2) = idir
126
127 sensor_ptr%RPARAM(1) = fmin
128 sensor_ptr%RPARAM(2) = fmax
129c------------------------------------------------------------
130 WRITE (iout, 1000) sens_id,tdel
131 WRITE (iout, 2000) rwall_id,fmin,fmax,tmin,dir(1:len_trim(dir))
132c------------------------------------------------------------
133 1000 FORMAT(
134 . 5x,' SENSOR TYPE 7: RIGID WALL FORCE '/,
135 . 5x,' ------------------------------- '/,
136 . 5x,'SENSOR ID. . . . . . . . . . . . . . . . .=',i10/
137 . 5x,'TIME DELAY BEFORE ACTIVATION . . . . . . .=',e12.4)
138 2000 FORMAT(
139 . 5x,' RIGID WALL ID . . . . . . . . . . . . .=',i10/
140 . 5x,' FORCE MIN . . . . . . . . . . . . . . .=',e12.4/
141 . 5x,' FORCE MAX . . . . . . . . . . . . . . .=',e12.4/
142 . 5x,' MIN DURATION LIMIT. . . . . . . . . . .=',e12.4/
143 . 5x,' FORCE DIRECTION . . . . . . . . . . . .=',2x,a/)
144c-----------
145 RETURN
146 END
#define my_real
Definition cppsort.cpp:32
subroutine hm_get_floatv(name, rval, is_available, lsubmodel, unitab)
subroutine hm_get_intv(name, ival, is_available, lsubmodel)
subroutine hm_get_string(name, sval, size, is_available)
integer, parameter nchartitle
integer, parameter ncharkey
integer, parameter ncharfield
subroutine read_sensor_rwall(sensor_ptr, sens_id, titr, unitab, lsubmodel)
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