The engine function

The purpose of the engine function is to select the engine type and invoke the function which specifies the values of the global variables relevant to the working space (compression and expansion) volumes of the selected engine type. We have currently included three alpha engines as case studies - the classic Ford-Philips 4-215 , the D-90 Ross Yoke-drive , and the Ross Rocker-V drive engine. Note that the Ford-Philips engine has a swashplate drive mechanism, which has the classical sinusoidal motion of the working spaces. Update 2016: We have recently included a Free-piston beta drive engine assuming that both the piston and displacer motions are sinusoidal.

   function engine 
 
 
   % Define engine configuration and drive geometric parameters. 
 
 
   % Israel Urieli 4/14/02 
 
 
   % Modified 6/14/2016 to include free-piston beta engine 
 
 
   % s)inusoidal, y)oke r)ocker-V (all alpha engines) 
 
 
   global 
 
 
  engine_type 
 
   global 
 
 
  new fid 
 
   % new data file 
 
 
  engine_type = 
 
   'u' 
 
 
  ; 
 
   while 
 
 
  (strncmp(engine_type, 
 
   'u' 
 
 
  ,1)) 
 
   if 
 
 
  (strncmp(new, 
 
   'y' 
 
 
  ,1)) 
 
  fprintf( 
 
   'Available engine types are:\n' 
 
 
  ); 
 
  fprintf( 
 
   '   s)inusoidal drive\n' 
 
 
  ); 
 
  fprintf( 
 
   '   y)oke drive (Ross)\n' 
 
 
  ); 
 
  fprintf( 
 
   '   r)ocker-V drive (Ross)\n' 
 
 
  ); 
 
  fprintf( 
 
   '   b)eta drive (Free piston)\n' 
 
 
  ); 
 
  engine_type = input( 
 
   'enter engine type ' 
 
 
  , 
 
   's' 
 
 
  ); 
 
  fprintf(fid, 
 
   '%c\n' 
 
 
  , engine_type(1)); 
 
   else 
 
 
  engine_type = fscanf(fid, 
 
   '%c' 
 
 
  ,1); 
 
   end 
 
 
   if 
 
 
  (strncmp(engine_type, 
 
   's' 
 
 
  ,1)) 
 
  sindrive; 
 
   elseif 
 
 
  (strncmp(engine_type, 
 
   'y' 
 
 
  ,1)) 
 
  yokedrive; 
 
   elseif 
 
 
  (strncmp(engine_type, 
 
   'r' 
 
 
  ,1)) 
 
  rockerVdrive; 
 
   elseif 
 
 
  (strncmp(engine_type, 
 
   'b' 
 
 
  ,1)) 
 
  betadrive; 
 
   else 
 
 
  fprintf( 
 
   'engine type is undefined\n' 
 
 
  ) 
 
  engine_type = 
 
   'u' 
 
 
  ; 
 
   end 
 
 
   end 
 
 
   %============================================================== 
 
 



Stirling Cycle Machine Analysis by Israel Urieli is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License



View Site in Mobile | Classic
Share by: