OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
volp_lfluid.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!|| volp_lfluid ../engine/source/airbag/volp_lfluid.F
25!||--- called by ------------------------------------------------------
26!|| monvol0 ../engine/source/airbag/monvol0.F
27!||--- uses -----------------------------------------------------
28!|| finter_mixed_mod ../engine/source/tools/finter_mixed.F90
29!|| output_mod ../common_source/modules/output/output_mod.f90
30!|| python_funct_mod ../common_source/modules/python_mod.F90
31!||====================================================================
32 SUBROUTINE volp_lfluid(IVOLU, RVOLU, VOL, FSAV, NPC, TF, PMAIN, OUTPUT,PYTHON, NFUNCT)
33C-----------------------------------------------
34C M o d u l e s
35C-----------------------------------------------
36 USE python_funct_mod
37 USE finter_mixed_mod
38 USE output_mod , ONLY : output_
39C-----------------------------------------------
40C I m p l i c i t T y p e s
41C-----------------------------------------------
42#include "implicit_f.inc"
43C-----------------------------------------------
44C C o m m o n B l o c k s
45C-----------------------------------------------
46#include "com06_c.inc"
47#include "com08_c.inc"
48#include "task_c.inc"
49C-----------------------------------------------
50C D u m m y A r g u m e n t s
51C-----------------------------------------------
52 INTEGER NPC(*),IVOLU(*), PMAIN
53 my_real tf(*), rvolu(*), fsav(*), vol
54 TYPE(OUTPUT_),INTENT(INOUT) :: OUTPUT
55 TYPE(python_), intent(inout) :: PYTHON
56 INTEGER, intent(in) :: NFUNCT
57C-----------------------------------------------
58C L o c a l V a r i a b l e s
59C-----------------------------------------------
60 INTEGER IFUNCT
61
62 my_real p0, vol0, area, veps, vinc, pold, pext, vold, pres, q, qold, dv, xfun
63 my_real scalef, bulk, pmax, gmass, dmass, rhoi
64C-----------------------------------------------
65C S o u r c e L i n e s
66C-----------------------------------------------
67
68 !pressure calculation
69 pext = rvolu(3)
70 vol0 = rvolu(4)
71 vinc = rvolu(5)
72 pold = rvolu(12)
73 vold = rvolu(16)
74 veps = rvolu(17)
75 area = rvolu(18)
76 qold = rvolu(23)
77 gmass = rvolu(20)
78 rhoi = rvolu(34)
79
80C BULK
81 ifunct = ivolu(21)
82 scalef = rvolu(35)
83 IF(ifunct == 0) THEN
84 bulk = scalef
85 ELSE
86 bulk = scalef * finter_mixed(python,nfunct,ifunct,tt,npc,tf)
87 ENDIF
88
89C FLUID MASS IN
90 ifunct = ivolu(22)
91 scalef = rvolu(36)
92 IF(ifunct == 0) THEN
93 dmass = scalef * dt1
94 ELSE
95 dmass = scalef * finter_mixed(python,nfunct,ifunct,tt,npc,tf) * dt1
96 ENDIF
97 gmass = gmass + dmass
98 rvolu(54)=rvolu(54)+dmass
99
100C FLUID MASS OUT (time)
101 ifunct = ivolu(23)
102 scalef = rvolu(37)
103 IF(ifunct == 0) THEN
104 dmass = scalef * dt1
105 ELSE
106 dmass = scalef * finter_mixed(python,nfunct,ifunct,tt,npc,tf) * dt1
107 ENDIF
108 gmass = gmass - dmass
109
110C FLUID MASS OUT (pressure)
111 ifunct = ivolu(24)
112 scalef = rvolu(38)
113 IF(ifunct == 0) THEN
114 dmass = scalef * dt1
115 ELSE
116 dmass = scalef * finter_mixed(python,nfunct,ifunct,pold,npc,tf) * dt1
117 ENDIF
118 gmass = gmass - dmass
119
120C P0
121 ifunct = ivolu(25)
122 scalef = rvolu(39)
123 IF(ifunct == 0) THEN
124 p0 = scalef
125 ELSE
126 p0 = scalef * finter_mixed(python,nfunct,ifunct,tt,npc,tf)
127 ENDIF
128
129C PMAX
130 ifunct = ivolu(26)
131 scalef = rvolu(40)
132 IF(ifunct == 0) THEN
133 pmax = scalef
134 ELSE
135 pmax = scalef * finter_mixed(python,nfunct,ifunct,tt,npc,tf)
136 ENDIF
137
138 vol0 = gmass / rhoi
139 vol = vol + veps
140 xfun = (vol0-vinc)/(vol-vinc)
141 pres = bulk * max(zero,log(xfun)) + p0
142 pres = min(pres,pmax)
143 q = zero
144
145 IF (ispmd+1==pmain) THEN
146 dv=vol-vold
147 output%TH%WFEXT=output%TH%WFEXT+(half*(q+qold+pres+pold))*dv
148 fsav(1)=gmass
149 fsav(2)=vol
150 fsav(3)=pres
151 fsav(4)=area
152 fsav(5)=zero
153 fsav(6)=zero
154 fsav(7)=zero
155 fsav(8)=zero
156 fsav(9)=zero
157 fsav(10)=zero
158 fsav(11)=zero
159 fsav(12)=zero
160 fsav(13)=zero
161 fsav(14)=zero
162 fsav(15)=rvolu(54)
163 fsav(16)=zero
164 ENDIF
165C
166 rvolu(16)=vol
167 rvolu(12)=pres
168 rvolu(20)=gmass
169 rvolu(23)=q
170C
171 RETURN
172 END
#define my_real
Definition cppsort.cpp:32
subroutine area(d1, x, x2, y, y2, eint, stif0)
#define min(a, b)
Definition macros.h:20
#define max(a, b)
Definition macros.h:21
subroutine volp_lfluid(ivolu, rvolu, vol, fsav, npc, tf, pmain, output, python, nfunct)
Definition volp_lfluid.F:33