Skip to content

Commit

Permalink
fix when all is burning
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan Mandel authored and janmandel committed Mar 22, 2011
1 parent 0778c78 commit 5f6709b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions wrfv2_fire/phys/module_fr_sfire_core.F
Expand Up @@ -1056,9 +1056,7 @@ subroutine fuel_left_cell_2( fuel_frac_left, fire_frac_area, &
DREAL::ps,aps,area,ta,out
DREAL::t00,t01,t10,t11
DREAL,parameter::safe=tiny(aps)
character(len=128)::msg
DREAL::dx,dy ! mesh sizes
!*** local
integer::i,j,k

DREAL,dimension(3)::u
Expand All @@ -1078,6 +1076,7 @@ subroutine fuel_left_cell_2( fuel_frac_left, fire_frac_area, &
DREAL::upper,lower,ah,ch,aa,cc,aupp,cupp,alow,clow
DREAL,dimension(2,2)::mQ
DREAL,dimension(2)::ut
character(len=128)::msg

!calls
intrinsic epsilon
Expand Down Expand Up @@ -1120,6 +1119,7 @@ subroutine fuel_left_cell_2( fuel_frac_left, fire_frac_area, &
!*** case0 Do nothing
if ( lfn00>=0 .and. lfn10>=0 .and. lfn01>=0 .and. lfn11>=0 ) then
out = 1.0 ! fuel_left, no burning
area= 0.
!*** case4 all four coners are burning
else if (lfn00<=0 .and. lfn10<=0 .and. lfn01<=0 .and. lfn11<=0) then
! All burning
Expand Down Expand Up @@ -1153,9 +1153,10 @@ subroutine fuel_left_cell_2( fuel_frac_left, fire_frac_area, &
u(3)=-u(3)/fuel_time_cell
s1=u(1)
s2=u(2)
out=1-exp(u(3))*intexp(s1)*intexp(s2)
out=exp(u(3))*intexp(s1)*intexp(s2)
area=1
if ( out<0 .or. out>1.0 ) then
print *,'case4, out should be between 0 and 1'
call message('WARNING: fuel_left_cell: case all burning: out should be between 0 and 1')
end if
!*** case 1,2,3- other cases
!*** part of cell is burning
Expand Down
2 changes: 1 addition & 1 deletion wrfv2_fire/test/em_fire/hill/namelist.input
Expand Up @@ -185,7 +185,7 @@
fire_grows_only=1, ! if >0 level set function cannot increase = fire can only grow
fire_viscosity=0.4, ! artificial viscosity in level set method (max 1, needed with fire_upwinding=0)
fire_upwinding=3, ! 0=none, 1=standard, 2=godunov, 3=eno, 4=sethian
fire_fuel_left_method=1, ! for now, use 1 only
fire_fuel_left_method=2, ! for now, use 1 only
fire_lfn_ext_up=1.0, ! 0.=extend level set function at boundary by reflection, 1.=always up
fire_advection=0, ! 0 = cawfe, 1 = use abs speed/slope in spread rate, then project on normal to fireline
/

0 comments on commit 5f6709b

Please sign in to comment.