CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Running, Solving & CFD (
-   -   Coupled Pressure-Flow Outlet Boundary Condition (Windkessel) (

torben_w January 23, 2012 09: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


michaelb February 29, 2012 05:51


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



Vitaly March 2, 2012 11:12

Hi, the previous thread read:


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

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 10:13.