OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
fvtemp.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!|| fvtemp ../engine/source/airbag/fvtemp.F
25!||--- called by ------------------------------------------------------
26!|| fv_up_switch ../engine/source/airbag/fv_up_switch.F
27!|| fvbag1 ../engine/source/airbag/fvbag1.F
28!|| fvupd1 ../engine/source/airbag/fvupd.F
29!||--- uses -----------------------------------------------------
30!|| cast_mod ../common_source/modules/cast_mod.F90
31!||====================================================================
32 SUBROUTINE fvtemp(ITYP , EFAC_IN , CPA_IN , CPB_IN , CPC_IN ,
33 . CPD_IN , CPE_IN , CPF_IN , RMW_IN , TEMP0_IN,
34 . TEMP_IN )
35 USE cast_mod, ONLY : double_to_my_real
36C-----------------------------------------------
37C I m p l i c i t T y p e s
38C-----------------------------------------------
39#include "implicit_f.inc"
40C-----------------------------------------------
41C D u m m y A r g u m e n t s
42C-----------------------------------------------
43 INTEGER ITYP
44 my_real, intent(in) ::
45 . efac_in, cpa_in, cpb_in, cpc_in, cpd_in, cpe_in, cpf_in, rmw_in, temp0_in
46 my_real, intent(inout) :: temp_in
47C-----------------------------------------------
48C L o c a l V a r i a b l e s
49C-----------------------------------------------
50 INTEGER K
51 DOUBLE PRECISION :: CVA, HH, TEMP2, EFAC
52 DOUBLE PRECISION :: CPA, CPB, CPC, CPD, CPE, CPF, RMW, TEMP0, TEMP
53C-----------------------------------------------
54C S o u r c e L i n e s
55C-----------------------------------------------
56 cpa=cpa_in
57 cpb=cpb_in
58 cpc=cpc_in
59 cpd=cpd_in
60 cpe=cpe_in
61 cpf=cpf_in
62 rmw=rmw_in
63 temp0=temp0_in
64 temp=temp_in
65 efac = efac_in
66
67 IF(ityp == 6) THEN
68 cva=cpa-rmw
69 IF(cpc == zero) THEN
70 IF(cpb == zero) THEN
71 temp=efac/cva
72 ELSE IF( cpb .NE. zero) THEN
73 temp=(sqrt(max(zero,cva*cva+two*cpb*efac))-cva)/cpb
74 ELSE
75 temp = temp0
76 ENDIF
77 ELSE
78 temp=temp0
79 DO k=1,5
80 hh=cpa+half*cpb*temp+third*cpc*temp*temp
81 temp=efac/(hh-rmw)
82 ENDDO
83 ENDIF
84 ELSEIF(ityp == 8) THEN
85 temp=temp0
86 DO k=1,5
87 temp2=temp*temp
88 hh=cpa+half*cpb*temp+third*cpc*temp2+
89 . fourth*cpd*temp*temp2-cpe/temp2+one_fifth*cpf*temp2*temp2
90 IF( (hh-rmw) > zero) THEN
91 temp=efac/(hh-rmw)
92 ELSE
93 temp_in=zero
94 RETURN
95 ENDIF
96 ENDDO
97 ENDIF
98 ! TEMP__IN**4 will be used, so we need to limit the value TEMP_IN
99 ! to avoid overflow
100 ! in sp sqrt(sqrt(HUGE(TEMP_IN))) is 4.2E+9
101 ! in dp sqrt(sqrt(HUGE(TEMP_IN))) is 1.2E+77
102 temp_in = double_to_my_real(temp,max_value = sqrt(sqrt(huge(temp_in))))
103 RETURN
104 END
subroutine fvtemp(ityp, efac_in, cpa_in, cpb_in, cpc_in, cpd_in, cpe_in, cpf_in, rmw_in, temp0_in, temp_in)
Definition fvtemp.F:35
#define max(a, b)
Definition macros.h:21