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

[cfMesh] edge refinement

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 4, 2017, 16:27
Default edge refinement
  #1
New Member
 
Join Date: Jul 2015
Posts: 1
Rep Power: 0
Gosaburo is on a distinguished road
Hello everybody,

I've read many threads of this forum over the last year and most of the time was able to find the error by myself. Now comes the time that I need to open a post :-)

First of all, I would like to thank the community for your kind help, as far as I've seen it, you are always kind and try to help everybody as good as you can.

So, now to my problem:

I'm trying to simulate an internal flow and prepared the STL file with all its regions. But when it comes to the meshing process in CfMesh, some edges are not meshed correctly. I've looked at the .vtk file, which shows the edges generated by the command "SurfaceFeatureEdges -angle 30". It seems to detect the edges correctly, but didn't place the mesh nodes on these edges.

My mesh has some very high skewness values of about 400-1200 which are way too high.

I've played a bit with the cellsize, but that did not help me out a lot (I did not cut the cell size by half because this would increase the data space too much)

Thank you in advance :-)

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                |
| \\      /  F ield         | cfMesh: A library for mesh generation          | 
|  \\    /   O peration     |                                                |
|   \\  /    A nd           | Author: Franjo Juretic                         | 
|    \\/     M anipulation  | E-mail: franjo.juretic@c-fields.com            |
\*---------------------------------------------------------------------------*/

FoamFile
{
    version   2.0;
    format    ascii;
    class     dictionary;
    location  "system";
    object    meshDict;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

surfaceFile "edges.fms";

maxCellSize 0.001;    

surfaceMeshRefinement
{
  wall
    {
    surfaceFile "CAD/STL/wall.stl";
    additionalRefinementLevels 3;
    refinementThickness 0.00004;
    }
} 

boundaryLayers
{
//    nLayers 3;

//    thicknessRatio 1.2;

//    maxFirstLayerThickness 0.5;

    patchBoundaryLayers
    {
        "wall.*"
        {
            nLayers           3;

            thicknessRatio    1.2;

            maxFirstLayerThickness 0.00001;

            allowDiscontinuity 0;
        }       
    }
}


renameBoundary
{
    newPatchNames
    {
    wall
      {
      newName walls;
      type    wall;
      }
      
     leftWall1
      {
      newName cyclic1;
      type    cyclicAMI;
      neighbourPatch  cyclic0;
      transform rotational;
      rotationAxis    (0 0 1);
      rotationCentre  (0 0 0);
      rotationAngle   180;          // degrees     
      }
          
      leftWall2
      {
      newName cyclic1;
      type    cyclicAMI;
      neighbourPatch  cyclic0;
      transform rotational;
      rotationAxis    (0 0 1);
      rotationCentre  (0 0 0);
      rotationAngle   180;          // degrees     
      }
      
     rightWall1
      {
      newName cyclic0;
      type    cyclicAMI;
      neighbourPatch  cyclic1;
      transform rotational;
      rotationAxis    (0 0 1);
      rotationCentre  (0 0 0);
      rotationAngle   180;          // degrees     
      } 
      
      rightWall2
      {
      newName cyclic0;
      type    cyclicAMI;
      neighbourPatch  cyclic1;
      transform rotational;
      rotationAxis    (0 0 1);
      rotationCentre  (0 0 0);
      rotationAngle   180;          // degrees     
      }  
       
      inlet
      {
      newName inlet;
      type    patch;
      } 
         
      outlet
      {
      newName outlet;
      type    patch;
      }    
    
    }
    


}
// ************************************************************************* //
Attached Images
File Type: jpg edges.jpg (192.7 KB, 145 views)
Gosaburo is offline   Reply With Quote

Old   June 6, 2017, 02:39
Default
  #2
Senior Member
 
M. C.
Join Date: May 2013
Location: Italy
Posts: 286
Blog Entries: 6
Rep Power: 16
student666 is on a distinguished road
Hi,

First, are you sure of the command line you're typing? I generally use:
Code:
surfaceFeatureEdges.exe surfacefile.stl surfacefile.fms -angle 30
and have a check with paraview that all feature Edges have been captured:

Code:
FMSToSurface -exportFeatureEdges surfacefile.fms temp.fms
I think you have also two more options to capture the edges properly:
  1. separate each surface containing the edges and define them as separate files.
  2. define locally a edgeMeshRefinement phase
point 1 enforce cfMesh to capture properly edges.
e.g.
Code:
maxCellSize 0.008;
//boundaryCellSize 0.001375;
localRefinement
	{
		ext1					{cellSize 0.004;}
		interAirAmbAirComb1		{cellSize 0.0025;}
		interAirAmbAirComb2		{cellSize 0.0025;}
		interAirAmbGlass		{cellSize 0.004;}
		interAirAmbSolido1		{cellSize 0.003;} //0.0025 //totale
		interAirAmbSolido2		{cellSize 0.00075;} //0.0025
		interAirAmbSolido3		{cellSize 0.00075;} //0.0025
		interAirAmbSolido4		{cellSize 0.002;} //0.0025 
		interAirAmbSolido5		{cellSize 0.002;}
		interAirAmbSolido6		{cellSize 0.002;} 		
		outletComfort			{cellSize 0.003;}
		//ext 2/3/4/3/5 - symmetryAmb - wallSerbatoio
	}
surfaceMeshRefinement
	{
		refVentilatore	{surfaceFile  "refineGeometry/refVentilatore.stl";	additionalRefinementLevels 4;} // refinementThickness 0.002; }
	}
edgeMeshRefinement
	{
		asole						{edgeFile "refineGeometry/asole.vtk";additionalRefinementLevels 4;} //refinementThickness 0.002;
		angolo2						{edgeFile "refineGeometry/angolo2.vtk";additionalRefinementLevels 6;}

	}
student666 is offline   Reply With Quote

Reply


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 01:37
how to set periodic boundary conditions Ganesh FLUENT 15 November 18, 2020 06:09
[snappyHexMesh] Edge Refinement fracasce OpenFOAM Meshing & Mesh Conversion 3 December 2, 2017 13:30
[snappyHexMesh] snappyHexMesh aborting Tobi OpenFOAM Meshing & Mesh Conversion 0 November 10, 2010 03:23
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 11:55


All times are GMT -4. The time now is 12:42.