Question: function N = Nmatrix1D(xt, xe, trialn) if trialn == 1 N(1) = (xt-xe(2))/(xe(1)-xe(2)); N(2) = (xt-xe(1))/(xe(2)-xe(1)); end end function B = Bmatrix1D(xt,xe, trialn) if trialn

 function N = Nmatrix1D(xt, xe, trialn) if trialn == 1 N(1)

function N = Nmatrix1D(xt, xe, trialn)

if trialn == 1

N(1) = (xt-xe(2))/(xe(1)-xe(2));

N(2) = (xt-xe(1))/(xe(2)-xe(1));

end

end

function B = Bmatrix1D(xt,xe, trialn)

if trialn == 1

B(1) = (1)/(xe(1)-xe(2));

B(2) = (1)/(xe(2)-xe(1));

end

end

function [w, gp] = gauss(ngp)

if ngp == 1

gp = 0;

w = 2;

elseif ngp == 2

gp = [-0.57735027, 0.57735027];

w = [1, 1];

elseif ngp == 3

gp = [-0.7745966692, 0.7745966692, 0.0];

w = [0.5555555555556, 0.55555555556, 0.8888888888889];

end

end

You are given the following ODE: du 0SxS3 Write a MATLab script that provides the stiffness matrix for a single quadratic element from 0 to 3, using gauss quadrature for integration with the proper number of gauss points. You'll have to first convert from the strong form to the weak form. Substitute the shape function form of your trial solution for ucx) and w(x) into the weak form Identify which pieces of this equation will create the stiffhess matrix. Then integrate using gauss quadrature. You'll need the following functions (see lecture notes): NmatrixlD Bmatrix1D that looks very similar to Nmatrix1D, just differentiated with respect to X. Gauss, which retums the locations of the gauss points in xi and their weight values. You are given the following ODE: du 0SxS3 Write a MATLab script that provides the stiffness matrix for a single quadratic element from 0 to 3, using gauss quadrature for integration with the proper number of gauss points. You'll have to first convert from the strong form to the weak form. Substitute the shape function form of your trial solution for ucx) and w(x) into the weak form Identify which pieces of this equation will create the stiffhess matrix. Then integrate using gauss quadrature. You'll need the following functions (see lecture notes): NmatrixlD Bmatrix1D that looks very similar to Nmatrix1D, just differentiated with respect to X. Gauss, which retums the locations of the gauss points in xi and their weight values

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!