📄 circle_spline_crack.asv
字号:
% *************************************************************************
% TWO DIMENSIONAL ELEMENT FREE GALERKIN CODE
% Nguyen Vinh Phu
% LTDS, ENISE, Juillet 2006
% *************************************************************************
function [w,dwdx,dwdy] = circle_spline(x,xI,d,form,xCr)
% Compute cubic and quartic spline function which take account the
% presence of 1 crack xCr
% Inputs:
% x (1x2) : coordinate of point at which w is to be evaluated
% xI (1x2) : coord of node I
% d : size of the support
% xCr(2,2) : points defining the crack line
% Only normal level sets are computed and stored in nodes
x0 = xCr(1,1); y0 = xCr(1,2);
x1 = xCr(2,1); y1 = xCr(2,2);
t = 1/norm(seg)*seg;
for i = 1 : numnode
x = node(i,1);
y = node(i,2);
l = sqrt((x1-x0)*(x1-x0)+(y1-y0)*(y1-y0)) ;
phi = (y0-y1)*x + (x1-x0)*y + (x0*y1-x1*y0);
ls(i,1) = phi/l; % normal LS
ls(i,2) = ([x y]-xTip)*t'; % tangent LS
dt(i) = norm([x y]-xTip); % distances from node I to tip
end
r = sqrt( (x(1,1) - xI(1,1)) .* (x(1,1) - xI(1,1)) + (x(1,2) - xI(1,2)).*(x(1,2) - xI(1,2)) )/d ;
switch form
case 'cubic_spline'
[w,dwdr] = cubic_spline(r);
case 'quartic_spline'
[w,dwdr] = quartic_spline(r);
otherwise
error('Grr. Unknown functional form');
end
if (r ~= 0)
drdx = (x(1,1) - xI(1,1))/(r*d*d) ;
drdy = (x(1,2) - xI(1,2))/(r*d*d) ;
else
drdx = 0 ;
drdy = 0 ;
end
dwdx = dwdr * drdx ;
dwdy = dwdr * drdy ;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -