CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > Siemens > STAR-CCM+

Setting mass flow rate profile at an inlet

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 26, 2012, 16:10
Default Setting mass flow rate profile at an inlet
  #1
New Member
 
Join Date: Mar 2011
Posts: 10
Rep Power: 15
MentalVacancy is on a distinguished road
Hello everyone,

I am trying to create a field function at the inlet of a circular pipe rather than just an average value.

I want to use the classic:

u(r) = 2* Vavg (1-(r^2/R^2))

I am not really sure how to go about defining radial position in STAR to define this profile.

Thanks
MentalVacancy is offline   Reply With Quote

Old   April 26, 2012, 16:57
Default
  #2
Senior Member
 
Ryne Whitehill
Join Date: Aug 2009
Posts: 312
Rep Power: 19
rwryne is on a distinguished road
Quote:
Originally Posted by MentalVacancy View Post
Hello everyone,

I am trying to create a field function at the inlet of a circular pipe rather than just an average value.

I want to use the classic:

u(r) = 2* Vavg (1-(r^2/R^2))

I am not really sure how to go about defining radial position in STAR to define this profile.

Thanks

Never done this, but I can see two ways:

1) set up a cylindrical coordinate system (Tools->Coordinate Systems)


---or----

2) Just use the relation that r = sqrt(x^2+y^2). your field function will probably be long and ugly but should work. Itll be much more clean if your axis system has its orgin somewhere along the center axis of your pipe
rwryne is offline   Reply With Quote

Old   April 26, 2012, 17:38
Default
  #3
New Member
 
Join Date: Mar 2011
Posts: 10
Rep Power: 15
MentalVacancy is on a distinguished road
Thanks for such a quick reply.

I am trying to set up the spherical coordinate system, as you suggested. It does appear to be an appropriate choice. I am having some trouble determining the coordinates of the center of my pipe, however. I have an imported mesh and cant seem to find the coordinate object properties for my inlet boundary.
MentalVacancy is offline   Reply With Quote

Old   April 26, 2012, 18:05
Default
  #4
New Member
 
Join Date: Mar 2011
Posts: 10
Rep Power: 15
MentalVacancy is on a distinguished road
Used the ruler tool to find some rough coordinates and hopefully ballpark the center of my pipe. Stay tuned.
MentalVacancy is offline   Reply With Quote

Old   April 27, 2012, 02:36
Default
  #5
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,754
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Quote:
Originally Posted by rwryne View Post
Never done this, but I can see two ways:

1) set up a cylindrical coordinate system (Tools->Coordinate Systems)


---or----

2) Just use the relation that r = sqrt(x^2+y^2). your field function will probably be long and ugly but should work. Itll be much more clean if your axis system has its orgin somewhere along the center axis of your pipe
I've never set up an alternative coordinate system to get around this problem but, method 2 should work. I've done it bunch of times for much more complicated functions also.


Quote:
Originally Posted by MentalVacancy View Post
Used the ruler tool to find some rough coordinates and hopefully ballpark the center of my pipe. Stay tuned.
Did you not setup the geometry? If you know where the pipe center is, you would not need to use the ruler.
LuckyTran is offline   Reply With Quote

Old   April 27, 2012, 09:32
Default
  #6
Senior Member
 
Ryne Whitehill
Join Date: Aug 2009
Posts: 312
Rep Power: 19
rwryne is on a distinguished road
Quote:
Originally Posted by MentalVacancy View Post
Thanks for such a quick reply.

I am trying to set up the spherical coordinate system, as you suggested. It does appear to be an appropriate choice. I am having some trouble determining the coordinates of the center of my pipe, however. I have an imported mesh and cant seem to find the coordinate object properties for my inlet boundary.

I do not think spherical would work. You will have to use cylindrical to get it right.

However, I think method two (using sqrt(x^2+y^2)) would be the best bet.
rwryne is offline   Reply With Quote

Old   April 28, 2012, 08:45
Default
  #7
Senior Member
 
Join Date: Oct 2009
Location: Germany
Posts: 636
Rep Power: 22
abdul099 is on a distinguished road
Even when using the sqrt approach, you still need to know where the center of your tube is. It's not just x and y, but it would by something like sqrt((x-x0)²+(y-y0)²). Just imagine, the center coordinates of your tube wouldn't be near the origin but 1000 miles away. What would you put in for x and y?

Anyway, the field function will be less complicated with the coordinate system. You will get the center coordinate by creating a minimum and maximum report for each position x, y and z of your inlet and subtracting minimum from maximum.
You can get the normal vector of your inlet boundary as well by creating a surface average report for Area at your inlet boundary.
abdul099 is offline   Reply With Quote

Old   June 26, 2012, 16:14
Default
  #8
