Rev | Line | |
---|
[1] | 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);
|
---|
[9366] | 8 | % s=shear2d(md);
|
---|
[1] | 9 |
|
---|
[9734] | 10 | [alpha beta]=GetNodalFunctionsCoeff(md.mesh.elements,md.mesh.x,md.mesh.y);
|
---|
[1] | 11 |
|
---|
| 12 | summation=[1;1;1];
|
---|
[9733] | 13 | sx=(md.initialization.vx(md.mesh.elements).*alpha)*summation;
|
---|
| 14 | uy=(md.initialization.vx(md.mesh.elements).*beta)*summation;
|
---|
| 15 | vx=(md.initialization.vy(md.mesh.elements).*alpha)*summation;
|
---|
| 16 | sy=(md.initialization.vy(md.mesh.elements).*beta)*summation;
|
---|
[1] | 17 | sxy=(uy+vx)/2;
|
---|
| 18 | s=sqrt(sx.^2+sy.^2+sxy.^2+sx.*sy);
|
---|
[9366] | 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.