0% found this document useful (0 votes)
36 views3 pages

FEM Assignment 1: Asssumed Function

This document presents the solution to a finite element method (FEM) assignment using five different approaches: collocation method, sub-domain method, Galerkin method, least squares method, and variational approach. For each approach, the document derives an expression for the assumed function, takes its derivatives, calculates the residue, determines the value of the constant A, and stores the results in a matrix to compare the different solutions.

Uploaded by

Sachin Bharadwaj
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)
36 views3 pages

FEM Assignment 1: Asssumed Function

This document presents the solution to a finite element method (FEM) assignment using five different approaches: collocation method, sub-domain method, Galerkin method, least squares method, and variational approach. For each approach, the document derives an expression for the assumed function, takes its derivatives, calculates the residue, determines the value of the constant A, and stores the results in a matrix to compare the different solutions.

Uploaded by

Sachin Bharadwaj
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/ 3

FEM Assignment 1

clc; clear all;


syms x A l y Mo E I;

Asssumed function

y_a = A*((x^2)*(l-x)/l)

y_a = 

First and Second derivative of assumed function with respect to 'x'

Dx= diff(y_a)

Dx = 

D2x= diff(y_a,2)

D2x = 

Residue

R_x = (E*I*D2x)-Mo

R_x = 

Value of the constant 'A' in Collocation Method

R_half_l = subs(R_x,x,l/2)

R_half_l = 

A_1 = solve(R_half_l,A)

A_1 = 
Value of the constant 'A' in Sub-Domain Method

I_sdm = int(R_x,0,l)

I_sdm = 

A_2 = solve(I_sdm,A)

A_2 = 

Value of the constant 'A' in Gallerkin Method

I_gm = int((y_a*R_x)/A,0,l)

I_gm = 

A_3 = solve(I_gm,A)

A_3 = 

Value of the constant 'A' in Least Squares Method

I_lsm = int((R_x)^2,0,l)

I_lsm = 

D_I_lsm = diff(I_lsm,1,A)

D_I_lsm = 

A_4 = solve(D_I_lsm,A)

A_4 = 

Value of the constant 'A' in Variational Approach

f = ((E*I*Dx^2)/2) + (Mo*y_a)

f = 
I_va = int(f,0,l)

I_va = 

D_I_va = diff(I_va,1,A)

D_I_va = 

A_5 = solve(D_I_va,A)

A_5 = 

A_matrix = [A_1 A_2 A_3 A_4 A_5]

A_matrix = 

You might also like