CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Modelling a ducted turbine boundaries (https://www.cfd-online.com/Forums/openfoam-solving/59050-modelling-ducted-turbine-boundaries.html)

 t_clark March 10, 2008 11:11

Hi all,

Firstly, please bear with me somewhat, as I'm a total newbie to OpenFOAM, fairly new to C++, and fairly new to RANS!

I'm investigating the effect of a duct on an axial turbine. I've built a grid (2D, which I will soon convert to axisymmetric) around my duct shape.

Inside the duct, there is a cylindrical block representing the turbine position. I now need to model the effect of the turbine as either a pressure drop or (preferably) a force and torque distribution.

To make matters more complicated, the forcing varies with the velocity inflow to the turbine position. The function F(Uduct) is known.

My initial strategy is:
1. Get rid of the block. Convert the upstream patch to an outlet, and the downstream patch to an inlet.
2. Constrain the inlet to have the same velocity as the outlet (mass flow conservation).
3. Evaluate U at the outlet, and therefore determine F.
4. Constrain the inlet pressure to be that of the outlet, minus the appropriate amount: (sum(F)/Area).

Firstly, is there anyone who thinks I'm a loony? Is there a better way of doing it (my inexperience with CFD is showing through...)?

Assuming that the above is sensible, my questions are:

1. How do I set up boundary conditions so that their values update (say) every N timesteps?

2. How do I evaluate the velocities and pressures upstream of the turbine, and send them to a piece of my own code in order to evaluate F(Uduct), before I update boundary conditions?

3. Presumably I'll need to compile a new solver - I guess that I'll adapt turbFOAM... Not having a brilliant grasp of how this works yet (I know, RTFM, I'm reading it now) can anyone point me to the right line of turbFOAM where I should begin my tinkering?

Thank you so much in advance for any help!

Tom Clark

 t_clark March 11, 2008 14:57

Solved my own problem. Yes,

Solved my own problem.

Yes, it turns out that the above is a crazy approach. I'm simply adding a forcing term to the equation being solved, in the block containing the turbine.

I found out how to do this in the thread entitled:

'SIMPLE + force term isn't converging; what have I missed?'

So thanks to Brooks Moses and Michael Prinkey for unwittingly helping out.

Tom C

 All times are GMT -4. The time now is 02:20.