Write a short matlab or whatever language you prefer


Objectives:

• To understand the procedure of discretization and interpolation.

• To learn the algorithm of Gauss quadrature.

1. 1D element shape functions
Consider a 4-node cubic element in 1D. The length of the element is 3 with the first node located at xi = -2. The remaining nodes are equally spaced.

1) Construct the Lagrange shape functions for this element.

2) Interpolate the function ue(x) (e.g. the displacement along the axis of a uniform bar) in the element when the nodal values are given as

728_1.png

with the same unit as the coordinates of the nodes. (Writing out the expression for u°(x) would suffice).

3) Evaluate the derivatives of the shape functions, i.e. the Be matrix, and use it to find the expression for the derivative of u°(x) (i.e. the axial strain e(x) = due /dx).

4) Plot ue(x) and a°(x) obtained in (2) and (3).

5) What are the corresponding displacement field and strain field when the nodal displacements are given by

235_2.png

Why is this result expected?

2. Gauss quadrature

1) Write a short Matlab (or whatever language you prefer) program to perform 2 point Gauss integration of a function f over a given interval (a, b). Inputs: a, b, and the functional values of f at the two Gauss points x1 and x2, f 1) and f (x2). (The program should calculate the actual coordinates of the two Gauss points). Output: the (approximate) value of the integral ∫fdx. (If you are able, write a program with adjustable order of integration.)

2) Check your program with the following integrals by comparing to the exact values:

04 (x3+1)dx,  -12 (x4 + 3x2)dx,  -11 cos2Πx dx

 

Solution Preview :

Prepared by a verified Expert
MATLAB Programming: Write a short matlab or whatever language you prefer
Reference No:- TGS01142153

Now Priced at $30 (50% Discount)

Recommended (91%)

Rated (4.3/5)