CFD Online Logo CFD Online URL
Home > Forums > OpenFOAM

Oscillating inlet BC

Register Blogs Members List Search Today's Posts Mark Forums Read

Sponsored Links

LinkBack Thread Tools Display Modes
Old   March 21, 2012, 03:25
Default Oscillating inlet BC
New Member
Join Date: Mar 2012
Posts: 12
Rep Power: 7
November is on a distinguished road
Sponsored Links
Hello all,

I am trying to set up a 3D case for an oscillatory flow past a circular cylinder. I'm wondering how would you specify the inlet and outlet BC for this easy case? It got me stuck here...
For the inlet boundary condition, I want to have Ui=Um*sin(2*pi*frequency*t), so i have set "patch" in /constant/boundary file for the inlet (for the top and bottom boundaries, which are perpendicular to the cylinder span, i have set "cyclic" BC for infinite length cylinder), and in /0/u file i have :
type oscillatingFixedValue;
refValue (0 0 0);
amplitude 1;
frequency 0.5;

For 0/p:
type calculated;
value uniform 0;

But when I run it, the following error msg appears:


gradientInternalCoeffs cannot be called for a calculatedFvPatchField
on patch inlet of field p in file "/home/kyang/OpenFOAM/OpenFOAM-2.1.0/icoFoam-t/3DCylinder/0/p"
You are probably trying to solve for a field with a default boundary condition.

From function calculatedFvPatchField<Type>::gradientInternalCoef fs() const
in file fields/fvPatchFields/basic/calculated/calculatedFvPatchField.C at line 186.

FOAM exiting

Seems like it is complaining that I didnt define p, but as I said, I did subscribe inlet BC for p in 0 folder!

I'm just wondering if any one has any ideas on what's the problem for this... or any suggestions on the setup for BC and initial condition for oscillatory flow past a circular cylinder would also be great!

Thanks a lot!

Last edited by November; March 21, 2012 at 21:51.
November is offline   Reply With Quote
Sponsored Links

Old   March 21, 2012, 06:11
Senior Member
Join Date: Jun 2009
Location: France, grenoble
Posts: 266
Rep Power: 11
olivierG is on a distinguished road

Why have you set to "cyclic" your boundary ?
oscillatingFixedValue work with patch type.
And for pressure, use outletInlet or zerogradient.

olivierG is offline   Reply With Quote

Old   March 21, 2012, 09:28
Senior Member
calim_cfd's Avatar
Join Date: Jun 2011
Posts: 141
Rep Power: 10
calim_cfd is on a distinguished road

in the boundary fle you can have primitive BCS : cyclic(AMI),symmetryPlane, patch, wall

inlets and outlets are type "patch" in the boudary file

in the variable files you may set specific stuff like the one you did:
when you use cyclic or symmetry you can only assign these types of bc in the variable files.
but the primitive bcs in the boundary file gotta be "patch"

check the user guide.. it has more to it
Best Regards

"Elune will grant us the strength"
calim_cfd is offline   Reply With Quote

Old   March 21, 2012, 21:27
New Member
Join Date: Mar 2012
Posts: 12
Rep Power: 7
November is on a distinguished road
Hi guys,

First really thank you for your reply!
Second sorry it was a typo,,, I didn't use cyclic in inlet and outlet, I did use patch, I have changed that typo in my post... sorry about the confusing...

then, my problem is, how would you specify the condition for initial p in 0/p after setting 0/u at inlet to be oscillatingfixedvalue? According to NS, once you have u=Um*sin(2*pi*f*t) then at inlet you ought to have partial(p)/partial(x)=-partial(u)/partial(t)=-Um*2*pi*f*cos(2*pi*f*t). Basically p should be calculated according to u... therefore I have set 0/p to be calculated at first, but then the error like I described in my post appeared...

And I tried to use zeroGradient, however i got all values of p and u at all timesteps to be 0 following that specification. Here's what I did:

In my input file for boundary:
inlet type is set to be patch

and then in 0/p,
inlet type is set to be zeroGradient;

in 0/u, if i want to specify U=Um*sin(2*pi*f*t),would the following be correct?
type oscillatingFixedValue;
refValue uniform (0 0 0); //steady current velocity, which is 0 in my case
//offset (0 -1 0);
amplitude constant 1; //Um
frequency constant 0.5; //f
//value uniform (0 0 0); //not sure what this is for?

Could you tell me my problem, really appreciated.

Last edited by November; March 21, 2012 at 21:43.
November is offline   Reply With Quote

Old   March 21, 2012, 21:46
New Member
Join Date: Mar 2012
Posts: 12
Rep Power: 7
November is on a distinguished road
Hello Oliver,

Thank you for your suggestion.
I tried outletInlet for 0/p at inlet as following:
type outletInlet;
outletValue 0;
value 0;
And I still got all 0 values for p and u at all timesteps....

I begin to wonder if I should specify inletOutlet at outlet for U and p too? In my current settings I just used zeroGradient for u at outlet and p=0 at outlet. This looks less scientific now... should I change it to inletOutlet then?
November is offline   Reply With Quote


boundary condition, cylinder, oscillatingfixedvalue, oscillatory flow

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
higher total pressure at inlet motorbean Main CFD Forum 0 December 7, 2011 17:13
Inlet Velocity in CFX aeroman CFX 12 August 6, 2009 18:42
Inlet shapes for modelling a fan in an inlet duct buzzybee CFX 10 June 11, 2009 20:15
Oscillating inlet??? Adam CFX 0 March 10, 2008 21:57
Diffusion component at inlet Balaji FLUENT 2 August 8, 2005 07:37

Sponsored Links

All times are GMT -4. The time now is 06:03.