/*velset set thermal velocities for all particles in gas */ #include "cddefines.h" #include "atomcwgt.h" #include "phycon.h" #include "turb.h" #include "wind.h" #include "doppvel.h" #include "velset.h" void velset(void) { long int nelem; double turb2; # ifdef DEBUG_FUN fputs( "<+>velset()\n", debug_fp ); # endif /* computes one doppler width, in cm/sec * usually TurbVel =0 * * compute doppler width */ turb2 = turb.TurbVel*turb.TurbVel; /* in case of D-Critical flow include inital velocity as * a component of turbulence */ if( wind.windv0 < 0. ) { turb2 += POW2(wind.windv0); } for( nelem=0; nelem < LIMELM; nelem++ ) { DoppVel.doppler[nelem] = (float)sqrt(1.651e8*phycon.te/AtomcWgt.AtomicWeight[nelem]+ turb2); } # ifdef DEBUG_FUN fputs( " <->velset()\n", debug_fp ); # endif return; }