-
Notifications
You must be signed in to change notification settings - Fork 1
/
feisoq4.m
41 lines (35 loc) · 1.31 KB
/
feisoq4.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
function [shapeq4,dhdrq4,dhdsq4]=feisoq4(rvalue,svalue)
%------------------------------------------------------------------------
% Purpose:
% compute isoparametric four-node quadilateral shape functions
% and their derivatves at the selected (integration) point
% in terms of the natural coordinate
%
% Synopsis:
% [shapeq4,dhdrq4,dhdsq4]=feisoq4(rvalue,svalue)
%
% Variable Description:
% shapeq4 - shape functions for four-node element
% dhdrq4 - derivatives of the shape functions w.r.t. r
% dhdsq4 - derivatives of the shape functions w.r.t. s
% rvalue - r coordinate value of the selected point
% svalue - s coordinate value of the selected point
%
% Notes:
% 1st node at (-1,-1), 2nd node at (1,-1)
% 3rd node at (1,1), 4th node at (-1,1)
%------------------------------------------------------------------------
% shape functions
shapeq4(1)=0.25*(1-rvalue)*(1-svalue);
shapeq4(2)=0.25*(1+rvalue)*(1-svalue);
shapeq4(3)=0.25*(1+rvalue)*(1+svalue);
shapeq4(4)=0.25*(1-rvalue)*(1+svalue);
% derivatives
dhdrq4(1)=-0.25*(1-svalue);
dhdrq4(2)=0.25*(1-svalue);
dhdrq4(3)=0.25*(1+svalue);
dhdrq4(4)=-0.25*(1+svalue);
dhdsq4(1)=-0.25*(1-rvalue);
dhdsq4(2)=-0.25*(1+rvalue);
dhdsq4(3)=0.25*(1+rvalue);
dhdsq4(4)=0.25*(1-rvalue);