added diffusivity formula selecting conditional

This commit is contained in:
ignis 2020-02-27 07:29:14 +09:00
parent b68cadc136
commit 5aa8111eb6
3 changed files with 28 additions and 6 deletions

View file

@ -12,6 +12,7 @@ module m_parameters
! Transport Properties ! Transport Properties
real :: vis,sc,diff real :: vis,sc,diff
real :: d_turb real :: d_turb
integer :: d_mode
real :: scp,prp,lep,vis0p,rod real :: scp,prp,lep,vis0p,rod
real :: lewis, le_a, le_x real :: lewis, le_a, le_x
@ -122,6 +123,7 @@ contains
CALL READ_PARAMETER (nrxn) ! number of reactions CALL READ_PARAMETER (nrxn) ! number of reactions
CALL READ_PARAMETER (d_turb) ! turbulent diffusivity CALL READ_PARAMETER (d_turb) ! turbulent diffusivity
CALL READ_PARAMETER (d_mode) ! diffusivity formula selector
! READ(itape,*) cdum,table_size ! READ(itape,*) cdum,table_size
! WRITE(otape,*) cdum,table_size ! WRITE(otape,*) cdum,table_size

View file

@ -40,6 +40,7 @@ le_x 0.20
nsp 2 nsp 2
nrxn 1 nrxn 1
d_turb 0 d_turb 0
d_mode 0
''' '''
).split() ).split()

View file

@ -89,17 +89,33 @@
!------------------------------------------------------------------------ !------------------------------------------------------------------------
SUBROUTINE solve SUBROUTINE solve
IF (reaction_type == "onestep") THEN IF (d_mode == 0) THEN
CALL solve_ (fonestep, SET_IC_ONESTEP) CALL solve_with_diffusivity (update_dm)
ELSE IF (reaction_type == "twostep") THEN ELSE IF (d_mode == 1) THEN
CALL solve_ (fns, SET_IC_TWOSTEP) CALL solve_with_diffusivity (update_dm)
ELSE ELSE
WRITE(*,*)'ERROR, UNSUPPORTED REACTION ', trim(reaction_type), '. STOPPING' WRITE(*,*)'ERROR, UNSUPPORTED DIFFUSIVITY ', d_mode, '. STOPPING'
STOP STOP
END IF END IF
END SUBROUTINE solve END SUBROUTINE solve
SUBROUTINE solve_ (rhs, SET_IC) SUBROUTINE solve_with_diffusivity (calc_diff)
INTERFACE
SUBROUTINE calc_diff
END SUBROUTINE calc_diff
END INTERFACE
IF (reaction_type == "onestep") THEN
CALL solve_ (fonestep, SET_IC_ONESTEP, calc_diff)
ELSE IF (reaction_type == "twostep") THEN
CALL solve_ (fns, SET_IC_TWOSTEP, calc_diff)
ELSE
WRITE(*,*)'ERROR, UNSUPPORTED REACTION ', trim(reaction_type), '. STOPPING'
STOP
END IF
END SUBROUTINE solve_with_diffusivity
SUBROUTINE solve_ (rhs, SET_IC, calc_diff)
INTERFACE INTERFACE
SUBROUTINE rhs(r1,f) SUBROUTINE rhs(r1,f)
@ -109,6 +125,9 @@
SUBROUTINE SET_IC SUBROUTINE SET_IC
END SUBROUTINE SET_IC END SUBROUTINE SET_IC
SUBROUTINE calc_diff
END SUBROUTINE calc_diff
END INTERFACE END INTERFACE
INTEGER :: i,j,k,savenum INTEGER :: i,j,k,savenum