Re: Windkessel outlet boundary condition
Posted: Thu May 20, 2021 8:30 pm
Hello Yvan
I am still making progress in the development of the BC. However, I figurd out that the flow given by the UDF makes no physical sense. The code (cs_user_BC.f90) is as follows :
here, sumpre is expected to be volumetric flow rate at the outlet and s_tot, the total surface area. However, the flow rate I get is quite small (E-13 m3/s) and the surface area is larger than the expected value.
Is there a good way to find what I am doing wrong here?
I am still making progress in the development of the BC. However, I figurd out that the flow given by the UDF makes no physical sense. The code (cs_user_BC.f90) is as follows :
Code: Select all
s_tot = 0.d0
sumpre = 0.d0
call getfbr('outlet', nlelt, lstelt)
do ilelt = 1, nlelt
ifac = lstelt(ilelt)
volden = bmasfl(ifac) / bpro_rho(ifac) * surfbn(ifac) ! flow = massflux/density*S
sumpre = sumpre+volden
s_tot = s_tot+surfbn(ifac)
enddo
print *, 'flow out', sumpre
print *, 'flow out', s_tot
Is there a good way to find what I am doing wrong here?