cloudy  trunk
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
parse_caseb.cpp
Go to the documentation of this file.
1 /* This file is part of Cloudy and is copyright (C)1978-2022 by Gary J. Ferland and
2  * others. For conditions of distribution and use see copyright notice in license.txt */
3 /*ParseCaseB - parse the Case A, B, or C command */
4 #include "cddefines.h"
5 #include "opacity.h"
6 #include "parser.h"
7 
8 /*ParseCaseB - parse the Case A, B, or C command */
9 void ParseCaseB( Parser &p )
10 {
11  DEBUG_ENTRY( "ParseCaseB()" );
12 
13  /* which case do we do? */
14  if( p.nMatch(" A ") )
15  {
16  opac.lgCaseB = false;
17 // rfield.lgInducProcess = false;
18  }
19  else if( p.nMatch(" B ") )
20  {
21  opac.lgCaseB = true;
22 // rfield.lgInducProcess = false;
23  }
24  else if( p.nMatch(" C ") )
25  opac.lgCaseB = false;
26 
27  /* difference between Case A and Case C is in induced processes -
28  * do not include them in Case A or Case B */
29  /* optional optical depth in Ly a */
30  opac.tlamin = (realnum)p.FFmtRead();
31  if( p.lgEOL() )
32  {
33  /* optical depths not specified - use defaults for cases A and B */
34  if( opac.lgCaseB )
35  /* set default to 1e5 to get more realistic conditions in H+ region.
36  * Very large tau caused extreme Lya trapping, photoionization rates,
37  * & radiation pressure*/
38  opac.tlamin = 1e5f;
39  else
40  /* Case A or Case C - Lyman lines optically thin */
41  opac.tlamin = 1e-5f;
42  }
43  else
45 
46  /* Hummer and Storey case B; no collisions from n=1, 2 (usually in) */
47  if( p.nMatch("HUMM") )
49 
50  /* the NO PHOTOIONIZATION option, turns off excited state photoionization */
51  if( p.nMatch("NO PH") )
52  opac.lgCaseB_no_photo = true;
53 
54  /* the NO PDEST option, turns off line destruction by background opacities */
55  if( p.nMatch("NO PDE") )
56  opac.lgCaseB_no_pdest = true;
57 
58  return;
59 }
bool nMatch(const char *chKey) const
Definition: parser.h:150
bool lgCaseB_no_photo
Definition: opacity.h:182
double FFmtRead(void)
Definition: parser.cpp:472
double exp10(double x)
Definition: cddefines.h:1368
t_opac opac
Definition: opacity.cpp:5
Definition: parser.h:43
bool lgCaseB_no_pdest
Definition: opacity.h:185
void ParseCaseB(Parser &p)
Definition: parse_caseb.cpp:9
bool lgCaseB
Definition: opacity.h:174
float realnum
Definition: cddefines.h:124
realnum tlamin
Definition: opacity.h:171
#define DEBUG_ENTRY(funcname)
Definition: cddefines.h:723
bool lgEOL(void) const
Definition: parser.h:113
bool lgCaseB_HummerStorey
Definition: opacity.h:178