From 818da3132d1d3fc25ec7b6786d9ee290f1f94999 Mon Sep 17 00:00:00 2001 From: JGonzalez Date: Fri, 4 Oct 2024 14:19:17 +0200 Subject: [PATCH] Small changes. --- makefile | 8 ++++---- plasmaExpansion.f90 | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/makefile b/makefile index 5a0927f..7818568 100644 --- a/makefile +++ b/makefile @@ -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: diff --git a/plasmaExpansion.f90 b/plasmaExpansion.f90 index 97e4309..45354ed 100644 --- a/plasmaExpansion.f90 +++ b/plasmaExpansion.f90 @@ -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)