Changeset 2155 for branches/c08_branch/source/radius_increment.cpp
- Timestamp:
- 07/04/08 02:43:20 (5 months ago)
- Files:
-
- 1 modified
-
branches/c08_branch/source/radius_increment.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/c08_branch/source/radius_increment.cpp
r2152 r2155 582 582 cmshft(); 583 583 584 relec *= EN1RYD; 585 586 # if 0 587 /* this is all evaluated in pressure_total */ 588 /* radiative acceleration; xMassDensity is gm per cc, evaluated when PTOT called */ 589 t = 1./SPEEDLIGHT/dense.xMassDensity; 590 /* >>chng 03 feb 01, lgLineRadPresOn was missing */ 591 wind.AccelLine = (realnum)(RT_line_driving()*t)*pressure.lgLineRadPresOn; 592 /* >>chng 01 aug 03, add lgConPress to kill AccelCont here */ 593 wind.AccelCont = (realnum)(rforce*EN1RYD*t)*pressure.lgContRadPresOn; 594 /* this is numerically unstable */ 595 wind.AccelPres = 0.; 596 /* total acceleration */ 597 wind.AccelTot = wind.AccelCont + wind.AccelLine + wind.AccelPres; 598 # endif 584 599 /* remember the largest value */ 585 600 wind.AccelMax = (realnum)MAX2(wind.AccelMax,wind.AccelTot); … … 587 602 /* force multiplier; relec can be zero for very low densities - so use double 588 603 * form of safe_div - fmul is of order unity - wind.AccelLine and wind.AccelCont 589 * are both floats to will underflow long before relec will - fmul is only use 604 * are both floats to will underflow long before relec will - fmul is only used 590 605 * in output, not in any physics */ 591 606 relec *= (EN1RYD/SPEEDLIGHT/dense.xMassDensity); 592 wind.fmul = (realnum)safe_div( (double)(wind.AccelLine + wind.AccelCont) , 593 relec ); 607 if( relec > SMALLFLOAT ) 608 wind.fmul = (realnum)( (wind.AccelLine + wind.AccelCont) / relec); 609 else 610 wind.fmul = 0.; 594 611 595 612 /* keep track of average acceleration */
