ViscousHeatingCompute

PURPOSE ^

VISCOUSHEATINGCOMPUTE - compute viscous heating

SYNOPSIS ^

function viscousheating=ViscousHeatingCompute(m,inputs,type);

DESCRIPTION ^

VISCOUSHEATINGCOMPUTE - compute viscous heating

   return a vector of size (numberofelements,1), holding the viscous heating for 
   every element

   Usage:
      viscousheating=ViscousHeatingCompute(m,inputs,type)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function viscousheating=ViscousHeatingCompute(m,inputs,type);
0002 %VISCOUSHEATINGCOMPUTE - compute viscous heating
0003 %
0004 %   return a vector of size (numberofelements,1), holding the viscous heating for
0005 %   every element
0006 %
0007 %   Usage:
0008 %      viscousheating=ViscousHeatingCompute(m,inputs,type)
0009 
0010 %global variables
0011 global cluster gridset
0012 
0013 %recover fem model fields
0014 elements=m.elements;
0015 grids=m.grids;
0016 materials=m.materials;
0017 loads=m.loads;
0018 gridset=m.gridset;
0019 
0020 %figure out active elements that will take part in the stiffness and load generation
0021 [n1,n2]=GetNumberOfActiveElements(elements);
0022 
0023 %initialize vector
0024 viscousheating=zeros((n2-n1)+1,1);
0025 
0026 %Go through all elements and call the vicous heating routine.
0027 for n=n1:n2,
0028         
0029     if ~isempty(elements(n).element),
0030         viscousheating(n)=ViscousHeating(elements(n).element,grids,materials,inputs);
0031     end
0032 
0033 end

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