Trying to fix polytropic electrons. Still not working...
This commit is contained in:
parent
a0aff96257
commit
73cb0a4afe
1 changed files with 3 additions and 1 deletions
|
|
@ -286,6 +286,8 @@ program plasmaExpansion
|
||||||
|
|
||||||
! Diagonal matrix for Newton integration scheme
|
! Diagonal matrix for Newton integration scheme
|
||||||
db_dphi = n_e / T_e ! Isotropic
|
db_dphi = n_e / T_e ! Isotropic
|
||||||
|
! db_dphi = Zave(1) * n_i(1) / (gamma_e * T_e) * &
|
||||||
|
! (1.0_dp + ((gamma_e - 1.0_dp)/gamma_e*(phi_old-phi0)/T_e)**((2.0_dp - gamma_e)/(gamma_e - 1.0_dp))) ! Polytropic
|
||||||
diag = -2.0_dp / dr**2 - db_dphi
|
diag = -2.0_dp / dr**2 - db_dphi
|
||||||
diag_low = 1.0_dp / dr**2 - 1.0_dp / (r(2:nr) * dr)
|
diag_low = 1.0_dp / dr**2 - 1.0_dp / (r(2:nr) * dr)
|
||||||
diag_high = 1.0_dp / dr**2 + 1.0_dp / (r(1:nr-1) * dr)
|
diag_high = 1.0_dp / dr**2 + 1.0_dp / (r(1:nr-1) * dr)
|
||||||
|
|
@ -313,7 +315,7 @@ program plasmaExpansion
|
||||||
|
|
||||||
! Calculate distribution of electrons
|
! Calculate distribution of electrons
|
||||||
n_e = Zave(1) * n_i(1) * exp((phi- phi0) / T_e) ! Isothermal (Boltzmann)
|
n_e = Zave(1) * n_i(1) * exp((phi- phi0) / T_e) ! Isothermal (Boltzmann)
|
||||||
! n_e = Zave(1) * n_i(1) * (1.0_dp + ((gamma_e - 1.0_dp)/gamma_e*(phi-phi0)/T_e)**(1.0_dp/(gamma_e - 1.0_dp))) ! Not working
|
! n_e = Zave(1) * n_i(1) * (1.0_dp + ((gamma_e - 1.0_dp)/gamma_e*(phi-phi0)/T_e)**(1.0_dp/(gamma_e - 1.0_dp))) ! Polytropic
|
||||||
|
|
||||||
! Check if the solution has converged
|
! Check if the solution has converged
|
||||||
phiConv = maxval(abs(Res),1)
|
phiConv = maxval(abs(Res),1)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue