subroutine not over-riding GUI boundary conditions - ALE

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Martin FERRAND
Posts: 47
Joined: Wed Mar 14, 2012 10:06 am

Re: subroutine not over-riding GUI boundary conditions - ALE

Post by Martin FERRAND »

Hello,
If you want to specified an initial mesh_displacement (for an initial water elevation), you can do it in cs_user_initialization. The boundary condition imposed in case of free surface is an imposed pressure (at p0) and an homogeneous Neumann on the fluid velocity (so no additional shear stress due to wind for instance) and an imposed mesh velocity (equal to the fluid velocity for the normal component to the surface).
I hope it will help you
Best regards
Martin
st268
Posts: 64
Joined: Fri May 31, 2013 10:45 am

Re: subroutine not over-riding GUI boundary conditions - ALE

Post by st268 »

Hi Martin,

So I should be able to do this by building a mesh that is initially deformed. As long as I specify the correct gravity vector and all touching sides as sliding?

I have tried with initialising my volume with the velocity field to be expected under a standing wave. Or with no initialisation.

I tried with the mesh viscosity at a minimum.

No matter what I do I cannot get the 'free surface' to deform.

I currently dont have access to the subroutines, or at least when I try and use them I get a lot of library errors. So if you think the above should work then I would appreciate if you have time to take a look at my setup and see if you can see what I am doing wrong!

Thanks
Attachments
standingwave.med.tar
(1.01 MiB) Downloaded 216 times
free_surface.xml
(7.51 KiB) Downloaded 219 times
Martin FERRAND
Posts: 47
Joined: Wed Mar 14, 2012 10:06 am

Re: subroutine not over-riding GUI boundary conditions - ALE

Post by Martin FERRAND »

Hello,
You can specify the initial water elevation by modifying this vectorial field in cs_user_initialisation.f90. Then, by default, a imposed pressure is imposed at the free surface (with p0 value) and a homogeneous Neumann on the velocity. Concerning the mesh velocity, the normal component to the free surface is imposed so that it compensates the mass flux (and then it is concervative in fluid mass). By default no shear stress is imposed at the free surface.
Best regards
Martin
st268
Posts: 64
Joined: Fri May 31, 2013 10:45 am

Re: subroutine not over-riding GUI boundary conditions - ALE

Post by st268 »

Hello,

Could you let me know what the variable is that lets me set the initial displacement? I have tried depale and disale, but cannot get either to work. I know xstr0/xtreq are used to specify initial mesh displacement for internal coupling but I am not using this here.

I have attached my xml, mesh and cs_user_initialization file. I am using v4.03 on a mac.

Thanks in advance,
Attachments
2d_box_sloshing_cozzithesis.med.zip
(1.04 MiB) Downloaded 201 times
SloshingGUI.xml.zip
(2.04 KiB) Downloaded 200 times
cs_user_initialization.f90.zip
(2.25 KiB) Downloaded 205 times
Post Reply