Home > SRC > GET_VOL_SA.m

GET_VOL_SA

PURPOSE ^

compute surface to volume ratio

SYNOPSIS ^

function [VOL_cmpts,SA_cmpts,SAu_cmpts,VOL_allcmpts,VF_cmpts,SoV_cmpts]= GET_VOL_SA(mymesh,gdir)

DESCRIPTION ^

 compute surface to volume ratio
 
 Input:
     1. mymesh is a structure with 10 elements:
         Nnode
         Nele
         Nface
         Pts_cmpt_reorder
         Ele_cmpt_reorder
         Pts_ind
         Pts_boundary_reorder
         Fac_boundary_reorder
         Nboundary
         Ncmpt
     2. gdir
     
 Output: 
     1. VOL_cmpts
     2. SA_cmpts
     3. SAu_cmpts
     4. VOL_allcmpts
     5. VF_cmpts
     6. SoV_cmpts

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function [VOL_cmpts,SA_cmpts,SAu_cmpts,VOL_allcmpts,VF_cmpts,SoV_cmpts] ...
0002     = GET_VOL_SA(mymesh,gdir)
0003 
0004 % compute surface to volume ratio
0005 %
0006 % Input:
0007 %     1. mymesh is a structure with 10 elements:
0008 %         Nnode
0009 %         Nele
0010 %         Nface
0011 %         Pts_cmpt_reorder
0012 %         Ele_cmpt_reorder
0013 %         Pts_ind
0014 %         Pts_boundary_reorder
0015 %         Fac_boundary_reorder
0016 %         Nboundary
0017 %         Ncmpt
0018 %     2. gdir
0019 %
0020 % Output:
0021 %     1. VOL_cmpts
0022 %     2. SA_cmpts
0023 %     3. SAu_cmpts
0024 %     4. VOL_allcmpts
0025 %     5. VF_cmpts
0026 %     6. SoV_cmpts
0027 
0028 UG = gdir';
0029 UG = UG/norm(UG);
0030 
0031 for icmpt = 1:mymesh.Ncmpt
0032     Fac = [];
0033     for iboundary = 1:mymesh.Nboundary
0034         Fac = [Fac,mymesh.Fac_boundary_reorder{icmpt}{iboundary}];
0035     end
0036     [VOL_cmpts(icmpt)] ...
0037         = get_volume_mesh(mymesh.Pts_cmpt_reorder{icmpt},mymesh.Ele_cmpt_reorder{icmpt});
0038     [SA_cmpts(icmpt),SAu_cmpts(icmpt,:)] ...
0039         = get_surface_mesh(mymesh.Pts_cmpt_reorder{icmpt},Fac,UG);
0040 end
0041 
0042 VOL_allcmpts = 0;
0043 
0044 for icmpt = 1:mymesh.Ncmpt
0045     VOL_allcmpts  = VOL_allcmpts + VOL_cmpts(icmpt);
0046 end
0047 
0048 for icmpt = 1:mymesh.Ncmpt
0049     VF_cmpts(icmpt) = VOL_cmpts(icmpt)/VOL_allcmpts;
0050 end
0051 
0052 for icmpt = 1:mymesh.Ncmpt
0053     SoV_cmpts(icmpt,:) = SAu_cmpts(icmpt,:)/VOL_cmpts(icmpt);
0054 end

Generated on Mon 28-Jan-2019 12:43:57 by m2html © 2005