CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Velocity BC in cyclic 2D domain (

Ivo July 29, 2010 10:43

Velocity BC in cyclic 2D domain
Hi people,

At the moment I'm trying to compare various approaches for generating velocity profiles in OpenFoam against windtunnel data and results obtained with Fluent. I'm now having trouble setting up one of these cases in OpenFoam.

Since in windtunnel measurements the velocity is usually only known at a single reference height I wanted to try and generate the velocity profile corresponding to proper BCs at the top and bottom of my domain and a velocity equal to a measured value of 14 m/s at a reference height of 0.48 m. The domain I chose has the inlet and outlet connected by a cyclic BC and as an initial condition I chose the mass flux across the inlet to equal 36 kg/s. I was able to perform this calculation under Fluent, but since I am new to OpenFoam I don't know how to set this up.

One of my attempts so far involved using the simpleFoam solver and setting the velocity boundary condition on the inlet/outlet as:

type flowRateInletVelocity;
patchType cyclic;
flowRate 36;
value uniform (0 0 0);

However, this has 2 problems: 1) this boundary condition doesn't work for cyclic patches and 2) I still can't specify my target velocity of 14 m/s at a reference height of 0.48 m since that would involve solving for the mass flux as well. Is there any way around this? Any help would be greatly appreciated!

Ivo July 30, 2010 11:22

jumpCyclic BC
In an attempt to solve the problem I described above I tried, amongst other things, to use a jumpCyclic boundary condition on my velocities in order to keep them from exploding (which is what happens when, on a cyclic grid, flowRateInletVelocity is used as a velocity BC and fixedValue (equal to 0) for p; it seems to me that the specified flow rate is added again on each consecutive pass). This resulted in the following error:

Unknown patchField type jumpCyclic for patch type cyclic

Does anybody know what this means? I'm using OpenFoam version 1.7.x and at least the source files are present. Do I need to compile them somehow or add an extra command in one of my input files before I can use this BC, or I am trying to do something illegal here?

All times are GMT -4. The time now is 09:35.