DL_MG
Functions/Subroutines | Variables
dl_mg_nonlinear_model Module Reference

Computes the Boltzmann term and its derivative. More...

Functions/Subroutines

real(wp) function fnl (x, steric_w)
 
real(wp) function derfnl (x, steric_w)
 
elemental real(wp) function capexp (x)
 
subroutine init_nonlinear (lineq, lam, t, n, q, c, has_stw, expcap_in, ntrl_method)
 initialise non-linear module data More...
 
subroutine set_debye_length (eq_type)
 set the inverse square of Debye length with the used More...
 
subroutine free_nonlinear
 

Variables

integer, save nion
 number of ion types More...
 
real(wp), save lambda
 
real(wp), save temp
 
real(wp), save kappa2
 
real(wp), save expcap
 
real(wp), save beta
 
real(wp), dimension(:), allocatable, save qion
 ions charges; array of dimension (nion) More...
 
real(wp), dimension(:), allocatable, save cion_in
 the input concentrations More...
 
real(wp), dimension(:), allocatable, save cion
 used concentrations, they might differ from cion_in if neutralisation by concentration shift is used More...
 
real(wp), dimension(:), allocatable, save mu
 chemical potential * beta computed only if full PBE and full PBC More...
 
real(wp), dimension(:), allocatable, save mu_prev
 previous chem pot, needed in convergence test; this is ugly ! More...
 
real(wp), parameter max_expcap = 50.0_wp
 
logical has_steric_weight = .false.
 true if steric_weight array is provided More...
 
real(wp), save steric_weight_sum
 steric weight sum over the whole domain ( needed when using PBC) More...
 
real(wp), save rho_sum = huge(0.0_wp)
 sum charge density over internal grid points. Needed in some neutralisations More...
 
integer, save neutralisation_method
 neutralisation method More...
 

Detailed Description

Computes the Boltzmann term and its derivative.

uses capped exponential to avoid overflow

Lucian Anton

Todo:
Warn the user if the provided expcap is overruled by max_excap; should max_expcap be located in parameters module?

Function/Subroutine Documentation

◆ capexp()

elemental real(wp) function dl_mg_nonlinear_model::capexp ( real(wp), intent(in)  x)

◆ derfnl()

real(wp) function dl_mg_nonlinear_model::derfnl ( real(wp), intent(in)  x,
real(wp), intent(in)  steric_w 
)

◆ fnl()

real(wp) function dl_mg_nonlinear_model::fnl ( real(wp), intent(in)  x,
real(wp), intent(in)  steric_w 
)

◆ free_nonlinear()

subroutine dl_mg_nonlinear_model::free_nonlinear

◆ init_nonlinear()

subroutine dl_mg_nonlinear_model::init_nonlinear ( logical, intent(in)  lineq,
real(wp), intent(in)  lam,
real(wp), intent(in)  t,
integer, intent(in)  n,
real(wp), dimension(n), intent(in)  q,
real(wp), dimension(n), intent(in)  c,
logical, intent(in)  has_stw,
real(wp), intent(in), optional  expcap_in,
integer, intent(in), optional  ntrl_method 
)

initialise non-linear module data

◆ set_debye_length()

subroutine dl_mg_nonlinear_model::set_debye_length ( integer, intent(in)  eq_type)

set the inverse square of Debye length with the used

Variable Documentation

◆ beta

real (wp), save dl_mg_nonlinear_model::beta

◆ cion

real(wp), dimension(:), allocatable, save dl_mg_nonlinear_model::cion

used concentrations, they might differ from cion_in if neutralisation by concentration shift is used

◆ cion_in

real (wp), dimension(:), allocatable, save dl_mg_nonlinear_model::cion_in

the input concentrations

◆ expcap

real (wp), save dl_mg_nonlinear_model::expcap

◆ has_steric_weight

logical dl_mg_nonlinear_model::has_steric_weight = .false.

true if steric_weight array is provided

◆ kappa2

real (wp), save dl_mg_nonlinear_model::kappa2

◆ lambda

real (wp), save dl_mg_nonlinear_model::lambda

◆ max_expcap

real(wp), parameter dl_mg_nonlinear_model::max_expcap = 50.0_wp

◆ mu

real (wp), dimension(:), allocatable, save dl_mg_nonlinear_model::mu

chemical potential * beta computed only if full PBE and full PBC

◆ mu_prev

real (wp), dimension(:), allocatable, save dl_mg_nonlinear_model::mu_prev

previous chem pot, needed in convergence test; this is ugly !

◆ neutralisation_method

integer, save dl_mg_nonlinear_model::neutralisation_method

neutralisation method

◆ nion

integer, save dl_mg_nonlinear_model::nion

number of ion types

◆ qion

real (wp), dimension(:), allocatable, save dl_mg_nonlinear_model::qion

ions charges; array of dimension (nion)

◆ rho_sum

real(wp), save dl_mg_nonlinear_model::rho_sum = huge(0.0_wp)

sum charge density over internal grid points. Needed in some neutralisations

◆ steric_weight_sum

real(wp), save dl_mg_nonlinear_model::steric_weight_sum

steric weight sum over the whole domain ( needed when using PBC)

◆ temp

real (wp), save dl_mg_nonlinear_model::temp