bem_sheath_model_core Module

Zhao 系シース数値モデルの core 実装。


Uses

  • module~~bem_sheath_model_core~~UsesGraph module~bem_sheath_model_core bem_sheath_model_core ieee_arithmetic ieee_arithmetic module~bem_sheath_model_core->ieee_arithmetic module~bem_constants bem_constants module~bem_sheath_model_core->module~bem_constants module~bem_kinds bem_kinds module~bem_sheath_model_core->module~bem_kinds module~bem_constants->module~bem_kinds iso_fortran_env iso_fortran_env module~bem_kinds->iso_fortran_env

Used by

  • module~~bem_sheath_model_core~~UsedByGraph module~bem_sheath_model_core bem_sheath_model_core module~bem_matching_plane_zhao bem_matching_plane_zhao module~bem_matching_plane_zhao->module~bem_sheath_model_core module~bem_matching_plane_zhao_physics bem_matching_plane_zhao_physics module~bem_matching_plane_zhao_physics->module~bem_sheath_model_core module~bem_matching_plane_zhao_physics->module~bem_matching_plane_zhao module~bem_surface_current_model bem_surface_current_model module~bem_surface_current_model->module~bem_sheath_model_core module~bem_matching_plane_coupling bem_matching_plane_coupling module~bem_matching_plane_coupling->module~bem_matching_plane_zhao module~bem_matching_plane_implicit bem_matching_plane_implicit module~bem_matching_plane_coupling->module~bem_matching_plane_implicit module~bem_matching_plane_response_provider bem_matching_plane_response_provider module~bem_matching_plane_coupling->module~bem_matching_plane_response_provider module~bem_matching_plane_implicit->module~bem_matching_plane_zhao module~bem_matching_plane_implicit->module~bem_matching_plane_response_provider module~bem_matching_plane_response_provider->module~bem_matching_plane_zhao module~bem_matching_plane_zhao_atlas bem_matching_plane_zhao_atlas module~bem_matching_plane_zhao_atlas->module~bem_matching_plane_zhao module~bem_matching_plane_zhao_atlas->module~bem_matching_plane_response_provider module~bem_matching_plane_zhao_numerics bem_matching_plane_zhao_numerics module~bem_matching_plane_zhao_numerics->module~bem_matching_plane_zhao module~bem_matching_plane_zhao_roots bem_matching_plane_zhao_roots module~bem_matching_plane_zhao_roots->module~bem_matching_plane_zhao module~bem_output_writer_summary bem_output_writer_summary module~bem_output_writer_summary->module~bem_surface_current_model module~bem_simulator bem_simulator module~bem_simulator->module~bem_surface_current_model module~bem_matching_plane_response_generator bem_matching_plane_response_generator module~bem_matching_plane_response_generator->module~bem_matching_plane_response_provider module~bem_matching_plane_response_provider_mpi bem_matching_plane_response_provider_mpi module~bem_matching_plane_response_provider_mpi->module~bem_matching_plane_response_provider module~bem_simulator_charge bem_simulator_charge module~bem_simulator_charge->module~bem_simulator module~bem_simulator_io bem_simulator_io module~bem_simulator_io->module~bem_simulator module~bem_simulator_loop bem_simulator_loop module~bem_simulator_loop->module~bem_matching_plane_coupling module~bem_simulator_loop->module~bem_simulator module~bem_simulator_particles bem_simulator_particles module~bem_simulator_particles->module~bem_simulator module~bem_simulator_stats bem_simulator_stats module~bem_simulator_stats->module~bem_simulator program~main main program~main->module~bem_matching_plane_response_provider program~main->module~bem_simulator program~zhao_atlas_main zhao_atlas_main program~zhao_atlas_main->module~bem_matching_plane_zhao_atlas program~zhao_response_main zhao_response_main program~zhao_response_main->module~bem_matching_plane_response_generator

Variables

Type Visibility Attributes Name Initial
real(kind=dp), public, parameter :: nonlinear_tol = 1.0d-5
integer, public, parameter :: nonlinear_max_iter = 60
integer, public, parameter :: nonlinear_max_backtrack = 20

Abstract Interfaces

abstract interface

  • public subroutine nonlinear_residual(x, f)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=dp), intent(in) :: x(:)
    real(kind=dp), intent(out) :: f(:)

Derived Types

type, public ::  zhao_params_type

Components

