cloudy  trunk
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
cont_pump.cpp
Go to the documentation of this file.
1 /* This file is part of Cloudy and is copyright (C)1978-2008 by Gary J. Ferland and
2  * others. For conditions of distribution and use see copyright notice in license.txt */
3 /*DrvContPump local continuum pumping rate radiative transfer for all lines */
4 /*con_pump_op routine used to get continuum pumping of lines
5  * used in DrvContPump in call to qg32 */
6 #include "cddefines.h"
7 #include "rfield.h"
8 #include "doppvel.h"
9 #include "radius.h"
10 #include "continuum.h"
11 
12 /* damping constant used for pumping */
13 static realnum damp;
14 /* variable used for inward optical depth for pumping */
16 
17 /*con_pump_op routine used to get continuum pumping of lines
18  * used in ContPump in call to qg32 */
19 STATIC double con_pump_op(double x);
20 
23 {
24  double a0,
25  ContPump_v,
26  tau,
27  yinc1,
28  yinc2;
29 
30  DEBUG_ENTRY( "DrvContPump()" );
31 
32  /* fit to results for tau less than 10 */
33 # define FITTED(t) ((0.98925439 + 0.084594094*(t))/(1. + (t)*(0.64794212 + (t)*0.44743976)))
34 
35  if( !rfield.lgInducProcess )
36  {
37  /* option to turn off continuum pumping with no fluorescence */
38  ContPump_v = 0.;
39  }
40  else
41  {
42  /* tau used will be optical depth in center of next zone */
43  tau = t->Emis->TauIn + t->Emis->PopOpc * t->Emis->opacity / DoppVel.doppler[t->Hi->nelem-1]*radius.dRNeff;
44  /* compute pumping probability */
45  if( tau <= 10. )
46  {
47  /* for tau<10 a does not matter, and one fit for all */
48  ContPump_v = FITTED(tau);
49  }
50  else if( tau > 1e6 )
51  {
52  /* this far in winds line opacity well below electron scattering
53  * so ignore for this problem */
54  ContPump_v = 0.;
55  }
56  else
57  {
58  /* following two are passed on to later subs */
59  if( t->Emis->iRedisFun > 0 )
60  {
61  damp = t->Emis->damp;
62  }
63  else
64  {
65  damp = 0.;
66  }
67  PumpTau = (realnum)tau;
68  a0 = 0.886227*(1. + damp);
69 # define BREAK_ 3.
70  yinc1 = qg32(0.,BREAK_,con_pump_op);
71  yinc2 = qg32(BREAK_,100.,con_pump_op);
72  ContPump_v = (yinc1 + yinc2)/a0;
73  }
74  }
75 
76  /* EscProb is escape probability, will not allow ContPump to be greater than it
77  * on second iteration with thick lines, pump prob=1 and esc=0.5
78  * ContPump = MIN( ContPump , t->t(ipLnEscP) )
79  * */
80  return( ContPump_v );
81 # undef FITTED
82 }
83 
84 /*con_pump_op routine used to get continuum pumping of lines
85  * used in DrvContPump in call to qg32 */
86 STATIC double con_pump_op(double x)
87 {
88  double opfun_v,
89  v;
90 
91  DEBUG_ENTRY( "con_pump_op()" );
92 
93  v = vfun(damp,x);
94  opfun_v = sexp(PumpTau*v)*v;
95 
96  return( opfun_v );
97 }

Generated for cloudy by doxygen 1.8.1.1