Nonlinear finite elements/Homework 6/Solutions/Problem 1/Part 10

From testwiki
Jump to navigation Jump to search

Problem 1: Part 10

Template:Font

To compute the velocity gradient, we have to find the velocities at the slave nodes using the relation

[vixviyvi+xvi+y]=[10(yiyi)01(xixi)10(yi+yi)01(xi+xi)][vixviyωi]

For node 1 of the element (global node 5), the 𝐓 matrix is

𝐓1=[100.0866010.05100.0866010.05].

Therefore, the velocities of the slave nodes are

[v1xv1yv1+xv1+y]=[1.08661.950.91342.05].

For node 2 of the element (global node 6), the 𝐓 matrix is

𝐓2=[100.05010.0866100.05010.0866].

Therefore, the velocities of the slave nodes are

[v2xv2yv2+xv2+y]=[2.050.91341.951.0866].

The interpolated velocity within the element is given by

𝐯(ξ,t)=DDt[𝐱(ξ,t)]=i=12t[𝐱i(t)]Ni(ξ,η)+i+=12t[𝐱i+(t)]Ni+(ξ,η)=i=12𝐯i(t)Ni(ξ,η)+i+=12𝐯i+(t)Ni+(ξ,η).

Plugging in the values of the nodal velocities and the shape functions, we get

vx=0.27165(1ξ)(1η)+0.51250(1+ξ)(1η)+0.22835(1ξ)(1+η)+0.48750(1+ξ)(1+η)vy=0.48750(1ξ)(1η)+0.22835(1+ξ)(1η)+0.51250(1ξ)(1+η)+0.27165(1+ξ)(1+η).

The velocity gradient is given by

𝐯=vi,j=vixj.

The velocities are given in terms of the parent element coordinates (ξ,η). We have to convert them to the (x,y) system in order to compute the velocity gradient. To do that we recall that

vxξ=vxxxξ+vxyyξvxη=vxxxη+vxyyηvyξ=vyxxξ+vyyyξvyη=vyxxη+vyyyη.

In matrix form

[vxξvxη]=[xξyξxηyη][vxxvxy]=𝐉[vxxvxy]

and

[vyξvyη]=[xξyξxηyη][vyxvyy]=𝐉[vyxvyy].

Therefore,

[vxxvxy]=𝐉1[vxξvxη]and[vyxvyy]=𝐉1[vyξvyη].

The isoparametric map is

x=0.12500(1ξ)(1η)+0.21651(1+ξ)(1η)+0.15000(1ξ)(1+η)+0.25981(1+ξ)(1+η)y=0.21651(1ξ)(1η)+0.12500(1+ξ)(1η)+0.25981(1ξ)(1+η)+0.15000(1+ξ)(1+η).

The derivatives with respect to ξ and η are

xξ=0.20131+0.018301ηyξ=0.201310.018301ηxη=0.0683+0.018301ξyη=0.06830.018301ξ

Therefore,

𝐉=[0.20131+0.018301η0.201310.018301η0.0683+0.018301ξ0.06830.018301ξ].

Since we are only interested in the point (ξ,η) = (0,0), we can compute 𝐉 at this point

𝐉=[0.201310.201310.06830.0683].

The inverse is

𝐉1=[2.48377.32052.48377.3205].

The derivatives of 𝐯 with respect to ξ and η are

vxξ=0.5+0.018301ηvxη=0.0683+0.018301ξvyξ=0.5+0.018301ηvyη=0.0683+0.018301ξ

At (ξ,η) = (0,0), we get

vxξ=0.5vxη=0.0683vyξ=0.5vyη=0.0683

Therefore,

[vxxvxy]=[0.741841.7418];[vyxvyy]=[0.741841.7418].

Therefore, the velocity gradient at the blue point is

𝐯=[0.741841.74180.741841.7418]

The Maple code for doing the above calculations is shown below.

> #
> # Compute velocity gradient
> #
> # Map from master to slave nodes
> #
> T1 := linalg[matrix](4,3,[1,0,y1-y1m,
> 0,1,x1m-x1,
> 1,0,y1-y1p,
> 0,1,x1p-x1]);
> T2 := linalg[matrix](4,3,[1,0,y2-y2m,
> 0,1,x2m-x2,
> 1,0,y2-y2p,
> 0,1,x2p-x2]);
> v1slave := evalm(T1&*v1master);
> v2slave := evalm(T2&*v2master);
> #
> # Velocity interpolation within element
> #
> vx := v1slave[1,1]*N[1,1] + v2slave[1,1]*N[1,2] +
> v1slave[3,1]*N[1,3] + v2slave[3,1]*N[1,4];
> vy := v1slave[2,1]*N[1,1] + v2slave[2,1]*N[1,2] +
> v1slave[4,1]*N[1,3] + v2slave[4,1]*N[1,4];
> #
> # Derivatives of velocity within element (at the blue point)
> #
> dvx_dxi := subs(xi=0,eta=0,diff(vx, xi));
> dvy_dxi := subs(xi=0,eta=0,diff(vy, xi));
> dvx_deta := subs(xi=0,eta=0,diff(vx, eta));
> dvy_deta := subs(xi=0,eta=0,diff(vy, eta));
> #
> # Jacobian of the isoparametric map and its inverse
> # (at the blue point)
> #
> dx_dxi := subs(xi=0,eta=0,diff(x, xi));
> dy_dxi := subs(xi=0,eta=0,diff(y, xi));
> dx_deta := subs(xi=0,eta=0,diff(x, eta));
> dy_deta := subs(xi=0,eta=0,diff(y, eta));
> J := linalg[matrix](2,2,[dx_dxi,dy_dxi,dx_deta,dy_deta]);
> Jinv := inverse(J);
> #
> # Compute velocity gradient (at the blue point)
> #
> dVx_dxi := linalg[matrix](2,1,[dvx_dxi,dvx_deta]);
> dVy_dxi := linalg[matrix](2,1,[dvy_dxi,dvy_deta]);
> dVxdx := evalm(Jinv&*dVx_dxi);
> dVydx := evalm(Jinv&*dVy_dxi);
> GradV := linalg[matrix](2,2,[dVxdx[1,1],dVxdx[2,1],
>dVydx[1,1],dVydx[2,1]]);

Template:Subpage navbar