solve_zhao_outflow_closure Subroutine

public subroutine solve_zhao_outflow_closure(app, outer_flux_m2_s, outer_mean_energy_ev, preferred_branch, result, success, message, outer_spectrum_m2_s, cell, outer)

表面放出はそのままに、matching planeで観測したPE流出を外部Zhaoシースの放出源として零電流根を解き直す。

周期セルは外部シースから見て一様な壁なので、外部の1-D解は壁から出るPEとしてH通過流出だけを見る。 合算した流出スペクトルを使い、省略時だけ half-Maxwellian とする。前回の外部状態は持たず、 preferred_branch を先に試す。outer を渡すと、後の更新に使う外部解を返す。

Arguments

Type IntentOptional Attributes Name
type(app_config), intent(in) :: app
real(kind=dp), intent(in) :: outer_flux_m2_s
real(kind=dp), intent(in) :: outer_mean_energy_ev
character(len=1), intent(in) :: preferred_branch
type(surface_current_model_result_type), intent(out) :: result
logical, intent(out) :: success
character(len=*), intent(out) :: message
real(kind=dp), intent(in), optional :: outer_spectrum_m2_s(outflow_spectrum_bins)

H外向きスペクトル [1/(m2 s)]、bin別。省略時は束と平均法線エネルギーの半Maxwell源とする。

type(irradiation_cell_contract_type), intent(in), optional :: cell
type(sheath_matching_iteration), intent(out), optional :: outer

Calls

proc~~solve_zhao_outflow_closure~~CallsGraph proc~solve_zhao_outflow_closure solve_zhao_outflow_closure conditions conditions proc~solve_zhao_outflow_closure->conditions emitted_fluxes emitted_fluxes proc~solve_zhao_outflow_closure->emitted_fluxes initialize initialize proc~solve_zhao_outflow_closure->initialize maxwellian_emission maxwellian_emission proc~solve_zhao_outflow_closure->maxwellian_emission none~outward_normal_velocity irradiation_cell_contract_type%outward_normal_velocity proc~solve_zhao_outflow_closure->none~outward_normal_velocity none~wall_area irradiation_cell_contract_type%wall_area proc~solve_zhao_outflow_closure->none~wall_area none~wall_tangents_periodic irradiation_cell_contract_type%wall_tangents_periodic proc~solve_zhao_outflow_closure->none~wall_tangents_periodic observed_outflow_source observed_outflow_source proc~solve_zhao_outflow_closure->observed_outflow_source proc~lower_ascii lower_ascii proc~solve_zhao_outflow_closure->proc~lower_ascii proc~outflow_spectrum_edges_ev outflow_spectrum_edges_ev proc~solve_zhao_outflow_closure->proc~outflow_spectrum_edges_ev proc~resolve_irradiation_cell_contract resolve_irradiation_cell_contract proc~solve_zhao_outflow_closure->proc~resolve_irradiation_cell_contract proc~species_number_density_m3 species_number_density_m3 proc~solve_zhao_outflow_closure->proc~species_number_density_m3 proc~species_temperature_k species_temperature_k proc~solve_zhao_outflow_closure->proc~species_temperature_k with_outward_flux with_outward_flux proc~solve_zhao_outflow_closure->with_outward_flux log_energy_edges log_energy_edges proc~outflow_spectrum_edges_ev->log_energy_edges proc~resolve_irradiation_cell_contract->proc~lower_ascii

Source Code

  subroutine solve_zhao_outflow_closure( &
    app, outer_flux_m2_s, outer_mean_energy_ev, preferred_branch, result, success, message, &
    outer_spectrum_m2_s, cell, outer &
    )
    type(app_config), intent(in) :: app
    real(dp), intent(in) :: outer_flux_m2_s, outer_mean_energy_ev
    character(len=1), intent(in) :: preferred_branch
    type(surface_current_model_result_type), intent(out) :: result
    logical, intent(out) :: success
    character(len=*), intent(out) :: message
    !> H外向きスペクトル [1/(m2 s)]、bin別。省略時は束と平均法線エネルギーの半Maxwell源とする。
    real(dp), intent(in), optional :: outer_spectrum_m2_s(outflow_spectrum_bins)
    type(irradiation_cell_contract_type), intent(in), optional :: cell
    type(sheath_matching_iteration), intent(out), optional :: outer
    type(sheath_matching_iteration) :: local_outer
    type(irradiation_cell_contract_type) :: active_cell
    type(emission_source) :: source
    integer(i32) :: status
    character(len=256) :: root_message

    success = .false.
    message = ''
    if (present(cell)) then
      active_cell = cell
    else
      call resolve_irradiation_cell_contract(app, active_cell, status, message)
      if (status /= irradiation_cell_ok) return
    end if
    call outer_emission(app, outer_flux_m2_s, outer_mean_energy_ev, source, success, message, outer_spectrum_m2_s)
    if (.not. success) return
    ! 外部根の解き直しでは表面の太陽高度ではなく、前回のbranchを優先して連続性を保つ。
    call start_outer(app, active_cell, source, preferred_order(preferred_branch), local_outer, status, root_message)
    success = status == SHEATH_OK
    if (.not. success) then
      message = 'outer Zhao zero-current root was not found for the observed photoelectron outflow: '// &
                trim(root_message)
      return
    end if
    call finish_observed_closure( &
      app, local_outer, outer_flux_m2_s, outer_mean_energy_ev, result, success, message, &
      outer_spectrum_m2_s, active_cell &
      )
    if (present(outer)) outer = local_outer
  end subroutine solve_zhao_outflow_closure