


STRESS - compute the stress components
this routine calculates the components of the stress tensor in 2D
Usage:
[tau_xx, tau_yy,tau_xy]=stress(u,v)

0001 function [tau_xx, tau_yy,tau_xy]=stress(u,v) 0002 %STRESS - compute the stress components 0003 % 0004 % this routine calculates the components of the stress tensor in 2D 0005 % 0006 % Usage: 0007 % [tau_xx, tau_yy,tau_xy]=stress(u,v) 0008 0009 nu_bar=viscosity(u,v); 0010 [ux,uy,vx,vy]=shear(u,v); 0011 tau_xx=2*nu_bar.*ux; 0012 tau_yy=2*nu_bar.*vy; 0013 tau_xy=nu_bar.*(uy+vx);