0% found this document useful (0 votes)
9 views

Stiffnessbregularn Grid

The document discusses the finite element method for solving differential equations on irregular grids. It provides equations for calculating the stiffness matrix A, which represents the coefficients in the finite element discretization of a differential operator. In particular, it shows formulas for calculating the elements of A based on the lengths of intervals in the irregular grid, and provides an example algorithm to construct A for a 1D problem on a grid with nx points.

Uploaded by

vivek garad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Stiffnessbregularn Grid

The document discusses the finite element method for solving differential equations on irregular grids. It provides equations for calculating the stiffness matrix A, which represents the coefficients in the finite element discretization of a differential operator. In particular, it shows formulas for calculating the elements of A based on the lengths of intervals in the irregular grid, and provides an example algorithm to construct A for a 1D problem on a grid with nx points.

Uploaded by

vivek garad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Stiffness irregular grid

10

Aik i k dx

8
7
6

5
4
3
2

A12 1 2 dx

1 2 dx

Finite element method

x1

2
+

3
+

x1 h1

x1 h1

x1

1 1
1
2 dx
A21
h1 0
h1

Aii

1 1
dx
h1 h1

1
1

hi 1 hi

i=1
+

h1 h2

4
+

h3

5
6 7
+ + +
h4 h5 h6
25

Example
u ( x ) f ( x )

Stiffness matrix A
for i=2:nx-1,

for j=2:nx-1,
if i==j,

A(i,j)=1/h(i-1)+1/h(i);

Domain: [0,1]; nx=100;


dx=1/(nx-1);f(x)=d(1/2)
Boundary conditions:
u(0)=u0; u(1)=u1

elseif i==j+1

A(i,j)=-1/h(i-1);

elseif i+1==j

A(i,j)=-1/h(i);

else

i=1 2
3 4 5
6
7
+ +
+
+ +
+
+
h1 h2 h3 h4 h5 h6

Finite element method

A(i,j)=0;

end

end

end

26

You might also like