cloudy trunk
Loading...
Searching...
No Matches
parse_caseb.cpp
Go to the documentation of this file.
1/* This file is part of Cloudy and is copyright (C)1978-2013 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 */
9void 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
44 opac.tlamin = (realnum)pow((realnum)10.f,opac.tlamin);
45
46 /* Hummer and Storey case B; no collisions from n=1, 2 (usually in) */
47 if( p.nMatch("HUMM") )
48 opac.lgCaseB_HummerStorey = true;
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}
float realnum
Definition cddefines.h:103
#define DEBUG_ENTRY(funcname)
Definition cddefines.h:684
double FFmtRead(void)
Definition parser.cpp:353
bool nMatch(const char *chKey) const
Definition parser.h:135
bool lgEOL(void) const
Definition parser.h:98
t_opac opac
Definition opacity.cpp:5
void ParseCaseB(Parser &p)