+ All Categories
Home > Documents > Distributed Parameters

Distributed Parameters

Date post: 06-Jan-2016
Category:
Upload: chessa
View: 44 times
Download: 0 times
Share this document with a friend
Description:
Distributed Parameters. ECX 5241. Academic year 2003. Prepared by D.A.Mangala Abeysekara. ASSIGNMENT NO.1. ASSIGNMENT NO.2. ASSIGNMENT NO.3. ASSIGNMENT NO.4. ASSIGNMENT NO.1. Symmetry in the physical universe Coordinates systems Operators in vector calculus The theorem of gauss - PowerPoint PPT Presentation
80
Distributed Parameters ECX 5241 Academic year 2003 Prepared by D.A.Mangala Abeysekara
Transcript
Page 1: Distributed Parameters

Distributed ParametersECX 5241

Academic year 2003

Prepared by

D.A.Mangala Abeysekara

Page 2: Distributed Parameters

ASSIGNMENT NO.1

ASSIGNMENT NO.2

ASSIGNMENT NO.3

ASSIGNMENT NO.4

Page 3: Distributed Parameters

ASSIGNMENT NO.1

Symmetry in the physical universe

Coordinates systems

Operators in vector calculus

The theorem of gauss

The theorem of Stokes

Page 4: Distributed Parameters

Symmetry in the physical universe

Most of the problems in the physical universe exhibit the spherical or cylindrical symmetry.

Examples

• the gravity field of the Earth is to the first order spherical symmetric.

Page 5: Distributed Parameters

• Waves excited by a stone thrown into water are usually cylindrically symmetric

•An earthquake excites a tsunami in the ocean

The Cartesian coordinates is usually not very convenient to use for study such a problems

Page 6: Distributed Parameters

The reason for this is that the theory is usually much simpler when one selects a coordinate system with symmetry properties that are the same as the symmetry properties of the physical system that one wants to study.

There are two coordinates systems used for study the symmetric system.

Page 7: Distributed Parameters

•Spherical Coordinates

•Cylindrical Coordinates

Relationship between the Cartesian coordinates and spherical coordinates

z

y

xr

ˆ

ˆ

ˆ

0cossin

sinsincoscoscos

cossinsincossin

ˆ

ˆ

ˆ

Page 8: Distributed Parameters

Relationship between the Cartesian coordinates and cylindrical coordinates

zz

ry

rx

sin

cos

0

sin

cos

ˆ

r

0

cos

sin

ˆ

1

0

0

z

Page 9: Distributed Parameters

Operators in vector calculus

 There are several operators can be identified in the vector calculus. They are,

        Gradient (f )

        Divergent(.v )

      Curl (v )

 

Page 10: Distributed Parameters

Gradient

Lets consider the particle, which moved according to the function f from point A to point B.(f Is a function of x and y)

 

Grad f =

 

yf

xff

/

/

Page 11: Distributed Parameters

The divergence of a vector field

dz

dxdy

vx

Outward flux through the right hand surface perpendicular through the x-axis

vx (x+dx, y, z) dydz

Page 12: Distributed Parameters

The flux through the left hand surface perpendicular through the x- axis

– vx (x, y, z) dydz

The the total outward flux through the two surface

vx (x+dx, y, z) dydz - vx (x, y, z) dydz =

(vx/x)dxdydz

Page 13: Distributed Parameters

dvvdvz

v

y

v

x

