Zhao の零電流定常根を fail-closed な status 付きで探索する。
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | model | |||
| type(zhao_params_type), | intent(in) | :: | p | |||
| real(kind=dp), | intent(out) | :: | phi0_v | |||
| real(kind=dp), | intent(out) | :: | phi_m_v | |||
| real(kind=dp), | intent(out) | :: | n_swe_inf_m3 | |||
| character(len=1), | intent(out) | :: | branch | |||
| logical, | intent(out) | :: | success |
subroutine try_solve_zhao_unknowns(model, p, phi0_v, phi_m_v, n_swe_inf_m3, branch, success) character(len=*), intent(in) :: model type(zhao_params_type), intent(in) :: p real(dp), intent(out) :: phi0_v, phi_m_v, n_swe_inf_m3 character(len=1), intent(out) :: branch logical, intent(out) :: success real(dp) :: x3(3), x2(2) character(len=1), dimension(3) :: order integer :: i phi0_v = 0.0_dp phi_m_v = 0.0_dp n_swe_inf_m3 = 0.0_dp branch = ' ' success = .false. select case (trim(model)) case ('zhao_a') call try_solve_zhao_branch_a(p, x3, success) if (success) then phi0_v = x3(1) phi_m_v = x3(2) n_swe_inf_m3 = x3(3) branch = 'A' end if return case ('zhao_b') call try_solve_zhao_branch_b(p, x2, success) if (success) then phi0_v = x2(1) phi_m_v = x2(1) n_swe_inf_m3 = x2(2) branch = 'B' end if return case ('zhao_c') call try_solve_zhao_branch_c(p, x2, success) if (success) then phi0_v = x2(1) phi_m_v = x2(1) n_swe_inf_m3 = x2(2) branch = 'C' end if return case ('zhao_auto') if (p%alpha_rad*180.0d0/pi < 20.0d0) then order = ['C', 'A', 'B'] else order = ['A', 'B', 'C'] end if case default return end select do i = 1, size(order) select case (order(i)) case ('A') call try_solve_zhao_branch_a(p, x3, success) if (success) then phi0_v = x3(1) phi_m_v = x3(2) n_swe_inf_m3 = x3(3) branch = 'A' success = .true. return end if case ('B') call try_solve_zhao_branch_b(p, x2, success) if (success) then phi0_v = x2(1) phi_m_v = x2(1) n_swe_inf_m3 = x2(2) branch = 'B' success = .true. return end if case ('C') call try_solve_zhao_branch_c(p, x2, success) if (success) then phi0_v = x2(1) phi_m_v = x2(1) n_swe_inf_m3 = x2(2) branch = 'C' success = .true. return end if end select end do end subroutine try_solve_zhao_unknowns