Small changes.

This commit is contained in:
Jorge Gonzalez 2024-10-04 14:19:17 +02:00
commit 818da3132d
2 changed files with 8 additions and 8 deletions

View file

@ -1,8 +1,8 @@
all:
gfortran moduleConstantParameters.f90 -c
gfortran moduleReferenceValues.f90 -c
gfortran moduleOutput.f90 -c
gfortran moduleTableBC.f90 -c
gfortran moduleConstantParameters.f90 -c -lopenblas -Ofast -fopenmp -Wall
gfortran moduleReferenceValues.f90 -c -lopenblas -Ofast -fopenmp -Wall
gfortran moduleOutput.f90 -c -lopenblas -Ofast -fopenmp -Wall
gfortran moduleTableBC.f90 -c -lopenblas -Ofast -fopenmp -Wall
gfortran plasmaExpansion.f90 moduleConstantParameters.o moduleReferenceValues.o moduleOutput.o moduleTableBC.o -lopenblas -Ofast -fopenmp -Wall -o plasmaExpansion
clean:

View file

@ -35,7 +35,7 @@ program plasmaExpansion
real(dp), parameter:: m_i = 1.9712258e-25_dp ! Tin atom mass in kg
real(dp), parameter:: gamma_i = 1.0_dp ! Adiabatic coefficient for ions
real(dp), parameter:: m_e = 9.1093837e-31_dp ! Electron mass in kg
real(dp), parameter:: gamma_e = 5.0_dp/3.0_dp ! Adiabatic coefficient for electrons
real(dp), parameter:: gamma_e = 2.0_dp ! Adiabatic coefficient for electrons
real(dp):: r0, rf
real(dp), allocatable, dimension(:):: r
@ -142,7 +142,7 @@ program plasmaExpansion
t0 = 0.0_dp
tf = 1.0e-6_dp / t_ref
! tf = 1.0e1_dp * (rf - r0) / c_s
dt = 1.0e-2_dp*dr/(10.0_dp*c_s)
dt = 1.0e-2_dp*dr/c_s
nt = nint((tf - t0) / dt)
dt = (tf - t0) / float(nt)
@ -308,7 +308,7 @@ program plasmaExpansion
! diag(nr) = 1.0_dp ! Dirichlet
! diag_low(nr-1) = 0.0_dp ! Dirichlet
diag_low(nr-1) = 2.0_dp / dr**2 - n_e(nr) ! Neumann
! Calculate charge density
b = -(Zave*n_i - n_e)
! Apply boundary conditions
@ -326,7 +326,7 @@ program plasmaExpansion
! phi0=phi(1)
! Calculate distribution of electrons
n_e = Zave(1) * n_i(1) * exp((phi - phi0) / T_i(1))
n_e = Zave(1) * n_i(1) * exp((phi - phi0) / 1.0_dp)
! Check if the solution has converged
phiConv = maxval(abs(Res),1)