visc_grad

PURPOSE ^

VISC_GRAD - computes the derivative of the viscosity with respect to the velocity

SYNOPSIS ^

function [nu2,nu3]=visc_grad(index,nel,alpha,beta,u,v,B_bar)

DESCRIPTION ^

VISC_GRAD - computes the derivative of the viscosity with respect to the velocity

   Usage:
      [nu2,nu3]=visc_grad(index,nel,alpha,beta,u,v,B_bar)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [nu2,nu3]=visc_grad(index,nel,alpha,beta,u,v,B_bar)
0002 %VISC_GRAD - computes the derivative of the viscosity with respect to the velocity
0003 %
0004 %   Usage:
0005 %      [nu2,nu3]=visc_grad(index,nel,alpha,beta,u,v,B_bar)
0006 
0007 nu2=zeros(nel,1);
0008 nu3=zeros(nel,1);
0009 
0010 [ux ,uy ,vx, vy]=shear(index,alpha,beta,u,v);
0011 
0012 second_inv=(ux.^2 + vy.^2 + ((uy+vx).^2)/4 + ux.*vy);
0013 location=find(second_inv~=0);
0014 nu2(location)=B_bar(location).*(second_inv(location).^(-4/3))/2;
0015 nu3(location)=second_inv(location).^(-1/3)/2;
0016 location=find(second_inv==0);
0017 nu2(location)=10^30; 
0018 nu3(location)=10^30;

Generated on Sun 29-Mar-2009 20:22:55 by m2html © 2003