Page 1 of 3

free surface not moving

Posted: Tue Oct 18, 2016 5:14 pm
by olivier_g
Hello,

I am using code saturne 4.0.6 on Ubuntu 16-04.
I simply tried to reproduce the test of the solitary wave (i.e modeling a 2D tank test and imposing a velocity field at the inlet via cs_user_boundary_conditions_ale.f90) to check if the free surface boundary condition from the GUI was working.
The solver is running but when visualizing the results with Paravis I cannot see any motion of the free surface. It seems that I have missed something here.

Note that I did not set up any additional fluid velocity boundary condition on the free surface via a user subroutine, contrary to what is explained in the user guide, because I am not sure if it is included or not by default when using "free surface" with the GUI.

Thanks in advance for your help!

Olivier

Re: free surface not moving

Posted: Tue Oct 18, 2016 6:12 pm
by Yvan Fournier
Hello,

Did you check if there is a vertices-based array for mesh displacement under ParaView ?

Regards,

Yvan

Re: free surface not moving

Posted: Tue Oct 18, 2016 8:41 pm
by olivier_g
Hello,

Thanks Yvan for your quick reply! Yes there is indeed a displacement array, based on vertices, in the Paravis output, but it shows zero displacement magnitude. I tried to use the "warp by vector" filter as well, but still no motion.
I guess it is not a matter of visualization (still I might be wrong), but more of boundary conditions?

Re: free surface not moving

Posted: Mon Oct 24, 2016 11:12 am
by olivier_g
Hello,

Did anyone manage to download my example and can tell me what's wrong with the model, why I cannot see any motion of the free surface? As already explained before, I presume it could be something to add in the user subroutine related to the boundary condition, but I don't know what.
Another way to help me could be to send me an example of model with a moving free surface, so that I can compare with mine.

Thanks in advance for your help! I am really struggling with this for quite a few days now... I hope that some users have already delt with such problem...

Re: free surface not moving

Posted: Mon Oct 24, 2016 1:24 pm
by Yvan Fournier
Hello,

I don't have much time to look into this in right now, but here is a test case in which the sliding mesh works (for version 4.0).

Best regards,

Yvan

Re: free surface not moving

Posted: Mon Oct 31, 2016 11:26 pm
by olivier_g
Hi Yvan,

Sorry for late reply. Still working on this topic :)
First of all thanks for the interesting example, which is unfortunately not using the "free surface" boundary condition, but still could be useful somehow in the future.
After digging into the src of code_saturne, I found out that the kinematic boundary condition of the free surface (ifresf), the one which will give the mesh velocity, is well calculated in alelav.f90, through variables pimpv(i), and the information stored thanks to "set_dirichlet_vector".
Then in my understanding, subroutine "alemav", via the "aledis" subroutine, should use this information about the mesh velocity and transform it into displacement of the nodes. Which is obviously not done in my case.
I will try to install the debug version of code_saturne to check the status of the relevant variables in alelav, alemav and aledis to understand why the calculated mesh velocity does not lead to displacement of the nodes.

Meanwhile, if you have anything new that could help me, I would of course be glad to hear from you!

Olivier

Re: free surface not moving

Posted: Tue Nov 01, 2016 10:34 pm
by Luciano Garelli
Hello olivier,

I was looking at your problem. First of all, I couldn't run but I found some issues in the user subroutine.

1) You have a

Code: Select all

if (.false.) then 
before the boundary selection.

2)

Code: Select all

 call getfbr('5', nlelt, lstelt) 
any of your baundaries has this ('5') indentifier.

3) The axis of your mesh are not setted like in this reference (http://cfd.mace.manchester.ac.uk/twiki/ ... _COZZI.pdf), so I think that this line

Code: Select all

DWDZ * cdgfbo(3,ifac) should be [DWDZ * (cdgfbo(2,ifac) +5)
in order to use and translate the Y axis.

These are my comments by now...I will let you know if I have any progress.

Regards,

Luciano

Re: free surface not moving

Posted: Wed Nov 02, 2016 10:02 pm
by olivier_g
Hi Luciano,

Thanks for your post. I agree with the 3 items you have mentionned - there were mistakes in my initially posted user subroutine. I already fixed it as well some time ago; I could have uploaded the updated subroutine, but since it does not change the fact that the free surface does not move, I did not do it. The fluid velocity after the inlet is ok, I can check it with paraview, but no motion of the free surface.

Have you noticed the same thing (I guess you have tried to run this solitary wave model), and have you any example of model with a moving free surface?

Thanks!

Olivier

Re: free surface not moving

Posted: Thu Nov 03, 2016 1:31 pm
by Luciano Garelli
Hello Olivier,

Please, next time post the updated subroutine

Whe you mentioned that you "digging" the alelav.f90, did you debug or printed the values of pimpv(i) for any face??. Because I debugging (printing) the data in alelav.f90 and I don't get any face that satisfied the condition

Code: Select all

if (ialtyb(ifac).eq.ifresf) then
So, no pimpv() velocity is computed.

Regards,

Luciano

Re: free surface not moving

Posted: Thu Nov 03, 2016 2:56 pm
by olivier_g
Hi Luciano,

Yes, next time I will post the updated subroutine, sorry about that.
By "digging into" I simply meant that I tried to understand how and where the free surface boundary condition was treated in the src.
I wanted as well to install a debugging version to check why the mesh velocity was not well calculated/or does not lead to a mesh displacement, but could not do it yet (my workstation being under repair for a few days). But it seems you have already done it: thanks for that!

So according to you none of the boundary faces is marked with the "ifresf" keyword?? Strange since I am using the GUI to assign "free surface" condition to the relevant faces. Could it be that it is instead a problem of numbering of the faces? I see that the loop we are talking about in alelav.f90, to calculate and assign pimpv(), is being done for ifac = 1 to nfabor.

Should we understand that to work properly then, the boundary faces should have a continuous numbering from 1 to nfabor (which is of course not the case with my mesh, which I have created with Salome)? Or there is kind of a automatic re-numbering of the faces in the preprocessor which is not done correctly there?

Olivier