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

Tangential derivative on curved boundary

Register Blogs Community New Posts Updated Threads Search

Like Tree4Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 26, 2014, 04:04
Default Tangential derivative on curved boundary
  #1
Senior Member
 
Simbelmynė's Avatar
 
Join Date: May 2012
Posts: 546
Rep Power: 15
Simbelmynė is on a distinguished road
Hey,

If we know that a tangential derivative is zero at a wall (e.g. the stream function derivative), then what procedure is best to apply?

1. Is it preferable to apply the boundary condition before discretizing the equations?

or

2. Should we try to apply the boundary condition discretely in the solution procedure.

3. If 2 is true then how do we do it? Given that the curvature or the curve length goes to zero it is easy to see that the difference approximation satisfies the derivative, but if we have a finite length then what? Is it correct to use interior nodes to approximate the tangential derivative on the wall?

Cheers!
Attached Images
File Type: jpg example1.JPG (58.9 KB, 17 views)
Simbelmynė is offline   Reply With Quote

Old   September 26, 2014, 04:59
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Well, the question is not very clear to me...
if you need to fix the boundary condition in terms of local tangential component, you just fix zero value in each node of the curved boundary. You have no-slip condition, therefore the velocity is zero, the stream-function is constant along the curved boundary...
what do you need for?
FMDenaro is offline   Reply With Quote

Old   September 26, 2014, 06:16
Default
  #3
Senior Member
 
Simbelmynė's Avatar
 
Join Date: May 2012
Posts: 546
Rep Power: 15
Simbelmynė is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
Well, the question is not very clear to me...
if you need to fix the boundary condition in terms of local tangential component, you just fix zero value in each node of the curved boundary. You have no-slip condition, therefore the velocity is zero, the stream-function is constant along the curved boundary...
what do you need for?
Perhaps my question becomes more clear if I add that it considers interior boundaries (e.g. cylinder in cross stream).

My problem is that while it is easy to set a constant stream function along a boundary, it is only one of two boundary conditions on the stream function. The other being that the normal derivative on the boundary must be zero as well. This means that although we can set a constant value on the boundary, finding that constant value is not easy (right?).

Right now my algorithm is to test all possible stream function values (according to the normal derivatives) on the boundary that gives the least error when calculating the normal derivative of the stream function. This means that there will be some error on all boundary nodes except in one node (the one I choose to use as the constant stream function value on the boundary).

Results are OK, but they could be improved I think. Oh, and for no internal boundaries the code works perfectly.
Simbelmynė is offline   Reply With Quote

Old   September 26, 2014, 07:50
Default
  #4
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
ok, hence you are working using the vorticity/stream function formulation in 3D? you don't use 3 stream functions?
Are you solving in the transformed computational plane and then coming back to the physical plane?
FMDenaro is offline   Reply With Quote

Old   September 26, 2014, 09:39
Default
  #5
Senior Member
 
Simbelmynė's Avatar
 
Join Date: May 2012
Posts: 546
Rep Power: 15
Simbelmynė is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
ok, hence you are working using the vorticity/stream function formulation in 3D? you don't use 3 stream functions?
Are you solving in the transformed computational plane and then coming back to the physical plane?
I work in 2D, so only 1 stream function. I am solving without transformation.
Simbelmynė is offline   Reply With Quote

Old   September 26, 2014, 10:16
Default
  #6
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Simbelmynė View Post
I work in 2D, so only 1 stream function. I am solving without transformation.

Well... sorry to say that I do not understand your problem... the Poisson equation for Psi require only one type of boundary condition, in this case Dirichlet. The constant value of Psi along a boundary ensures that you have no mass flowing through it (normal velocity is zero). The normal derivative of Psi is the tangential velocity on the boundary that is zero for no-slip condition.
The vorticity at the boundary is not fixed as Dirichlet condition but depends on the second derivative of Psi along the normal direction.
FMDenaro is offline   Reply With Quote

Old   September 26, 2014, 11:05
Default
  #7
Senior Member
 
Simbelmynė's Avatar
 
