free surface not moving

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Luciano Garelli
Posts: 280
Joined: Fri Dec 04, 2015 1:42 pm

Re: free surface not moving

Post by Luciano Garelli »

Hello Olivier,

I was debuging the alelav.f90 subroutine and I found that may be there is a bug in the following line, because to get the type of boundary condition at the boundary face ifac is used itypfb(ifac).

Code: Select all

 if (ialtyb(ifac) .eq. ifresf) then 
so if you change to

Code: Select all

if (itypfb(ifac).eq.ifresf) then
The mesh start to move.

I attach the modified alelav.f90, paste it in the SRC directory and check if its works. May be the developers can check if it is correct.

Regards,

Luciano
Attachments
alelav.f90
(8.77 KiB) Downloaded 253 times
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: free surface not moving

Post by Yvan Fournier »

Hello,

I mentioned your post to Martin, who is more familiar with the ALE module.

So I hope to confirm your recommendation soon.

Best regards,

Yvan
olivier_g
Posts: 7
Joined: Tue Oct 18, 2016 11:02 am

Re: free surface not moving

Post by olivier_g »

Hello,

Thanks Luciano for your precious help! Seems we are close to solving the problem now.
From my understanding of the user guide, the "ialtyb" keyword is also relevant for boundary condition associated to mesh velocity, and can take as well the "ifresf" (=free surface) value.
But maybe the problem here is that the free surface option in the GUI does not associate any value to the "ialtyb" keyword - which should be then treated separately in a user subroutine -, but only to the "itypfb".
Anyway I haven't found anything clear in the user guide, so as Yvan proposed, let's wait for the answer of someone familiar with the ALE module.

Plus my workstation is not fixed yet, so I can't even test your proposal of alelav.f90 :(

Olivier
HelmutZhang
Posts: 15
Joined: Wed Oct 25, 2017 1:51 am

Re: free surface not moving

Post by HelmutZhang »

Hello,

i want to know what was the final result? How does that end up?

Regards,

Helmut
HelmutZhang
Posts: 15
Joined: Wed Oct 25, 2017 1:51 am

Re: free surface not moving

Post by HelmutZhang »

Luciano Garelli wrote: Mon Nov 07, 2016 3:06 pm Hello Olivier,

I was debuging the alelav.f90 subroutine and I found that may be there is a bug in the following line, because to get the type of boundary condition at the boundary face ifac is used itypfb(ifac).

Code: Select all

 if (ialtyb(ifac) .eq. ifresf) then 
so if you change to

Code: Select all

if (itypfb(ifac).eq.ifresf) then
The mesh start to move.

I attach the modified alelav.f90, paste it in the SRC directory and check if its works. May be the developers can check if it is correct.

Regards,

Luciano
Hello, Luciano

I attach my case, can you help me what' s wrong with my case. Thank you!

Regards,

Helmut
Attachments
ALE.rar
(2.8 MiB) Downloaded 184 times
Luciano Garelli
Posts: 280
Joined: Fri Dec 04, 2015 1:42 pm

Re: free surface not moving

Post by Luciano Garelli »

Hello Helmut,

I was trying to run your case and I think that my previous appreciation about ialtyb(ifac) -> itypfb(ifac) was wrong. I think that maybe can be a bug in the GUI. I create a new case with CS 5.0.8 and after set the free surface and all the BC's, the result was that the free surface doesn't move.

Looking at the XML file I found that the BC corresponding to the free surface was set with "fixed boundary" (figure attached).
setup_1.png
If I remove the section

Code: Select all

<wall field_id="none" label="BC_4">
			<ale choice="fixed_boundary"/>
		</wall>
The free surface move with the fluid velocity. If I do any modification in the GUI, after save the case, this section is added again.

In the case that you attach also the free surface is set as fixed boundary in the ale choice.

I attach two video with the example that I have run.

Only with velocity initialization (neither inlet nor outlet)

https://drive.google.com/open?id=1F7Uaw ... Lwo6dLpvKJ

With a velocity inlet.
https://drive.google.com/open?id=1FlWA9 ... Ns_7WUQa3Q

Sloshing with and without a buffer plate in the center of the domain

https://drive.google.com/open?id=12vB_V ... XucTAzf7jG

May be YVan can confirm that.

Regards,

Luciano
Last edited by Luciano Garelli on Wed Nov 28, 2018 8:34 pm, edited 1 time in total.
HelmutZhang
Posts: 15
Joined: Wed Oct 25, 2017 1:51 am

Re: free surface not moving

Post by HelmutZhang »

Luciano thank you ! :)
Luciano Garelli
Posts: 280
Joined: Fri Dec 04, 2015 1:42 pm

Re: free surface not moving

Post by Luciano Garelli »

Hello

I attach the two case file and the mesh of the previous examples.

Regards,

Luciano
Attachments
Free_surface_cases.zip
(344.17 KiB) Downloaded 166 times
HelmutZhang
Posts: 15
Joined: Wed Oct 25, 2017 1:51 am

Re: free surface not moving

Post by HelmutZhang »

Hello

I received your file in the forum. Thank you! And i have some questions. If I want to simulate wave conditions with Free Surface, how can i setting wave related parameters, for example, wave height,wave length etc. Do i need to implement it through user subroutine? I have uploaded the user subroutine on the forum before, are they correct? I hope you can give me some advice in these areas.

Best wishes
Helmut
Luciano Garelli
Posts: 280
Joined: Fri Dec 04, 2015 1:42 pm

Re: free surface not moving

Post by Luciano Garelli »

Hello,

I'm not sure, but I think that only the use of this BC will not be enough to model waves. You will need a two fluid modelling in order to set as inlet the wave height and lenght. Also, you will need an absorbing BC in order to avoid the reflection of the waves.

I couldn find the user subroutine that you mention.

Regards,

Luciano
Post Reply