|
[Sponsors] |
[cfMesh] How can I change the mesh structure generated by cfMesh |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 20, 2015, 00:43 |
How can I change the mesh structure generated by cfMesh
|
#1 |
New Member
Choi Hak Kyu
Join Date: Apr 2015
Posts: 12
Rep Power: 11 |
Hello,
Now I'm generating the mesh by cfMesh I can generating mesh around boundary layer like picture 1 by cfMesh The meshs are merged immediately on upper boundary layer but, I want generate mesh seems like picture 2, there is little difference. (you can compare red circle) so, How can I generate the mesh like picture 2? there is a option for this ? thank you |
|
May 22, 2015, 05:27 |
|
#2 |
Senior Member
|
Hello,
I guess you want to move the transition region away from the boundary layer. Please try refinementThickness option. The is boundaryCellSizeRefinementThickness options valid globally. I hope this helps you proceed further. Regards, Franjo
__________________
Principal Developer of cfMesh and CF-MESH+ www.cfmesh.com Social media: LinkedIn, Twitter, YouTube, Facebook, Pinterest, Instagram |
|
June 2, 2015, 07:59 |
|
#3 |
New Member
Choi Hak Kyu
Join Date: Apr 2015
Posts: 12
Rep Power: 11 |
Thank you very much, Franjo
It is working very well Regards, |
|
July 20, 2015, 07:29 |
about cfMesh cartesianMesh objectRefinement
|
#4 |
Member
Pierluigi Cirrottola
Join Date: Jun 2013
Posts: 52
Rep Power: 13 |
Hi prodo, hi Franjo
I' trying to use cfMesh too, and I can say that it is very interesting and fast. I have this problem: this objectRefinement part of my meshDict doesn't work at all. I don't see any error in cartesianMesh logfile, but refinement doesn't appear. Can you help me? Many thanks Piero Code:
objectRefinement { centro { type sphere; cellSize 0.1; centre (0 0 0); radius 3; } linea1 { type line; cellSize 0.2; p0 (-7.5 0 8); p1 (0 0 0); refinementThickness 2.5; } linea2 { type line; cellSize 0.2; p0 (7.5 0 8); p1 (0 0 0); refinementThickness 2.5; } verticale { type line; cellSize 1; p0 (0 -50 0); p1 (0 50 0); refinementThickness 10; } } |
|
July 20, 2015, 07:43 |
|
#5 |
New Member
Choi Hak Kyu
Join Date: Apr 2015
Posts: 12
Rep Power: 11 |
I think, objectRefinement spell was wrong
may objectRefinements is correct Code:
objectRefinement <-- { centro { type sphere; cellSize 0.1; centre (0 0 0); radius 3; } linea1 { type line; |
|
July 20, 2015, 09:27 |
ok
|
#6 | |
Member
Pierluigi Cirrottola
Join Date: Jun 2013
Posts: 52
Rep Power: 13 |
Quote:
Many many thanks to you, prodo Piero |
||
July 21, 2015, 10:13 |
cfMesh python tools
|
#7 |
Member
Pierluigi Cirrottola
Join Date: Jun 2013
Posts: 52
Rep Power: 13 |
Hi Franjo,
I read that you are actively involved in cfMesh SourceForge project. I have a stupid problem: I'm not able to run salomeTriSurf.py. In effect, I can start the tool, but I don't know how to create the output file. I read the source code, but, because I'm not so good to program, I didn't understand how to input the fileName. Can you give me some information? Thank you in advance Pierop.s. I'm running Salomé 7.5.1 on Ubuntu 14.04.2LTS |
|
July 22, 2015, 05:19 |
cfMesh python tools for Salome
|
#8 |
Senior Member
|
Ciao Piero,
Yes, I am the principal developer of cfMesh. However, the scripts for Salome are the contribution from Ivor Clifford. In order to export the surface from Salome I usually do the following: 1. Generate a triangulation in Salome, within the Mesh module. 2. Import the salomeToSurf.py script. The Load Script option exists inside the File menu. 3. Select the surface you want to export, by highlighting it in the project tree, and write: triSurf().writeFms("surfaceName.fms") in the python console. This executes the script with the selected mesh as its argument, and writes the fms file with the given name into the directory where Salome is installed. You can also provide an absolute path to get the fms file written to the desired location. I hope this helps you move forward. Regards, Franjo
__________________
Principal Developer of cfMesh and CF-MESH+ www.cfmesh.com Social media: LinkedIn, Twitter, YouTube, Facebook, Pinterest, Instagram |
|
July 22, 2015, 07:15 |
Nice !
|
#9 | |
Member
Pierluigi Cirrottola
Join Date: Jun 2013
Posts: 52
Rep Power: 13 |
Quote:
I just tested it (on 7.5.1): it works very well! Many thanks Pierop.s. it could be a good idea to make a sub-forum about cfMesh use . . . |
||
January 13, 2016, 08:40 |
|
#10 | |
New Member
Javier Anez
Join Date: May 2013
Location: Paris, France
Posts: 6
Rep Power: 13 |
Hi everyone.
I just began using cfMesh on last Monday. And I am also new in OF and Salome. I followed the steps described below, but I got this message from the python console: >>>triSurf().writeFms("meshPractice.fms") Converting SMESH Mesh 'Mesh_1' Done Traceback (most recent call last) File ''<input>'', line 1, in <module> File /path_to_salomeTriSurf.py, line 344, in writeFms f = open(fileName, 'wb') #NOTE: file opened as binary to ensure unix-style line breaks IOError: [Errno 13] Permission denied: 'meshPractice.fms' I am using Salome 7.6 Please anyone Thanks in advance JAP Quote:
|
||
January 18, 2016, 10:00 |
|
#11 | |
Member
Pierluigi Cirrottola
Join Date: Jun 2013
Posts: 52
Rep Power: 13 |
Quote:
perhaps you are trying to send your .cms file to a protected directory. In python console, write: import osyou will see the actual dir where your are attempting to write. Write now: dir="yourdirname"where "yourdirname" is complete path of a directory where you have a complete hownership and try to use again TriSurf().writeFms("meshPractice.fms") I hope it is enough bye Piero |
||
January 20, 2016, 13:17 |
|
#12 | |
New Member
Javier Anez
Join Date: May 2013
Location: Paris, France
Posts: 6
Rep Power: 13 |
Quote:
Since that was my first time using python console in Salome, I did not know that the scripts need to be located where Salome is being run. However, I have another question. Have you managed to create smooth boundary layers using cartesianMesh? I mean, I am trying to get similar cell size between the last boundary layer and its neighbor cell. Attached I sent you two pictures: The first picture is just a simple case to demonstrate the big difference between the last boundary layer and its neighbor cell, and the second picture both cells are approximately the same size. Best regards JAP |
||
January 20, 2016, 21:08 |
|
#13 | |
Senior Member
|
Hello,
Quote:
Regards, Franjo
__________________
Principal Developer of cfMesh and CF-MESH+ www.cfmesh.com Social media: LinkedIn, Twitter, YouTube, Facebook, Pinterest, Instagram |
||
February 23, 2017, 06:10 |
|
#14 |
New Member
Sam
Join Date: Feb 2017
Posts: 1
Rep Power: 0 |
Hi guys, this is my first post so please be kind!
I created an fms file using the salomeTriSurf.py script and the triSurf().writeFms("draftTube8.fms") function as outlined by franjo_j - this was successful and I have the .fms file in the correct directory and tried to mesh using cartesianMesh and got the following terminal window failure: Create time Setting root cube size and refinement parameters Root box (-2.446 -3.36 -4.096) (5.746 4.832 4.096) Requested cell size corresponds to octree level 13 Refining boundary Refining boundary boxes to the given size Finished refining boundary boxes Performing automatic refinement Performing automatic refinement Marking inside/outside. Number of internal boxes is 100736558 Number of outside boxes is 70662364 Number of data boxes is 52416923 Number of unknown boxes is 0 Killed This case has been run using a simple .fms file that was created from a merged .stl using surfaceToFMS. So my question is, why would the .fms file created in salome cause the cartesianMesh to fail? The only change I have made to the fms file created in salome is to change the inlet and outlet from wall to patch and left the main body as wall. p, li { white-space: pre-wrap; salomeTriSurf.py p, li { white-space: pre-wrap; } |
|
August 20, 2018, 11:35 |
|
#15 | |
New Member
Jenna Vergeynst
Join Date: Aug 2016
Posts: 10
Rep Power: 10 |
Quote:
Hello, The workflow above (but with the script salomeTriSurf.py instead of salomeToSurf.py, are these the same?) is giving me following error: Code:
AtributeError: 'SalomeOutsideGUI' object has no attribute 'getAllSelected'. Thanks! Jenna |
||
August 22, 2018, 10:27 |
|
#16 |
New Member
Jenna Vergeynst
Join Date: Aug 2016
Posts: 10
Rep Power: 10 |
Hello,
Just posting the solution to my problem above, thanks to Ivor Clifford. As I was running the script from outside the GUI, the following was needed to be written inside my script: Code:
import salome salome.salome_init() from salomeTriSurf import triSurf triSurf(<object>).writeFms(<filename>) |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] SnappyHexMesh for internal Flow | vishwa | OpenFOAM Meshing & Mesh Conversion | 24 | June 27, 2016 09:54 |
[GAMBIT] 3D Mesh for complex structure | Shinobi | ANSYS Meshing & Geometry | 40 | December 4, 2012 05:30 |
[Gmsh] 2D Mesh Generation Tutorial for GMSH | aeroslacker | OpenFOAM Meshing & Mesh Conversion | 12 | January 19, 2012 04:52 |
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! | sc298 | OpenFOAM Meshing & Mesh Conversion | 2 | March 27, 2011 22:11 |
fluent add additional zones for the mesh file | SSL | FLUENT | 2 | January 26, 2008 12:55 |