|
[Sponsors] |
May 29, 2015, 15:16 |
CfMesh Mesh Refinements
|
#1 |
New Member
Calum Douglas
Join Date: Apr 2013
Location: Coventry, UK
Posts: 26
Rep Power: 13 |
Hi,
In this case we`re talking car external aero. For which I`ve basically copied the "asmoOctree" cf-mesh standard example and adapted it to my STL geometry. (pics attached) I made separate STLs, car_body, ground, walls, inlet, outlet etc etc then joined into one STL file with cat command, and in ASCII format renamed the patches inside the single large STL. I cant see any obvious solutions to this in the official documentation - although I suspect that #1 is something to do with this "fms" filetype. But its not very clear to me how I get to that from the starting point of ASCII STLs. My questions (in decending order of importance) 1) I do not want the side and upper walls etc to have mesh refinements. How do I stop these patches getting refined ? (pic from cfmesh example also attached showing it how I wish my mesh to appear) https://drive.google.com/file/d/0B7a...ew?usp=sharing 2) In snappy I can easily make an additional box shaped refinement area (inside of the outer boundary STL box) behind the car to catch the wake eddies, Can this be done in CF-Mesh too ? https://drive.google.com/file/d/0B7a...ew?usp=sharing 3) In snappy I make alot of use of distance refinements, so I can say how far away from my car I want each level of refinement to extend. Possible in Cf ? My cfmesh config file: 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 "car_all.stl"; maxCellSize 0.3; //0.2 boundaryCellSize 0.03;//0.025 minCellSize 0.015; //0.0125 localRefinement { car_body { cellSize 0.006; //0.005 } car_wheels { cellSize 0.005; //0.0025 } car_tyres { cellSize 0.005; //0.025 } } // ************************************************************************* // Regards
__________________
Calum Douglas Director Scorpion Dynamics Ltd Email: calum.douglas@scorpion-dynamics.com Web: www.scorpion-dynamics.com |
|
May 29, 2015, 18:56 |
progress
|
#2 |
New Member
Calum Douglas
Join Date: Apr 2013
Location: Coventry, UK
Posts: 26
Rep Power: 13 |
I managed to sort out most of this - not sure I`m doing in a very good way - but I solved the first one by making the boundary cell density identical to the max cell size. I think maybe not ideal but works.
The 2nd issue actually was in the manual, I just didnt look properly. However would still be very nice to find out how to NOT get the corners of the "wind-tunnel" to have angle corner refinements added....thats the current un-solved one now (see image below). https://drive.google.com/file/d/0B7a...ew?usp=sharing 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 "car.fms"; //"car_all.stl" maxCellSize 0.3; //0.2 boundaryCellSize 0.3;//0.03 //make same as maxCellSize to get rid of walls being refined minCellSize 0.015; //0.0125 localRefinement { ground { cellSize 0.025; //0.005 } car_body { cellSize 0.006; //0.005 } car_wheels { cellSize 0.005; //0.0025 } car_tyres { cellSize 0.005; //0.025 } } // Next section added by Calum to refine zone behind the car -not tested yet objectRefinements //copied from text in official manual { wake_refine //zone behind car to capture wake { type box; //shape of zone cellSize 0.15; //wake cell size centre (3 0 1.0); // xyz centre of box lengthX 10.0; lengthY 3.5; lengthZ 2.0; } } // Next section added by Calum to add in viscous layers boundaryLayers //coped from example "singleorifice" { // nLayers 3; //viscous layers to add // thicknessRatio 1.2; //1.0 > 1.3 // maxFirstLayerThickness 0.0015; //meters patchBoundaryLayers { "car_body" { nLayers 3; thicknessRatio 1.2; maxFirstLayerThickness 0.0015; allowDiscontinuity 0; } "car_wheels" { nLayers 3; thicknessRatio 1.2; maxFirstLayerThickness 0.0015; allowDiscontinuity 0; } "car_tyres" { nLayers 3; thicknessRatio 1.2; maxFirstLayerThickness 0.0015; allowDiscontinuity 0; } } } // ************************************************************************* //
__________________
Calum Douglas Director Scorpion Dynamics Ltd Email: calum.douglas@scorpion-dynamics.com Web: www.scorpion-dynamics.com |
|
June 1, 2015, 08:03 |
|
#3 |
Senior Member
|
Hello,
cfMesh requires only two entries in meshDict, and these are surfaceFile, and maxCellSize. All other settings are optional. Therefore, you do not need boundaryCellSize entry if you do not need to refine the mesh at the boundary. Refinement zones near corners and edges of the bounding box very likely come from the automatic refinement procedure activated by the minCellSize setting. It is possible to use primitives i.e. (box, sphere, cone, line) as refinement sources. The syntax is documented in the manual. Distance refinement is available, and is activated by specifying refinementThickness. Examples are provided in the manual. It is not parallelised in the version 1.0.1, and can be slow when the thickness is large. A new improved version shall be available soon. Kind Regards, Franjo
__________________
Principal Developer of cfMesh and CF-MESH+ www.cfmesh.com Social media: LinkedIn, Twitter, YouTube, Facebook, Pinterest, Instagram |
|
March 19, 2020, 22:42 |
|
#4 |
New Member
Matheus Marques
Join Date: Mar 2020
Posts: 4
Rep Power: 6 |
Hello,
I'm a brazilian chemical Engineering student and actually I'm starting to use CFmesh and I saw in some CFD post that you had problema similar as mine. I'm trying to make same refinement in each patch, but it looks like that when I use: boundaryLayers { patchBoundaryLayers { patchName { nLayers 5; thicknessRatio 1.1; maxFirstLayerThickness 2; } } } It looks like that ALL my boundarys get the nLayers I chose for just one patch. Do you know how can I solve this kind of problem? The same looks like happen with localRefinement { patchName1 { cellSize 2 refinementThickness 0.5 } patchName2 { cellSize 0.5; refinementThickness 0.5; } } I chose one patch to have a specific cell size but the two patches get the size of the first localRefinement I did (cellSize 2). Do you know how I can finish this problem? Thank you!!! |
|
March 20, 2020, 03:47 |
|
#5 | |
Senior Member
|
Quote:
Check the allowDiscontinuity option. It is described in the manual.
__________________
Principal Developer of cfMesh and CF-MESH+ www.cfmesh.com Social media: LinkedIn, Twitter, YouTube, Facebook, Pinterest, Instagram |
||
March 20, 2020, 06:28 |
|
#6 |
New Member
Matheus Marques
Join Date: Mar 2020
Posts: 4
Rep Power: 6 |
Franjo, thank you to answer me!
I tried here this: /*--------------------------------*- 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 "finalVersion.stl"; maxCellSize 5; boundarLayers { patchBoundaryLayers { "Lateral.*" { nLayers 5; thicknessRatio 1.2; maxFirstLayerThickness 1; allowDiscontinuity 0; } } } and after I changed allowDiscontinuity for 1 instead 0, but still does not work I chose this patch and when I open paraView and did a slice to see the intern mesh, it looks like as anything has happend. |
|
March 20, 2020, 06:44 |
|
#7 |
New Member
Matheus Marques
Join Date: Mar 2020
Posts: 4
Rep Power: 6 |
Now with allowDiscontinuity 1, it looks like that anything happend. I did many slice cuts in my geometry and any layer has been showed
I really don't know how to solve this!!! |
|
March 27, 2020, 08:49 |
|
#8 |
Member
benoit paillard
Join Date: Mar 2010
Posts: 96
Rep Power: 16 |
Hi, maybe try the following :
remove maxFirstLayerThickness add optimiseLayer add the boundary layer on each patch one by one |
|
Tags |
car, cfmesh, mesh, refinement |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
sliding mesh problem in CFX | Saima | CFX | 46 | September 11, 2021 07:38 |
Star CCM Overset Mesh Error (Rotating Turbine) | thezack | Siemens | 7 | October 12, 2016 11:14 |
[ICEM] surface mesh merging problem | everest | ANSYS Meshing & Geometry | 44 | April 14, 2016 06:41 |
[cfMesh] I can't create sharp edge mesh by cfMesh | prodo | OpenFOAM Community Contributions | 5 | November 11, 2015 03:42 |
[snappyHexMesh] snappyHexMesh won't work - zeros everywhere! | sc298 | OpenFOAM Meshing & Mesh Conversion | 2 | March 27, 2011 21:11 |