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_injection bem_injection module~bem_sheath_model_core->module~bem_injection module~bem_kinds bem_kinds module~bem_sheath_model_core->module~bem_kinds module~bem_string_utils bem_string_utils module~bem_sheath_model_core->module~bem_string_utils module~bem_constants->module~bem_kinds module~bem_injection->module~bem_constants module~bem_injection->module~bem_kinds module~bem_injection->module~bem_string_utils module~bem_boundary bem_boundary module~bem_injection->module~bem_boundary module~bem_collision bem_collision module~bem_injection->module~bem_collision module~bem_particles bem_particles module~bem_injection->module~bem_particles module~bem_types bem_types module~bem_injection->module~bem_types iso_fortran_env iso_fortran_env module~bem_kinds->iso_fortran_env module~bem_boundary->module~bem_kinds module~bem_boundary->module~bem_types module~bem_collision->module~bem_kinds module~bem_collision->module~bem_string_utils module~bem_collision->module~bem_types module~bem_particles->module~bem_kinds module~bem_particles->module~bem_types module~bem_types->module~bem_kinds

Used by

  • module~~bem_sheath_model_core~~UsedByGraph module~bem_sheath_model_core bem_sheath_model_core module~bem_sheath_runtime bem_sheath_runtime module~bem_sheath_runtime->module~bem_sheath_model_core module~bem_sheath_injection_model bem_sheath_injection_model module~bem_sheath_injection_model->module~bem_sheath_runtime module~bem_app_config_runtime bem_app_config_runtime module~bem_app_config_runtime->module~bem_sheath_injection_model module~bem_app_config bem_app_config module~bem_app_config->module~bem_app_config_runtime module~bem_simulator bem_simulator module~bem_simulator->module~bem_app_config program~main main program~main->module~bem_app_config program~main->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_simulator module~bem_simulator_stats bem_simulator_stats module~bem_simulator_stats->module~bem_simulator

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
real(kind=dp), public, parameter :: zhao_profile_phi_tol_hat = 1.0d-3
real(kind=dp), public, parameter :: zhao_type_a_phi_m_eps_hat = 1.0d-5
integer, public, parameter :: zhao_profile_grid = 8000

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 ::  sheath_model_species

Components

Type Visibility Attributes Name Initial
real(kind=dp), public :: q_particle = 0.0d0
real(kind=dp), public :: m_particle = 0.0d0
real(kind=dp), public :: number_density_m3 = 0.0d0
real(kind=dp), public :: temperature_k = 0.0d0
real(kind=dp), public :: drift_velocity(3) = 0.0d0

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 :: 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

type, public ::  zhao_local_state_type

Components

Type Visibility Attributes Name Initial
character(len=1), public :: branch = ' '
character(len=16), public :: side = 'monotonic'
real(kind=dp), public :: z_m_m = 0.0d0
real(kind=dp), public :: phi_hat = 0.0d0
real(kind=dp), public :: phi_v = 0.0d0
real(kind=dp), public :: n_swi_m3 = 0.0d0
real(kind=dp), public :: n_swe_f_m3 = 0.0d0
real(kind=dp), public :: n_swe_r_m3 = 0.0d0
real(kind=dp), public :: n_phe_f_m3 = 0.0d0
real(kind=dp), public :: n_phe_c_m3 = 0.0d0
real(kind=dp), public :: electron_source_density_m3 = 0.0d0
real(kind=dp), public :: vcut_swe_mps = 0.0d0
real(kind=dp), public :: vcut_phe_mps = 0.0d0
real(kind=dp), public :: v_i_mps = 0.0d0
logical, public :: swe_reflected_active = .false.
logical, public :: phe_captured_active = .false.

Functions

public function no_photo_current_balance(phi0_v, n_e_inf_m3, spec_e, inward_normal, gamma_i) result(balance)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: phi0_v
real(kind=dp), intent(in) :: n_e_inf_m3
type(sheath_model_species), intent(in) :: spec_e
real(kind=dp), intent(in) :: inward_normal(3)
real(kind=dp), intent(in) :: gamma_i

Return Value real(kind=dp)

public function interpolate_profile_value(x_nodes, y_nodes, x_query) result(y_query)

Arguments

Type IntentOptional Attributes Name
real(kind=dp), intent(in) :: x_nodes(:)
real(kind=dp), intent(in) :: y_nodes(:)
real(kind=dp), intent(in) :: x_query

Return Value real(kind=dp)

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)

public function temperature_ev_from_species(spec) result(temp_ev)

Arguments

Type IntentOptional Attributes Name
type(sheath_model_species), intent(in) :: spec

Return Value real(kind=dp)

public function resolve_species_drift_speed(spec, drift_mode, inward_normal) result(speed)

Arguments

Type IntentOptional Attributes Name
type(sheath_model_species), intent(in) :: spec
character(len=*), intent(in) :: drift_mode
real(kind=dp), intent(in) :: inward_normal(3)

Return Value real(kind=dp)

public function zhao_electron_vmin_normal(branch, phi0_v, phi_m_v, m_e_kg) result(vmin_normal)

Arguments

Type IntentOptional Attributes Name
character(len=1), intent(in) :: branch
real(kind=dp), intent(in) :: phi0_v
real(kind=dp), intent(in) :: phi_m_v
real(kind=dp), intent(in) :: m_e_kg

Return Value real(kind=dp)

public function zhao_photo_vmin_normal(branch, phi0_v, phi_m_v, m_phe_kg) result(vmin_normal)

Arguments

Type IntentOptional Attributes Name
character(len=1), intent(in) :: branch
real(kind=dp), intent(in) :: phi0_v
real(kind=dp), intent(in) :: phi_m_v
real(kind=dp), intent(in) :: m_phe_kg

Return Value real(kind=dp)

public function zhao_photo_emit_current_density(branch, phi0_v, phi_m_v, photo_charge_c, p) result(current_a_m2)

Arguments

Type IntentOptional Attributes Name
character(len=1), intent(in) :: branch
real(kind=dp), intent(in) :: phi0_v
real(kind=dp), intent(in) :: phi_m_v
real(kind=dp), intent(in) :: photo_charge_c
type(zhao_params_type), intent(in) :: p

Return Value real(kind=dp)


Subroutines

public subroutine solve_no_photo_floating_potential(spec_e, spec_i, inward_normal, phi0_v)

Arguments

Type IntentOptional Attributes Name
type(sheath_model_species), intent(in) :: spec_e
type(sheath_model_species), intent(in) :: spec_i
real(kind=dp), intent(in) :: inward_normal(3)
real(kind=dp), intent(out) :: phi0_v

public subroutine sample_zhao_state_at_z(p, branch, phi0_v, phi_m_v, n_swe_inf_m3, z_m, state)

Arguments

Type IntentOptional Attributes Name
type(zhao_params_type), intent(in) :: p
character(len=1), intent(in) :: branch
real(kind=dp), intent(in) :: phi0_v
real(kind=dp), intent(in) :: phi_m_v
real(kind=dp), intent(in) :: n_swe_inf_m3
real(kind=dp), intent(in) :: z_m
type(zhao_local_state_type), intent(out) :: state

public subroutine sample_type_a_phi_hat_at_z(p, phi0_hat, phi_m_hat, n_swe_inf_hat, z_m, phi_hat, side, z_m_hat)

Arguments

Type IntentOptional Attributes Name
type(zhao_params_type), intent(in) :: p
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(in) :: z_m
real(kind=dp), intent(out) :: phi_hat
character(len=16), intent(out) :: side
real(kind=dp), intent(out) :: z_m_hat

public subroutine sample_monotonic_phi_hat_at_z(p, branch, phi0_hat, phi_m_hat, n_swe_inf_hat, z_m, phi_hat, side, z_m_hat)

Arguments

Type IntentOptional Attributes Name
type(zhao_params_type), intent(in) :: p
character(len=1), intent(in) :: branch
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(in) :: z_m
real(kind=dp), intent(out) :: phi_hat
character(len=16), intent(out) :: side
real(kind=dp), intent(out) :: z_m_hat

public subroutine build_type_a_branch_from_minimum(p, phi_nodes_asc, phi0_hat, n_swe_inf_hat, phi_m_hat, side, s_nodes)

Arguments

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

public subroutine evaluate_zhao_state_from_phi_hat(p, branch, side, phi_hat, phi0_hat, phi_m_hat, n_swe_inf_m3, z_m_m, state)

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_m3
real(kind=dp), intent(in) :: z_m_m
type(zhao_local_state_type), intent(out) :: state

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)

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

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