# Impose flow in a cell zone

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

 March 31, 2016, 08:43 Impose flow in a cell zone #1 New Member   HAOWU Join Date: Feb 2016 Location: Trondheim Posts: 15 Rep Power: 3 Hello, everyone, I am trying to impose a cross flow velocity within a small volume. But I am not sure how to implement. My idea is to add fixed values or source terms. Is it right? ??.JPG After setting a velocity in the cell zone, how is the boundary condition then? Still inlet and outlet? Regards, Hao

 April 1, 2016, 01:35 #2 Senior Member   Lucky Tran Join Date: Apr 2011 Location: Orlando, FL USA Posts: 1,968 Rep Power: 26 I think you should separate your region into a separate cell zone. And then apply the fixed values to only that cell zone. It should talk to the rest of the domain with interfaces and this way you can apply regular boundary conditions to the rest of the domain.

April 1, 2016, 08:35
#3
New Member

HAOWU
Join Date: Feb 2016
Location: Trondheim
Posts: 15
Rep Power: 3
Quote:
 Originally Posted by LuckyTran I think you should separate your region into a separate cell zone. And then apply the fixed values to only that cell zone. It should talk to the rest of the domain with interfaces and this way you can apply regular boundary conditions to the rest of the domain.

Yes, I will add the velocity on a sub domain, but I dont think 'fixed values' work, because I have to consider the interaction between cross flow velocity and in line velocity.

??.JPG
The dashed line is the cell zone

 April 1, 2016, 09:44 #4 Senior Member   Lucky Tran Join Date: Apr 2011 Location: Orlando, FL USA Posts: 1,968 Rep Power: 26 Sorry but when you say impose, you mean to force. So it seems like you are not actually trying to impose the velocity but to study the interaction of two flows. Then this is an entirely different problem and not related to fixed values and subdomains at all. This is way more complicated than it needs to be. Why can't you do the obvious and just specify the cross-flow velocity at the boundary where it enters as a velocity inlet?

April 1, 2016, 12:42
#5
New Member

HAOWU
Join Date: Feb 2016
Location: Trondheim
Posts: 15
Rep Power: 3
Quote:
 Originally Posted by LuckyTran Sorry but when you say impose, you mean to force. So it seems like you are not actually trying to impose the velocity but to study the interaction of two flows. Then this is an entirely different problem and not related to fixed values and subdomains at all. This is way more complicated than it needs to be. Why can't you do the obvious and just specify the cross-flow velocity at the boundary where it enters as a velocity inlet?

Sorry for my poor english. 'impose' may be not the right word here. The continuous cross flow here represents fish school, so it could have fixed direction but variable magnitude.

 April 1, 2016, 12:47 #6 Senior Member   Lucky Tran Join Date: Apr 2011 Location: Orlando, FL USA Posts: 1,968 Rep Power: 26 If you want the velocity to be purely in vertical direction, then you can fix the horizontal velocity to be 0. This way the direction is fixed but the magnitude is variable. If you want the direction to be a combination of x,y,z velocities, that's much harder to do. But note that as soon as you add fixed values, you eliminate the interaction between streams (or severely limit them). You can't have interaction of two streams with different directions with velocity direction fixed for one stream because that would violate momentum conservation. Or even if you did, it would require/result in fictitious forces.

April 1, 2016, 13:02
#7
New Member

HAOWU
Join Date: Feb 2016
Location: Trondheim
Posts: 15
Rep Power: 3
Quote:
 Originally Posted by LuckyTran If you want the velocity to be purely in vertical direction, then you can fix the horizontal velocity to be 0. This way the direction is fixed but the magnitude is variable. If you want the direction to be a combination of x,y,z velocities, that's much harder to do. But note that as soon as you add fixed values, you eliminate the interaction between streams (or severely limit them). You can't have interaction of two streams with different directions with velocity direction fixed for one stream because that would violate momentum conservation. Or even if you did, it would require/result in fictitious forces.
Yes, Fixed value is not the right choice here because I need to solve governing equation in all the domain.

How about adding source of momentum? If I set momentum source along the cross flow?

April 1, 2016, 13:39
#8
Senior Member

Lucky Tran
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 1,968
Rep Power: 26
Quote:
 Originally Posted by haow Yes, Fixed value is not the right choice here because I need to solve governing equation in all the domain. How about adding source of momentum? If I set momentum source along the cross flow?
Fixed values can be the appropriate choice but it depends on what I mentioned earlier about the velocity direction.

I can't answer that because it's too vague what you are trying to implement. You want to add a momentum source, but what do you want to achieve with it?

Can you please just clearly and state what you are trying to model (but be concise), the boundary conditions, and constraints you are trying to impose? It can be pseudo-code and doesn't have to be 100% mathematically.

April 1, 2016, 13:58
#9
New Member

HAOWU
Join Date: Feb 2016
Location: Trondheim
Posts: 15
Rep Power: 3
Quote:
 Originally Posted by LuckyTran Fixed values can be the appropriate choice but it depends on what I mentioned earlier about the velocity direction. I can't answer that because it's too vague what you are trying to implement. You want to add a momentum source, but what do you want to achieve with it? Can you please just clearly and state what you are trying to model (but be concise), the boundary conditions, and constraints you are trying to impose? It can be pseudo-code and doesn't have to be 100% mathematically.
It is a group of fish moving from top to bottom (in the image). The flow from left side represents current flow in the ocean.
In the small cell zone:
1. use porous media to model the blockage of fish
2. add velocity in the cell zone to model the velocity of fish group

November 24, 2017, 12:16
#10
New Member

Misa
Join Date: Oct 2017
Posts: 10
Rep Power: 2
Quote:
 Originally Posted by LuckyTran Fixed values can be the appropriate choice but it depends on what I mentioned earlier about the velocity direction.
Dear Lucky Tran,

I am trying to impose a gust in vertical direction thru y-momentum source udf as defined below.But the desired Y-velocity in the source region is not coming equal to 15 as defined in the udf. I think i made a mistake somewhere? can you please help if you find time.
# include "udf.h"

{
real source=0.0;
real XGS=-7.5; /* X-center of source*/
real YGS=0.0; /* Y-center of source*/
real ZGS=0.0; /* Z-center of source*/
real X= 1.0; /* X, Y, Z dimensions are such so as to make the source-Volume=1m^3*/
real Y= 1.0;
real Z= 1.0;
real t = CURRENT_TIME;

real centroid[3];
real x_loc=centroid[0];
real y_loc=centroid[1];
real z_loc=centroid[2];
if (t>1.0 && t<1.5)
{
if (fabs(x_loc-XGS)<X && fabs(y_loc-YGS)<Y && fabs(z_loc-ZGS)<Z)
{
source=rho*(15-C_V(cell,thread))/CURRENT_TIMESTEP; /*15(m/s) is perturbation in Y direction*/
dS[eqn]=0.0;
}
}
else
{
source=0.0;
dS[eqn]=0.0;
}
return source;
}

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Daveo643 FLUENT 3 April 15, 2015 12:51 shrina OpenFOAM Running, Solving & CFD 10 October 3, 2013 14:38 Maralady FLUENT 0 June 17, 2013 23:31 michele OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 2 July 15, 2005 04:15 AB Siemens 6 November 15, 2004 05:41

All times are GMT -4. The time now is 11:45.