Join Date: May 2012
Posts: 546
Rep Power: 15
Simbelmynė is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
Well... sorry to say that I do not understand your problem... the Poisson equation for Psi require only one type of boundary condition, in this case Dirichlet. The constant value of Psi along a boundary ensures that you have no mass flowing through it (normal velocity is zero). The normal derivative of Psi is the tangential velocity on the boundary that is zero for no-slip condition.
The vorticity at the boundary is not fixed as Dirichlet condition but depends on the second derivative of Psi along the normal direction.
The constant value of Psi along the boundary is not known and should be found as part of the solution. If we set an arbitrary value for this constant then there might be nodes where the normal derivative is not zero, i.e. the no slip condition is violated.

Imagine flow between two plates, then if we wish to have flow between the plates we need to have a non-zero gradient of Psi between them, i.e. we need to set two different constant values (e.g. 0 on the bottom plate and 1 on the top plate).

This works well when we know the flow between the plates. But what if we don“t know it? If we calculate flow around a cylinder, then one of the results might be the flow rate above and below the cylinder, this is not known į priori.

For internal boundaries, different (constant) Psi on the wall might give different results. The solution will not penetrate the walls, but the no-slip condition might not be fulfilled.

This is how I understand it (and how my code behaves), however, as always, there is a large chance of error on my part

One final thing: In this post you can see the results where the stream function on the internal wall is constant (arbitrarily chosen) and when it is part of the solution. The differences are huge.

http://www.cfd-online.com/Forums/mai...-boundary.html

Last edited by Simbelmynė; September 26, 2014 at 11:10. Reason: added link
Simbelmynė is offline   Reply With Quote

Old   September 26, 2014, 12:18
Default
  #8
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Simbelmynė View Post
The constant value of Psi along the boundary is not known and should be found as part of the solution. If we set an arbitrary value for this constant then there might be nodes where the normal derivative is not zero, i.e. the no slip condition is violated.

Imagine flow between two plates, then if we wish to have flow between the plates we need to have a non-zero gradient of Psi between them, i.e. we need to set two different constant values (e.g. 0 on the bottom plate and 1 on the top plate).

This works well when we know the flow between the plates. But what if we don“t know it? If we calculate flow around a cylinder, then one of the results might be the flow rate above and below the cylinder, this is not known į priori.

For internal boundaries, different (constant) Psi on the wall might give different results. The solution will not penetrate the walls, but the no-slip condition might not be fulfilled.

This is how I understand it (and how my code behaves), however, as always, there is a large chance of error on my part

One final thing: In this post you can see the results where the stream function on the internal wall is constant (arbitrarily chosen) and when it is part of the solution. The differences are huge.

http://www.cfd-online.com/Forums/mai...-boundary.html

but it is right that you cannot fix a-priori the value as it fixes the flow rate that goes in the upper and lower part of the obstacle...
The correct way to work is to use the integral constraint that the circuitation of the velocity has a known value. You discretize this integral constraint ad insert this equation to sove simoulataneously with the Poisson equation...that does not depend on curved or straight boundary...

I attach a file of a lecture a usually do to my students, it is written in italian but I hope it can help.
Attached Files
File Type: doc Condizioni per domini pluriconnessi 1.doc (52.5 KB, 8 views)
File Type: doc Condizioni per domini pluriconnessi 2.doc (84.5 KB, 6 views)
Simbelmynė likes this.
FMDenaro is offline   Reply With Quote

Old   September 28, 2014, 04:58
Default
  #9
Senior Member
 
Simbelmynė's Avatar
 
Join Date: May 2012
Posts: 546
Rep Power: 15
Simbelmynė is on a distinguished road
Thank you for the lecture notes. I have now tried the integral constraint in my code. I have a few questions on the implementation though, since my previous implementation yields better results:

1. Given that we have constant spacing both in normal direction and in the tangential direction, is it true that we will assume that the stream function on the wall (n) is the mean value of the stream function of all the nodes surrounding the boundary in the normal direction (n+1)?

