diff options
author | cott <cott@8e189c6b-2ab8-4400-aa02-70a9cfce18b9> | 2010-10-24 14:06:52 +0000 |
---|---|---|
committer | cott <cott@8e189c6b-2ab8-4400-aa02-70a9cfce18b9> | 2010-10-24 14:06:52 +0000 |
commit | 5621733be96b97235891c5da5e1aaa52967058c3 (patch) | |
tree | 11f840e137111193f641e553600c86e7cebc310c | |
parent | 7449c12a9f5976d5d9eff74ea4a43741a64e8cb3 (diff) |
* add capability allowing to read in finite-T EOS tables.
git-svn-id: http://svn.einsteintoolkit.org/cactus/EinsteinEOS/EOS_Omni/EOS_Omni@11 8e189c6b-2ab8-4400-aa02-70a9cfce18b9
-rw-r--r-- | param.ccl | 11 | ||||
-rw-r--r-- | src/EOS_Omni_SingleVarCalls.F90 | 7 | ||||
-rw-r--r-- | src/EOS_Omni_Startup.F90 | 17 | ||||
-rw-r--r-- | src/nuc_eos/readtable.F90 | 6 |
4 files changed, 36 insertions, 5 deletions
@@ -55,3 +55,14 @@ REAL hybrid_rho_nuc "Density at which to switch betwen gammas; c=G=Msun=1" { : :: "" } 3.238607e-4 + +################ Finite-Temperature Nuclear EOS + +BOOLEAN nuceos_read_table "Read in EOS table?" +{ +} "No" + +STRING nuceos_table_name "nuceos table name (hdf5)" +{ + .* :: "Can be anything" +} "blah.h5" diff --git a/src/EOS_Omni_SingleVarCalls.F90 b/src/EOS_Omni_SingleVarCalls.F90 index 73daa55..217c8f3 100644 --- a/src/EOS_Omni_SingleVarCalls.F90 +++ b/src/EOS_Omni_SingleVarCalls.F90 @@ -84,6 +84,13 @@ subroutine EOS_Omni_EOS_Press(eoskey,keytemp,rf_precision,npoints,& press(i) = hybrid_p_poly + hybrid_p_th enddo +!!! case (4) +!!! +!!! do i=1,npoints +!!! +!!! enddo + + case DEFAULT write(warnstring,*) "eoskey ",eoskey," not implemented!" call CCTK_WARN(0,warnstring) diff --git a/src/EOS_Omni_Startup.F90 b/src/EOS_Omni_Startup.F90 index d13a0f6..d080e3e 100644 --- a/src/EOS_Omni_Startup.F90 +++ b/src/EOS_Omni_Startup.F90 @@ -10,6 +10,8 @@ subroutine EOS_Omni_Startup(CCTK_ARGUMENTS) DECLARE_CCTK_PARAMETERS DECLARE_CCTK_ARGUMENTS + character(len=512) eosfilename + CCTK_INT fslen poly_k_cgs = poly_k * rho_gf**poly_gamma_ini / press_gf @@ -17,7 +19,18 @@ subroutine EOS_Omni_Startup(CCTK_ARGUMENTS) hybrid_k1_cgs = hybrid_k1 * rho_gf**poly_gamma_ini / press_gf - hybrid_k2_cgs = hybrid_k1_cgs * (hybrid_rho_nuc * inv_rho_gf)**(hybrid_gamma1-hybrid_gamma2) - + hybrid_k2_cgs = hybrid_k1_cgs * & + (hybrid_rho_nuc * inv_rho_gf)**(hybrid_gamma1-hybrid_gamma2) + + if(nuceos_read_table.ne.0) then + ! call EOS table reader + call CCTK_FortranString(fslen,nuceos_table_name,eosfilename) + call CCTK_INFO("##################################################") + call CCTK_INFO("EOS_Omni: Reading finite-T nuclear EOS table") + call CCTK_INFO(eosfilename) + call CCTK_INFO("##################################################") + call nuc_eos_readtable(eosfilename) + endif + end subroutine EOS_Omni_Startup diff --git a/src/nuc_eos/readtable.F90 b/src/nuc_eos/readtable.F90 index 41f8159..d8ae2bc 100644 --- a/src/nuc_eos/readtable.F90 +++ b/src/nuc_eos/readtable.F90 @@ -1,4 +1,4 @@ -subroutine readtable(eos_filename) +subroutine nuc_eos_readtable(eos_filename) ! This routine reads the table and initializes ! all variables in the module. @@ -21,7 +21,7 @@ subroutine readtable(eos_filename) real*8 buffer1,buffer2,buffer3,buffer4 accerr=0 - write(*,*) "Reading Ott EOS Table" + write(*,*) "Reading Nuclear EOS Table" call h5open_f(error) @@ -229,6 +229,6 @@ subroutine readtable(eos_filename) write(6,*) "Done reading eos tables" -end subroutine readtable +end subroutine nuc_eos_readtable |