CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   custom cyclic fvPatchField (https://www.cfd-online.com/Forums/openfoam-programming-development/230234-custom-cyclic-fvpatchfield.html)

Gerry Kan September 14, 2020 09:12

custom cyclic fvPatchField
 
Howdy Foamers:

Following this thread, I have decided to investigate the possibly of writing my own fvPatchField based on cyclicFvPatchField.

As first step I took cyclicFvPatchField verbatim and renamed it to, say, "myCyclicFvPatchField". Note that I also had to change the TypeName to "myCyclicFvPatchField". The new fvPatchField compiled successfully and was picked up by my solver and, since I did not change its functionality, it should behave exactly like a cyclic boundary condition.

Using a test case, I changed the necessary "cyclic" boundaries to "myCyclic". I received the following runtime error:

Code:

--> FOAM FATAL IO ERROR:
inconsistent patch and patchField types for
    patch type cyclic and patchField type myCyclic

My hunch is that OF expecting matching name between the mesh patch type and the corresponding patch field type. As a logical conclusion, I also need to define a "myCyclic" patch type and use it in the corresponding patches in blockMeshDict.

My question is, do I have to develop a "myCyclic" patch type for use with blockMesh and, if this is the case, also develop a modified version of blockMesh which also include the new "myCyclic" patch type?

Thank you very much in advance, Gerry.


All times are GMT -4. The time now is 16:01.