2. If so, then how do we ensure that the tangential velocity on the wall is exacly zero for all nodes on the wall (no-slip)?

Cheers!
Simbelmynė is offline   Reply With Quote

Old   September 28, 2014, 06:18
Default
  #10
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Simbelmynė View Post
Thank you for the lecture notes. I have now tried the integral constraint in my code. I have a few questions on the implementation though, since my previous implementation yields better results:

1. Given that we have constant spacing both in normal direction and in the tangential direction, is it true that we will assume that the stream function on the wall (n) is the mean value of the stream function of all the nodes surrounding the boundary in the normal direction (n+1)?

2. If so, then how do we ensure that the tangential velocity on the wall is exacly zero for all nodes on the wall (no-slip)?

Cheers!

1. That depends on the formula you adopt for discretizing the normal derivative d Psi/dn. You can use second order formula on n,n+1,n+2 points.

2. The elliptic equation for Psi is expressed in terms of only one condition, the zero tangential condition must be fixed when you compute the vorticity field, the BC.s for vorticity at wall contains the no-slip assuption.
FMDenaro is offline   Reply With Quote

Old   September 28, 2014, 07:21
Default
  #11
Senior Member
 
Simbelmynė's Avatar
 
Join Date: May 2012
Posts: 546
Rep Power: 15
Simbelmynė is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
1. That depends on the formula you adopt for discretizing the normal derivative d Psi/dn. You can use second order formula on n,n+1,n+2 points.

2. The elliptic equation for Psi is expressed in terms of only one condition, the zero tangential condition must be fixed when you compute the vorticity field, the BC.s for vorticity at wall contains the no-slip assuption.
My vorticity BC is derived from a taylor expansion of the stream function in the normal direction, where I assume that the first derivative is zero since the tangential velocity should be zero at the wall. This is then used with the poisson equation for the stream function to find the vorticity BC on the wall.

So I am still confused how we can make the assumption that the first derivative is zero if we have no way of enforcing that. It seems like a circular argument to me.

Do I understand correctly that if the vorticity on the wall is non zero then we have a tangential velocity component on the wall and this is OK, since the discretization of the vorticity BC cosideres this? In other words: Since the tangential velocity at the wall is not zero then we have vorticity at the wall?
Simbelmynė is offline   Reply With Quote

Old   September 28, 2014, 07:40
Default
  #12
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
no, the vorticity at the wall is due to the wall stress ...when you use the Taylor expansion, you write (z is the vorticity):

Psi(w+1)=Psi(w)+ d Psi/dn|w *h + d2 Psi/dn2|w *h^2/s +...

Hence, d Psi/dn|w= u_tang=0, d2 Psi/dn2|w = z(w) and you determine a relation (valid at each time step) for the the vorticity at the wall that includes the no-slip condition. This relation is used in computing the vorticity equation, not the Poisson equation for Psi...the problem is therefore totally well posed
FMDenaro is offline   Reply With Quote

Old   September 28, 2014, 08:21
Default
  #13
Senior Member
 
Simbelmynė's Avatar
 
Join Date: May 2012
Posts: 546
Rep Power: 15
Simbelmynė is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
no, the vorticity at the wall is due to the wall stress ...when you use the Taylor expansion, you write (z is the vorticity):

Psi(w+1)=Psi(w)+ d Psi/dn|w *h + d2 Psi/dn2|w *h^2/s +...

Hence, d Psi/dn|w= u_tang=0, d2 Psi/dn2|w = z(w) and you determine a relation (valid at each time step) for the the vorticity at the wall that includes the no-slip condition. This relation is used in computing the vorticity equation, not the Poisson equation for Psi...the problem is therefore totally well posed
Yes I do exactly what you suggest. But we have two physical conditions on the wall (right?), both which we could use to form conditions for the stream function on the wall:

1. v_n=0
2 v_t=0

Condition 1, states that there can be no flow through the wall, and following the definition of the stream function it means that the stream function must be constant on the wall.

Condition 2 is the no-slip condition and it states that the stream function derivative at the wall must be zero.

