CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Coupled Pressure-Flow Outlet Boundary Condition (Windkessel) (http://www.cfd-online.com/Forums/openfoam-solving/96439-coupled-pressure-flow-outlet-boundary-condition-windkessel.html)

 torben_w January 23, 2012 10:34

Coupled Pressure-Flow Outlet Boundary Condition (Windkessel)

Hi there,

is it possible to use a Windkessel type outlet boundary condition with OpenFoam?

Here, P(t) depends on P(t-1) and Phi(t). How can this be done as a UDF?

The question is similar to an unsolved thread http://www.cfd-online.com/Forums/flu...indkessel.html.

Cheers

 michaelb February 29, 2012 06:51

Hi,

have you find a way of implementing the Windkessel boundary conditions in OpenFoam ?
I'd be very interested in knowing how you proceeded.

Cheers,

Michael

 Vitaly March 2, 2012 12:12

Hi,

I'm trying to apply a windkessel type boundary condition at the outlet, which is of the form:

P(t) + k*P'(t) = Q(t), where k is a known constant

To do this, I model the outlet as a 'pressure-outlet' and use a UDF to impose P(t) on the outlet faces.
To calculate P(t), I approximate P'(t) by [P(t) - P(t-1)]/delta_t, and arrive at the closed form expression
P(t) = Function[P(t-1), Q(t), k, delta_t]

My question is:
how do I specify this equation in the UDF ?

At present, I'm using the DEFINE_PROFILE(pressure, t, i) macro,
calculating Q(t) by

Code:
density = 100; sumFlow = 0; face_t f; begin_f_loop(f, t) { sumFlow = sumFlow + F_FLUX(f,t); } end_f_loop(f, t) sumFlow = sumFlow/density;
Now, what is the best way to find P(t-1) on all the faces of the outlet ?
Is there a macro like F_P_M1(f,t) ?
-----

I am also starting to work on this issue. I think that you can find P(t-1) using a memory macro, and I think you can find Q(t) using the code supplied. If you only have one outlet for an incompressible fluid, then Q(t) should not be a problem.
In my case, I have multiple outlets. But, I think that if each outlet has the same R and C values, then the flow split should stay the same.

 All times are GMT -4. The time now is 21:49.