Page 1 of 1

How to set the pressure inlet boundary conditions in version 4.0?

Posted: Wed Mar 17, 2021 12:02 pm
by yhuang
hello,
How to set the pressure inlet boundary conditions in version 4.0?
The case is an incompressible fluid. I want to fix total pressure of the inlet and static pressure of the outlet.
thanks!

Re: How to set the pressure inlet boundary conditions in version 4.0?

Posted: Wed Mar 17, 2021 12:12 pm
by yhuang
I set the outlet as "isolib" and the inlet like this in “cs_user_boundary_conditions.f90” . But it was divergence.
itypfb(ifac)=iindef

icodcl(ifac,ipr) = 1
rcodcl(ifac,ipr,1) = 1.e5

icodcl(ifac,iu) = 3
rcodcl(ifac,iu,3) = 0

icodcl(ifac,iv) = 3
rcodcl(ifac,iv,3) = 0

icodcl(ifac,iw) = 3
rcodcl(ifac,iw,3) = 0

Re: How to set the pressure inlet boundary conditions in version 4.0?

Posted: Fri Mar 19, 2021 1:37 pm
by Yvan Fournier
Hello,

I am not sure how this combination would work, relative to the outlet pressure.

If you impose both inlet and outlet pressures, you have more chances of running correctly, but thi is often more tricky to set up than imposing an inlet velocity.

Best regards,

Yvan

Re: How to set the pressure inlet boundary conditions in version 4.0?

Posted: Sun May 02, 2021 5:57 pm
by Tsubasa
Hello yhuang,

In version 6.0.5,
for pressure inlet boundary condition, I can ues this,
_________________________________
call getfbr('inlet', nlelt, lstelt)
do ilelt = 1, nlelt
ifac = lstelt(ilelt)
itypfb(ifac) = ientre

!Dirichlet B.C for pressure:
icodcl(ifac,ipr) = 1
rcodcl(ifac,ipr,1) = 101325.633

!Neumann B.C for velocity:
icodcl(ifac,iu)= 3
icodcl(ifac,iv)= 3
icodcl(ifac,iw)= 3
enddo
_________________________________

But you should keep in mind that
calculation often become divergent if you use tetra mesh.

Best regards,
Tsubasa

Re: How to set the pressure inlet boundary conditions in version 4.0?

Posted: Sun May 02, 2021 10:54 pm
by Yvan Fournier
Hello,

computations are often less stable on lower quality/less regular meshes, but that does not mean they automatically diverge...

Best regards,

Yvan