vd zyx ).(

(.v)= d/dv

The divergence of a vector field is the outward flux of the vector field per unit volume

Page 14: Distributed Parameters

The curl of a vector field

xyyx

zxxz

yzzy

zyx

zyx

vv

vv

vv

vvv

zyx

curlV

ˆˆˆ

Curl V=v

Page 15: Distributed Parameters

Physical meaning of the curl operator

 

The component of curl v in a certain direction is the closed line integral of v along a closed path perpendicular to this direction, normalized per unit surface area.

Page 16: Distributed Parameters

VS

dVvvdS ).(

The theorem of gauss

The theorem of Stokes

SC

dSvdrv ).(.

Page 17: Distributed Parameters

Example

The magnetic field induced by a straight current

I

B

The Maxwell equation for the curl

JB 0

Page 18: Distributed Parameters

)(rBB

dSrBdrBSC )(

dSJBdrSC

ˆ0

ˆ2

0

r

IB

Solving this equation,

(Using Stoke theorem)

Page 19: Distributed Parameters

Reference

 

A Guided Tour Of Mathematical Methods For The Physical Science

By

Role Sineder

Cambridge University Press

 

Page 20: Distributed Parameters

Thank you for your attention

Page 21: Distributed Parameters

ASSIGNMENT NO.2

Classification of PDE

Acoustic sound propagation in gas

Page 22: Distributed Parameters

A partial differential equation of the form

is said to be

      Elliptic if 4AC-B2>0

      Parabolic if 4AC-B2=0

      Hyperbolic if 4AC-B2<0

 

y

u

x

uuyxF

y

uC

yx

uB

x

uA ,,,,

2

22

2

2

Page 23: Distributed Parameters

Consider the partial differential equation,

where A,B and C are constants.

Define variables,

and

where ,, and are constants.

Using chain rule we can show that ,

02

22

2

2

y

uC

yx

uB

x

uA

tx tx

Page 24: Distributed Parameters

0)(

]2)(2[

)(

222

2

222

2

CBAu

uCBA

CBAu

Page 25: Distributed Parameters

If we can select ,, and such that, 

and

Then

and the general solution is ,

022 CBA

022 CBA

0

u

)()( qpu

Page 26: Distributed Parameters

hyperbolic Equations It can be shown that, if the equation is hyperbolic if B2>4AC, 

=2A=2A

Satisfies this condition. Hence hyperbolic equations have two characteristic given by,

 

ACBB 42 ACBB 42

tconstACBBAx tan)4(2 2

tconstACBBAx tan)4(2 2

Page 27: Distributed Parameters

Parabolic Equation

 

It can be shown that the equation is parabolic, if 4AC-B2=0

The solution of the quadric equation,

is

 

If =2A, and =-B, the coefficient of , that is,

 

 

02

CBA

A

B

2

u

Page 28: Distributed Parameters

0)4(

4)2(2

2)(2

2

BAC

ACABAB

CBA

The partial differential equation is reduce to,

 

The solution is,

Where p and q are arbitrary functions.

02

2

u

)()( qpu

Page 29: Distributed Parameters

The parabolic equations have only one characteristic given by,

2Ax-Bt = constant

Page 30: Distributed Parameters

Elliptic Equation

 Elliptic equations have no characteristics. However, the transformation,

 

Reduce the partial differential equation to,

 

 

 

 

24

2

BAC

BtAx

t

02

2

2

2

uu

Page 31: Distributed Parameters

Let consider the cubic element of the fluid (gas).

Y

Z

X

x

zyxx

pp

)(zyp z

y

x

Page 32: Distributed Parameters

zyxx

pFx

net force in the positive x direction is

similarly the net force in the positive y and z directions are

zyxy

pFy

zyxz

pFz

Page 33: Distributed Parameters

The net vector force on the cubical element is therefore

.zyxpF

where

z

pk

y

pj

x

pip

Using Newton’s second low

2

2

0 tp

Page 34: Distributed Parameters

Let write the divergence of the gradient of pressure

2

2

0

).(.

tpp

The incremental pressure and the accompanying dilation are linearly related through the bulk modules B,

BBp

Page 35: Distributed Parameters

By eliminating .

2

2

22 1

t

p

cp

f

where 2/1

0

B

c f

The left side of equation is the three dimensional laplacian of the pressure p

Page 36: Distributed Parameters

Thank you for your attention

Page 37: Distributed Parameters

Potential of the velocity field in fluid

ASSIGNMENT NO.3

Page 38: Distributed Parameters

IRROTTIONAL FLOW

Lets consider the two point in the fluid with distance of dr

z

x

yA

B

dr

Page 39: Distributed Parameters

Les conceder the two points of A and B as a diagonal of the rectangular pipe.

A

C

B

E

dy

dz

dx

D

We can write the velocity of the point c can be given in the term of the velocity of point A.

Page 40: Distributed Parameters

dxx

Vvv Ac

dxx

Vvv Ac

This equation can be written in three dimensional form

dxkx

Vzdxj

x

Vdxi

x

Vvv yx

Ac

Page 41: Distributed Parameters

Hence the velocity at the point c can be represent in the term of velocity of the point A

dxx

Vx

dxx

Vy

dxx

Vz

A

E

D

Cy

x

z

Page 42: Distributed Parameters

Like in the point c, the velocities at the other two are also can be written relative to the point A

E

D

dxx

Vx

dxx

Vy

dxx

Vz

A

Cy

x

z

dyy

Vy

dyy

Vx

dyy

Vz

dzz

Vy

dzz

Vz

dzz

Vx

Page 43: Distributed Parameters

Now conceder particle C. it is clear that is the rate of elongation of line segment AC.

dxxVx

We can write the elongation rate per unit original length,as . This is known as the normal stain

xVx xx

.

.

.

zzz

yyy

xxx

z

V

y

Vx

V

Hence,

Page 44: Distributed Parameters

Lets investigate the rate of the angular change of the sides of the rectangular pipe.

The average rate of rotation about the z axis of the orthogonal line segments AC and AD is

y

V

x

Vxy

z 2

1

The rate of change of the angle CAD (a right angle at time t ) becomes

y

V

x

Vxy

Page 45: Distributed Parameters

Thus we know that the time rate of change of the shear angle xy so that

y

V

x

Vxy

yxxy

..

Similarly,

x

V

z

V zxzxxz

..

y

V

z

Vzy

zyyz

..

Page 46: Distributed Parameters

Accordingly, we have available to describe the deformation rate of the rectangular parallel piped the strain rate terms which we now set forth as follows:

...

..

.

...

22

22

22

zzyzxz

yzyy

xy

xzxyxx

=strain rate tensor

Page 47: Distributed Parameters

Now lets consider the rigid body rotation. Thus, the expression

y

V

x

Vxy

2

1

Is actually more than just the average rotation of line segments dx and dy about the z axis . It represents for a deformable medium what we maybe consider as the rigid_body angular velocity z about the z axis. This is,

y

V

x

Vxy

z 2

1

Similarly,

x

V

z

V zxy 2

1

z

V

y

V yzx 2

1

Page 48: Distributed Parameters

kx

V

z

Vj

z

V

y

Vi

y

V

x

Vzxyzxy

2

1

2

1

2

1

Thus,

VcurlV 2

1

2

1

Hence,

kx

V

z

Vj

z

V

y

Vi

y

V

x

Vcurl zxyzxy

2

1

2

1

2

1

At this time ,we define irrotational flow as those for which =0 at each point in the flow.

Page 49: Distributed Parameters

For irrotational flow, we require that

0

y

V

x

Vxy

0

z

V

y

V yz

0

x

V

z

V zx

Thus it become clear that another criterion for irrotationality, and the one we will use,is

Curl V = 0

Page 50: Distributed Parameters

The velocity potential

If velocity components at all points in a region of flow can be expressed as continuous partial derivatives of a scalar function (x,y,z,t) thusly

z

tzyxV

y

tzyxV

x

tzyxV

z

y

x

),,,(

),,,(

),,,(

In general we can write

gragV

Page 51: Distributed Parameters

0

0

0

22

22

22

xyyx

zxxz

yzzy

Then the flow must be irrotational. Hence,

Relationship between the stream function and the velocity field.

It will now be demonstrated that a relativity simple relation exists between the stream function (x,y,t) and the velocity field v(x,y,t).

Page 52: Distributed Parameters

y

x

X0,y0

X,y

dy

dxVx

The flow q associated with the path from x0y0 to the extremity of dy may be expressed in two ways. These are equated as

dyVtyxdyy

tyxtyx xyxyx

),,(),,(

),,(0000

Page 53: Distributed Parameters

After cancellation of equal terms in both sides,

yVx

Performing the same computation for the extreme point of the dx segment leads to the result.

xVy

Relation between the steam function and velocity potential for flows which are irrotational as well as two dement ional and incompressible.

Page 54: Distributed Parameters

We will now add the restriction of irrotationality to the previous restrictions. This means the existence of a velocity potential . For two dimensional flow, must be a function of x,y, and t. By equating the corresponding expressions of velocity involving the stream function and velocity potential,the following relationship can be established.

yx

xy

In complex variable theory, this equation is known as Cauchy_Riemann equation.

Page 55: Distributed Parameters

ReferenceMechanics of Fluids

By

Irving H Shames

Page 56: Distributed Parameters

THANK YOU FOR YOUR ATTENTION

Page 57: Distributed Parameters

MATLAB SOLUTIONS FOR PDE

There are two methods for solve the PDEs in Matlab.

•Using Command Line window

•Using GUI(Graphical User Interface) window

ASSIGNMENT NO.4

•Finite element method

Page 58: Distributed Parameters

Using the MATLAB PDE TOOLBOX

The MATLAB PDE Toolbox is a tool for solving two-dimensional linear partial differential equations by finite element methods. This presentation is intended to guide you through the use of the graphical user interface for interactive use. It assumes that the reader is running MATLAB and the PDE toolbox in a graphical environment.At the MATLAB prompt, type pdetool. You should see a window like the one below pop up.

Page 59: Distributed Parameters
Page 60: Distributed Parameters

This is an example which have been done in second assignment , and which you might solve by Fourier series methods, by hand; you will find that you obtain the solution faster with the PDE Toolbox, and that you also obtain a visual representation, which may contribute to the more important goal of understanding.

1.      Draw the region of interest: suppose we want the rectangle (x,y) = [0, 3] X [0, 1]. o        In the Options menu, select Grid and Snap; then set the Axes' Limits to [-1.5 1.5] and [-1.5 1.5]. When finished, click Apply and Close the Axes' Limits window.

Page 61: Distributed Parameters

1.       

o        In the Draw menu, select Rectangle/Square (not centered). o        In the drawing region, click and hold with the cursor at the origin, and drag it to the point with coordinates (3,1). The region will be shaded and marked R1.

Page 62: Distributed Parameters

2.      Set up the boundary conditions: suppose we want the unknown solution function u to be -1 on the long horizontal sides, and +1 on the short vertical sides. o        In the Boundary menu, select Boundary Mode. The window changes to this:

Page 63: Distributed Parameters

          o        In the drawing region, double click on the left edge of the rectangle. The boundary condition window pops up. The default Dirichlet condition h*u=r is OK, the default h=1 is OK; change the value of r to +1.

Page 64: Distributed Parameters

3.       

o        Do the same thing with the right edge: double-click, set the value. On the top and bottom edges, set r to -1. Be patient and careful. When the boundary conditions are correctly set, you should be able to click on any edge, and see the correct value for r. 4.      Specify the particular PDE of interest: o        In the PDE menu, select PDE specification. The pde specification window pops up; we are doing the default type of problem, hyperbolic, of the form -div(c*grad(u)) + a*u = f, where a=0, f=0,d=1 and c=1. Change the values as needed, and click on OK.

Page 65: Distributed Parameters

4.      Generate the mesh: o        In the Mesh menu, select Initialize Mesh. This time we will use the default mesh.

Page 66: Distributed Parameters

5.      Solve the Finite Element problem: o        In the Solve menu, select Solve PDE. The figure in the main drawing area changes.

Page 67: Distributed Parameters

6.      Generate other plots: o        In the Plot menu, select Parameters. The plot parameter window pops up; click on the check boxes for color, contour, and height, then on the Plot button.

Page 68: Distributed Parameters

A new figure window pops up, with the appropriate plot.

Page 69: Distributed Parameters

% Animation for wave propagation problem for ass2

%echo on

clc

g='squareg'; % The unit square

b='Boundary'; % (boundary condition) boundary is the function defined by the user and should be created before run the program

c=1;

a=0; coefficient of the hyperbolic function

f=0;

d=1;

[p,e,t]=initmesh('squareg'); %Mesh(p and e are mesh parameters)

clc

x=p(1,:)';

y=p(1,:)';

u0=atan(cos(pi/2*x)); % The initial conditions:

ut0=3*sin(pi*x).*exp(sin(pi/2*y)); % The initial conditions:

clc

n=20;

tlist=linspace(0,5,n); % We want the solution at 20 points in time between 0 and 5.

uu=hyperbolic(u0,ut0,tlist,b,p,e,t,c,a,f,d); %Solve hyperbolic problem

Clc % To speed up the plotting, we interpolate to a rectangular grid.

delta=-1:0.1:1;

[uxy,tn,a2,a3]=tri2grid(p,t,uu(:,1),delta,delta); NOT ESSENTIAL FOR RUN THE PROGRAM

gp=[tn;a2;a3];

newplot; % prepare the new figure window with axis

Page 70: Distributed Parameters

M=moviein(n); %initialized movie frame memory

umax=max(max(uu)); maximum and minimum values for Z axis

umin=min(min(uu));

for i=1:n,...

if rem(i,10)==0,...

fprintf('%d ',i);...

end,...

pdeplot(p,e,t,'xydata',uu(:,i),'zdata',uu(:,i),'zstyle','continuous',...

'colormap','gray','mesh','on','xygrid','off','gridparam',gp,'colorbar','on');...

axis([-1 1 -1 1 umin umax]); caxis([umin umax]);...

title('Acoustic Wave in Gas');

zlabel('Pressure level');

M(:,i)=getframe;...

if i==n,...

fprintf('done\n');...

end,...

end

nfps=5; used for speed up animation

movie(M,10,nfps); not essential for run the program

echo off

Page 71: Distributed Parameters
Page 72: Distributed Parameters

Program for function “boundary”function [q,g,h,r]=Boundary(p,e,u,time)

% Boundary Boundary condition data

bl=[

1 1 1 1

0 1 0 1

1 1 1 1

1 1 1 1

48 1 48 1

48 1 48 1

48 48 42 48

48 48 120 48

49 49 49 49

48 48 48 48

];

if any(size(u))

[q,g,h,r]=pdeexpd(p,e,u,time,bl);

else

[q,g,h,r]=pdeexpd(p,e,time,bl);

end

This program is as same as in the programs in MATLAB demos.Refer MATLAB demo files for details

Page 73: Distributed Parameters

When function u and its derivatives are single_valued,finite and continuous function of x,then by Taylor’s theorem,

...)('''6

1)(''

2

1)(')()( 32 xuhxuhxhuxuhxu

and

...)('''6

1)(''

2

1)(')()( 32 xuhxuhxhuxuhxu

1

2

Finite element methods

Page 74: Distributed Parameters

Addition of these expansions gives

)()('')(2)()( 42 hOxuhxuhxuhxu

)}()(2)({1

)(''22

2

hxuxuhxuhdx

xdxu

xx

By subtraction eqn2 from eqn1

)}()({2

1)(' hxuhxu

hdx

duxu

xx

3

4

5

Page 75: Distributed Parameters

A P

B

The slope of the chord PB is given by the forward difference formula.

)}()({1

)(' xuhxuh

xu 6

Page 76: Distributed Parameters

The slope of the chord AP is given by the backward difference formula.

)}()({1

)(' hxuxuh

xu 7

Notation for function of the independent variables x and t. Subdivide the x_t plane into sets of equal rectangles of sides x=h, t=k, as shown in Figer,and let the co_ordinate (x,t) of the representative mesh point P be

X=ih; t=jk

Where I and j are integers.

Page 77: Distributed Parameters

 

P(ih,jk)

i,j

i,j-1

i+1,j

i,j+1

i,j+1

t

x

k

h

Page 78: Distributed Parameters

Denote the value of u at P by

jip ujkihuu ,),(

Then by equation 4

2

,

2

2

2

2 },)1{(},{2},)1{(

h

jkhiujkihujkhiu

u

u

u

u

jip

2

,1,,1

,

2

2 }2

h

uuu

u

u jijiji

ji

With leading error of order h2.

Page 79: Distributed Parameters

Similarly,

2

,,,

,

2

2 }121

k

uuu

u

u jijiji

ji

With leading error of order k2.

With this notation the forward difference approximation for u/t at P is

k

uu

t

u jiji ,1,

With leading error of k

Page 80: Distributed Parameters

THANK YOU FOR YOUR ATTENTION


Recommended