Line | |
---|
1 | function [sx,sy,sxy,s]=shear2d(md)
|
---|
2 | %SHEAR2D - computes 2d strain rate
|
---|
3 | %
|
---|
4 | % This routine computes the strain rate of 2d models
|
---|
5 | %
|
---|
6 | % Usage:
|
---|
7 | % [sx,sy,sxy,s]=shear2d(md);
|
---|
8 | % s=shear2d(md);
|
---|
9 |
|
---|
10 | [alpha beta]=GetNodalFunctionsCoeff(md.elements,md.x,md.y);
|
---|
11 |
|
---|
12 | summation=[1;1;1];
|
---|
13 | sx=(md.vx(md.elements).*alpha)*summation;
|
---|
14 | uy=(md.vx(md.elements).*beta)*summation;
|
---|
15 | vx=(md.vy(md.elements).*alpha)*summation;
|
---|
16 | sy=(md.vy(md.elements).*beta)*summation;
|
---|
17 | sxy=(uy+vx)/2;
|
---|
18 | s=sqrt(sx.^2+sy.^2+sxy.^2+sx.*sy);
|
---|
19 |
|
---|
20 | %if user requested only one output, it must be the norm
|
---|
21 | if nargout==1,
|
---|
22 | sx=s;
|
---|
23 | end
|
---|
Note:
See
TracBrowser
for help on using the repository browser.