|
[Sponsors] |
[snappyHexMesh] SnappyHexMesh - How to set-up to avoid skewfaces? |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 7, 2015, 13:30 |
|
#21 |
Member
Werner
Join Date: Jul 2015
Location: West Lafayette, USA
Posts: 34
Rep Power: 11 |
Hi Luois !
With your hack my simulation is now running. I had to introduce that line of code in both AMI1 and AMI2 boundary conditions. Thank you very much !! best regards, Werner |
|
September 7, 2015, 16:08 |
|
#22 | |
Member
Werner
Join Date: Jul 2015
Location: West Lafayette, USA
Posts: 34
Rep Power: 11 |
Hi again,
The simulation ran for a couple of hours (in debug Mode) and then the courant number began growing dramaticly before the solver crashed. What is making the courant number to grow that way ? May it be because the simulation starts working with the finer cells of my model that have a smaller deltaX ? (having in mind that the courant number is Co=U*deltaT/deltaX) Do you have any ideas of how to solve this issue? thank a lot in advance, Werner Quote:
|
||
September 14, 2015, 11:44 |
Solution to Problem
|
#23 |
Member
Werner
Join Date: Jul 2015
Location: West Lafayette, USA
Posts: 34
Rep Power: 11 |
Hi,
I could solve the problem working with a courser mesh. Now I'll refine it slowly to get a better precision in the results. Using a searchableCylinder to define the geometry of the slinding Cylinder where the turbine is contained, I was able to avoid the low weight faces on the AMI interface. I guess snappyHexMesh works more stable with this definition that with and .stl for the Cylinder. thank you all ! Werner |
|
September 15, 2015, 09:25 |
|
#24 | |
Senior Member
|
Quote:
Regards, -Louis |
||
September 15, 2015, 10:11 |
|
#25 |
Member
Werner
Join Date: Jul 2015
Location: West Lafayette, USA
Posts: 34
Rep Power: 11 |
Thank YOU Louis !
What software and settings do you use to generate the .stl file ? |
|
September 15, 2015, 12:52 |
|
#26 |
Senior Member
|
For the cylinders I use Gmsh with a simple script that generates them. I don't even need to open the graphical interface and it is completely parametrized...
|
|
September 25, 2015, 13:22 |
Mesh refinement in SnappyHexMesh
|
#27 |
Member
Werner
Join Date: Jul 2015
Location: West Lafayette, USA
Posts: 34
Rep Power: 11 |
Hi Louis and OpenFoamers,
I have worked further with my wind Turbine Model and now I'm finding issues since I can't refine the model as much as I need. I hope this is inquiry is not very far away of the topic of the thread. I have been able to run a model (with pimpleDyMFoam) of a wind turbine already and have got nice results so far. However the torque that I'm getting is just one third of the experimental Torque. Therefore I'm trying to refine my mesh in a Grid Independence test but I'm not able to increase the number of cells over 250 000 cells. Whenever I increase this (e.g. increasing the surface refinement over rotor as you can see in my MeshSensiAna.xls spreadsheet) the solver blows-up with large MaxCourant numbers that get balanced by decreasing deltaTime (since I'm using adjustableTimeStep in controlDict). As a results the simulation advances much slower and crashes eventually. This is presumably because I have too small deltaX in the finer cells. Some advice is to implement the same region refinement outside of the rotating cylinder so that the sliding interface would have the same cell size at both sides, thus I created a region called CylinderBig (as you may see in my snappyHexMeshDict.txt ), yet with no positive result. Do you know how to create a finer Mesh and get my simulation running ?. I tried already increaing the relaxationFactors in fvSolution, and refining the mesh changing several parameters (as you may see in MeshSensiAna.xls) but this didnt't work either. I haven't tried yet with other meshing software because I want to understand what is happening with my model and if possible make it run with snappyHexMesh, where I have everything ready. thanks in advance for your attention, Werner ps. I'm dealing as well with the layer addition that is not properly made. I'm trying to put just 1 layer around the blades and as the addlayers application iterates the layers that I had at the beginning get all removed, aparently because they didn't comply with the meshquality controls.. Do you have any ideas for this issue ? |
|
October 2, 2015, 06:26 |
|
#28 |
Senior Member
|
Dear Werner,
I only had time to look quickly at your files, but I'd suggest you try to change the faceType to baffle for your AMI interface: Code:
refinementSurfaces // Surface-wise min and max refinement level { rotor {level (1 4);} Cylinder { level (1 1); faceType baffle; cellZone Cylinder; faceZone Cylinder; cellZoneInside inside; } I would also reduce the initial timestep as it seems you Courant number in the first few time steps is too high. Try not to let it ever go above ~5 I hope this leads to to some sort of solution. Regards, -Louis |
|
December 11, 2015, 12:22 |
|
#29 |
New Member
Martin
Join Date: Oct 2013
Location: Newcastle
Posts: 21
Rep Power: 13 |
Hi Louis,
I'm currently also struggeling with getting a good AMI source and target weights with mesh generated using snappyHexMesh. I've tried both, using .stl files for the cylinder and creating the cylinder as searchableCylinder in SHMD but both options do not give me a good mesh around the edges of the cylinder. Further, I'm meshing a number of cylinders and the quality of the mesh around the edges varies quite a bit between cylinders at different positions within my domain. Could you give some more information as to what actually changes by changing the faceType to baffle?I did this and it solved all the problems i was encountering for a long long long time !! Getting very good numbers now on the patch weights. Code:
AMI: Patch source sum(weights) min/max/average = 1, 1.00006, 1 AMI: Patch target sum(weights) min/max/average = 1, 1.00006, 1 AMI: Creating addressing and weights between 32189 source faces and 32189 target faces AMI: Patch source sum(weights) min/max/average = 1, 1.05919, 1.00001 AMI: Patch target sum(weights) min/max/average = 1, 1.05919, 1.00001 AMI: Creating addressing and weights between 32120 source faces and 32120 target faces AMI: Patch source sum(weights) min/max/average = 1, 1.06342, 1.00001 AMI: Patch target sum(weights) min/max/average = 1, 1.06342, 1.00001 |
|
December 11, 2015, 13:34 |
|
#30 |
Senior Member
|
Hi Martin,
I'm glad this solved your issue. I'm not the code expert, but from what I recall the baffle condition imposes that both inside and outside AMI interfaces have exactly the same cell faces. In the other scenario, the inside and outside interfaces are allowed to be meshed differently. There seems to be issues when there are big cells on one side of the AMI and small cells on the other. Best Regards, -Louis |
|
December 11, 2015, 16:08 |
|
#31 |
New Member
Martin
Join Date: Oct 2013
Location: Newcastle
Posts: 21
Rep Power: 13 |
Are you using the splitOrMergeBaffles after this step? I'm getting a lot of errors now in the moveDynamicMesh -checkAMI and it looks like the cells are being pulled by the rotation or there was some error during snapping?
Code:
solidBodyMotionFunctions::rotatingMotion::transformation(): Time = 7.69383 transformation: ((0 0 0) (0.996041 (0.0889006 0 0))) solidBodyMotionFunctions::rotatingMotion::transformation(): Time = 7.69383 transformation: ((0 0.00331939 -0.0371904) (0.996041 (0.0889006 0 0))) solidBodyMotionFunctions::rotatingMotion::transformation(): Time = 7.69383 transformation: ((0 -0.00331939 0.0371904) (0.996041 (0.0889006 0 0))) solidBodyMotionFunctions::rotatingMotion::transformation(): Time = 7.69383 transformation: ((0 0 0) (0.996041 (0.0889006 0 0))) AMI: Creating addressing and weights between 10765 source faces and 10765 target faces AMI: Patch source sum(weights) min/max/average = 1, 1.13227, 1.00006 AMI: Patch target sum(weights) min/max/average = 1, 1.13227, 1.00006 AMI: Creating addressing and weights between 10532 source faces and 10532 target faces AMI: Patch source sum(weights) min/max/average = 1, 1.24544, 1.00016 AMI: Patch target sum(weights) min/max/average = 1, 1.24544, 1.00016 AMI: Creating addressing and weights between 10489 source faces and 10489 target faces AMI: Patch source sum(weights) min/max/average = 1, 1.21772, 1.0001 AMI: Patch target sum(weights) min/max/average = 1, 1.21772, 1.0001 AMI: Creating addressing and weights between 10171 source faces and 10171 target faces AMI: Patch source sum(weights) min/max/average = 1, 1.16598, 1.00006 AMI: Patch target sum(weights) min/max/average = 1, 1.16598, 1.00006 Point usage OK. Upper triangular ordering OK. Topological cell zip-up check OK. Face vertices OK. Number of identical duplicate faces (baffle faces): 41957 <<Number of duplicate (not baffle) faces found: 6. This might indicate a problem. <<Number of faces with non-consecutive shared points: 7. This might indicate a problem. Mesh topology OK. Boundary openness (8.17392e-17 1.84432e-16 6.86022e-16) OK. ***High aspect ratio cells found, Max aspect ratio: 1.21045e+196, number of cells 652 Minimum face area = 1.38377e-09. Maximum face area = 0.0101884. Face area magnitudes OK. ***Zero or negative cell volume detected. Minimum negative volume: -1.46402e-07, Number of negative volume cells: 649 Mesh non-orthogonality Max: 179.834 average: 15.5283 *Number of severely non-orthogonal (> 70 degrees) faces: 32041. ***Number of non-orthogonality errors: 4562. ***Error in face pyramids: 9357 faces are incorrectly oriented. ***Max skewness = 48556.3, 19066 highly skew faces detected which may impair the quality of the results Failed 5 mesh geometry checks. Failed 1 mesh checks. Calculating AMI weights between owner patch: AMI1 and neighbour patch: AMI2 Calculating AMI weights between owner patch: AMI3 and neighbour patch: AMI4 Calculating AMI weights between owner patch: AMI5 and neighbour patch: AMI6 Calculating AMI weights between owner patch: AMI7 and neighbour patch: AMI8 ExecutionTime = 855.37 s ClockTime = 855 s Last edited by mahtin360; December 14, 2015 at 05:06. |
|
January 15, 2016, 06:53 |
|
#32 |
Senior Member
|
Hello Martin,
Yes, I use these tools after running snappyHexMesh: Code:
runParallel createPatch $nProcs -overwrite runParallel mergeOrSplitBaffles $nProcs -split -overwrite; # split baffles when faceType baffles called in snappyHexMesh (baffle solves the problem of badly defined AMI patches) runParallel topoSet $nProcs runParallel renumberMesh $nProcs -overwrite runParallel checkMesh $nProcs -Louis |
|
January 12, 2018, 14:32 |
|
#33 |
Member
James Gross
Join Date: Nov 2017
Posts: 77
Rep Power: 9 |
Hi,
Might be a bit late to the party on this one, but thought it might be better to post in a thread that is already established, rather than to make another. I was hoping Bruno (or anyone else for that matter) might have some advice for a similar problem. I am trying to use sHM to make a mesh of a volute casing and the internal volume. I am finding that the quality of the mesh is not very good (particularly the internal volume). In particular, there are a number of skewed faces that are being generated during the patch smoothing iterations. Here is a link to the directory containing the problem. https://universityofcambridgecloud-m....000Z&e=jczdgy Disclaimer: I am using OpenFOAM Extend 4.0. I do not feel there will be any issues if one were to attempt this on normal installations of OF (e.g. OF V5.0), but I have not tested this. The Allrun file will most likely need to be slightly modified however. Regards, James |
|
February 27, 2018, 09:36 |
problem with meshing - how to change parameters -SkewFaces and nonOrthoFaces
|
#34 |
New Member
Gabriela
Join Date: Dec 2017
Posts: 3
Rep Power: 9 |
Hi everyone!
I have a very similar problem. I don’t have a lot of experience with openFoam and also not with scripting. I have a very complex building geometry that sits on a topography ground and I need to run an air flow around the building. Attached 2 screenshots of the case. I am trying for a few days to mesh this with snappyhex and always 2 highly skew faces left and in the last try, also 2 nonOrthoFaces. I can visualize them in paraview but imposible to find them in my rhino model or stl file. I redid the area there they appear a few times and still no change. They appear in a different location. I don’t know what parameters to change to improve my mesh. My snappyhex was set up by someone else that I cant contact. I gave a try to start the simulation but error is: Floating point exception(core dumped) What I did until now is to increase the level of cells for my building, I am not at 30 cm cell size. below is my snappyHexMeshDict if anyone would have time to take a look. Any help is highly appreciated. Thank you very much! Gabriela |
|
February 27, 2018, 09:58 |
|
#35 |
Senior Member
|
Hi Gabriela,
It seems you are using a script to run the case, pyFoam, with which I am not familiar. The floating point error you mention may be linked to something else than the mesh, I would advise running the case with a smaller mesh step by step to see where it actually "breaks". Also, to better understand snappy, have a read at this quick guide: https://cfd.direct/openfoam/user-guide/snappyhexmesh/ Good luck, -Louis |
|
April 15, 2023, 06:35 |
|
#36 | |
Senior Member
Farzad Faraji
Join Date: Nov 2019
Posts: 206
Rep Power: 8 |
Dear pcaron
I am going to test your solution "This problem arises when your surface is almost aligned with the mesh." and see if it works for me or not. I have attached my skewed face to this post. Thanks, Farzad Quote:
|
||
April 19, 2023, 01:38 |
|
#37 |
Senior Member
Farzad Faraji
Join Date: Nov 2019
Posts: 206
Rep Power: 8 |
Dear Pacron
your suggestion does not worked! Thanks, Farzad |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[ICEM] ICEM Scripting Issues | tylerplowright | ANSYS Meshing & Geometry | 33 | September 27, 2021 17:35 |
[snappyHexMesh] On which patches to set BC's for snappyHexMesh ? | Talder | OpenFOAM Meshing & Mesh Conversion | 0 | November 8, 2015 19:25 |
set BC mass-flow-inlet via UDF and via GUI perform different result | sawa25 | FLUENT | 1 | February 25, 2015 01:51 |
[ICEM] Question about the use of ICEM tcl scripting | lnk | ANSYS Meshing & Geometry | 9 | January 16, 2013 10:24 |
How to show the transient case? | H.P.LIU | Phoenics | 7 | July 13, 2010 05:31 |