|
[Sponsors] |
July 24, 2023, 04:00 |
FOAM Warning :
|
#1 |
Member
Join Date: Jul 2023
Location: India
Posts: 30
Rep Power: 3 |
I've been working on the WindAroundBuildings tutorial and have been trying to just replace the geometry for start. I have replaced the original geometry with a .stl file. Now, when I run the snappyHexMesh, I get the following warning:
Reading refinement surfaces... --> FOAM Warning : From function Foam::refinementSurfaces::refinementSurfaces(const Foam::searchableSurfaces&, const Foam::dictionary&, Foam::label) in file refinementSurfaces/refinementSurfaces.C at line 215 Reading "/home/amirthaa/OpenFOAM/amirthaa-10/run/WABEx2/system/snappyHexMeshDict/castellatedMeshControls/refinementSurfaces" from line 49 to line 50 Not all entries in refinementSurfaces dictionary were used. The following entries were not used : 1(av1) My snappyHexMeshDict code: /*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 10 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { format ascii; class dictionary; object snappyHexMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #includeEtc "caseDicts/mesh/generation/snappyHexMeshDict.cfg" castellatedMesh on; snap on; addLayers off; geometry { av1.stl { type triSurfaceMesh; file "av1.obj"; } refinementBox { type searchableBox; min ( 0 0 0); max (250 180 90); } }; castellatedMeshControls { features ( { file "av1.obj"; level 1; } ); refinementSurfaces { av1 { level (3 3); patchInfo { type wall; } } } refinementRegions { refinementBox { mode inside; level 2; } } insidePoint (1 1 1); } snapControls { explicitFeatureSnap true; implicitFeatureSnap false; } addLayersControls { layers { stlSurface { nSurfaceLayers 2; } } relativeSizes true; expansionRatio 1.2; finalLayerThickness 0.5; minThickness 1e-3; } meshQualityControls {} writeFlags ( // scalarLevels // layerSets // layerFields ); mergeTolerance 1e-6; // ************************************************** *********************** // It would be useful if someone can guide me on the cause of this warning. |
|
July 24, 2023, 04:39 |
|
#2 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,232
Rep Power: 29 |
Hello,
In the geometry section of your snappyHexMeshDict, you geometry is named "av1.stl" but in the refinementSurfaces section you define refinement levels for "av1". You can either rename your geometry or modify your refinementSurfaces but names have to be consistent. You can have a look at the tutorials using snappyHexMesh to have some examples. For instance here: https://github.com/OpenFOAM/OpenFOAM...ppyHexMeshDict Cheers, Yann |
|
July 24, 2023, 05:52 |
|
#3 |
Member
Join Date: Jul 2023
Location: India
Posts: 30
Rep Power: 3 |
Thank you, that was helpful.
I also had and have another warning following the earlier one as : --> FOAM Warning : From function Foam::treeBoundBox::treeBoundBox(const Foam::UList<Foam::Vector<double> >&) in file meshes/treeBoundBox/treeBoundBox.C at line 136 cannot find bounding box for zero-sized pointField, returning zero Would you know what causes this? |
|
July 24, 2023, 06:24 |
|
#4 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,232
Rep Power: 29 |
Not with that few information. But you can post the full snappy log file (or at least the beginning of the log, up to the part where you get the warning) which would be more helpful to have an idea about what is happening.
Regards, Yann |
|
July 24, 2023, 06:36 |
|
#5 |
Member
Join Date: Jul 2023
Location: India
Posts: 30
Rep Power: 3 |
Sure. Below is the log from start until the warning:
Create time Create mesh for time = 0 Read mesh in = 0.013785 s Reading "snappyHexMeshDict" Overall mesh bounding box : (-20 -50 0) (330 230 140) Relative tolerance : 1e-06 Absolute matching distance : 0.000469574 Reading refinement surfaces... Read refinement surfaces in = 0.001651 s Reading refinement regions... Refinement level 2 for all cells inside refinementBox Read refinement regions in = 0.000121 s Reading features... Read edgeMesh av1.obj points : 0 edges : 0 boundingBox : (0 0 0) (0 0 0) Refinement level according to distance to "av1.obj" (0 points, 0 edges). level 1 for all cells within 0 metre. --> FOAM Warning : From function Foam::treeBoundBox::treeBoundBox(const Foam::UList<Foam::Vector<double> >&) in file meshes/treeBoundBox/treeBoundBox.C at line 136 cannot find bounding box for zero-sized pointField, returning zero Do let me know, if you'd require any additional information. |
|
July 24, 2023, 06:51 |
|
#6 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,232
Rep Power: 29 |
OK, I think this is related to your features refinement:
Code:
Reading features... Read edgeMesh av1.obj points : 0 edges : 0 boundingBox : (0 0 0) (0 0 0) Refinement level according to distance to "av1.obj" (0 points, 0 edges). level 1 for all cells within 0 metre. --> FOAM Warning : From function Foam::treeBoundBox::treeBoundBox(const Foam::UList<Foam::Vector<double> >&) in file meshes/treeBoundBox/treeBoundBox.C at line 136 cannot find bounding box for zero-sized pointField, returning zero In the features section, you are not supposed to provide your geometry obj file, but a file containing the feature edges of your geometry (extension eMesh or extendedFeatureEdgeMesh). You create this file using the surfaceFeatures utility. Have a look at the tutorial I've linked in my previous post, especially the Allrun script to see the workflow, and the surfaceFeaturesDict and snappyHexMeshDict to check syntax: https://github.com/OpenFOAM/OpenFOAM...HexMesh/flange |
|
July 24, 2023, 09:31 |
|
#7 |
Member
Join Date: Jul 2023
Location: India
Posts: 30
Rep Power: 3 |
Thank You! I have made the required change with your help.
I have an issue in post processing. I'm not able to view my geometry in ParaView. Am not certain of what can be the reason. Would you be able to guide me on this? Do let me know of what files you may require if you have to check on it. |
|
July 25, 2023, 04:17 |
|
#8 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,232
Rep Power: 29 |
Hello,
I cannot help if I don't know what you are doing
Yann |
|
July 25, 2023, 05:45 |
|
#9 |
Member
Join Date: Jul 2023
Location: India
Posts: 30
Rep Power: 3 |
Yes, I understand.
1) I am running in serial. 2) Yes, snappyHexMesh had run without any error 3) By executing paraFoam after executing surfaceFeatures, blockMesh and snappyHexMesh 4) Currently am only able to visualise the mesh I have attached the main directory for your reference. |
|
July 25, 2023, 06:04 |
|
#10 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,232
Rep Power: 29 |
If you ran snappyHexMesh without the -overwrite option, you should see additional timeStep directories written in your case directory.
When loading the case in ParaView, you need to display the last timeStep to see the final mesh. Also, I'm not sure what you mean by "only able to visualize the mesh". If you want to display your geometry surfaces rather than the internal mesh, you need to load it in the "Mesh Regions" section in ParaView (something like in the screenshot attached). By default it only loads the internalMesh. Yann |
|
July 25, 2023, 06:38 |
|
#11 |
Member
Join Date: Jul 2023
Location: India
Posts: 30
Rep Power: 3 |
Got it. I realise I was missing the step to load geometry seperately. Am able to visualise now.
Thanks for guiding me through =) |
|
July 26, 2023, 09:22 |
|
#12 |
Member
Join Date: Jul 2023
Location: India
Posts: 30
Rep Power: 3 |
Hello. So, I'm visualising my geometry and domain in paraview but my U values are wrong. They are high. I wonder what can be the error as I have merely made any changes to the base files except changing the geometry.
|
|
July 26, 2023, 09:31 |
|
#13 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,232
Rep Power: 29 |
Then probably it is related to the new geometry and/or mesh.
have you run checkMesh on your last mesh? |
|
July 26, 2023, 09:36 |
|
#14 |
Member
Join Date: Jul 2023
Location: India
Posts: 30
Rep Power: 3 |
No, I have not in my trials. But I just did and it has run without errors. What should one check in it?
|
|
July 26, 2023, 10:08 |
|
#15 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,232
Rep Power: 29 |
If checkMesh does not report any errors, you'll have to investigate your case to know what's wrong.
Have you check boundary conditions are properly defined for your new geometry? What wrong with the flow? High velocity everywhere or only locally? Did your simulation converge? Have you checked the residuals? |
|
July 27, 2023, 01:27 |
|
#16 |
Member
Join Date: Jul 2023
Location: India
Posts: 30
Rep Power: 3 |
Yes, Boundary conditions are properly defined for my geometry. (It's a simple cuboid block)
Yes, I can see that it shows high velocity throughout the domain in paraview. I just checked the residuals properly and the simulation has not converged. |
|
July 27, 2023, 08:30 |
|
#17 |
Member
Join Date: Jul 2023
Location: India
Posts: 30
Rep Power: 3 |
I'm not able to figure out the reason as to of why the solutions are not converging. What can be the reason?
|
|
July 27, 2023, 08:41 |
|
#18 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,232
Rep Power: 29 |
Hello,
It's impossible to tell without knowing the details of your case. It can be pretty much anything: mesh, boundary conditions, numerical setup, or even physics itself... Yann |
|
July 27, 2023, 08:44 |
|
#19 |
Member
Join Date: Jul 2023
Location: India
Posts: 30
Rep Power: 3 |
Will you be able to check if I attach the files?
I have attached the main directory in one of my previous messages for your reference. |
|
July 27, 2023, 09:11 |
|
#20 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,232
Rep Power: 29 |
I dont know if the case you have uploaded here is your latest setup, but the locationInMesh in your snappyHexMeshDict is wrong: you are meshing the inside of your geometry rather than the outside.
Nothing happens during the simulation because there is nothing to do and the velocity is 0 everywhere (it's basically an enclosure with nothing to create a flow) Since you mentioned high velocities, I guess you must be doing something different than me. Please provide your latest setup and a script to run the case as you are doing it. Thanks, Yann |
|
Tags |
foam warning, geometry, refinementsurfaces, snappyhesmesh, snappyhesmeshdict |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
whats the cause of error? | immortality | OpenFOAM Running, Solving & CFD | 13 | March 24, 2021 08:15 |
Caffa 3D code | Waliur Rahman | Main CFD Forum | 0 | May 29, 2018 01:53 |
is internalField(U) equivalent to zeroGradient? | immortality | OpenFOAM Running, Solving & CFD | 7 | March 29, 2013 02:27 |
[Gmsh] discretizer - gmshToFoam | Andyjoe | OpenFOAM Meshing & Mesh Conversion | 13 | March 14, 2012 05:35 |
Version 15 on Mac OS X | gschaider | OpenFOAM Installation | 113 | December 2, 2009 11:23 |