@@ -30,7 +30,7 @@ subroutine heater(itime, Q, Qdens)
3030 integer (int12) :: ix, iy, iz, IA ,heated_num
3131 real (real12) :: time, POWER, time_pulse, x, x2
3232 real (real12) :: rho, volume, heat_capacity, area, tau, sum_temp
33-
33+ logical :: shared_power
3434 ! Initialize variables
3535 IA = 0
3636 Q = 0._real12
@@ -53,7 +53,7 @@ subroutine heater(itime, Q, Qdens)
5353 heat_capacity = grid(ix,iy,iz)% heat_capacity
5454 area = grid(ix,iy,iz)% Length(1 )* grid(ix,iy,iz)% Length(2 ) ! ???
5555 ! tau divided by time_step squared in setup.f90
56- tau = grid(ix,iy,iz)% tau* (time_step** 2.0_real12 )
56+ tau = grid(ix,iy,iz)% tau* (time_step)
5757 ! select heater case
5858
5959 select case (grid(ix,iy,iz)% iheater)
@@ -114,13 +114,22 @@ subroutine heater(itime, Q, Qdens)
114114 Q(IA) = 0.0
115115 end if
116116 ! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
117+
118+ case (10 )
119+ Q(IA) = POWER - (tau* (POWER))
120+
121+ case (11 )
122+ Q(IA) = POWER
123+
124+ case (12 )
125+ Q(IA) = POWER + (tau* (POWER))
117126 end select
118127 !- -----------------------------
119128 ! If emissitivity is not zero, then calculate the radiative heating
120129 !- -----------------------------
121- Q(IA) = Q(IA) - grid(ix,iy,iz)% em * grid(ix,iy,iz)% length(1 )* &
122- grid(ix,iy,iz)% length(2 )* StefBoltz &
123- * ((Temp_p(IA)** 4.0_real12 ) - (T_Bath** 4.0_real12 ))
130+ ! Q(IA) = Q(IA) - grid(ix,iy,iz)%em * grid(ix,iy,iz)%length(1)*&
131+ ! grid(ix,iy,iz)%length(2)*StefBoltz &
132+ ! * ((Temp_p(IA)**4.0_real12) - (T_Bath**4.0_real12))
124133
125134 ! ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
126135
@@ -161,11 +170,15 @@ subroutine heater(itime, Q, Qdens)
161170
162171
163172 ! Normalize all heat sources by the heated volume
164- if (heated_volume .gt. 0.0 ) then
165- Qdens(:) = Q(:) / heated_volume
166- heated_temp = sum_temp / heated_volume
167- end if
168-
173+ shared_power = .False.
174+ if (shared_power) then
175+ if (heated_volume .gt. 0.0 ) then
176+ Qdens(:) = Q(:) / heated_volume
177+ heated_temp = sum_temp / heated_volume
178+ end if
179+ else
180+ Qdens(:) = Q(:) / grid(1 ,1 ,1 )% volume
181+ end if
169182 end subroutine heater
170183
171184
0 commit comments