OpenRadioss 2025.1.11
OpenRadioss project
Loading...
Searching...
No Matches
m37init.F File Reference
#include "implicit_f.inc"
#include "com04_c.inc"
#include "param_c.inc"
#include "vect01_c.inc"
#include "mvsiz_p.inc"

Go to the source code of this file.

Functions/Subroutines

subroutine m37init (ipm, pm, ngl, nuvar, uvar, uparam, x, mat, iparg, iform, ix, nix, iloadp, facload, gbuf, nel)

Function/Subroutine Documentation

◆ m37init()

subroutine m37init ( integer, dimension(npropmi,nummat) ipm,
pm,
integer, dimension(mvsiz) ngl,
integer nuvar,
uvar,
uparam,
x,
integer, dimension(mvsiz) mat,
integer, dimension(nparg) iparg,
integer iform,
integer, dimension(nix,*) ix,
integer nix,
integer, dimension(sizloadp,*), intent(in) iloadp,
dimension(lfacload,*), intent(in) facload,
type(g_bufel_), intent(inout), target gbuf,
integer, intent(in) nel )

Definition at line 29 of file m37init.F.

34C-----------------------------------------------
35C D e s c r i p t i o n
36C-----------------------------------------------
37C This subroutine is initializing cell based on law37
38C In case of /LOAD/HYDRO is attached to it then
39C Pressure is computed so that P(t=0) = P0 + DP
40C where DP=rho0.g.h
41C and h is signed distance from water/air free surface
42C which is defined by B and n in input
43C-----------------------------------------------
44C M o d u l e s
45C-----------------------------------------------
46 USE elbufdef_mod
47C-----------------------------------------------
48C I m p l i c i t T y p e s
49C-----------------------------------------------
50#include "implicit_f.inc"
51C-----------------------------------------------
52C C o m m o n B l o c k s
53C-----------------------------------------------
54#include "com04_c.inc"
55#include "param_c.inc"
56#include "vect01_c.inc"
57#include "mvsiz_p.inc"
58C-----------------------------------------------
59C D u m m y A r g u m e n t s
60C-----------------------------------------------
61 INTEGER :: IPM(NPROPMI,NUMMAT),NGL(MVSIZ) ,MAT(MVSIZ), IPARG(NPARG) ,IFORM,NIX,IX(NIX,*)
62 my_real :: pm(npropm,nummat),x(3,numnod), uvar(llt,nuvar)
63 INTEGER,INTENT(IN) :: ILOADP(SIZLOADP,*),NEL
64 my_real,INTENT(IN) :: facload(lfacload,*)
65 TYPE(G_BUFEL_), INTENT(INOUT),TARGET :: GBUF
66C-----------------------------------------------
67C L o c a l V a r i a b l e s
68C-----------------------------------------------
69 INTEGER :: I,J,NUVAR, GG1, GG2, GG3, ISFLUID,NL
70 INTEGER :: NPH,IFLG,IE,IADBUF,NUPARAM, M_UID,M_IID,IGRAV
71 my_real :: mfrac, a, mu1p1, mu1p2, rho1, rho2, rho10, rho20, c1, gam, pmin, p0, mu2p1, rho,p,a1,psh,depth,z(3)
72 my_real :: uparam(*),xbas,ybas,zbas,nx,ny,nz,grav, bz(3),dotprod, delta_p, rho0_liq,rho0_gas, rho_liq,rho_gas
73 my_real :: pold,height
74 my_real :: n(3,8)
75C-----------------------------------------------
76
77 !---------------------------------!
78 ! CELL INIT. (UVAR ARRAY) !
79 !---------------------------------!
80 !UVAR(I,1) : massic percentage of liquid * global density (rho1*V1/V : it needs to give liquid mass multiplying by element volume in aleconve.F)
81 !UVAR(I,2) : density of gas
82 !UVAR(I,3) : density of liquid
83 !UVAR(I,4) : volumetric fraction of liquid
84 !UVAR(I,5) : volumetric fraction of gas
85 DO i=lft,llt
86 ie = i+nft
87 c1 = uparam(4)
88 gam = uparam(5)
89 pmin = uparam(8)
90 p0 = uparam(9)
91 rho10 = uparam(11)
92 rho20 = uparam(12)
93 a1 = uparam(10)
94 p = -p0
95 rho = rho10 * a1 + (one-a1)*rho20
96 IF(gam*c1>=em30)THEN !if Liquid and gas correctly defined
97 mu1p1 = one !(P/C1+ONE)
98 mu2p1 = one !( ONE+P/P0)**(ONE/GAM)
99 rho1 = rho10*mu1p1
100 rho2 = rho20*mu2p1
101 a = (rho-rho2)/(rho1-rho2)
102 uvar(i,1) = a*rho1
103 uvar(i,2) = rho2
104 uvar(i,3) = rho1
105 uvar(i,4) = a
106 IF(uvar(i,4)<em20)uvar(i,4)=zero
107 uvar(i,5) = one-uvar(i,4)
108 !SOUNDSP(I) = A*SQRT(C1/RHO1) + (ONE-A) * SQRT(GAM*P0/RHO2) -> check sigeps37.F (starter)
109 ELSE !boundary element
110 uvar(i,3) = rho
111 ENDIF
112 ENDDO
113
114C-----------------------------------------------
115 RETURN
#define my_real
Definition cppsort.cpp:32