diff --git a/code/m_chemistry.f90 b/code/m_chemistry.f90 index 3d72f64..fc71a4a 100644 --- a/code/m_chemistry.f90 +++ b/code/m_chemistry.f90 @@ -4,8 +4,21 @@ use m_parameters implicit none +real, private :: coef(10) +real, private :: lambda_onestep + contains +subroutine init_chemistry + if ( reaction_type == "onestep" ) then + lambda_onestep = pre * exp ( - beta / hrp ) + else if ( reaction_type == "twostep" ) then + else + stop + end if + +end subroutine init_chemistry + real function rate_1step (yr, theta) real, intent(in) :: yr diff --git a/code/m_parameters.f90 b/code/m_parameters.f90 index 0367666..0c1a243 100644 --- a/code/m_parameters.f90 +++ b/code/m_parameters.f90 @@ -16,7 +16,7 @@ module m_parameters real :: pre,ac,bc,c_cut,c_ref - real :: lambda1, lambda2, beta1, hrp + real :: lambda1, lambda2, beta1, hrp, beta integer :: syp,eyp,twod @@ -44,10 +44,13 @@ module m_parameters CHARACTER(100) :: itape_name + CHARACTER(100) :: reaction_type + contains SUBROUTINE SET_CHEMISTRY + reaction_type = "twostep" lambda1 = 100000. lambda2 = lambda1 * 63.6 beta1 = 9.1 @@ -60,6 +63,8 @@ contains INTEGER :: itape=300,otape=301 INTEGER :: i + CALL SET_CHEMISTRY + IF (read_stdin) THEN itape=5 ELSE diff --git a/code/ysolve.f90 b/code/ysolve.f90 index 1a784d1..ec7b0ae 100644 --- a/code/ysolve.f90 +++ b/code/ysolve.f90 @@ -79,8 +79,6 @@ INTEGER :: i,j,k,savenum REAL :: pflame,pflold,delf=0. - CALL ludcmp(nx,100,100,1,0,0) - CALL SET_IC t_now=0. @@ -342,6 +340,8 @@ ALLOCATE(duxt(nx),STAT=ierr) ; duxt=0. ALLOCATE(dm(nx),STAT=ierr) ; dm=diff + CALL ludcmp(nx,100,100,1,0,0) + END SUBROUTINE init_solver SUBROUTINE finalize_solver