CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Community Contributions

[cfMesh] How do we perform edge refinement in cfMesh

Register Blogs Community New Posts Updated Threads Search

Like Tree6Likes
  • 2 Post By franjo_j
  • 1 Post By dinolsky
  • 1 Post By dinolsky
  • 1 Post By franjo_j
  • 1 Post By jstejskal

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 30, 2015, 05:35
Default How do we perform edge refinement in cfMesh
  #1
New Member
 
Dion
Join Date: Dec 2014
Location: Bremen, Germany
Posts: 13
Rep Power: 12
dinolsky is on a distinguished road
Hello everyone,

I started using cfMesh for the past few days. I find it very useful and with some difficulties. For exemple i want to use the edgeMehRefinement dictionary option. I uses V1.1.1 currently. I tried to follw the user guide and i didnt find any solution. For exemple i tried to extract the edge Features using surfaceFeatureEdges utility and save it in .vtk format. When i try to insert this file in my dictionary i get a error like
Code:
----> Foam Fatal Error
unknown file extension vtk

valid types are :

5 (
bdf
eMesh
inp
nas
obj
)
...
Then i tried to extract the .eMEsh and used it in the edgeMeshRefinement dictionary and it returns a error

Code:
---> FOam Fatal Error:
Expected a '(' while reading VectorSpace>Form. Cmpt, nCmpt>, foulnd on line22 an error
I belive that i used the SurfaceFeatureExtract utility to get the .eMesh file. If any could please tell me whether i am doing the right thing or not. Looking forward for your valueable help.

with regards,
Dinesh
dinolsky is offline   Reply With Quote

Old   October 30, 2015, 08:13
Default
  #2
Senior Member
 
Franjo Juretic
Join Date: Aug 2011
Location: Velika Gorica, Croatia
Posts: 124
Rep Power: 17
franjo_j is on a distinguished road
Send a message via Skype™ to franjo_j
Hi,

An example for edgeMeshRefinement looks like this:

edgeMeshRefinement
{
edge1
{
edgeMesh "edges.vtk";
cellSize 0.005;
refinementThickness 0.002;
}
edge2
{
edgeMesh "edge2.vtk;
additionalRefinementLevels 2;
}
}

The edgeMesh keyword is the name of the file relative to the directory of the case. cellSize is the desired cell size, and the selected value is the first multiplier of maxCellSize that is smaller than cellSize. additionalRefinementLevels specifies the desired number of refinement levels relative to maxCellSize. refinementThickness is the distance from the edge where the refinement still applies.

Quote:
Originally Posted by dinolsky View Post
Hello everyone,

I started using cfMesh for the past few days. I find it very useful and with some difficulties. For exemple i want to use the edgeMehRefinement dictionary option. I uses V1.1.1 currently. I tried to follw the user guide and i didnt find any solution. For exemple i tried to extract the edge Features using surfaceFeatureEdges utility and save it in .vtk format. When i try to insert this file in my dictionary i get a error like
Code:
----> Foam Fatal Error
unknown file extension vtk

valid types are :

5 (
bdf
eMesh
inp
nas
obj
)
...
My impression is that your vtk file is a surface mesh, and it must be an edge mesh. Please load the file into ParaView or something else and make sure that you have only edge cells in there.

surfaceFeatureEdges <inputSurface> <surfaceWithFeatureEdges> -angle 40 generates a new surface mesh with selected feature edges or additional patches. Feature edges are stored when you export into fms files, and in other cases the utility generates patches whose boundaries correspond to the detected feature edges.

To extract the edge mesh from the fms file, you can FMSToSurface as follows:

FMSToSurface <surfaceMesh> <outputSurfaceMesh> -exportFeatureEdges

Alternatively, you can extract edges that you want to use for refinement in Paraview and save them is a vtk file.

Quote:
Originally Posted by dinolsky View Post

Then i tried to extract the .eMEsh and used it in the edgeMeshRefinement dictionary and it returns a error

Code:
---> FOam Fatal Error:
Expected a '(' while reading VectorSpace>Form. Cmpt, nCmpt>, foulnd on line22 an error
I belive that i used the SurfaceFeatureExtract utility to get the .eMesh file. If any could please tell me whether i am doing the right thing or not. Looking forward for your valueable help.

