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

Go to the source code of this file.

Functions/Subroutines

subroutine fvtemp (ityp, efac_in, cpa_in, cpb_in, cpc_in, cpd_in, cpe_in, cpf_in, rmw_in, temp0_in, temp_in)

Function/Subroutine Documentation

◆ fvtemp()

subroutine fvtemp ( integer ityp,
intent(in) efac_in,
intent(in) cpa_in,
intent(in) cpb_in,
intent(in) cpc_in,
intent(in) cpd_in,
intent(in) cpe_in,
intent(in) cpf_in,
intent(in) rmw_in,
intent(in) temp0_in,
intent(inout) temp_in )

Definition at line 32 of file fvtemp.F.

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
#define my_real
Definition cppsort.cpp:32
#define max(a, b)
Definition macros.h:21