Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Bioinformatics Databases And Systems

Authors: Stanley I. Letovsky

1st Edition

1475784058, 978-1475784053

More Books

Students also viewed these Databases questions