VOF permament inlet

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
vlado285
Posts: 16
Joined: Fri Feb 12, 2021 9:52 am

VOF permament inlet

Post by vlado285 »

Hello,
I would like to ask if it is possible to set permanent inlet in VOF. I found some example of VOF in Code Saturne (dam-break) but they were without inlet.
Yvan Fournier
Posts: 4069
Joined: Mon Feb 20, 2012 3:25 pm

Re: VOF permament inlet

Post by Yvan Fournier »

Hello,

I am not sure, but do not see why the two would be incompatible. Did you try it ?

Regards,

Yvan
vlado285
Posts: 16
Joined: Fri Feb 12, 2021 9:52 am

Re: VOF permament inlet

Post by vlado285 »

Yes I tried to set inlet. It is possible but there is no possibilities to set inlet medium(for example water)If I have two medium in simulation.(water and air) Mayby it is possible via subroutine but I dont know how.
Yvan Fournier
Posts: 4069
Joined: Mon Feb 20, 2012 3:25 pm

Re: VOF permament inlet

Post by Yvan Fournier »

Hello,

I'll try to find user examples for this soon.

Best regards,

Yvan
vlado285
Posts: 16
Joined: Fri Feb 12, 2021 9:52 am

Re: VOF permament inlet

Post by vlado285 »

Hello Yvan,
did you find some example of inlet definition for VOF?
I tried to find solution but without success. Every time I get the warning that you can see in attachment.
In documentation of Code Saturne I found that is possible to set the density on boundary faces but I don't know if it is what I need and it don't works me.
Attachments
physical properties.PNG
156940616_494466018383824_8811673580415388362_n.jpg
vlado285
Posts: 16
Joined: Fri Feb 12, 2021 9:52 am

Re: VOF permament inlet

Post by vlado285 »

Hello Yvan,
I found the solution for setting the input with combination of VOF. The solution is in attachment but I would like to ask what exactly mean the expression rcodcl(ifac,ivolf2,1)=5.d-2.
I didnt find the description to this expression in documentation. I try to set various value of this coeficietn and it seems to be the proportion of medium 2 in medium 1 at the input but I am not sure.
The second is the question if it is possible to simulate more then two phases. I mean for example the water, oil and air in one simulation. (set not only rho1 and rho2 but more)
Attachments
cs_user_parameters.JPG
cs_user_boundary_conditions.JPG
(36.93 KiB) Not downloaded yet
ThomasFonty
Posts: 1
Joined: Thu Oct 14, 2021 10:10 am

Re: VOF permament inlet

Post by ThomasFonty »

Hello,

To define boundary conditions, one can use in cs_user_boundary_conditions.f90 the expressions icodcl(ifac,ivar) combined with rcodcl(ifac,ivar,i). icodcl sets the face boundary condition code (1 Dirichlet, 3 Neumann, etc.) for a face ifac and for a variable ivar, and rcodcl sets the boundary condition value : rcodcl(ifac,ivar,1) value of the dirichlet, rcodcl(2) value of the exterior exchange coefficient (infinite if no exchange), rcodcl(3) value of the flux density (negative if gain) in w/m2 or roughness in m if icodcl=6.

rcodcl(ifac,ivolf2,1)=5.d-2 therefore means that you apply the value of 0.05 to the volume fraction field akpha reference by ivolf2 for the Dirichlet value (due to the 1 argument) at face ifac. If the medium is full of Fluid 0 then alpha = 0, if the medium is full of fLuid 1 then alpha = 1.

It is not possible to simulate more than two phases.

Best regards,

Thomas
Post Reply