Skip to content

Commit

Permalink
fix some EOS issues
Browse files Browse the repository at this point in the history
  • Loading branch information
zingale committed Dec 12, 2023
1 parent 36da2d2 commit 14ebbbb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
6 changes: 2 additions & 4 deletions nse_tabular/nse_eos.H
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@
#include <nse_table.H>


using namespace amrex;


///
/// if we are in NSE, then the entire thermodynamic state is just
/// a function of rho, T, Ye. We can write the energy as:
Expand All @@ -27,6 +24,7 @@ AMREX_GPU_HOST_DEVICE AMREX_INLINE
Real
nse_T_from_e(const Real rho, const Real e_in, const Real Ye, const Real T_guess) {

using namespace amrex;
using namespace AuxZero;

const Real ttol{1.e-8_rt};
Expand Down Expand Up @@ -54,7 +52,7 @@ nse_T_from_e(const Real rho, const Real e_in, const Real Ye, const Real T_guess)
Real abar_old = nse_state.abar;

// call the EOS with the initial guess for T

eos_extra_t eos_state;
eos_state.rho = rho;
eos_state.T = T;
eos_state.aux[iye] = Ye;
Expand Down
2 changes: 1 addition & 1 deletion unit_test/test_nse_interp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ int main(int argc, char *argv[]) {
init_unit_test();

// C++ EOS initialization (must be done after Fortran eos_init and init_extern_parameters)
eos_init(small_temp, small_dens);
eos_init(unit_test_rp::small_temp, unit_test_rp::small_dens);

// C++ Network, RHS, screening, rates initialization
network_init();
Expand Down
4 changes: 2 additions & 2 deletions unit_test/test_nse_interp/nse_cell.H
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

#include <nse_table.H>
#include <nse_table_type.H>

using namespace unit_test_rp;
#include <nse_eos.H>

void nse_cell_c()
{

using namespace unit_test_rp;

std::cout << "rho, T, Ye = " << density << " " << temperature << " " << ye << std::endl;

Expand Down

0 comments on commit 14ebbbb

Please sign in to comment.