refresh_zhao_outflow_closure Subroutine

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

外部解を観測したH外向き流出で更新する。前回の根を初期値にし、同じbranchを先に試す。 根が解けないか、解けた根の closure を棄却したときは outer を前回のまま残し、success=.false. を返す。 呼出し側はこのとき前回の closure を使い続けるので、外部根もそれと揃えておく。

Arguments

Type IntentOptional Attributes Name
type(app_config), intent(in) :: app
type(sheath_matching_iteration), intent(inout) :: outer
real(kind=dp), intent(in) :: outer_flux_m2_s
real(kind=dp), intent(in) :: outer_mean_energy_ev
real(kind=dp), intent(in) :: outer_spectrum_m2_s(outflow_spectrum_bins)
type(irradiation_cell_contract_type), intent(in) :: cell
type(surface_current_model_result_type), intent(out) :: result
logical, intent(out) :: success
character(len=*), intent(out) :: message

Calls

proc~~refresh_zhao_outflow_closure~~CallsGraph proc~refresh_zhao_outflow_closure refresh_zhao_outflow_closure conditions conditions proc~refresh_zhao_outflow_closure->conditions emitted_fluxes emitted_fluxes proc~refresh_zhao_outflow_closure->emitted_fluxes maxwellian_emission maxwellian_emission proc~refresh_zhao_outflow_closure->maxwellian_emission none~wall_area irradiation_cell_contract_type%wall_area proc~refresh_zhao_outflow_closure->none~wall_area none~wall_tangents_periodic irradiation_cell_contract_type%wall_tangents_periodic proc~refresh_zhao_outflow_closure->none~wall_tangents_periodic observed_outflow_source observed_outflow_source proc~refresh_zhao_outflow_closure->observed_outflow_source proc~outflow_spectrum_edges_ev outflow_spectrum_edges_ev proc~refresh_zhao_outflow_closure->proc~outflow_spectrum_edges_ev proc~species_temperature_k species_temperature_k proc~refresh_zhao_outflow_closure->proc~species_temperature_k update update proc~refresh_zhao_outflow_closure->update with_outward_flux with_outward_flux proc~refresh_zhao_outflow_closure->with_outward_flux log_energy_edges log_energy_edges proc~outflow_spectrum_edges_ev->log_energy_edges

Source Code

  subroutine refresh_zhao_outflow_closure( &
    app, outer, outer_flux_m2_s, outer_mean_energy_ev, outer_spectrum_m2_s, cell, result, success, message &
    )
    type(app_config), intent(in) :: app
    type(sheath_matching_iteration), intent(inout) :: outer
    real(dp), intent(in) :: outer_flux_m2_s, outer_mean_energy_ev
    real(dp), intent(in) :: outer_spectrum_m2_s(outflow_spectrum_bins)
    type(irradiation_cell_contract_type), intent(in) :: cell
    type(surface_current_model_result_type), intent(out) :: result
    logical, intent(out) :: success
    character(len=*), intent(out) :: message
    type(sheath_matching_iteration) :: candidate
    type(emission_source) :: source
    integer(i32) :: status
    character(len=256) :: root_message

    call outer_emission(app, outer_flux_m2_s, outer_mean_energy_ev, source, success, message, outer_spectrum_m2_s)
    if (.not. success) return
    candidate = outer
    call candidate%update(source, 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, candidate, outer_flux_m2_s, outer_mean_energy_ev, result, success, message, &
      outer_spectrum_m2_s, cell &
      )
    if (success) outer = candidate
  end subroutine refresh_zhao_outflow_closure