00001 /* This file is part of Cloudy and is copyright (C)1978-2013 by Gary J. Ferland and 00002 * others. For conditions of distribution and use see copyright notice in license.txt */ 00003 /*ParseCaseB - parse the Case A, B, or C command */ 00004 #include "cddefines.h" 00005 #include "opacity.h" 00006 #include "parser.h" 00007 00008 /*ParseCaseB - parse the Case A, B, or C command */ 00009 void ParseCaseB( Parser &p ) 00010 { 00011 DEBUG_ENTRY( "ParseCaseB()" ); 00012 00013 /* which case do we do? */ 00014 if( p.nMatch(" A ") ) 00015 { 00016 opac.lgCaseB = false; 00017 // rfield.lgInducProcess = false; 00018 } 00019 else if( p.nMatch(" B ") ) 00020 { 00021 opac.lgCaseB = true; 00022 // rfield.lgInducProcess = false; 00023 } 00024 else if( p.nMatch(" C ") ) 00025 opac.lgCaseB = false; 00026 00027 /* difference between Case A and Case C is in induced processes - 00028 * do not include them in Case A or Case B */ 00029 /* optional optical depth in Ly a */ 00030 opac.tlamin = (realnum)p.FFmtRead(); 00031 if( p.lgEOL() ) 00032 { 00033 /* optical depths not specified - use defaults for cases A and B */ 00034 if( opac.lgCaseB ) 00035 /* set default to 1e5 to get more realistic conditions in H+ region. 00036 * Very large tau caused extreme Lya trapping, photoionization rates, 00037 * & radiation pressure*/ 00038 opac.tlamin = 1e5f; 00039 else 00040 /* Case A or Case C - Lyman lines optically thin */ 00041 opac.tlamin = 1e-5f; 00042 } 00043 else 00044 opac.tlamin = (realnum)pow((realnum)10.f,opac.tlamin); 00045 00046 /* Hummer and Storey case B; no collisions from n=1, 2 (usually in) */ 00047 if( p.nMatch("HUMM") ) 00048 opac.lgCaseB_HummerStorey = true; 00049 00050 /* the NO PHOTOIONIZATION option, turns off excited state photoionization */ 00051 if( p.nMatch("NO PH") ) 00052 opac.lgCaseB_no_photo = true; 00053 00054 /* the NO PDEST option, turns off line destruction by background opacities */ 00055 if( p.nMatch("NO PDE") ) 00056 opac.lgCaseB_no_pdest = true; 00057 00058 return; 00059 }