Migration to CS 3

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: Migration to CS 3

Post by Yvan Fournier »

Hello,

I just ran a few tests for to see why velocity is not solved after a few iterations, and this happens both with ivelco = 0 or 1, so I'll now try to understand why. So far, this does indeed seem like a bug.

I'll try to pass this case on to Martin, so we may have a fix soon (I'll be out of office next week, but if he is not too busy with other test cases, he might keep you updated).

Regards,

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

Re: Migration to CS 3

Post by Yvan Fournier »

Hello,

We have taken a quick look with Martin, and may have the explanation : the solver precision is given for each linear system resolution, but the EPSRSM parameter id different. In 2.3, it is 1e-8 by default (the same as the solver precision), and is not modified by the GUI settings. In 3.0, it is 10x the solver precision. You may force it in cs_user_parameters.f90, but the simplest solution is to simply set the solver precision back to 1e-8 for velocity (whose resolution is much cheaper than that of pressure anyways).

Also, flux reconstruction is not recommended for turbulent variables (the code does not seem to accept deactivating it with a SOLU scheme, which is probably an incorrect test, but it is OK to use an upwind scheme for turbulent variables (k and omega) anyways.

Finally, comparing your XML files for versions 2.2 and 2.3, the inlet turbulence is different: in version 2.2 (using a different mesh), you used a turbulent intensity, while with version 3, you use fixed values (the same as for initialization). I am not sure which is best, but it can have a strong impact on the result.

Also, as your mesh seems to use prisms near the deck, and hexahedra elsewhere, the quality is probably lowest near the most interesting parts.

For better precision, in unsteady cases, using more sweeps is recommended (although more costly). So setting "RHS Sweep reconstruction" to a value higher than 1 may be interesting. Unfortunately, this is most useful for the pressure, but I have just noticed that it is available for all variables except pressure in the GUI. So to change it, you need to add for example
nswrsm(ipr) = 5
anywhere in usipsu, in cs_user_parameters.f90
(you could force it for any variable ivar by using ivar instead of ipr).

I hope this helps, and we are always interested in your feedback, as it helps us make the code more robust.

Regards,

Yvan
Luca

Re: Migration to CS 3

Post by Luca »

Dear Yvan,

thanks for the extremely detailed reply and the precious tips. I will try to see if I can solve the problem with it.

Just to explain some of the points you remarked:
1- The turbulence intensity and scale given at the inlet in version 2.2 are chosen to match the k and omega given in version 2.3 and 3. Actually my goal would be to fix intensity and turbulence viscosity ratio...

2- The bad quality of the mesh close to the deck should be only a graphical problem. The mesh is structured and completely hexaedral in the boundary layer: if you look the outer skin the mesh is the real one while if you cut the domain with a plane (at least with paraview) the hexa are splitted.
As I posted in an old message if you import it in Salome the mesh is still correct.
Anyway in the listing i find the correct number of elements and faces.

Thank you again for the graet job!
flyer
Posts: 18
Joined: Mon Mar 26, 2012 2:37 pm

Re: Migration to CS 3

Post by flyer »

Hello,
my question is about the FSI applications with internal coupling.
How can we introduce the angular parameters of the structure : the inertia moment and the torsional stiffness?
The aim is to simulate a flow around an oscillating airfoil : rotation around an elastic axis and vertical oscillations, and i use the 3.00 c_s version.
Thank you.
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: Migration to CS 3

Post by Yvan Fournier »

Hello,

Could you re-post this in another thread, as this is a new conversation (I could move it myself, but then you'd probably wonder where it's gone) ?

I'm no a specialist in this part of the code, but please mention whether the documentation or code examples are not clear enough, or whether the functionality seems missing, so as to get this started more easily/

Regards,

Yvan
flyer
Posts: 18
Joined: Mon Mar 26, 2012 2:37 pm

Re: Migration to CS 3

Post by flyer »

hi,
i repost it in a new topic: Fluid Structure Interaction.
best regards
Post Reply