with regards,
Dinesh
Can you please post the content of the eMesh file?
In addition, what version of OpenFOAM are you using? I have observed problems reading edge meshes with foam-extend.

Regards,

Franjo
bennn and dinolsky like this.
__________________
Principal Developer of cfMesh and CF-MESH+
www.cfmesh.com
Social media: LinkedIn, Twitter, YouTube, Facebook, Pinterest, Instagram
franjo_j is offline   Reply With Quote

Old   October 30, 2015, 10:47
Default
  #3
New Member
 
Dion
Join Date: Dec 2014
Location: Bremen, Germany
Posts: 13
Rep Power: 12
dinolsky is on a distinguished road
Hello Franjo,

Thank you very much for your reply. As you have mentioned in your post.
Code:
edgeMeshRefinement
{
   edge1
   {
        edgeMesh "edges.vtk";
        cellSize 0.005;
        refinementThickness  0.002;
   }
   edge2
   {
       edgeMesh "edge2.vtk;
       additionalRefinementLevels 2;
   }
}
I have followed the same procedure as per the user guide. I used the surfaceFeatureEdges utility to extract the edges. I aslo checked my vtk in paraview and it looks fine only with the edge features. I always get this following error if i use a vtk file in the edgeREfinement dictonary.
Code:
----> Foam Fatal Error unknown file extension vtk
 valid types are :  5 ( bdf eMesh inp nas obj )
Code:
In addition, what version of OpenFOAM are you using? I have observed problems reading edge meshes with foam-extend.
May be what you mentioned in your post is true. I am using a extened version of openfoam v2.0.x. And i am not allowed to share any files here by my company rules. But i really apppreciate your effort creatinf this wonderful tool. I will try to use cfMesh on other standard versions of OF and will update my status. Thank you once agin for your reply.

with regards,
Dinesh
franjo_j likes this.
dinolsky is offline   Reply With Quote

Old   November 2, 2015, 07:04
Default
  #4
New Member
 
Dion
Join Date: Dec 2014
Location: Bremen, Germany
Posts: 13
Rep Power: 12
dinolsky is on a distinguished road
Hello Mr. Franjo,

I tried with a standard OF v2.3.0 and the problem relating the edgeFile is now solved. I can now able to use the edgeRefinement without any problem. Thank you for your effort.

with regards,
Dinesh Nithyanandham
franjo_j likes this.
dinolsky is offline   Reply With Quote

Old   November 3, 2015, 05:40
Default
  #5
Senior Member
 
Franjo Juretic
Join Date: Aug 2011
Location: Velika Gorica, Croatia
Posts: 124
Rep Power: 17
franjo_j is on a distinguished road
Send a message via Skype™ to franjo_j
It was my pleasure to help and please let us know if you run into any other difficulites with cfMesh.

Kind regards,
Franjo
dinolsky likes this.
__________________
Principal Developer of cfMesh and CF-MESH+
www.cfmesh.com
Social media: LinkedIn, Twitter, YouTube, Facebook, Pinterest, Instagram
franjo_j is offline   Reply With Quote

Old   November 19, 2015, 09:03
Default
  #6
New Member
 
Jiri Stejskal
Join Date: May 2014
Posts: 5
Rep Power: 12
jstejskal is on a distinguished road
Dear Franjo,

I would also like to test the edge refinement in cfMesh. I extracted the edges as you described earlier using surfaceFeatureEdges and then FMSToSurface. When running cartesianMesh I get the following error:

--> FOAM FATAL IO ERROR:
incorrect first token, expected <int> or '(', found on line 1 the word '#'

file: trailingEdgeWall_featureEdges.vtk at line 1.

From function operator>>(Istream&, List<T>&)
in file /nfs/CFDWRK/bigdisk/SOFTWARE/foam/foam-extend-3.1/src/foam/lnInclude/ListIO.C at line 149.

FOAM exiting

I attach the .vtk file generated by FMSToSurface I'm using for your reference (renamed to .txt to be able to upload it here). Do you have any idea what I'm doing wrong? Thank you.
Attached Files
File Type: txt trailingEdgeWall_featureEdges.txt (4.2 KB, 45 views)
jstejskal is offline   Reply With Quote

Old   November 20, 2015, 07:11
Default
  #7
Senior Member
 
