CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

Setting angle of inlet velocity.

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 13, 2016, 10:40
Default Setting angle of inlet velocity.
  #1
New Member
 
Join Date: Apr 2016
Posts: 6
Rep Power: 10
kareemm2 is on a distinguished road
Hey all,

I'm pretty new to OpenFOAM and I've been successfully running some (2D) simulations before this post. For this new simulation i'd like my inlet velocity to come in at 0.05 m/s at an angle of 45 degrees, I have given it a go but I'm not sure if what I'm trying to do is correct and I'd like someone to have a look at my U file (bellow) to either verify or suggest a way to accomplish this task.

Thanks.

Code:
dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0.0353 0.0353 0);

boundaryField
{
    ch1_inlet
    {
	type		inletOutlet;
        value           uniform (0.0353 0.0353 0);
	inletValue	uniform (0.0353 0.0353 0);
    }
    ch_1blocked
    {
	type		fixedValue;
        value           uniform (0 0 0);
    }
    ch1_wall
    {
	type		fixedValue;
        value           uniform (0 0 0);
    }
    ch1_to_porous
    {
        type            cyclic;
    }
    ch1_sides
    {
        type            empty;
    }
    ch2_blocked
    {
	type		fixedValue;
        value           uniform (0 0 0);
    }
    ch2_outlet
    {
        type            zeroGradient;
    }
    ch2_wall
    {
	type		fixedValue;
        value           uniform (0 0 0);
    }
    ch2_to_porous
    {
        type            cyclic;
    }
    ch2_sides
    {
        type            empty;
    }
    porous_ends
    {
	type		fixedValue;
        value           uniform (0 0 0);
    }
    porous_sides
    {
        type            empty;
    }
    porous_to_ch1
    {
        type            cyclic;
    }
    porous_to_ch2
    {
        type            cyclic;
    }
}

Last edited by kareemm2; April 14, 2016 at 06:38.
kareemm2 is offline   Reply With Quote

Old   April 14, 2016, 06:09
Default
  #2
Senior Member
 
Join Date: Sep 2015
Location: Singapore
Posts: 102
Rep Power: 11
usv001 is on a distinguished road
Hi there,

I am new to OF as well. As far as I know, there seems to be no problem with your BCs. You can always check if it's okay using Paraview before running.

Are you getting any sort of error when running it?
usv001 is offline   Reply With Quote

Old   April 14, 2016, 06:13
Default
  #3
New Member
 
Join Date: Apr 2016
Posts: 6
Rep Power: 10
kareemm2 is on a distinguished road
Hey, thanks for the reply, I've ran my simulation and there are no errors, I was just concerned that I may not have set up my U file to do what I wanted properly.
kareemm2 is offline   Reply With Quote

Old   April 14, 2016, 06:26
Default
  #4
Senior Member
 
Alex
Join Date: Jan 2014
Posts: 126
Rep Power: 12
Kina is on a distinguished road
Quick reply: you're correct! Since you define U in components, your interpretation of the U file is right. You can also see it when you generate streamlines from the inlet in paraFoam.

Cheers
Alex
Kina is offline   Reply With Quote

Old   April 14, 2016, 06:47
Default
  #5
New Member
 
Join Date: Apr 2016
Posts: 6
Rep Power: 10
kareemm2 is on a distinguished road
Thanks for the confirmation, but I forgot to ask; when changing the inlet velocity, was I right in changing the values internalfield, inletvalue and value for the velocity?
kareemm2 is offline   Reply With Quote

Old   April 14, 2016, 07:34
Default
  #6
New Member
 
Join Date: Apr 2016
Posts: 6
Rep Power: 10
kareemm2 is on a distinguished road
Nevermind; following Alex's advice, it seems that what I'm doing is fine. Thanks again for your help.

Last edited by kareemm2; April 15, 2016 at 06:18.
kareemm2 is offline   Reply With Quote

Old   April 14, 2016, 09:41
Default
  #7
Senior Member
 
Alex
Join Date: Jan 2014
Posts: 126
Rep Power: 12
Kina is on a distinguished road
Yes, that's right.
I usually prefer to set my internalfield values to 0 at 0 and then initialize with potentialFoam. If you want to keep the intiial U for internalfield you can set the U for Inlet to

Code:
type             inletOutlet;
value            $internalField;
inletValue      $internalField;
this way, the inlet automatically accepts the internalfield value for 0 and you only have to change one number.

~~ what I was referring to when talking about the internalField at t=0 : this is only the initial velocity at t=0 and it changes anyway. From my experience , when dealing with complex geometry or high freestream turbulence, the convergence is a little softer when initializing with U = 0 for internalField.

Cheers
Alex
Kina is offline   Reply With Quote

Old   April 15, 2016, 06:22
Default
  #8
New Member
 
Join Date: Apr 2016
Posts: 6
Rep Power: 10
kareemm2 is on a distinguished road
Thanks a bunch Alex, you've save me quite some time with that advice.
kareemm2 is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with assigned inlet velocity profile as a boundary condition Ozgur_ FLUENT 5 August 25, 2015 05:58
3-D parabolic velocity Inlet - Steady state - UDF Turbulent Flow mohibanwar Fluent UDF and Scheme Programming 10 May 18, 2015 11:34
[Netgen] Import netgen mesh to OpenFOAM hsieh OpenFOAM Meshing & Mesh Conversion 32 September 13, 2011 06:50
boundary condition velocity inlet dont have gauge pressure setting value? coolyihao FLOW-3D 0 March 17, 2009 11:17
UDF paraboloid velocity inlet Ronak Shah FLUENT 0 June 4, 2003 10:44


All times are GMT -4. The time now is 04:40.