How can I change the mesh structure generated by cfMesh
2 Attachment(s)
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 |
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 |
Thank you very much, Franjo
It is working very well Regards, |
about cfMesh cartesianMesh objectRefinement
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 |
I think, objectRefinement spell was wrong
may objectRefinements is correct Code:
objectRefinement <-- |
ok
Quote:
Many many thanks to you, prodo Piero |
cfMesh python tools
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 |
cfMesh python tools for Salome
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 |
Nice !
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 . . . |
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:
|
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 |
2 Attachment(s)
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 |
Hello,
Quote:
Regards, Franjo |
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; } |
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 |
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 |
All times are GMT -4. The time now is 19:58. |