Professional Documents
Culture Documents
V
An Issue With Doublet Panels
Consider a cut through the body surface
V=Vtang
V<Vtang
V<<Vtang
no flow
• Panels appear as a series of discrete vortices with strengths equal to the difference between adjacent
panel strengths. At the control points we see almost none of the tangential velocity generated by nearby
vortices. This is wrong.
• It is as though the surface were a continuous vortex sheet, and we calculated the tangential velocity at
the c.p. ignoring the discontinuous jump between the inside and outside. This jump, equal to half the local
sheet strength is called the principal value and must be added to the tangent velocity calculated at a
control point V=Vtang
• The principal value for a doublet panel can be
V=0 estimated as -½ local gradient of the panel
strength on the surface.
• This must be added to the tangential velocity calculated at any control point
3D Doublet Panel Code
Non-lifting bodies
% determine surface area and normal vectors at control points (assumes counter clockwise around com
ac=0.5*v_cross(r(:,sw)-r(:,ne),r(:,se)-r(:,nw));nc=ac./v_mag(ac);
ga=coef\rm;
function q=ffil(r,rs,re);
r1(1,:)=rs(1,:)-r(1,:); r1(2,:)=rs(2,:)-r(2,:); r1(3,:)=rs(3,:)-r(3,:);
r2(1,:)=re(1,:)-r(1,:); r2(2,:)=re(2,:)-r(2,:); r2(3,:)=re(3,:)-r(3,:);
r0(1,:)=r1(1,:)-r2(1,:);r0(2,:)=r1(2,:)-r2(2,:);r0(3,:)=r1(3,:)-r2(3,:);
c=v_cross(r1,r2);
c2=v_dot(c,c);
q=c./c2.*v_dot(r0,r1./v_mag(r1)-r2./v_mag(r2))/4/pi;
Specifying a 3D Body
First we must choose shape. %Specify body of revolution geometry
th=-pi/2:pi/20:pi/2;xp=sin(th);yp=cos(th);nc=20;
E.g. Body of revolution: [r,rc,nw,sw,se,ne,no,we,so,ea]=bodyOfRevolution(xp,yp,nc)
function [r,rc,nw,sw,se,ne,no,we,so,ea]=bodyOfRevolution(xp,yp,nc)
[r,rc,nw,sw,se,ne,no,we,so,ea]=bodyOfRevolution(xp,yp,nc);
% determine surface area and normal vectors at control points (assumes counter clockwise
around compass by RH rule points out of surface)
ac=0.5*v_cross(r(:,sw)-r(:,ne),r(:,se)-r(:,nw));nc=ac./v_mag(ac);
Panel Influence
Velocity due to panel m at control point n:
V (rc( n ) )
(m)
f fil (rc( n ) , rnw
( m) ( m)
, rsw ) f fil (rc( n ) , rsw
(m)
, rse( m ) )
ne f fil (rc( n ) , rse( m ) , rne( m ) ) f fil (rc( n ) , rne( m ) , rnw
(m)
) (m)
nw (m)
or V (r (n)
c ) C ( n ,m ) ( m )
Panel m
se Summed velocity at control point n is thus:
sw V (rc( n ) ) V C ( n ,m ) ( m ) (w/o tangential velocity
m due to principal value)
Normal component is
r(m)
V (rc( n ) ).n c( n ) 0 V n c( n ) C ( n ,m ) .n (cn ) ( m )
m
).n c
(n)
V (rc vector
%determine result 0 solve
and c
(n)
V nmatrix
m
.n c strengths
C filament
for
(n)
( n ,m ) (n) (m)
rm=(-nc(1,:)*vinf(1)-nc(2,:)*vinf(2)-nc(3,:)*vinf(3))';
So, to get the
coef(end+1,:)=1;rm(end+1)=0;(m)%prevents singular matrix
’s we need to solve the
rc(n) ga=coef\rm;
simultaneous equations:
V n (cn ) C ( n ,m ) .n c( n ) ( m )
m
Control
point n Nx1 matrix of freestream NxN coefficient Nx1 matrix of
components matrix panel strengths
Determining Surface Pressure
Total velocity at control point
V (rc( n ) ) V C ( n ,m ) ( m )
no Tangential velocity
due to principal
m value at rc
ea
Tangential velocity
nc due to principal 12 Evaluated at rc
value at rc
we
Using the gradient theorem and values of at
neighboring control points we can show that
rc so
(rwe rno )(we no ) (rso rwe )(so we )
(r r )( ) (r r )( ) n c
ea so ea so no ea no ea
(n) 2
We can then use Bernoulli V (r
c )
C p (r (n)
c ) 1
to compute the pressure V
2
Determining Surface Pressure
Velocity at control point
V (rc( n ) ) V C ( n ,m ) ( m )
no Tangential velocity
due to principal
m value at rc
ea
Tangential velocity
nc due to principal 12 Evaluated at rc
value at rc
we
%Determine velocity and pressure at control points
for n=1:npanels Using
%Get the gradient
velocity theorem
at each and
c.p. w/o of at
values value
principal
cmn=ffil(rc(:,n),r(:,nw),r(:,sw))+ffil(rc(:,n),r(:,sw),r(:,se))
neighboring control points we can show that
+ffil(rc(:,n),r(:,se),r(:,ne))+ffil(rc(:,n),r(:,ne),r(:,nw));
rc so
rwe rno )(principle
(%Determine
v(:,n)=vinf+sum(ga.*cmn,2);
we no ) value,
(rso -grad(ga)/2
rwe )(so we )
nc
end
(rea rso )(ea so ) (rno rea )(no ea )
gg=v_cross((rc(:,we)-rc(:,no)).*(ga(:,we)+ga(:,no))+(rc(:,so)-...
v=v-gg/2; %velocity vector
(rno rso ) (rwe rea )
cp=1-sum(v.^2)/(vinf'*vinf); %pressure
(n) 2
We can then use Bernoulli V (r
c )
C p (r (n)
c ) 1
to compute the pressure V
2
Determining Surface Pressure
Velocity
%Determine velocity at control
and pressure at point
control points
for n=1:npanels %Get velocity at each c.p. w/o principal value
no Tangential velocity
cmn=ffil(rc(:,n),r(:,nw),r(:,sw))+ffil(rc(:,n),r(:,sw),r(:,se))
V (rc( n ) ) V C ( n ,m ) ( m ) due to principle
+ffil(rc(:,n),r(:,se),r(:,ne))+ffil(rc(:,n),r(:,ne),r(:,nw));
v(:,n)=vinf+sum(ga.*cmn,2); m value at rc
end %Determine principle value, -grad(ga)/2
ea
gg=v_cross((rc(:,we)-rc(:,no)).*(ga(:,we)+ga(:,no))+(rc(:,so)-...
Tangential velocity
v=v-gg/2; %velocity vector
n c due to principle
cp=1-sum(v.^2)/(vinf'*vinf); %pressure
12 Evaluated at rc
value at rc
we
Using the gradient theorem and values of at
neighboring control points we can show that
rc so
(rwe rno )(we no ) (rso rwe )(so we )
(r r )( ) (r r )( ) n c
ea so ea so no ea no ea
(n) 2
We can then use Bernoulli V (r
c )
C p (r(n)
c ) 1
to compute the pressure V
2
Using the Code
• Plotting the pressure, streamlines
• Deforming the body shape
• Changing the shape
• More than one body