I am trying to develop a workflow for OpenFoam where I create the whole OpenFoam case in Butterfly, and then meshing and running it from linux machine. I am trying the new examples, based on the latest Butterfly in Github. Here is my finding on the outdoor example.
The write options are not working properly.
I like the write toggle options in the latest Butterfly, as I can straight away saving my case files without having to run anything on my windows machine. However, when I tried that on the outdoor example, I got some error on my linux machine when I tried to mesh the case.
Apparently, the write command did not export âoutdoor_airflow.eMeshâ, so snappyHexMesh failed.
Writing and Running works partially
When I run the case in my windows machine, the process stops at snappyHexMesh with the following error:
new cannot satisfy memory request.
This does not necessarily mean you have run out of virtual memory.
It could be due to a stack violation caused by e.g. bad use of pointers or an out of date shared library
I took this case to a linux machine, and re-run blockMesh and snappyHexMesh, the process works fine, but the mesh is not good:
Finished meshing with 1646929 illegal faces (concave, zero area or negative cell pyramid volume)
So, toggling the run command manage to export the âoutdoor_airflow.eMeshâ file that was not exported using the write command.
Well, I did not continue my experiment to running the simulation as the mesh is not good. I will report again later with another case.
Hopefully the example can be fixed so that we can have a working example for newbies like to learn Butterfly.
there are a couple of extra steps which butterfly take care automatically in the background.
when running a case on windows after writing donât forget to run the âsurfaceFeatureExtractâ command. This one will generate the .eMesh file you were missing.
blockMesh
surfaceFeatureExtract
snappyHexMesh
With regards to your mesh, make sure your geometry is watertight and that your location in mesh point is well positioned. Adjust the refinement levels gradually towards the areas of interest. The defaults of butterfly should allow you to proceed.
Youâre right. This is a current limitation and will be addressed before the official release. For now you can run the commands yourself before running snappyHexMesh as suggested by @OlivierDambron
Did you configure memory allocation to VM after installation? VM doesnât have access to all the memory of your machine unless you give it the permission.
It sounds like you havenât removed the refinement region from the case. Otherwise the mesh should have an acceptable quality.
Just as a note what you are visualizing in Grasshopper preview in this case is the grid of probes which doesnât necessarily match you mesh. You can visualize the mesh using component.
If Iâm not mistaken the error is because ParaView cannot find the boundary condition files in the folder. It happens because Butterfly writes the boundary condition to folder when you write the solution. Folder 1 is created when you ran snappyHexMesh and at the time there was no boundary condition file to be copied. You can just copy them from folder 0 in this case and that should remove the error.
I think I have a problem. I looked at the flow domain in ParaView, the model looks so small. The range of x axis is about 0.04m.
I ran checkMesh, and it says:
Checking geometry...
Overall domain bounding box (-0.02910161 -0.01213029 0) (0.06054806 0.1394959 0.03531573)
Mesh has 3 geometric (non-empty/wedge) directions (1 1 1)
Mesh has 3 solution (non-empty) directions (1 1 1)
Boundary openness (-9.552427e-17 1.883e-16 -8.503742e-14) OK.
Max cell openness = 2.219543e-16 OK.
Max aspect ratio = 36.70771 OK.
Minimum face area = 2.07425e-09. Maximum face area = 0.0001584144. Face area magnitudes OK.
Min volume = 1.320675e-13. Max volume = 1.016664e-06. Total volume = 0.0004790682. Cell volumes OK.
Mesh non-orthogonality Max: 45.04813 average: 3.268392
Non-orthogonality check OK.
Face pyramids OK.
Max skewness = 0.3335899 OK.
Coupled point location match (average 0) OK.
The bounding box is tiny, isnât it?
I looked it up further, and blockMeshDict contains the following line:
convertToMeters 0.0010;
This is wrong, right? Any thoughts on how it can be there? I believe that I work in meter in Grasshopper/Rhino.
Most likely the units are not set correctly in your model. It seems they are set to mm while the Grasshopper model is sized in Meters. You can see the units in the bottom of the window.
You can right click on units and select Unit Settings or simply type units In Rhino command line and change it to meters. Now recompute your Grasshopper solution (Right click > Recompute).
If you want to keep the units in mm then you need to scale the buildings to be the correct size in mm. Butterfly works with any units as long as it is set correctly in Rhino.
Okay thanks. A follow up question: if the refinement region needs to be disconnected, why should it be connected in the first place? If we disconnect, does that mean the region will not get refined?
My student built the model, and I generated the OpenFoam files myself. So I told her there is something wrong. The model works fine on her machine. Well apparently what is wrong is in my Rhino settings, as you said.
The sample file show cases the possibilities including refinement region. If you use grading it provides a basic level of refinement around the geometries. In case you need to refine an area more you can use refinement region otherwise you donât have to.