|
[Sponsors] |
March 21, 2012, 03:25 |
Oscillating inlet BC
|
#1 |
New Member
Join Date: Mar 2012
Posts: 12
Rep Power: 14 |
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 : inlet { type oscillatingFixedValue; refValue (0 0 0); amplitude 1; frequency 0.5; } For 0/p: inlet { type calculated; value uniform 0; } But when I run it, the following error msg appears: --> FOAM FATAL ERROR: 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. |
|
March 21, 2012, 06:11 |
|
#2 |
Senior Member
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 18 |
hello,
Why have you set to "cyclic" your boundary ? oscillatingFixedValue work with patch type. And for pressure, use outletInlet or zerogradient. regards, olivier |
|
March 21, 2012, 09:28 |
|
#3 |
Senior Member
mauricio
Join Date: Jun 2011
Posts: 172
Rep Power: 18 |
hi,
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: Code:
oscillatingFixedValue but the primitive bcs in the boundary file gotta be "patch" check the user guide.. it has more to it
__________________
Best Regards /calim "Elune will grant us the strength" |
|
March 21, 2012, 21:27 |
|
#4 |
New Member
Join Date: Mar 2012
Posts: 12
Rep Power: 14 |
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? inlet { 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. |
|
March 21, 2012, 21:46 |
|
#5 |
New Member
Join Date: Mar 2012
Posts: 12
Rep Power: 14 |
Hello Oliver,
Thank you for your suggestion. I tried outletInlet for 0/p at inlet as following: inlet { 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? |
|
Tags |
boundary condition, cylinder, oscillatingfixedvalue, oscillatory flow |
|
|
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 19:42 |
Inlet shapes for modelling a fan in an inlet duct | buzzybee | CFX | 10 | June 11, 2009 21:15 |
Oscillating inlet??? | Adam | CFX | 0 | March 10, 2008 21:57 |
Diffusion component at inlet | Balaji | FLUENT | 2 | August 8, 2005 08:37 |