Overset/Chimera Method in saturne

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
mehdi.04
Posts: 14
Joined: Thu Mar 22, 2018 10:51 am

Overset/Chimera Method in saturne

Post by mehdi.04 »

Hello,

I'm working on a case of Fluid-Structure Interaction with Saturne-Saturne coupling using overset method, and I have 2 questions please.

I tried a coupling of 2 meshes without moving one of them, I get a continuous velocity between the 2 meshes, but the stress and the pressure are not really continuous, can you suggest a way to improce this ?

My 2nd question is about moving one of the 2 meshes inside the other one (Rotation and Translation), so should I use the mesh_periodicity subroutine or the Turbomachinery one ? How should it be done if one mesh will move (with all its elements) ?

Regards,
Yvan Fournier
Posts: 4221
Joined: Mon Feb 20, 2012 3:25 pm

Re: Overset/Chimera Method in saturne

Post by Yvan Fournier »

Hello,

The "Chimera" coupling is not a true Chimera method: boundary conditions are exchanged (so the velocity continuity is handled pretty well), but the incompressibility constraint is not enforced, whicn explains the pressure discontinuity.

The only solution for this would be to transform this into a true Chimera method, with stronger coupling at the pressure prediction/correction stages.

If meshes are moving, turbomachinery is a better option, because periodicity is handled at the preprocessing stage (so not updated at each time step).

Regards,

Yvan
mehdi.04
Posts: 14
Joined: Thu Mar 22, 2018 10:51 am

Re: Overset/Chimera Method in saturne

Post by mehdi.04 »

Thank you for your answer, I can't see how I can impose a translation using the turbomachinery subroutine, can you help me with that ?

Regards,
Yvan Fournier
Posts: 4221
Joined: Mon Feb 20, 2012 3:25 pm

Re: Overset/Chimera Method in saturne

Post by Yvan Fournier »

Hello,

Imposing a translation requires modifying the code a bit, so you would need to do that where the turbomachinery module updates the mesh (_update_mesh function in cs_turbomachinery.c). This also requires computing relative velocities between meshes, which may be more difficult (the turbomachinery modules does this using "rotation_velocity" and associated functions, for example in navstv.f90, which would need to be adapted (basically, check for all such things in cases where "iturbo.eq.2" in Fortran code), though this should be quite simple.

Adapting the ALE module to "rigid body movements" could be interesting also, but probably requires more knowledge of the code.

Regards,

Yvan
mehdi.04
Posts: 14
Joined: Thu Mar 22, 2018 10:51 am

Re: Overset/Chimera Method in saturne

Post by mehdi.04 »

Hello,
Thank you Yvan for your answer.

As a first try, I only imposed a rotation using the cs_turbomachinery.c subroutine. I have some results, but as mentionned in the Turbomachinery module usage in Doxygen, "the code/code coupling approach is not fully conservative", so even the velocity is not continued between the 2 meshes. To solve this problem I guess I need to use the 2 subroutines cscpfb.90 and csc2cl.90, but when I put these 2 subroutines in the SRC, the results don't change (and I don't get an error), could you help me how do they work, where to put them, and if there is any other modifications I'll need to do.
Yvan Fournier wrote: Sat May 12, 2018 12:08 pm for example in navstv.f90, which would need to be adapted (basically, check for all such things in cases where "iturbo.eq.2" in Fortran code), though this should be quite simple.
I don't have this file in my repertory and I can't download it from the doxygen, what I understood from Documentation is that it's a solver that predict velocity and pressure, am I right ? should it have the same treatment as the 2 other ones ?
Yvan Fournier wrote: Sat May 12, 2018 12:08 pm Imposing a translation requires modifying the code a bit, so you would need to do that where the turbomachinery module updates the mesh (_update_mesh function in cs_turbomachinery.c).
Where should I add "cs_turbomachinery-update_mesh()" ? Is it in the same file, or I should put it in other one ?

Thank you for your help.

Regards,

Mehdi
Yvan Fournier
Posts: 4221
Joined: Mon Feb 20, 2012 3:25 pm

Re: Overset/Chimera Method in saturne

Post by Yvan Fournier »

Hello,

you should find navstv.f90 in the main code source files (not user files).

And yes, you need to modify the existing _update_mesh function.

Regards,

Yvan
mehdi.04
Posts: 14
Joined: Thu Mar 22, 2018 10:51 am

Re: Overset/Chimera Method in saturne

Post by mehdi.04 »

Hello,

Thank you Yvan for your answer, I had a problem in my installation, so I didn't not find the navstv.90 and the cs_turbomachinery.c where they should have been. But now I fixed it.

Can you help me with what I should modify in the update_mesh function ? it calls a lot of functions and I can't see how it works exactly.

Thank you


Regards,
Mehdi
Yvan Fournier
Posts: 4221
Joined: Mon Feb 20, 2012 3:25 pm

Re: Overset/Chimera Method in saturne

Post by Yvan Fournier »

Hello,

Actually, _update_mesh calls _update_geometry, which is simpler, and which is the part you need to modify. But in _update_mesh, you will need to remove the
if (tbm->n_rotors > 0)
test before the call to _update_geometry, or ensure n_rotors > 0 (for example using the rotor structure also for translation, in which case a rename would also be recommended for clarity).

Regards,

Yvan
mehdi.04
Posts: 14
Joined: Thu Mar 22, 2018 10:51 am

Re: Overset/Chimera Method in saturne

Post by mehdi.04 »

Hello Yvan,

Is there any example on how we can translate a mesh ?

Which part of _update_geometry should I modify ? the update of the coordinates ?

In the ALE module, there is the subroutine "cs_user_boundary_conditions_ale.f90" where we can impose a translation to some nodes, is it possible to do the same with the whole domain (volumetric) ?

The code-code coupling is non conservative, and as I understood, the correction of the pressure is deactivated, how ? why ?
Is there any anyway we can improve that ?


Best regards,
Yvan Fournier
Posts: 4221
Joined: Mon Feb 20, 2012 3:25 pm

Re: Overset/Chimera Method in saturne

Post by Yvan Fournier »

Hello,

Yes, simply update the coordinates for a start. Though in places where relative rotation velocity is used (check rotation in the Fortran part of the code) you may need to also adjust for the translation relative velocity.

In ALE, to my knowledge, you can only prescribe boundary conditions. The rest is solved. It would probably be possible to prescribe movement everywhere, if you modify the code where the displacements are computed.

The code-code coupling is not conservative, because it only modifies the boundary conditions and is not a true "Chimera" (domain-decomposition family) method, as we do not solve a boundary value problem. This would require a different algorithm, and I am not sure how interpolation could be made to be conservative (though globally conservative is probably easier than locally conservative).

Regards,

Yvan
Post Reply