CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > FLUENT

Impose flow in a cell zone

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

Reply
 
LinkBack Thread Tools Display Modes
Old   March 31, 2016, 08:43
Default Impose flow in a cell zone
  #1
New Member
 
HAOWU
Join Date: Feb 2016
Location: Trondheim
Posts: 15
Rep Power: 3
haow is on a distinguished road
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
haow is offline   Reply With Quote

Old   April 1, 2016, 01:35
Default
  #2
Senior Member
 
Lucky Tran
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 1,968
Rep Power: 26
LuckyTran will become famous soon enoughLuckyTran will become famous soon enough
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.
LuckyTran is offline   Reply With Quote

Old   April 1, 2016, 08:35
Default
  #3
New Member
 
HAOWU
Join Date: Feb 2016
Location: Trondheim
Posts: 15
Rep Power: 3
haow is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
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
haow is offline   Reply With Quote

Old   April 1, 2016, 09:44
Default
  #4
Senior Member
 
Lucky Tran
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 1,968
Rep Power: 26
LuckyTran will become famous soon enoughLuckyTran will become famous soon enough
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?
LuckyTran is offline   Reply With Quote

Old   April 1, 2016, 12:42
Default
  #5
New Member
 
HAOWU
Join Date: Feb 2016
Location: Trondheim
Posts: 15
Rep Power: 3
haow is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
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.
haow is offline   Reply With Quote

Old   April 1, 2016, 12:47
Default
  #6
Senior Member
 
Lucky Tran
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 1,968
Rep Power: 26
LuckyTran will become famous soon enoughLuckyTran will become famous soon enough
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.
LuckyTran is offline   Reply With Quote

Old   April 1, 2016, 13:02
Default
  #7
New Member
 
HAOWU
Join Date: Feb 2016
Location: Trondheim
Posts: 15
Rep Power: 3
haow is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
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?
haow is offline   Reply With Quote

Old   April 1, 2016, 13:39
Default
  #8
Senior Member
 
Lucky Tran
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 1,968
Rep Power: 26
LuckyTran will become famous soon enoughLuckyTran will become famous soon enough
Quote:
Originally Posted by haow View Post
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.
LuckyTran is offline   Reply With Quote

Old   April 1, 2016, 13:58
Default
  #9
New Member
 
HAOWU
Join Date: Feb 2016
Location: Trondheim
Posts: 15
Rep Power: 3
haow is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
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
haow is offline   Reply With Quote

Old   November 24, 2017, 12:16
Default
  #10
New Member
 
Misa
Join Date: Oct 2017
Posts: 10
Rep Power: 2
mmj_blackforce is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
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.
Thanks in advance
# include "udf.h"

DEFINE_SOURCE(V-gust,cell,thread,dS,eqn)
{
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];
C_CENTROID(centroid,cell,thread);
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)
{
real rho=C_R(cell,thread);
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;
}
mmj_blackforce is offline   Reply With Quote

Reply

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
[Resolved] GPU on Fluent Daveo643 FLUENT 3 April 15, 2015 12:51
FvMatrix coefficients shrina OpenFOAM Running, Solving & CFD 10 October 3, 2013 14:38
Question about common cell zone interaction Maralady FLUENT 0 June 17, 2013 23:31
Trimmed cell and embedded refinement mesh conversion issues michele OpenFOAM Other Meshers: ICEM, Star, Ansys, Pointwise, GridPro, Ansa, ... 2 July 15, 2005 04:15
Warning 097- AB Siemens 6 November 15, 2004 05:41


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