Skip to content
Permalink
Browse files

fixing computation of fuel_left and fire_area

fuel_left was 0.25 on domain boudary after first time step, should be divided to average only where computed
fuel_left could increase due to approximation errors, causing  large negative heat flux spikes
fire_area was not initialized on boundary
  • Loading branch information...
janmandel committed Mar 27, 2011
1 parent 987c3bd commit 6578171a9c85614b0d9ab7758c7c45be1e393d49
@@ -530,6 +530,7 @@ subroutine fuel_left( &
do j=jts,jte
do i=its,ite
fuel_frac(i,j)=1.
fire_area(i,j)=0.
enddo
enddo

@@ -571,10 +572,12 @@ subroutine fuel_left( &

helpsum1=helpsum1+fuel_left_ff
helpsum2=helpsum2+fire_area_ff
! write(*,*)icl,jcl,isubcl,jsubcl,fuel_left_ff,fire_area_ff
enddo
enddo
fuel_frac(icl,jcl)=helpsum1
fire_area(icl,jcl)=helpsum2
! write(*,*)icl,jcl,helpsum1,helpsum2
fuel_frac(icl,jcl)=helpsum1 / (ir*jr) ! multiply by weight for averaging over coarse cell
fire_area(icl,jcl)=helpsum2 / (ir*jr) ! multiply by weight for averaging over coarse cell
enddo
enddo

@@ -587,14 +590,6 @@ subroutine fuel_left( &
call write_array_m(1,IFCELLS,1,JFCELLS,1,IFCELLS,1,JFCELLS,fire_area_f,'fire_area_f',0)
#endif

! finish the averaging
do j=jts,jte
do i=its,ite
fuel_frac(i,j) = fuel_frac(i,j) /(ir*jr) ! multiply by weight for averaging over coarse cell
fire_area(i,j) = fire_area(i,j) /(ir*jr) !
enddo
enddo

! consistency check after sum
!fmax=0
!do j=jts,jte
@@ -127,7 +127,7 @@ subroutine sfire_model ( &
integer :: xifms,xifme,xjfms,xjfme ! memory bounds for pass-through arguments to normal spread
real, dimension(ifts:ifte,jfts:jfte)::fuel_frac_burnt,fuel_frac_end
integer::ignited,ig,i,j,itso,iteo,jtso,jteo
real::tbound,err,erri,errj,maxgrad,grad,tfa,thf,mhf,tqf,mqf,aw,mw
real::tbound,err,erri,errj,maxgrad,grad,tfa,thf,mhf,tqf,mqf,aw,mw,t
character(len=128)::msg
logical:: freeze_fire
integer:: stat_lev=1
@@ -348,8 +348,9 @@ subroutine sfire_model ( &

do j=jfts,jfte
do i=ifts,ifte
fuel_frac_burnt(i,j)=fuel_frac(i,j)-fuel_frac_end(i,j) ! fuel lost this timestep
fuel_frac(i,j)=fuel_frac_end(i,j) ! copy new value to state array
t = min(fuel_frac(i,j),fuel_frac_end(i,j)) ! do not allow fuel fraction to increase, in case of approximation error
fuel_frac_burnt(i,j)=fuel_frac(i,j)-t ! fuel lost this timestep
fuel_frac(i,j)=t ! copy new value to state array
enddo
enddo

@@ -15,8 +15,8 @@
end_hour = 00, 00, 00,
end_minute = 600, 600, 600,
end_second = 00, 00, 00,
history_interval = 1, 30, 30,
frames_per_outfile = 1000, 1000, 1000,
history_interval_s = 1, 30, 30,
frames_per_outfile = 10, 1000, 1000,
restart = .false.,
restart_interval = 1000
io_form_history = 2
@@ -151,7 +151,7 @@
fire_ignition_end_time3 = 4, ! sec for ignition from the start! end ignition for sfire
!
! verbosity
fire_print_msg = 1, ! 1 print fire summary, 2 debugging messages, 3 voluminous debugging messages
fire_print_msg = 2, ! 1 print fire summary, 2 debugging messages, 3 voluminous debugging messages
fire_print_file = 0, ! 1 write files for matlab
!
! experiments
@@ -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=2, ! for now, use 1 only
fire_fuel_left_method=1, ! 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 6578171

Please sign in to comment.
You can’t perform that action at this time.