Franjo Juretic
Join Date: Aug 2011
Location: Velika Gorica, Croatia
Posts: 124
Rep Power: 17
franjo_j is on a distinguished road
Send a message via Skype™ to franjo_j
Hello,

Quote:
Originally Posted by jstejskal View Post
Dear Franjo,

I would also like to test the edge refinement in cfMesh. I extracted the edges as you described earlier using surfaceFeatureEdges and then FMSToSurface. When running cartesianMesh I get the following error:

--> FOAM FATAL IO ERROR:
incorrect first token, expected <int> or '(', found on line 1 the word '#'

file: trailingEdgeWall_featureEdges.vtk at line 1.

From function operator>>(Istream&, List<T>&)
in file /nfs/CFDWRK/bigdisk/SOFTWARE/foam/foam-extend-3.1/src/foam/lnInclude/ListIO.C at line 149.

FOAM exiting

I attach the .vtk file generated by FMSToSurface I'm using for your reference (renamed to .txt to be able to upload it here). Do you have any idea what I'm doing wrong? Thank you.
The file is correct. The problem is that you are using it with foam-extend-3.1. There is something wrong with the reader for edge meshes there. The error does not come from the code in cfMesh. Please compile cfMesh with OpenFOAM-* if you want to use edge mesh refinement.
__________________
Principal Developer of cfMesh and CF-MESH+
www.cfmesh.com
Social media: LinkedIn, Twitter, YouTube, Facebook, Pinterest, Instagram
franjo_j is offline   Reply With Quote

Old   November 23, 2015, 04:38
Default
  #8
New Member
 
Jiri Stejskal
Join Date: May 2014
Posts: 5
Rep Power: 12
jstejskal is on a distinguished road
Dear Franjo,

Thank you for your response, I'll try it out with OpenFOAM...
franjo_j likes this.
jstejskal is offline   Reply With Quote

Old   April 7, 2017, 10:43
Default edges not being captured properlly with cfMesh
  #9
Member
 
Ali
Join Date: Oct 2013
Location: Scotland
Posts: 66
Rep Power: 13
ali.m.1 is on a distinguished road
Hi Folks

I've been modelling a submerged jet impingement test with cfMesh with fairly good results (especially for the ease of use etc.)

One issue I am having is that in one of my geometries, the edge of the pipe, or the edge of the mesh is being 'cut' by the mesher. Does anyone have any ideas? I tried the above method of exporting the edges as .vtks, but that never worked.

My meshing process is as follows:
1. Create fluid geometry in Autodesk Inventor
2. Import .step file from inventor to Salome
3. Export surfaces from Salome to .stls
4. Merge .stls into one 'master' .stl
5. Mesh with cfMesh: using 'cartesianMesh' (using of4x)

Attached are some images of the problem. The settings are the same for both meshes, (although the images show a finer mesh around the nozzle in the cone mesh) however the mesh with the cone in it has curved edges at the pipe exit.

Does anyone have any suggestions?
ali.m.1 is offline   Reply With Quote

Old   August 2, 2017, 11:36
Default
  #10
Member
 
Ali
Join Date: Oct 2013
Location: Scotland
Posts: 66
Rep Power: 13
ali.m.1 is on a distinguished road
Hi Folks

I managed to solve the problem by doing:

surfaceFeatureEdges constant/triSurface/master.stl master1.stl

Where master.stl was my original .stl, and master1.stl is the new one to be meshed.

Cheers
ali.m.1 is offline   Reply With Quote

Old   September 27, 2022, 17:55
Default
  #11
Senior Member
 
Charles
Join Date: Aug 2016
Location: Vancouver, Canada
Posts: 151
Rep Power: 10
Marpole is on a distinguished road
Just a note here: meshDict keyword edgeMesh is changed to edgeFile in version 1.1.
__________________
Charles L.
Marpole is offline   Reply With Quote

Reply

Tags
cfmesh, edgerefinement


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[snappyHexMesh] SnappyHexMesh running killed! Mark JIN OpenFOAM Meshing & Mesh Conversion 7 June 14, 2022 02:37
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 07:09
killed "snappyHexMesh" parkh32 OpenFOAM Pre-Processing 2 April 8, 2012 18:12
[snappyHexMesh] snappyHexMesh aborting Tobi OpenFOAM Meshing & Mesh Conversion 0 November 10, 2010 04:23
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55


All times are GMT -4. The time now is 23:29.