CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

FOAM Warning :

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree5Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 24, 2023, 03:00
Post FOAM Warning :
  #1
Member
 
Join Date: Jul 2023
Location: India
Posts: 30
Rep Power: 2
Amirthaa is on a distinguished road
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.
Amirthaa is offline   Reply With Quote

Old   July 24, 2023, 03:39
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,104
Rep Power: 26
Yann will become famous soon enough
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
Yann is offline   Reply With Quote

Old   July 24, 2023, 04:52
Default
  #3
Member
 
Join Date: Jul 2023
Location: India
Posts: 30
Rep Power: 2
Amirthaa is on a distinguished road
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?
Amirthaa is offline   Reply With Quote

Old   July 24, 2023, 05:24
Default
  #4
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,104
Rep Power: 26
Yann will become famous soon enough
Quote:
Originally Posted by Amirthaa View Post
Would you know what causes this?
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
Yann is offline   Reply With Quote

Old   July 24, 2023, 05:36
Default
  #5
Member
 
Join Date: Jul 2023
Location: India
Posts: 30
Rep Power: 2
Amirthaa is on a distinguished road
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.
Amirthaa is offline   Reply With Quote

Old   July 24, 2023, 05:51
Default
  #6
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,104
Rep Power: 26
Yann will become famous soon enough
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
As you can see, there is nothing detected here (0 points, edges, and bounding box).
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
Yann is offline   Reply With Quote

Old   July 24, 2023, 08:31
Default
  #7
Member
 
Join Date: Jul 2023
Location: India
Posts: 30
Rep Power: 2
Amirthaa is on a distinguished road
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.
Amirthaa is offline   Reply With Quote

Old   July 25, 2023, 03:17
Default
  #8
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,104
Rep Power: 26
Yann will become famous soon enough
Hello,

I cannot help if I don't know what you are doing
  1. Are you running in serial or parallel?
  2. Did snappy complete without error?
  3. How do you load your case in paraView?
  4. What are you visualizing in ParaView?

Yann
Yann is offline   Reply With Quote

Old   July 25, 2023, 04:45
Default
  #9
Member
 
Join Date: Jul 2023
Location: India
Posts: 30
Rep Power: 2
Amirthaa is on a distinguished road
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.
Attached Files
File Type: zip WABEx2.zip (170.1 KB, 7 views)
Amirthaa is offline   Reply With Quote

Old   July 25, 2023, 05:04
Default
  #10
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,104
Rep Power: 26
Yann will become famous soon enough
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
Attached Images
File Type: png 2023-07-25.png (5.9 KB, 17 views)
Yann is offline   Reply With Quote

Old   July 25, 2023, 05:38
Default
  #11
Member
 
Join Date: Jul 2023
Location: India
Posts: 30
Rep Power: 2
Amirthaa is on a distinguished road
Got it. I realise I was missing the step to load geometry seperately. Am able to visualise now.
Thanks for guiding me through =)
Yann likes this.
Amirthaa is offline   Reply With Quote

Old   July 26, 2023, 08:22
Default
  #12
Member
 
Join Date: Jul 2023
Location: India
Posts: 30
Rep Power: 2
Amirthaa is on a distinguished road
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.
Amirthaa is offline   Reply With Quote

Old   July 26, 2023, 08:31
Default
  #13
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,104
Rep Power: 26
Yann will become famous soon enough
Then probably it is related to the new geometry and/or mesh.

have you run checkMesh on your last mesh?
Yann is offline   Reply With Quote

Old   July 26, 2023, 08:36
Default
  #14
Member
 
Join Date: Jul 2023
Location: India
Posts: 30
Rep Power: 2
Amirthaa is on a distinguished road
No, I have not in my trials. But I just did and it has run without errors. What should one check in it?
Amirthaa is offline   Reply With Quote

Old   July 26, 2023, 09:08
Default
  #15
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,104
Rep Power: 26
Yann will become famous soon enough
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?
Yann is offline   Reply With Quote

Old   July 27, 2023, 00:27
Default
  #16
Member
 
Join Date: Jul 2023
Location: India
Posts: 30
Rep Power: 2
Amirthaa is on a distinguished road
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.
Amirthaa is offline   Reply With Quote

Old   July 27, 2023, 07:30
Default
  #17
Member
 
Join Date: Jul 2023
Location: India
Posts: 30
Rep Power: 2
Amirthaa is on a distinguished road
I'm not able to figure out the reason as to of why the solutions are not converging. What can be the reason?
Amirthaa is offline   Reply With Quote

Old   July 27, 2023, 07:41
Default
  #18
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,104
Rep Power: 26
Yann will become famous soon enough
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
Yann is offline   Reply With Quote

Old   July 27, 2023, 07:44
Default
  #19
Member
 
Join Date: Jul 2023
Location: India
Posts: 30
Rep Power: 2
Amirthaa is on a distinguished road
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.
Amirthaa is offline   Reply With Quote

Old   July 27, 2023, 08:11
Default
  #20
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,104
Rep Power: 26
Yann will become famous soon enough
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
Yann is offline   Reply With Quote

Reply

Tags
foam warning, geometry, refinementsurfaces, snappyhesmesh, snappyhesmeshdict

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
whats the cause of error? immortality OpenFOAM Running, Solving & CFD 13 March 24, 2021 07:15
Caffa 3D code Waliur Rahman Main CFD Forum 0 May 29, 2018 00:53
is internalField(U) equivalent to zeroGradient? immortality OpenFOAM Running, Solving & CFD 7 March 29, 2013 01:27
[Gmsh] discretizer - gmshToFoam Andyjoe OpenFOAM Meshing & Mesh Conversion 13 March 14, 2012 04:35
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 10:23


All times are GMT -4. The time now is 15:38.