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
Face Joining, suspected bug
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Face Joining, suspected bug
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
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
Re: Face Joining, suspected bug
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.
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.
Re: Face Joining, suspected bug
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.
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
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Face Joining, suspected bug
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
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
Re: Face Joining, suspected bug
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
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
-
- Posts: 4208
- Joined: Mon Feb 20, 2012 3:25 pm
Re: Face Joining, suspected bug
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
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
Re: Face Joining, suspected bug
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
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