Type Visibility Attributes Name Initial
real(kind=dp), public :: alpha_rad = 0.0d0
real(kind=dp), public :: n_swi_inf_m3 = 0.0d0
real(kind=dp), public :: n_phe_ref_m3 = 0.0d0
real(kind=dp), public :: n_phe0_m3 = 0.0d0
real(kind=dp), public :: photoelectron_population_fraction = 1.0d0
real(kind=dp), public :: t_swe_ev = 0.0d0
real(kind=dp), public :: t_phe_ev = 0.0d0
real(kind=dp), public :: v_d_electron_mps = 0.0d0
real(kind=dp), public :: v_d_ion_mps = 0.0d0
real(kind=dp), public :: m_i_kg = 0.0d0
real(kind=dp), public :: m_e_kg = 0.0d0
real(kind=dp), public :: v_swe_th_mps = 0.0d0
real(kind=dp), public :: v_phe_th_mps = 0.0d0
real(kind=dp), public :: cs_mps = 0.0d0
real(kind=dp), public :: mach = 0.0d0
real(kind=dp), public :: u = 0.0d0
real(kind=dp), public :: tau = 0.0d0
real(kind=dp), public :: lambda_d_phe_ref_m = 0.0d0

Functions

public function swe_free_current_term(p, n_swe_inf_m3, a_swe) result(term)

Arguments

Type IntentOptional Attributes Name
type(zhao_params_type), intent(in) :: p
real(kind=dp), intent(in) :: n_swe_inf_m3
real(kind=dp), intent(in) :: a_swe

Return Value real(kind=dp)

public function type_a_e2_sum_at_infinity(p, phi0_v, phi_m_v, n_swe_inf_m3) result(e2_sum)

Arguments

Type IntentOptional Attributes Name
type(zhao_params_type), intent(in) :: p
real(kind=dp), intent(in) :: phi0_v
real(kind=dp), intent(in) :: phi_m_v
real(kind=dp), intent(in) :: n_swe_inf_m3

Return Value real(kind=dp)

public function residual_norm(f) result(norm2)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: f(:)

Return Value real(kind=dp)


Subroutines

public subroutine evaluate_zhao_rho_hat(p, branch, side, phi_hat, phi0_hat, phi_m_hat, n_swe_inf_hat, rho_hat)

Arguments

Type IntentOptional Attributes Name
type(zhao_params_type), intent(in) :: p
character(len=1), intent(in) :: branch
character(len=*), intent(in) :: side
real(kind=dp), intent(in) :: phi_hat
real(kind=dp), intent(in) :: phi0_hat
real(kind=dp), intent(in) :: phi_m_hat
real(kind=dp), intent(in) :: n_swe_inf_hat
real(kind=dp), intent(out) :: rho_hat

public subroutine evaluate_zhao_density_hat(p, branch, side, phi_hat, phi0_hat, phi_m_hat, n_swe_inf_hat, n_swi_hat, n_swe_f_hat, n_swe_r_hat, n_phe_f_hat, n_phe_c_hat)

Arguments

Type IntentOptional Attributes Name
type(zhao_params_type), intent(in) :: p
character(len=1), intent(in) :: branch
character(len=*), intent(in) :: side
real(kind=dp), intent(in) :: phi_hat
real(kind=dp), intent(in) :: phi0_hat
real(kind=dp), intent(in) :: phi_m_hat
real(kind=dp), intent(in) :: n_swe_inf_hat
real(kind=dp), intent(out) :: n_swi_hat
real(kind=dp), intent(out) :: n_swe_f_hat
real(kind=dp), intent(out) :: n_swe_r_hat
real(kind=dp), intent(out) :: n_phe_f_hat
real(kind=dp), intent(out) :: n_phe_c_hat

public subroutine build_zhao_params(alpha_deg, n_swi_inf_m3, n_phe_ref_m3, t_swe_ev, t_phe_ev, v_d_electron_mps, v_d_ion_mps, m_i_kg, m_e_kg, p, photoelectron_population_fraction, photoelectron_source_scale)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: alpha_deg
real(kind=dp), intent(in) :: n_swi_inf_m3
real(kind=dp), intent(in) :: n_phe_ref_m3
real(kind=dp), intent(in) :: t_swe_ev
real(kind=dp), intent(in) :: t_phe_ev
real(kind=dp), intent(in) :: v_d_electron_mps
real(kind=dp), intent(in) :: v_d_ion_mps
real(kind=dp), intent(in) :: m_i_kg
real(kind=dp), intent(in) :: m_e_kg
type(zhao_params_type), intent(out) :: p
real(kind=dp), intent(in), optional :: photoelectron_population_fraction
real(kind=dp), intent(in), optional :: photoelectron_source_scale

public subroutine solve_zhao_unknowns(model, p, phi0_v, phi_m_v, n_swe_inf_m3, branch)

