00001 // 00002 // tdyn_tt.C: pdyn- and tdyn-specific node-handling functions. 00003 // 00004 00005 #include "tdyn.h" 00006 00007 real _pdyn_::get_radius() 00008 { 00009 if (oldest_daughter) return 0; 00010 if (temperature <= 0 || luminosity <= 0) return 0; 00011 00012 // Use the radius-temperature-luminosity relation and return 00013 // radius in solar units. 00014 00015 real radius = sqrt(luminosity) / pow(temperature/5800, 2); 00016 return radius; 00017 }