|
[Sponsors] |
September 26, 2014, 05:04 |
Tangential derivative on curved boundary
|
#1 |
Senior Member
Join Date: May 2012
Posts: 552
Rep Power: 16 |
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! |
|
September 26, 2014, 05:59 |
|
#2 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,893
Rep Power: 73 |
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? |
|
September 26, 2014, 07:16 |
|
#3 | |
Senior Member
Join Date: May 2012
Posts: 552
Rep Power: 16 |
Quote:
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. |
||
September 26, 2014, 08:50 |
|
#4 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,893
Rep Power: 73 |
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? |
|
September 26, 2014, 10:39 |
|
#5 |
Senior Member
Join Date: May 2012
Posts: 552
Rep Power: 16 |
I work in 2D, so only 1 stream function. I am solving without transformation.
|
|
September 26, 2014, 11:16 |
|
#6 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,893
Rep Power: 73 |
Quote:
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. |
||
September 26, 2014, 12:05 |
|
#7 | |
Senior Member
Join Date: May 2012
Posts: 552
Rep Power: 16 |
Quote:
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 12:10. Reason: added link |
||
September 26, 2014, 13:18 |
|
#8 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,893
Rep Power: 73 |
Quote:
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. |
||
September 28, 2014, 05:58 |
|
#9 |
Senior Member
Join Date: May 2012
Posts: 552
Rep Power: 16 |
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! |
|
September 28, 2014, 07:18 |
|
#10 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,893
Rep Power: 73 |
Quote:
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. |
||
September 28, 2014, 08:21 |
|
#11 | |
Senior Member
Join Date: May 2012
Posts: 552
Rep Power: 16 |
Quote:
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? |
||
September 28, 2014, 08:40 |
|
#12 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,893
Rep Power: 73 |
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 |
|
September 28, 2014, 09:21 |
|
#13 | |
Senior Member
Join Date: May 2012
Posts: 552
Rep Power: 16 |
Quote:
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) |
||
September 28, 2014, 09:53 |
|
#14 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,893
Rep Power: 73 |
Quote:
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 |
||
September 29, 2014, 07:30 |
|
#15 |
Senior Member
Join Date: May 2012
Posts: 552
Rep Power: 16 |
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? |
|
September 29, 2014, 07:45 |
|
#16 | |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,893
Rep Power: 73 |
Quote:
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 |
||
September 29, 2014, 08:22 |
|
#17 | |
Senior Member
Join Date: May 2012
Posts: 552
Rep Power: 16 |
Quote:
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 =) |
||
September 29, 2014, 08:58 |
|
#18 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,893
Rep Power: 73 |
You must solve all simoultaneously, do not forget to consider also the residual of the circuitation equation in your convergence criterion
|
|
September 29, 2014, 09:02 |
|
#19 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,893
Rep Power: 73 |
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; |
|
October 1, 2014, 15:26 |
|
#20 |
Senior Member
Jonas T. Holdeman, Jr.
Join Date: Mar 2009
Location: Knoxville, Tennessee
Posts: 128
Rep Power: 18 |
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. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Implementation of boundary conditions for FVM | Tom | Main CFD Forum | 7 | August 26, 2014 06:58 |
GETVAR Error in Multiband Monte Carlo Radiation Simulation with Directional Source | silvan | CFX | 3 | June 16, 2014 10:49 |
RPM in Wind Turbine | Pankaj | CFX | 9 | November 23, 2009 05:05 |
implement tangential boundary condition in simple | jhuang | Main CFD Forum | 4 | July 10, 2006 05:01 |
Boundary conditions? | Tom | Main CFD Forum | 0 | November 5, 2002 02:54 |