|
[Sponsors] |
April 15, 2016, 11:33 |
|
#21 | |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Hi,
Quote:
Geometry module -> make your patches Mesh module -> triangulate your patches and export as STL
__________________
Keep foaming, Tobias Holzmann |
||
April 18, 2016, 04:25 |
|
#22 |
New Member
Cristian Ariza
Join Date: Mar 2016
Location: Madrid, Spain
Posts: 24
Rep Power: 10 |
I did import the STEP file, created the patches but now I cannot find what you meant by triangulating (I have never used SALOME before).
|
|
April 18, 2016, 04:48 |
|
#23 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Hi,
if you export a surface out of a CAD software and save the file as STL (STereoLithography), the software will triangulate the surface. In other words, the surface will be approximated by triangles. Using CAD tools you normally can not have a big influence on how the surface will be triangulated. Normally it will be done in a way that the size of the file is small. However this is a very bad behavior if you have more STL combined to one complete geometry. It will work if you have only flat surfaces but hence two connected STL's share a curved line, this will fail all the time. Therefore SALOME offers you the possibility to generate the triangles by some more advanced methods. To do the triangulation, you have to go to the mesh module and mesh your surfaces with Netgen 2d or other methods. If you export this file as STL, it will use the generated triangulation. Simple example in the attachment. The first one shows the geometry. The second one the triangulation of CAD exported and my own one. You clearly see that mine is closed and the export of the CAD software not. And now think about more complex shapes. CAD softwares are not created for "meshing surfaces". Maybe there are some extensions but I never used some of them. This should be clear now (: Further information about how to mesh can be found in the tutorial section of salome. PS: For sHM the nice triangulation is much better.
__________________
Keep foaming, Tobias Holzmann |
|
April 18, 2016, 07:22 |
|
#24 |
New Member
Cristian Ariza
Join Date: Mar 2016
Location: Madrid, Spain
Posts: 24
Rep Power: 10 |
I understand the idea but I don't really get how to do it in SALOME. Is there any way I can check whether the STL files are water-proofed to try and fix them from the CAD software? What I can do is to increase the tolerance of the distances and angles, setting it to max. maybe fixes the problem?
EDIT: Solved! I will try simulating everything again. Last edited by cristian.arbe; April 18, 2016 at 10:18. |
|
April 20, 2016, 10:43 |
|
#25 |
New Member
Cristian Ariza
Join Date: Mar 2016
Location: Madrid, Spain
Posts: 24
Rep Power: 10 |
Now getting another error:
Code:
--> FOAM Warning : From function gaussConvectionScheme in file finiteVolume/convectionSchemes/gaussConvectionScheme/gaussConvectionScheme.H at line 123 Reading "/home/cristian/OpenFOAM/cristian-3.0.1/run/reactorCaseTurbulent/system/fvSchemes.divSchemes.div(phi,epsilon)" at line 33 Unbounded 'Gauss' div scheme used in steady-state solver, use 'bounded Gauss' to ensure boundedness. To remove this warning switch off 'warnUnboundedGauss' in "/opt/openfoam30/etc/controlDict" Last edited by cristian.arbe; April 22, 2016 at 05:41. |
|
April 20, 2016, 12:33 |
|
#26 | |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Quote:
If you export from CAD, the software will not set the outer points of the different patches to the same position. Either you use salome for that or another surface mesher. I will post some other trick, how to get a water proofed STL for snappyHexMesh, using snappyHexMesh itself (: The post will be done during weekend. To your error.
Code:
--> FOAM Warning : Reading "/home/cristian/OpenFOAM/cristian-3.0.1/run/reactorCaseTurbulent/system/fvSchemes.divSchemes.div(phi,epsilon)" at line 33 Unbounded 'Gauss' div scheme used in steady-state solver, use 'bounded Gauss' to ensure boundedness.
__________________
Keep foaming, Tobias Holzmann |
||
April 20, 2016, 12:37 |
|
#27 |
New Member
Cristian Ariza
Join Date: Mar 2016
Location: Madrid, Spain
Posts: 24
Rep Power: 10 |
Then I guess it's all fine cause the simulation converged. Thanks!
|
|
April 21, 2016, 05:26 |
|
#28 |
New Member
Cristian Ariza
Join Date: Mar 2016
Location: Madrid, Spain
Posts: 24
Rep Power: 10 |
Actually the first simulation ran fine, but then when I ran it again cause I lost the data it does not converge anymore. I made sure that all the changes I did with @Tobi are kept, but still.
Residuals screenshot: http://imgur.com/l3Yeimj Case Folder: https://drive.google.com/open?id=0By...GZIZEtOSnQwLWc |
|
April 21, 2016, 08:00 |
|
#29 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Hi,
first, congrats to your nice triangulation. That is very good. I want to mention that your dT set-up is senceless. We do not have any time derivative in the SIMPLE algorithm and therefore dT does not influence the simulation. Normally it is set to 1 because then the time indicates the number of iterations you already did. So if you set dT to 1 and endTime to 40, you will at least have 40 iterations. If you set dT to 0.0001 and endTime to 0.004 you end up with the same solution. To you case.
http://www.holzmann-cfd.de/cfd-onlin...rbulent.tar.gz Code:
tar xzf reactorCaseTurbulent.tar.gz cd reactorCaseTurbulent ideasUnvToFoam backgroundMesh.unv snappyHexMesh -overwrite simpleFoam Thats how I would do it.
__________________
Keep foaming, Tobias Holzmann |
|
April 21, 2016, 09:41 |
|
#30 | ||||
New Member
Cristian Ariza
Join Date: Mar 2016
Location: Madrid, Spain
Posts: 24
Rep Power: 10 |
Quote:
Quote:
Quote:
EDIT: Now I get the error: Quote:
Last edited by cristian.arbe; April 21, 2016 at 10:54. |
|||||
April 21, 2016, 11:00 |
|
#31 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Hi,
of course the normal velocity BC will give you problems because your faces at the inlet are nor correct oriented (: Thats why. But I already told you in the first replay that you have to make a good mesh for the inlet and outlet.
__________________
Keep foaming, Tobias Holzmann |
|
April 21, 2016, 16:03 |
|
#32 |
New Member
Cristian Ariza
Join Date: Mar 2016
Location: Madrid, Spain
Posts: 24
Rep Power: 10 |
I've seen that with the files you sent me the mesh has way more elements, could you explain me what you did there?
And what should I do with the error "Cannot find patchField entry for defaultFaces"? Thanks. |
|
April 21, 2016, 16:12 |
|
#33 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
In your boundary (constant/polyMesh/boundary) there is the entry "defaultFaces". Just remove the entry and set the first number before the brackets to 3.
What I did, I made improvements to your mesh.
__________________
Keep foaming, Tobias Holzmann |
|
April 22, 2016, 04:46 |
|
#34 | |
New Member
Cristian Ariza
Join Date: Mar 2016
Location: Madrid, Spain
Posts: 24
Rep Power: 10 |
Quote:
From what I could guess, when using the command you gave me "ideasUnvToFoam backgroundMesh.unv", there are some faces that do not belong to any patch so it adds them to defaultpatch, and then when I try to use decomposePar -after deleting default patch- to mesh in parallel it complains about it: Code:
--> FOAM FATAL IO ERROR: error in IOstream "/home/cristian/OpenFOAM/cristian-3.0.1/run/reactorCaseTurbulent/processor4/constant/polyMesh/points" for operation Ostream& operator<<(Ostream&, const Scalar&) file: /home/cristian/OpenFOAM/cristian-3.0.1/run/reactorCaseTurbulent/processor4/constant/polyMesh/points at line 41800. From function IOstream::check(const char*) const in file db/IOstreams/IOstreams/IOstream.C at line 99. FOAM exiting |
||
April 22, 2016, 04:56 |
|
#35 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
No.
If you use that command it will convert the mesh to a foam mesh (its pure hexmesh). Due to the fact that I did not set any name to the boundary faces, OpenFOAM sets all unknown or not defined faces to the group defaultFaces. After meshing there are no faces anymore that belong to that group but the entry in the boundary file still exist. OpenFOAM initialize all boundaries that are written in that file (does not matter if they have faces or not). Therefore you have to delete that entry or copy a createPatchDict to your system and run createPatch -overwrite. Hence the initialization will check all boundaries, you get the error. The other way to fix that, just add boundary conditions to all your variables but that is senceless hence defaultFaces do not have any face entry. You can check this out in the file constant/polyMesh/boundarys The error you get is related to some mistake you did. Note: If the nFaces entry in defaultFaces are not 0 you are not allowed to delete that entry. So you should make a short workaround what is standing in the files and what that means.
__________________
Keep foaming, Tobias Holzmann |
|
April 22, 2016, 05:41 |
|
#36 |
New Member
Cristian Ariza
Join Date: Mar 2016
Location: Madrid, Spain
Posts: 24
Rep Power: 10 |
It won't even let me do SHMesh, it throws this:
Code:
[10] --> FOAM FATAL IO ERROR: [10] error in IOstream "/home/cristian/OpenFOAM/cristian-3.0.1/run/reactorCaseTurbulent/processor10/constant/polyMesh/faces" for operation Ostream& operator<<(Ostream&, const char) [10] [10] file: /home/cristian/OpenFOAM/cristian-3.0.1/run/reactorCaseTurbulent/processor10/constant/polyMesh/faces at line 877056. [10] [10] From function IOstream::check(const char*) const [10] in file db/IOstreams/IOstreams/IOstream.C at line 99. [10] FOAM parallel run exiting |
|
April 22, 2016, 05:52 |
|
#37 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51 |
Okay, lets start from the beginning.
Code:
ideasUnvToFoam theGuy.unv Then just mesh it: Code:
snappyHexMesh -overwrite Code:
patches (); Code:
createPatch -overwrite Note: For meshing that simple case you never will need 10 cores or more. Finally you should really know how to split your domain, otherwise you will slow down your calculation because of the shared faces.
__________________
Keep foaming, Tobias Holzmann |
|
April 25, 2016, 04:45 |
|
#38 |
New Member
Cristian Ariza
Join Date: Mar 2016
Location: Madrid, Spain
Posts: 24
Rep Power: 10 |
I get "No patches removed." and the defaultFaces patch is still there after doing what you did
On my boundary file there is only one patch which is defaultFaces though, all the other patches disappeared. Edit: Solved, forgot to reconstruct after running in parallel. Last edited by cristian.arbe; April 25, 2016 at 06:17. |
|
April 25, 2016, 09:25 |
|
#39 |
New Member
Cristian Ariza
Join Date: Mar 2016
Location: Madrid, Spain
Posts: 24
Rep Power: 10 |
I've run the simulation and the residuals for U and p (I've ran only the laminar case to see everything is ok) stay on an almost constant value of 10e-2 and 10e-1, respectively, for 1,000 iterations. Is that just cause the simulation doesn't converge or maybe is there any parameter limiting the value of the residuals?
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
icoFoam floating point exception (8) | leizhao512 | OpenFOAM Running, Solving & CFD | 7 | November 1, 2018 11:43 |
A floating point exception - SEM Model | yansheng | STAR-CCM+ | 1 | April 4, 2016 04:57 |
Floating point exception from twoPhaseEulerFoam | openfoammaofnepo | OpenFOAM Running, Solving & CFD | 1 | March 19, 2016 13:56 |
floating point exception [invalid operation] | jubair073 | STAR-CCM+ | 5 | April 24, 2015 13:05 |
Inlet Velocity Profile BC - Floating Point exception during solution initialization | Janshi | STAR-CCM+ | 4 | March 14, 2012 10:21 |