Code covered by the BSD License  

Highlights from
Co-Blade: Software for Analysis and Design of Composite Blades

image thumbnail

Co-Blade: Software for Analysis and Design of Composite Blades

by

 

18 Sep 2012 (Updated )

Analysis and design of composite blades for wind and hydrokinetic turbines

writeOupFileProps(iSIM, SIM, BLADE, StrProps, OUT)
function writeOupFileProps(iSIM, SIM, BLADE, StrProps, OUT)

date = datestr(now, 'mmmm dd, yyyy HH:MM AM');
 
fid = fopen([SIM.rootDir filesep SIM.case{iSIM} '_StrProps.out'], 'w');

fprintf(fid,'=====  Structural Properties Output File  ======================================\r\n');
fprintf(fid,'Generated on %s by Co-Blade v%s\r\n', date, SIM.version);
fprintf(fid,'This line is for user comments. \r\n');
fprintf(fid,'\r\n');
         
if OUT.TAB_DEL
    dlm = '\t';
    fmtHeadr = [ '%s', repmat( [ dlm, '%s' ], 1, 37 ), '\r\n' ];  
else
    dlm = '  ';
    fmtHeadr = [ '%-6.4s', repmat( [ dlm, '%12.12s' ], 1, 37 ), '\r\n' ];  
end

fmtNumbr = [ '%-6.0f', ...
             repmat( [ dlm, '%12.4f' ], 1, 4 ), ...
             repmat( [ dlm, '%12.4e' ], 1, 1 ), ...
             repmat( [ dlm, '%12.4f' ], 1, 3 ), ...
             repmat( [ dlm, '%12.4e' ], 1, 20 ), ...
             repmat( [ dlm, '%12.4f' ], 1, 9 ), ...
             '\r\n' ];

header = {'sec',         '(-)'; ...
          'zSec',        '(m)'; ...
          'aeroTwst',    '(deg)'; ...
          'chord',       '(m)'; ...
          'pitAxis',     '(-)'; ...
          'mass_den',    '(kg/m)'; ...
          'iner_tw',     '(deg)'; ...
          'cent_tw',     '(deg)'; ...
          'elas_tw',     '(deg)'; ...
          'axial_stff',  '(N)'; ...
          'tor_stff',    '(N-m^2)'; ...
          'EIx',         '(N-m^2)'; ...
          'EIy',         '(N-m^2)'; ...
          'EIxy',        '(N-m^2)'; ...
          'flapEI_cm',   '(N-m^2)'; ...
          'edgeEI_cm',   '(N-m^2)'; ...
          'flapEI_tc',   '(N-m^2)'; ...
          'edgeEI_tc',   '(N-m^2)'; ...
          'flapEI_sc',   '(N-m^2)'; ...
          'edgeEI_sc',   '(N-m^2)'; ...
          'mIx',         '(kg-m)'; ...
          'mIy',         '(kg-m)'; ...
          'mIxy',        '(kg-m)'; ...
          'flapIner_cm', '(kg-m)'; ...
          'edgeIner_cm', '(kg-m)'; ...
          'flapIner_tc', '(kg-m)'; ...
          'edgeIner_tc', '(kg-m)'; ...
          'flapIner_sc', '(kg-m)'; ...
          'flapIner_sc', '(kg-m)'; ...
          'cm_offst',    '(-)'; ...
          'tc_offst',    '(-)'; ...
          'sc_offst',    '(-)'; ...
          'x_cm',        '(m)'; ...
          'y_cm',        '(m)'; ...
          'x_tc',        '(m)'; ...
          'y_tc',        '(m)'; ...
          'x_sc',        '(m)'; ...
          'y_sc',        '(m)'};

fprintf(fid, fmtHeadr, header{:,1});
fprintf(fid, fmtHeadr, header{:,2});
for i = 1:BLADE.NUM_SEC
    fprintf(fid, fmtNumbr, i, ...
                           BLADE.zSec(i), ...
                           BLADE.aeroTwst(i), ...    
                           BLADE.chord(i), ...    
                           BLADE.pitAxis(i), ...
                           StrProps.mass_den(i), ...
                           StrProps.iner_tw(i), ...
                           StrProps.cent_tw(i), ...
                           StrProps.elas_tw(i), ...	
                           StrProps.axial_stff(i), ...	
                           StrProps.tor_stff(i), ...	
                           StrProps.EIx(i), ...	
                           StrProps.EIy(i), ...	
                           StrProps.EIxy(i), ...	
                           StrProps.flapEI_cm(i), ...	
                           StrProps.edgeEI_cm(i), ...	
                           StrProps.flapEI_tc(i), ...	
                           StrProps.edgeEI_tc(i), ...	
                           StrProps.flapEI_sc(i), ...	
                           StrProps.edgeEI_sc(i), ...	
                           StrProps.mIx(i), ...	
                           StrProps.mIy(i), ...	
                           StrProps.mIxy(i), ...	
                           StrProps.flapIner_cm(i), ...	
                           StrProps.edgeIner_cm(i), ...	
                           StrProps.flapIner_tc(i), ...	
                           StrProps.edgeIner_tc(i), ...
                           StrProps.flapIner_sc(i), ...
                           StrProps.edgeIner_sc(i), ...
                           StrProps.cm_offst(i), ...	
                           StrProps.tc_offst(i), ...	
                           StrProps.sc_offst(i), ...	
                           StrProps.x_cm(i), ...	
                           StrProps.y_cm(i), ...	
                           StrProps.x_tc(i), ...	
                           StrProps.y_tc(i), ...	
                           StrProps.x_sc(i), ...
                           StrProps.y_sc(i));
end

fclose(fid);

end % function writeOupFileProps

Contact us