Arguments

Type IntentOptional 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

public subroutine try_solve_zhao_unknowns(model, p, phi0_v, phi_m_v, n_swe_inf_m3, branch, success)

Zhao の零電流定常根を fail-closed な status 付きで探索する。

Arguments

Type IntentOptional 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

public subroutine solve_zhao_branch_a(p, phi0_v, phi_m_v, n_swe_inf_m3)

Arguments

Type IntentOptional Attributes Name
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

public subroutine solve_zhao_branch_b(p, phi0_v, n_swe_inf_m3)

Arguments

Type IntentOptional Attributes Name
type(zhao_params_type), intent(in) :: p
real(kind=dp), intent(out) :: phi0_v
real(kind=dp), intent(out) :: n_swe_inf_m3

public subroutine solve_zhao_branch_c(p, phi0_v, n_swe_inf_m3)

Arguments

Type IntentOptional Attributes Name
type(zhao_params_type), intent(in) :: p
real(kind=dp), intent(out) :: phi0_v
real(kind=dp), intent(out) :: n_swe_inf_m3

public subroutine try_solve_zhao_branch_a(p, x, success)

Arguments

Type IntentOptional Attributes Name
type(zhao_params_type), intent(in) :: p
real(kind=dp), intent(out) :: x(3)
logical, intent(out) :: success

public subroutine try_solve_zhao_branch_b(p, x, success)

Arguments

Type IntentOptional Attributes Name
type(zhao_params_type), intent(in) :: p
real(kind=dp), intent(out) :: x(2)
logical, intent(out) :: success

public subroutine try_solve_zhao_branch_c(p, x, success)

Arguments

Type IntentOptional Attributes Name
type(zhao_params_type), intent(in) :: p
real(kind=dp), intent(out) :: x(2)
logical, intent(out) :: success

public subroutine try_solve_zhao_monotonic_scalar(p, branch, x, success)

Type-B/C の定常電流式から ambient density を消去し、電位だけをbracketする。

Arguments

Type IntentOptional Attributes Name
type(zhao_params_type), intent(in) :: p
character(len=1), intent(in) :: branch
real(kind=dp), intent(out) :: x(2)
logical, intent(out) :: success

public subroutine evaluate_monotonic_stationary_phi(p, branch, phi_v, residual_v, density_m3, success)

Arguments

Type IntentOptional Attributes Name
type(zhao_params_type), intent(in) :: p
character(len=1), intent(in) :: branch
real(kind=dp), intent(in) :: phi_v
real(kind=dp), intent(out) :: residual_v
real(kind=dp), intent(out) :: density_m3
logical, intent(out) :: success

public subroutine zhao_residuals_type_a(p, x, f)

Arguments

Type IntentOptional Attributes Name
type(zhao_params_type), intent(in) :: p
real(kind=dp), intent(in) :: x(:)
real(kind=dp), intent(out) :: f(:)

public subroutine zhao_residuals_type_b(p, x, f)

Arguments

Type IntentOptional Attributes Name
type(zhao_params_type), intent(in) :: p
real(kind=dp), intent(in) :: x(:)
real(kind=dp), intent(out) :: f(:)

public subroutine zhao_residuals_type_c(p, x, f)

Arguments

Type IntentOptional Attributes Name
type(zhao_params_type), intent(in) :: p
real(kind=dp), intent(in) :: x(:)
real(kind=dp), intent(out) :: f(:)

public subroutine solve_nonlinear_system(n, guesses, residual_fn, x_best, success)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n
real(kind=dp), intent(in) :: guesses(:,:)
procedure(nonlinear_residual) :: residual_fn
real(kind=dp), intent(out) :: x_best(n)
logical, intent(out) :: success

public subroutine try_newton_solve(n, x0, residual_fn, x_out, final_norm, success)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n
real(kind=dp), intent(in) :: x0(n)
procedure(nonlinear_residual) :: residual_fn
real(kind=dp), intent(out) :: x_out(n)
real(kind=dp), intent(out) :: final_norm
logical, intent(out) :: success

public subroutine numerical_jacobian(n, x, f0, residual_fn, jac)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n
real(kind=dp), intent(in) :: x(n)
real(kind=dp), intent(in) :: f0(n)
procedure(nonlinear_residual) :: residual_fn
real(kind=dp), intent(out) :: jac(n,n)

public subroutine solve_small_linear_system(n, a_in, b_in, x, ok)

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: n
real(kind=dp), intent(in) :: a_in(n,n)
real(kind=dp), intent(in) :: b_in(n)
real(kind=dp), intent(out) :: x(n)
logical, intent(out) :: ok