cloudy  trunk
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
prt_lines_grains.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 /*lines_hydro put H-iso seq into line intensity stack */
4 #include "cddefines.h"
5 #include "radius.h"
6 #include "thermal.h"
7 #include "dense.h"
8 #include "lines_service.h"
9 #include "grainvar.h"
10 #include "lines.h"
11 
12 void lines_grains(void)
13 {
14  double
15  dhtot,
16  hold;
17  long i,
18  nd;
19 
20  DEBUG_ENTRY( "lines_grains()" );
21 
22  if( !gv.lgGrainPhysicsOn )
23  {
24  return;
25  }
26 
27  i = StuffComment( "grains" );
28  linadd( 0., (realnum)i , "####", 'i',
29  "the grain output");
30 
31  /* find total grain heating */
32  dhtot = 0.;
33  for( nd=0; nd < gv.nBin; nd++ )
34  {
35  /* add heating due to all grain species that are included */
36  dhtot += gv.bin[nd]->GasHeatPhotoEl;
37  }
38 
39  /* total heating due to dust integrated over model */
40  gv.TotalDustHeat += (realnum)(dhtot*radius.dVeff);
41  /* largest fraction of local heating due to grains photo */
42  gv.dphmax = MAX2((realnum)(dhtot/thermal.htot),gv.dphmax);
43  /* largest local cooling of gas by collisions with grains */
45 
46  /* largest relative number of electrons donated by grains */
47  hold = SDIV(dense.EdenTrue);
50 
51  /* largest relative number of electrons on grain surface */
54 
55  linadd(dhtot,0,"GrGH",'h',
56  " gas heating by grain photoionization");
57 
58  linadd(thermal.heating[0][25],0,"GrTH",'h',
59  " gas heating by thermionic emissions of grains ");
60 
61  linadd(MAX2(0.,gv.GasCoolColl),0,"GrGC",'c',
62  "gas cooling by collisions with grains ");
63 
64  linadd(MAX2(0.,-gv.GasCoolColl),0,"GrGC",'c',
65  " gas heating by collisions with grains ");
66 
67  linadd(gv.GrainHeatSum,0,"GraT",'i',
68  " total grain heating by all sources, lines, collisions, incident continuum ");
69 
70  linadd(gv.GrainHeatInc,0,"GraI",'i',
71  " grain heating by incident continuum ");
72 
73  linadd(gv.GrainHeatLya,1216,"GraL",'i',
74  " grain heating due to destruction of Ly alpha ");
75 
76  linadd(gv.GrainHeatCollSum,0,"GraC",'i',
77  " grain heating due to collisions with gas ");
78 
79  linadd(gv.GrainHeatDif,0,"GraD",'i',
80  " grain heating due to diffuse fields, may also have grain emission ");
81  return;
82 
83 }

Generated for cloudy by doxygen 1.8.4