Returns geometrical factors associated with a given oblate spheroid (for which a=b>c) The relevant formulae are given in Sec. G.2. Parameters: - a,c: scalars or row vectors [1 x G] semi-axis length along x (same as y), and z - sOptions: string (optional) if 'L', only L_1, L_3 are returned if 'x', or 'z', only properties related to corresponding axis are computed if 'All' (default), then all properties are returned Returns: - stEllGeom: structure with fields, all of size [1 x G] stEllGeom.a, c for future reference stEllGeom.S: surface area (in squared units of a, b, and c) stEllGeom.type: ='Oblate' (type of ellipsoid) stEllGeom.L1, L3: Geometrical factors (see Sec. G.1.5) stEllGeom.exix2ave: <|e_xi . e_x|^2> stEllGeom.exiz2ave: <|e_xi . e_z|^2> stEllGeom.exix4ave: <|e_xi . e_x|^4> stEllGeom.exiz4ave: <|e_xi . e_z|^4> stEllGeom.exix2y2ave: <|e_xi . e_x|^2 |e_xi . e_y|^2> stEllGeom.exix2z2ave: <|e_xi . e_x|^2 |e_xi . e_z|^2> This file is part of the SPlaC v1.0 package (copyright 2008) Check the README file for further information
0001 if nargin<4, sOption='All'; end 0002 0003 bxaxis=true; bzaxis=true; 0004 if strcmpi(sOption,'x'), bzaxis=false; end 0005 if strcmpi(sOption,'z'), bxaxis=false; end 0006 0007 stEllGeom.a=a; 0008 stEllGeom.c=c; 0009 stEllGeom.type='Oblate'; % for reference 0010 0011 stEllGeom.h=a./c; % aspect ratio 0012 eo=sqrt(1-(c./a).^2); % eccentricity (Eq. G.44, note that the sqrt is missing in the book) 0013 stEllGeom.e=eo; 0014 0015 fo=(1-eo.^2)./(2*eo) .* log( (1+eo)./(1-eo)); % Eq. G.46 0016 0017 % surface area 0018 stEllGeom.S=2*pi*a.^2 .* (1+fo); % Eq. G.47 0019 0020 % geometrical factors 0021 L1=0.5./(eo.^2).* ( sqrt(1-eo.^2)./eo .* asin(eo) - (1-eo.^2)); % Eq. G.45 0022 0023 if (bxaxis) 0024 stEllGeom.L1=L1; 0025 end 0026 if (bzaxis) 0027 stEllGeom.L3=1-2*L1; % Eq. G.45 0028 end 0029 0030 if ~strcmpi(sOption,'L') % compute other geometrical averages 0031 0032 exiz2ave=1./eo.^2 .*(1-fo)./(1+fo); % Eq. G.48 0033 exiz4ave=1./eo.^4 .*(3-2*eo.^2-3*fo)./(1+fo); % Eq. G.50 0034 if (bxaxis) 0035 stEllGeom.exix2ave=0.5*(1-exiz2ave); % Eq. G.49 0036 stEllGeom.exix4ave=3/8*(1-2*exiz2ave+exiz4ave); % Eq. G.51 0037 % alternative direct calculation 0038 % stEllGeom.exix4ave=3/8*(1-eo.^2)./eo.^4.*(3-eo.^2-(3+eo.^2).*fo)./(1+fo); % Eq. G.51 0039 end 0040 if (bzaxis) 0041 stEllGeom.exiz2ave=exiz2ave; 0042 stEllGeom.exiz4ave=exiz4ave; 0043 end 0044 if strcmpi(sOption,'All') 0045 stEllGeom.exix2y2ave= (1-2*exiz2ave+exiz4ave ... 0046 -2*stEllGeom.exix4ave)/2; 0047 stEllGeom.exix2z2ave=(1-2*stEllGeom.exix2ave-stEllGeom.exiz4ave)/2; 0048 end 0049 end 0050 0051 0052 0053