CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   How to create a new cyclic BC (https://www.cfd-online.com/Forums/openfoam/97126-how-create-new-cyclic-bc.html)

gregdB February 9, 2012 08:01

How to create a new cyclic BC
 
Hi all,

I have been attempting to replicate the fan BC so that I can create my own derived type of cyclic BC. All has been going OK by following:

http://openfoamwiki.net/index.php/Ho...dary_condition

But I have a problem. There is no entry for fixedJumpFvPatchField.C or equivalent in $FOAM_SRC/finiteVolume/Make/files ? How can this be copied and how can it be complied in the first place without an entry here?

Any help would be very much appreciated.

Cheers,
Greg

stevenvanharen February 9, 2012 10:56

I am confused, where did you find this C-file? Why do you expect an entry for this in the Make-file?

gregdB February 9, 2012 12:00

The C and H files for fixedJump are found in $FOAM_SRC/finiteVolume/fields/fvPatchFields/derived/fixedJump

To create a BC I copy a similar one from $FOAM_SRC/finiteVolume/fields/fvPatchFields/... and after changing the names then look-up from $FOAM_SRC/finiteVolume/Make/files for the correct entries needed to compile it. All BC's eg fan, jumpCyclic etc have entries in here so that they can be copied yet fixedJump does not?

stevenvanharen February 10, 2012 07:22

Ah ok, sorry, was looking in the wrong OF version.

fixedJump does not have an entry since it is not a boundary condition. It is just a parent-class for the fan boundary condition. It will be compiled since it is included in the fan b.c. files.

Maybe try to base your new b.c. on the fan b.c.?

gregdB February 10, 2012 07:56

I see, unfortunately I need to change jumpCyclic, fixedJump and fan bc so that I can get what I need. If I change fixedJump as well as fan and then include all the files when compiling fan hopefully that will work?

stevenvanharen February 10, 2012 08:19

Yes, that will work. But make sure you include the updated files and not the files from the lnInclude folder.

gregdB February 10, 2012 09:40

Thanks, it complies and runs. All I now need to do now is change the code! Cheers, Greg


All times are GMT -4. The time now is 14:48.