00001 /* This file is part of Cloudy and is copyright (C)1978-2008 by Gary J. Ferland and 00002 * others. For conditions of distribution and use see copyright notice in license.txt */ 00003 /*ParseCaseB - parse the Case B command */ 00004 #include "cddefines.h" 00005 #include "opacity.h" 00006 #include "parse.h" 00007 00008 /*ParseCaseB - parse the Case B command */ 00009 void ParseCaseB( char *chCard ) 00010 { 00011 long int i; 00012 bool lgEOL; 00013 00014 DEBUG_ENTRY( "ParseTest()" ); 00015 00016 /* set flag saying we are doing case b */ 00017 opac.lgCaseB = true; 00018 00019 /* scan in an optional optical depth in lya */ 00020 i = 5; 00021 opac.tlamin = (realnum)FFmtRead(chCard,&i,INPUT_LINE_LENGTH,&lgEOL); 00022 if( lgEOL ) 00023 { 00024 /* set tau-La to 10**9 if not specified 00025 opac.tlamin = 1e9;*/ 00026 /* >>chng 01 sep 24, change from 1e9 default to 1e5, to get 00027 * more realistic conditions in HII region. Very large tau 00028 * caused extreme Lya behavior */ 00029 opac.tlamin = 1e5; 00030 } 00031 else 00032 { 00033 opac.tlamin = (realnum)pow((realnum)10.f,opac.tlamin); 00034 } 00035 00036 /* Hummer and Storey case B; no collisions from n=1, 2 (usually in) */ 00037 if( nMatch("HUMM",chCard) ) 00038 { 00039 opac.lgCaseB_HummerStorey = true; 00040 } 00041 00042 /* the NO PHOTOIONIZATION option, turns off excited state photoionization */ 00043 if( nMatch("O PH",chCard) ) 00044 { 00045 opac.lgCaseB_no_photo = true; 00046 } 00047 00048 /* the NO PDEST option, turns off line destruction by background opacities */ 00049 if( nMatch("O PDE",chCard) ) 00050 { 00051 /* turn off destruction off line destruction by background opacities */ 00052 opac.lgCaseB_no_pdest = true; 00053 } 00054 return; 00055 }