This is two conditions on the stream function. We use condition 1 for the Poisson equation solution and construct a vorticity BC with condition 2. Is there any rationale behind this other than that the zero penetration condition is more important to enforce?

Also, what I meant with my previous post can be seen if we consider the equation

Psi(w+1)=Psi(w)+ d Psi/dn|w *h + d2 Psi/dn2|w *h^2/s +...

If v_t=0 on the wall then d Psi/dn|w=0. If we discretize d Psi/dn|w with a first order approximation then it means that Psi(w+1)=Psi(w). So this means that d2 Psi/dn2|w *h^2/s=0 if v_t=0, i.e. no vorticity is generated on the wall if v_t=0 on the wall.

(I completely agree that the physical explanation to vorticity generation is due to shear stress at the wall, but I do not think vorticity exists at the wall in reality, it is only exists numerically)
Simbelmynė is offline   Reply With Quote

Old   September 28, 2014, 08:53
Default
  #14
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Simbelmynė View Post
Yes I do exactly what you suggest. But we have two physical conditions on the wall (right?), both which we could use to form conditions for the stream function on the wall:

1. v_n=0
2 v_t=0

Condition 1, states that there can be no flow through the wall, and following the definition of the stream function it means that the stream function must be constant on the wall.

Condition 2 is the no-slip condition and it states that the stream function derivative at the wall must be zero.

This is two conditions on the stream function. We use condition 1 for the Poisson equation solution and construct a vorticity BC with condition 2. Is there any rationale behind this other than that the zero penetration condition is more important to enforce?

Also, what I meant with my previous post can be seen if we consider the equation

Psi(w+1)=Psi(w)+ d Psi/dn|w *h + d2 Psi/dn2|w *h^2/s +...

If v_t=0 on the wall then d Psi/dn|w=0. If we discretize d Psi/dn|w with a first order approximation then it means that Psi(w+1)=Psi(w). So this means that d2 Psi/dn2|w *h^2/s=0 if v_t=0, i.e. no vorticity is generated on the wall if v_t=0 on the wall.

(I completely agree that the physical explanation to vorticity generation is due to shear stress at the wall, but I do not think vorticity exists at the wall in reality, it is only exists numerically)

No...u_tan =0 is the exact BC. you must use, Psi(w+1)=Psi(w) is only a first order accurate representation of it. And, consequently, you cannot use it in the Taylor expansion to say that z(w)=0!

Vorticity at wall exists as limit of the circuitation of the tangential velocity over a closed path going to zero. It will not vanish
FMDenaro is offline   Reply With Quote

Old   September 29, 2014, 06:30
Default
  #15
Senior Member
 
Simbelmynė's Avatar
 
Join Date: May 2012
Posts: 546
Rep Power: 15
Simbelmynė is on a distinguished road
OK, so if we decrease the mesh size then we can expect the discrete wall tangential velocity to converge to zero?

or

Is it only the integral condition that is satisfied?
Simbelmynė is offline   Reply With Quote

Old   September 29, 2014, 06:45
Default
  #16
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Simbelmynė View Post
OK, so if we decrease the mesh size then we can expect the discrete wall tangential velocity to converge to zero?

or

Is it only the integral condition that is satisfied?
Assume a formula like

u_tang= d Psi/dn|w = ( -3*Psi(w)+4*Psi(w+1)-Psi(w+2))/(2*h)

Therefore, assuming that the tangential velocity is zero on the obstacle, the circuitation along it is zero:

Int [C_obs] u_tang dC = 0

After substituting the formula for u_tang, you get an equation for the unique value Psi(w) to be associated to the Poisson equation for Psi.
Once the convergence for the solution of the algebric problem is reached, you have ensured (in discrete sense) that the no-slip condition over the obstacle.
DO not forget that the formula for the vorticity on the obsacle also impose the tangential velocity to be zero.
Try to verify that, after convergence of the Psi solver, the discrete u_tang is zero in all the nodes along a wall
Simbelmynė likes this.
FMDenaro is offline   Reply With Quote

