Import Equation of State
Function to import equation of state given by user.
- TOVsolver.EoS_import.EOS_check(density, pressure)[source]
file_read
Checks that the derivative (drho/dp) is positive.
- Parameters:
density (array) – numpy 1Darray. Density array to be checked.
pressure (array) – numpy 1Darray. Pressure array to be checked.
- Returns:
two arrays, one corresponding to density and one corresponding to pressure or ends the function and prints invalid equation of state.
- Return type:
array
- TOVsolver.EoS_import.EOS_import()[source]
Imports density and pressure from csv or array, checks them, and returns them.
- Parameters:
file_name (string, optional) – string. CSV file to be opened.
density (array, optional) – numpy 1Darray. Passed into a check function and returned if valid.
pressure (array, optional) – numpy 1Darray. Passed into a check function and returned if valid.
- Returns:
checked density and pressure.
- Return type:
array