How to set up a symmetric case?

Hi,I was trying to run a symmetric case using butterfly(Picture below).It is a atrium, the part of highlighted is the symmetric plane


For this,I writed a new boundary condition class in fields.py and used the custom boundary component

The blockMesh and SnappyHexMesh component can be run successfully,but Solution give me a OpenFoam error message like this

→ FOAM FATAL IO ERROR:
patch type ‘wall’ not constraint type ‘symmetry’
for patch symmetry1 of field T in file “C:/PROGRA~1/BLUECF~1/ofuser-of5/run/heatroom_silverFeather/0/T”

The symmetry boundary condition in 0 folder was right


but in constant/polyMesh folder , boundary file indicated the boundary type all was wall.

I guess it was the reason,but how can i do?I notice that the code about make 2d in blockMeshDict.py can modify the boundary type from wall to empty. Maybe i should do something like make 2d?

Any suggestions?
Thanking you in advance for your help.

It has been a very long time since I used Butterfly or checked the source code so I cannot really help but I think you are on the right direction and at this point this is more of a OpenFOAM question than a Butterfly question which you can most likely post to an OpenFOAM forum.

@TheodorosGalanos, might also be able to help.

Hi,@mostapha Thank you for the prompt reply.
Indeed this is a OpenFoam question.The boundary file in constant/polyMesh folder is the key,after I set the type from wall to symmetry it works perfectly.
My original idea was to create a symmetric plane automatically via butterfly,so I posted here for some idea, and then I modified the source code of butterfly,added some functions like “make2d”.
I am not sure it is a correct way to set a symmetric plane via butterfly,anyway,it create a symmetric plane automatically and works perfectly now.

Thank you very much for helping

@tao can you explain in detail how to implement this? These are issues that I am facing:

  1. When trying to create a a symmetryPlane custom boundary condition, I get this error
  1. Solution exception:
    Failed to import butterfly:
    Cannot import name symmetryPlane

2)Then I tried to modify the “boundary field” manually under 0 folder and the boundary file under constant/polymesh after writing the solution file. I get the following error