Face Joining, suspected bug

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
mortbauer
Posts: 11
Joined: Mon Jan 27, 2014 10:28 am

Face Joining, suspected bug

Post by mortbauer »

Hey

I just wanted to understand some parts in the code related to coriolis force source term so i created an additional postprocessing output which sets all elements with (irotce.ne.0) to 1 and everything else to 0 (I therefore use cs_user_postprocess_var and loop through all cells and check the irotce flag). The field irotce is from base/turbomachinery.f90. The results can be seen in the appended pictures.I use code_saturne 3.3.0.

I have the impression that this is a bug, if it is i can of course sign a bug report, i hope this can be resolved quickly!

Thanks Martin
Attachments
shows again the rotor plus one third of the entrance part, as you can see some parts of the entrance have (irotce.ne.0) which they shouldn't.
shows again the rotor plus one third of the entrance part, as you can see some parts of the entrance have (irotce.ne.0) which they shouldn't.
shows the whole rotor cell group which i use to select the rotor, as you can see not all parts are red(irotce.ne.0) which they should
shows the whole rotor cell group which i use to select the rotor, as you can see not all parts are red(irotce.ne.0) which they should
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: Face Joining, suspected bug

Post by Yvan Fournier »

Hello,

Before I answer your main question, if you are using 3.3.0 for turbomachinery, please either wait for 3.3.1 (either late this afternoon or Monday), or pull the version using SVN: some value updates were broken for turbomachinery in 3.3.0, and have been fixed in the 3.3 branch (if you are doing frozen rotor, then you may not have the bug).

Otherwise, your postprocessing problem is probably due to an error in your user subroutine. When you call post_write_var in cs_user_postprocess_var.f90, do you set ivarpr to 1 or 0 ? Depending on how you looped on cells (using lstcel(iloc) or directly), you must use one or the other.

Regards,

Yvan
mortbauer
Posts: 11
Joined: Mon Jan 27, 2014 10:28 am

Re: Face Joining, suspected bug

Post by mortbauer »

That is the best what could be, just a fault of mine! I already investigated quite much, but if one wants to add some extra source terms, it is a lot to learn about the code. But as you pointed out cjanging ivarpr to true did the trick.

Thank you Yvan for your quick help and also pointing me at possible bugs in 3.3.0 have only done frozen calculations with 3.3 so far.
amir
Posts: 19
Joined: Wed Mar 09, 2016 2:15 pm

Re: Face Joining, suspected bug

Post by amir »

Hello everyone,
I'm new in Code_Saturne (V. 4.0.4) and I work on GUI. I use a standard venturi such as geometry.
Cause of memory limitation, I had to subdivide my geometry. So now I have 3 Meshes and I want to join them. I uploaded the files on meshes selection and I also added 2 face joining (for 4 face).
The points are:
How many face joining should be added?
Should I change the joining parameters? If yes, what do you suggest?

To make mesh joining more efficient,
Is it necessary to add a periodic criteria for this geometry?
And should I change the Mesh quality criteria?

The meshes section screen and check_mesh.log are attached.

Thank you in advance.
Attachments
Check_mesh.log
(35.96 KiB) Downloaded 390 times
Meshes selection.png
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: Face Joining, suspected bug

Post by Yvan Fournier »

Hello,

You have the choice of combining joinings 1 and 2 or separating them.

An advantage of the separation in some cases is that it allows you to use different tolerance parameters for each (which is useful mainly for mediocre-quality meshes; if the default parameters work for you, there is no sense in changing them)

Otherwise, locating face intersections 2 times on smaller subsets might be faster, but updating the structure twice is more costly, so it is hard to guess in advance which option will provide the best performance (it may vary from mesh to mesh).

I don't know if you need periodicity or not. It all depends on whether you mesh is a subset of a periodic geometry. in any case, periodicity is handled mainly at the mesh level, so it is handled in a fully implicit manner for scalar and vector variables, with some explicit terms for tensors (i.e. Rij).

Regards,

Yvan
amir
Posts: 19
Joined: Wed Mar 09, 2016 2:15 pm

Re: Face Joining, suspected bug

Post by amir »

Hello Yvan,

As we discussed above, I used 2 joining face for my mesh files.

I was under impression that I should not have any problem with this, because neither in check_mesh nor in listing I did not catch any error, however, post processing with Paraview shows the joining difficulties.

At first I focused on my mesh coherency, I changed the cell ratio and run another case; the results stayed without changing.
I continued to run with 2 different iteration number (i.e. 40000 and 80000), I saw the results have improved for the first and the third volume; however, there was not any change for the second one.

The case which I explained here is a RANS 2D and the geometry is a classical ventury.

I also tried with Code_Saturne 4.0.3. to verify if it changes and if it depends on version, nevertheless the results are still be the same.

Enclosed you could find the listing, check_mesh, paraview image, my mesh files and also my case if you would like to run it yourself.

I would appreciate it if you could help me with this problem.

Kind regards,
Amir
Attachments
RANS-K-W-2D.rar
(2.03 MiB) Downloaded 405 times
Yvan Fournier
Posts: 4208
Joined: Mon Feb 20, 2012 3:25 pm

Re: Face Joining, suspected bug

Post by Yvan Fournier »

Hello,

You have no joining, I believe because yoour selection criterion is incorrect:

"join5 and join 6" means you select faces that belong both to groups "join5" and "join6" (logical "and").

To select faces that belong either to "join5" or "join6" (logical "or"), use "join5 or join6".

Regards,

Yvan
amir
Posts: 19
Joined: Wed Mar 09, 2016 2:15 pm

Re: Face Joining, suspected bug

Post by amir »

Thank you Yvan for your quick reply and your recommendation as well.

I just obtained the result from a case, where I used your mention and it seems good.

I thank you again and have a good evening.

Kind regards,
Amir
Post Reply