New Member
 
Join Date: Mar 2011
Posts: 10
Rep Power: 15
MentalVacancy is on a distinguished road
Hello everyone,

Thanks for the support.

So my field function now has the following shape:

21.778*2*(1-((mag2($$X(@CoordinateSystem("Laboratory.Inlet_Coo rdinates"))) +mag2($$Y(@CoordinateSystem("Laboratory.Inlet_Coor dinates"))))/0.005181))

Where 21.778 is my Vavg and 0.005181 is my R2.

When I attempt to run this, I get an error stating " Unable to compute field function MyName on faces of boundary "inlet" Please check that the function is defined there.

Am I defining my variables correctly?

Thanks.
MentalVacancy is offline   Reply With Quote

Old   June 26, 2012, 16:47
Default
  #9
Senior Member
 
Ryne Whitehill
Join Date: Aug 2009
Posts: 312
Rep Power: 19
rwryne is on a distinguished road
Quote:
Originally Posted by MentalVacancy View Post
u(r) = 2* Vavg (1-(r^2/R^2))
Quote:
Originally Posted by MentalVacancy View Post
Hello everyone,

Thanks for the support.

So my field function now has the following shape:

21.778*2*(1-((mag2($$X(@CoordinateSystem("Laboratory.Inlet_Coo rdinates"))) +mag2($$Y(@CoordinateSystem("Laboratory.Inlet_Coor dinates"))))/0.005181))

Where 21.778 is my Vavg and 0.005181 is my R2.

When I attempt to run this, I get an error stating " Unable to compute field function MyName on faces of boundary "inlet" Please check that the function is defined there.

Am I defining my variables correctly?

Thanks.
Think you're almost there, but not quite.

You should be using position or centroid (not sure of difference, if any, for faces)

I think this will work:

Code:
2*21.778*(1-(pow($$Position(@CoordinateSystem("Laboratory.Inlet_Coordinates"))[0],2)+pow($$Position(@CoordinateSystem("Laboratory.Inlet_Coordinates"))[1],2))/0.005181)
rwryne is offline   Reply With Quote

Old   June 26, 2012, 17:42
Default
  #10
New Member
 
Join Date: Mar 2011
Posts: 10
Rep Power: 15
MentalVacancy is on a distinguished road
Quote:
Originally Posted by rwryne View Post
Think you're almost there, but not quite.

You should be using position or centroid (not sure of difference, if any, for faces)

I think this will work:

Code:
2*21.778*(1-(pow($$Position(@CoordinateSystem("Laboratory.Inlet_Coordinates"))[0],2)+pow($$Position(@CoordinateSystem("Laboratory.Inlet_Coordinates"))[1],2))/0.005181)
Seems to have worked! Thanks for all the help!
MentalVacancy is offline   Reply With Quote

Old   June 27, 2012, 12:46
Default
  #11
New Member
 
Join Date: Mar 2011
Posts: 10
Rep Power: 15
MentalVacancy is on a distinguished road
I may have spoken too soon. I believe I may have been setting the problem up incorrectly. Instead of just a mass flow inlet, should a mass flux style (still under mass flow inlet) inlet be used instead? Choosing this option actually allows for a choice of coordinate system when choosing your field function. If I just use the above equation for a "magnitude" (I tried the other choices as well) coordinate system, I once again get the function undefined here error.

Perhaps someone can explain how STAR defines its functions or flow profiles at an interface like this inlet? I cannot seem to find it in the manual. Just from looking at a regular run, it does seem like there is some sort of flow profile assigned to inlets rather than an averaged mass flux over the surface. Can anyone provide any insight?

Thanks again.
MentalVacancy is offline   Reply With Quote

Old   July 6, 2012, 20:54
Default
  #12
Senior Member
 
Join Date: Oct 2009
Location: Germany
Posts: 636
Rep Power: 22
abdul099 is on a distinguished road
Quote:
Originally Posted by rwryne View Post
You should be using position or centroid (not sure of difference, if any, for faces)
Centroid references the cell center. Position references the vertices of a cell.

MentalVacany, for me it looks more like a velocity inlet would be a better choice. Your u(r) equation defines a velocity, no mass flux, right?
__________________
We do three types of jobs here:
GOOD, FAST AND CHEAP
You may choose any two!
abdul099 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
inlet mass flow rate BC manu FLUENT 0 February 5, 2008 14:24
How to change from mass flow to volume flow rate stanley FLUENT 1 February 2, 2007 07:44
Mass flow rate Neser CFX 4 February 14, 2004 01:27
Mass Flow Inlet Pravir Kumar Rai FLUENT 0 February 19, 2003 15:03
mass flow inlet Denis Tschumperle FLUENT 7 August 9, 2000 03:19


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