Skip to content

Commit

Permalink
change beta_1 to additive_kernel_coefficient
Browse files Browse the repository at this point in the history
  • Loading branch information
jcurtis2 committed Oct 9, 2024
1 parent e218013 commit 5177a46
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
11 changes: 6 additions & 5 deletions src/coag_kernel_additive.F90
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ subroutine kernel_additive(aero_particle_1, aero_particle_2, &
!> Coagulation kernel.
real(kind=dp), intent(out) :: k

k = env_state%beta_1 * (aero_particle_volume(aero_particle_1) &
k = env_state%additive_kernel_coefficient &
* (aero_particle_volume(aero_particle_1) &
+ aero_particle_volume(aero_particle_2))

end subroutine kernel_additive
Expand All @@ -61,7 +62,7 @@ subroutine kernel_additive_minmax(v1, v2, aero_data, env_state, k_min, k_max)
!> Coagulation kernel maximum value.
real(kind=dp), intent(out) :: k_max

k_min = env_state%beta_1 * (v1 + v2)
k_min = env_state%additive_kernel_coefficient * (v1 + v2)
k_max = k_min

end subroutine kernel_additive_minmax
Expand All @@ -74,8 +75,8 @@ end subroutine kernel_additive_minmax
!! Given input paramaters \f$R\f$ and \f$N_0\f$ we let the mean
!! volume be \f$v_\mu = \frac{4\pi}{3} R^3\f$ and define the
!! rescaled times \f$\tau = N_0 v_\mu \beta_1 t\f$ and \f$T = 1 -
!! e^{-\tau}\f$, where \f$\beta_1\f$ is the fixed kernel scaling
!! parameter. Then the solution is
!! e^{-\tau}\f$, where \f$\beta_1\f$ is the fixed additive kernel scaling
!! coefficient. Then the solution is
!! \f[
!! n(D,t) \ {\rm d}\ln D
!! = \frac{\pi}{2} D^3
Expand Down Expand Up @@ -128,7 +129,7 @@ subroutine soln_additive_exp(bin_grid, aero_data, time, num_conc, &
/ mean_vol))
end do
else
tau = num_conc * mean_vol * env_state%beta_1 * time
tau = num_conc * mean_vol * env_state%additive_kernel_coefficient * time
T = 1d0 - exp(-tau)
do k = 1,bin_grid_size(bin_grid)
rat_v = aero_data_rad2vol(aero_data, bin_grid%centers(k)) / mean_vol
Expand Down
8 changes: 4 additions & 4 deletions src/env_state.F90
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ module pmc_env_state
!> Box height (m).
real(kind=dp) :: height
!> Scaling coefficient for additive coagulation kernel.
real(kind=dp) :: beta_1
real(kind=dp) :: additive_kernel_coefficient
end type env_state_t

contains
Expand Down Expand Up @@ -388,7 +388,7 @@ integer function pmc_mpi_pack_size_env_state(val)
+ pmc_mpi_pack_size_real(val%elapsed_time) &
+ pmc_mpi_pack_size_real(val%solar_zenith_angle) &
+ pmc_mpi_pack_size_real(val%height) &
+ pmc_mpi_pack_size_real(val%beta_1)
+ pmc_mpi_pack_size_real(val%additive_kernel_coefficient)

end function pmc_mpi_pack_size_env_state

Expand Down Expand Up @@ -432,7 +432,7 @@ subroutine pmc_mpi_pack_env_state(buffer, position, val)
call pmc_mpi_pack_real(buffer, position, val%elapsed_time)
call pmc_mpi_pack_real(buffer, position, val%solar_zenith_angle)
call pmc_mpi_pack_real(buffer, position, val%height)
call pmc_mpi_pack_real(buffer, position, val%beta_1)
call pmc_mpi_pack_real(buffer, position, val%additive_kernel_coefficient)
call assert(464101191, &
position - prev_position <= pmc_mpi_pack_size_env_state(val))
#endif
Expand Down Expand Up @@ -480,7 +480,7 @@ subroutine pmc_mpi_unpack_env_state(buffer, position, val)
call pmc_mpi_unpack_real(buffer, position, val%elapsed_time)
call pmc_mpi_unpack_real(buffer, position, val%solar_zenith_angle)
call pmc_mpi_unpack_real(buffer, position, val%height)
call pmc_mpi_unpack_real(buffer, position, val%beta_1)
call pmc_mpi_unpack_real(buffer, position, val%additive_kernel_coefficient)
call assert(205696745, &
position - prev_position <= pmc_mpi_pack_size_env_state(val))
#endif
Expand Down
2 changes: 1 addition & 1 deletion src/run_exact.F90
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ subroutine spec_file_read_run_exact(file, run_exact_opt, aero_data, &
run_exact_opt%coag_kernel_type)
if (run_exact_opt%coag_kernel_type == COAG_KERNEL_TYPE_ADDITIVE) then
call spec_file_read_real(file, 'additive_kernel_coeff', &
env_state%beta_1)
env_state%additive_kernel_coefficient)
end if
else
run_exact_opt%coag_kernel_type = COAG_KERNEL_TYPE_INVALID
Expand Down
2 changes: 1 addition & 1 deletion src/run_part.F90
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ subroutine spec_file_read_run_part(file, run_part_opt, aero_data, &
call spec_file_read_coag_kernel_type(file, run_part_opt%coag_kernel_type)
if (run_part_opt%coag_kernel_type == COAG_KERNEL_TYPE_ADDITIVE) then
call spec_file_read_real(file, 'additive_kernel_coeff', &
env_state_init%beta_1)
env_state_init%additive_kernel_coefficient)
end if
else
run_part_opt%coag_kernel_type = COAG_KERNEL_TYPE_INVALID
Expand Down
2 changes: 1 addition & 1 deletion src/run_sect.F90
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ subroutine spec_file_read_run_sect(file, run_sect_opt, aero_data, &
run_sect_opt%coag_kernel_type)
if (run_sect_opt%coag_kernel_type == COAG_KERNEL_TYPE_ADDITIVE) then
call spec_file_read_real(file, 'additive_kernel_coeff', &
env_state%beta_1)
env_state%additive_kernel_coefficient)
end if
else
run_sect_opt%coag_kernel_type = COAG_KERNEL_TYPE_INVALID
Expand Down

0 comments on commit 5177a46

Please sign in to comment.