Old   September 29, 2014, 07:22
Default
  #17
Senior Member
 
Simbelmynė's Avatar
 
Join Date: May 2012
Posts: 546
Rep Power: 15
Simbelmynė is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
Assume a formula like

u_tang= d Psi/dn|w = ( -3*Psi(w)+4*Psi(w+1)-Psi(w+2))/(2*h)

Therefore, assuming that the tangential velocity is zero on the obstacle, the circuitation along it is zero:

Int [C_obs] u_tang dC = 0

After substituting the formula for u_tang, you get an equation for the unique value Psi(w) to be associated to the Poisson equation for Psi.
Once the convergence for the solution of the algebric problem is reached, you have ensured (in discrete sense) that the no-slip condition over the obstacle.
DO not forget that the formula for the vorticity on the obsacle also impose the tangential velocity to be zero.
Try to verify that, after convergence of the Psi solver, the discrete u_tang is zero in all the nodes along a wall
Thank you! OK, two final questions (I hope ).

1. When I tried the integral condition, I used a first order approximation for the tangential velocity. The results were not as good as when I tried to minimize the tangential velocity on the wall using the attached algorithm (also 1st order approximations). Any thoughts on the algorithm?

2. Do you solve the integral condition before each Poisson solution or do you have to do it at each loop?

Thanks =)
Attached Images
File Type: jpg algorithm.JPG (48.2 KB, 5 views)
Simbelmynė is offline   Reply With Quote

Old   September 29, 2014, 07:58
Default
  #18
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
You must solve all simoultaneously, do not forget to consider also the residual of the circuitation equation in your convergence criterion
FMDenaro is offline   Reply With Quote

Old   September 29, 2014, 08:02
Default
  #19
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Have a look here
G. de Felice, F.M. Denaro, C. Meola; "Stream-Function Based Multiple Bluff Bodies 2D Flow Analysis"; Journal of Wind Engineering and Industrial Aerodynamics, Vol. 50, pp. 49-61, 1993;
FMDenaro is offline   Reply With Quote

Old   October 1, 2014, 14:26
Default
  #20
Senior Member
 
Jonas T. Holdeman, Jr.
Join Date: Mar 2009
Location: Knoxville, Tennessee
Posts: 128
Rep Power: 18
Jonas Holdeman is on a distinguished road
There is, of course, a simpler method for solving Simbelmyne's problem of a cylinder in a driven cavity. Yesterday I cobbled together some code from a LDC with a mesh I had generated for a MHD problem. It solves the stationary problem, and lacks a number of things but it apparently works. I use divergence-free finite elements derived as the curl of a simple cubic Hermite stream function (this might be called a stream function-velocity method). I use the usual BCs on the square boundary and u=v=0 on the cylinder surface. I should have used the condition that the stream function be constant on the cylinder surface but did not have the time and ambition to code that constraint. But solving the pressure-free NSE gives a surface stream function constant to within 1%.

It seems, however, that the omission of the surface constraint is not sufficient for use of quartic and quantic stream function elements. Maybe I will check this out sometime. The three figures of mesh, stream contours, and vector velocity plot are attached. I show the steady result because I don't know Simbelmyne's initial conditions.
Attached Images
File Type: jpg Fig1.jpg (93.2 KB, 12 views)
File Type: jpg Fig2.jpg (85.5 KB, 9 views)
File Type: jpg Fig4.jpg (88.3 KB, 11 views)
Jonas Holdeman 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
Implementation of boundary conditions for FVM Tom Main CFD Forum 7 August 26, 2014 05:58
GETVAR Error in Multiband Monte Carlo Radiation Simulation with Directional Source silvan CFX 3 June 16, 2014 09:49
RPM in Wind Turbine Pankaj CFX 9 November 23, 2009 04:05
implement tangential boundary condition in simple jhuang Main CFD Forum 4 July 10, 2006 04:01
Boundary conditions? Tom Main CFD Forum 0 November 5, 2002 01:54


All times are GMT -4. The time now is 09:49.