CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)

 Jonathan April 3, 2013 12:43

new radial equilibrium pressure BC for turbomachinery

Hi everyone,

this is my first attempt at a new BC for OF.

what i am trying to implement is the 'standard' radial equilibrium pressure BC which is used in many turbomachinery simulations. i.e., where the pressure at the outlet is governed according to:

I have a little experience with groovyBC, and have used it to set up an inlet velocity profile using lookup_tables, but now need to decide how to build the outlet BC. So basically, my questions are:

1) which would be easier - building the BC using groovyBC, or coding up a 'proper' new BC in c++ and linking to that

how difficult do you expect this would be to implement in general (my c++ is coming along, but i am no expert as yet) and i am under a little bit of pressure to get it done ;)

cheers
jon

 Jonathan April 4, 2013 04:52

hi guys !

many thanks!
Jonathan

 cosimobianchini April 4, 2013 13:09

1 Attachment(s)
I have an old piece of code which was written in FOAM-1.5-dev.
The idea is quite simple:
1) construct a regular grid of points in cylindrical coordinates that covers the entire patch.
2) map velocity field on the regular grid
3) construct pressure field on the regular grid based on radial derivatives and a reference pressure at the hub
4) map back regular grid pressure on the patch

Hope this will be a good starting point for you, please let me know if you find some difficulties and do not hesitate to share the code once imported in current versions of OpenFOAM.

 Jonathan April 7, 2013 17:08

hi Cosimo,

thanks very much for your help and the piece of code. i will try to give it a go and see how i go.

i have been playing around with some code which lets the pressures over the patch fluctuate but constrains the integral of the pressure over the patch to a mean value, so the radial pressure gradients should come out in the solution, but will give your code a shot as well as it may give better results ...

i'll let you know how it goes!

many thanks
kind regards
jonathan

 cosimobianchini August 29, 2013 11:40

Did you get any good solution for the radial equilibrium BC?

 Jonathan August 30, 2013 06:41

hi Cosimo,

thanks for the post! the short answer was no - your c++ was a little over my head, and so i have been using a fixedMeanValue BC, and letting the flow solution figure hammer out the radial equilibrium, rather than enforcing it.

my results are comparable to those i get in Fluent, with the radialEquilibrium BC.

however, i have done quite a lot of c++ work in the last months, and depending on whether my supervisor wants me to follow that route, i might have to go back to it, in which case, your code will be my starting template.

best regards
jonathan

 babala January 2, 2014 03:31

Hi Cosimo,
I am trying to compile the code you have shared in Openfoam 2.2.1.But the Openfoam don't have a file named regularGridPolyPatch.H.
(regularGridFvPatch / #include "regularGridPolyPatch.H")
I even don't find regularGridPolyPatch.H in Openfoam 1.5.
Have you compile the BC in Openfoam 1.5 or other new versions? Do you meet this problem?

best regards

Zhiyuan

 cosimobianchini January 6, 2014 06:05

The code for regularGridPolyPatch is part of the development I made for this radial equilibrium BC, you can find it in RadialEquilibrium.zip .
Hope you suceed in compiling the code and provide some feedback.
Regards,
Cosimo

 babala January 6, 2014 22:01

Hi Cosimo,
Thank you for your reply.Unfortunately, I can't find the code for regularGridPolyPatch in your development. There is only a head file named as regularGridFvPatch.H. Maybe you forget to compress the file into RadialEquilibrium.zip.

best regards
Zhiyuan

 All times are GMT -4. The time now is 22:54.