From 2ae363a80d4dcdb9e10ce6bd3bb48eb5f8f95815 Mon Sep 17 00:00:00 2001 From: ignis Date: Fri, 21 Feb 2020 11:06:57 +0900 Subject: [PATCH] default onestep nsp=2, conditional rhs selection (working onestep calculation) --- code/sample/itape.py | 2 +- code/ysolve.f90 | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/code/sample/itape.py b/code/sample/itape.py index eb6d1b3..994dd4f 100755 --- a/code/sample/itape.py +++ b/code/sample/itape.py @@ -37,7 +37,7 @@ beta1 5 hrp 0.75 le_a 1. le_x 0.20 -nsp 1 +nsp 2 nrxn 1 ''' ).split() diff --git a/code/ysolve.f90 b/code/ysolve.f90 index 887a1e9..6fb348a 100644 --- a/code/ysolve.f90 +++ b/code/ysolve.f90 @@ -115,7 +115,14 @@ CALL SET_BC - CALL RK4(fns) + if ( reaction_type == "onestep" ) then + CALL RK4(fonestep) + else if ( reaction_type == "twostep" ) then + CALL RK4(fns) + else + WRITE(*,*) 'ERROR, UNDEFINED REACTION TYPE ', reaction_type + stop + end if IF (t_uf.ge.dt_uf) THEN pflold=pflame @@ -240,7 +247,7 @@ OPEN (305,FILE='sfield.dat') DO i=1,nx - WRITE (305,'(4e30.20)') i*hx, y1(i,1), y1(i,2), y1(i,3) + WRITE (305,*) (/ i*hx, y1(i,:) /) ENDDO CLOSE (305) @@ -343,6 +350,8 @@ xi = x(i) y1(i,1)=(1.-xi) ! reactant mass fraction + y1(i,2)=(xi) ! reactant mass fraction + ENDDO else if ( reaction_type == "twostep" ) then DO i=1,nx