OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
freupwind.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!|| freupwind ../engine/source/input/freupwind.F
25!||--- called by ------------------------------------------------------
26!|| freform ../engine/source/input/freform.F
27!||--- calls -----------------------------------------------------
28!|| ancmsg ../engine/source/output/message/message.F
29!|| arret ../engine/source/system/arret.F
30!|| wriusc2 ../engine/source/input/wriusc2.F
31!||--- uses -----------------------------------------------------
32!|| ale_mod ../common_source/modules/ale/ale_mod.F
33!|| message_mod ../engine/share/message_module/message_mod.F
34!||====================================================================
35 SUBROUTINE freupwind(IKAD,KEY0,KUPWM)
36C-----------------------------------------------
37C M o d u l e s
38C-----------------------------------------------
39 USE message_mod
40 USE ale_mod
41C-----------------------------------------------
42C I m p l i c i t T y p e s
43C-----------------------------------------------
44#include "implicit_f.inc"
45C-----------------------------------------------
46C D u m m y A r g u m e n t s
47C-----------------------------------------------
48 INTEGER IKAD(0:*),KUPWM
49 CHARACTER KEY0(*)*5
50C-----------------------------------------------
51C C o m m o n B l o c k s
52C-----------------------------------------------
53#include "units_c.inc"
54C-----------------------------------------------
55C L o c a l V a r i a b l e s
56C-----------------------------------------------
57 INTEGER IKEY
58C-----------------------------------------------
59C D e s c r i p t i o n
60C-----------------------------------------------
61C This subrouting is reading updated coefficient eta1 eta2 eta3
62C initially defined with starter card /UPWIND or from previous run
63C with engine card /UPWIND
64C Additional details
65 ! ALE%UPWIND%UPWSM2 : READ HERE BUT UPDATED IN LECTUR.F FOR ALE PRINTOUT UPWSM=UPWSM2
66 ! ALE%UPWIND%UPWMG : READ HERE BUT UPDATED IN LECTUR.F FOR ALE PRINTOUT PM(15,IMAT)=UPWMG2
67 ! ALE%UPWIND%UPWOG : READ HERE BUT UPDATED IN LECTUR.F FOR ALE PRINTOUT PM(16,IMAT)=UPWOG2
68C
69 ! ALE%UPWIND%UPW_UPDATE == 1 : ENGINE /UPWIND CARD DETECTED
70 ! ALE%UPWIND%UPW_UPDATE == 2 : /UPWIND CARD IS CHANGING AT LEAST ONE PARAMETER
71 ! ALE%UPWIND%UPW_UPDATE modified in lectur.F (checking change for 1st and 2nd parameter)
72C-----------------------------------------------
73 ale%UPWIND%UPW_UPDATE = 0 !now initialized in freform.F because SUPG is default option
74 ale%UPWIND%UPWMG2 = 0 !now initialized in freform.F because SUPG is default option
75 ale%UPWIND%UPWOG2 = 0
76 ale%UPWIND%UPWSM2 = 0
77 ikey=kupwm
78 IF(ikad(ikey)/=ikad(ikey+1))THEN
79 CALL wriusc2(ikad(ikey)+1,1,key0(ikey))
80 READ(iusc2,*,err=9990)ale%UPWIND%UPWMG2, ale%UPWIND%UPWOG2, ale%UPWIND%UPWSM2
81
82 ale%UPWIND%UPW_UPDATE = 1
83
84 IF(ale%UPWIND%UPWMG2==zero)ale%UPWIND%UPWMG2=one
85 IF(ale%UPWIND%UPWOG2==zero)ale%UPWIND%UPWOG2=one
86 IF(ale%UPWIND%UPWSM2==zero)ale%UPWIND%UPWSM2=one
87
88 !Upwind coefficient for Momentum Advection
89 IF(ale%UPWIND%UPWMG2<=zero .OR. ale%UPWIND%UPWMG2>one)THEN
90 WRITE(istdo,*)' ** ERROR IN CARD /UPWIND'
91 WRITE(istdo,*)' MOMENTUM COEFFICIENT IS OUT OF BOUNDS [0,1]'
92 CALL arret(2)
93 ENDIF
94
95 !Upwind coefficient for Mass and Energy Advection
96 IF(ale%UPWIND%UPWOG2<zero.OR.ale%UPWIND%UPWOG2>one)THEN
97 WRITE(istdo,*)' ** ERROR IN CARD /UPWIND'
98 WRITE(istdo,*)' MASS & ENERGY COEFFICIENT IS OUT OF BOUNDS [0,1]'
99 CALL arret(2)
100 ENDIF
101
102 !Upwind coefficient for Wet Surface (Mulimaterial specific advection)
103 IF(ale%UPWIND%UPWSM2<-one.OR.ale%UPWIND%UPWSM2>one)THEN
104 WRITE(istdo,*)' ** ERROR IN CARD /UPWIND'
105 WRITE(istdo,*)' WET SURFACE COEFFICIENT IS OUT OF BOUNDS [-1,1]'
106 CALL arret(2)
107 ENDIF
108
109 ENDIF
110
111 RETURN
112
113 9990 CONTINUE
114 CALL ancmsg(msgid=73,anmode=aninfo,c1=key0(ikey))
115 CALL arret(0)
116 END
subroutine freupwind(ikad, key0, kupwm)
Definition freupwind.F:36
type(ale_) ale
Definition ale_mod.F:249
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
subroutine arret(nn)
Definition arret.F:87
subroutine wriusc2(irec, nbc, key0)
Definition wriusc2.F:60