Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert Helmholtz EOS to C++ #262

Merged
merged 4 commits into from
Feb 24, 2020
Merged

Convert Helmholtz EOS to C++ #262

merged 4 commits into from
Feb 24, 2020

Conversation

maxpkatz
Copy link
Member

No description provided.

@zingale
Copy link
Member

zingale commented Feb 24, 2020

comparison:

            variable name            absolute error            relative error
                                        (||A - B||)         (||A - B||/||A||)
 ----------------------------------------------------------------------
 level =  1
 density                            0.000000000               0.000000000    
 temperature                        0.000000000               0.000000000    
 specific_enthalpy                 0.2576980378E+12          0.9514407143E-14
 specific_energy                    8589934592.              0.4199783680E-15
 pressure                          0.6542094185E+15          0.5088021011E-13
 specific_entropy                   1.000000000              0.3692074202E-15
 X_hydrogen-1                       0.000000000               0.000000000    
 X_helium-3                         0.000000000               0.000000000    
 X_helium-4                         0.000000000               0.000000000    
 X_carbon-12                        0.000000000               0.000000000    
 X_nitrogen-14                      0.000000000               0.000000000    
 X_oxygen-16                        0.000000000               0.000000000    
 X_neon-20                          0.000000000               0.000000000    
 X_magnesium-24                     0.000000000               0.000000000    
 X_silicon-28                       0.000000000               0.000000000    
 X_sulfur-32                        0.000000000               0.000000000    
 X_argon-36                         0.000000000               0.000000000    
 X_calcium-40                       0.000000000               0.000000000    
 X_titanium-44                      0.000000000               0.000000000    
 X_chromium-48                      0.000000000               0.000000000    
 X_iron-52                          0.000000000               0.000000000    
 X_iron-54                          0.000000000               0.000000000    
 X_nickel-56                        0.000000000               0.000000000    
 X_neutron                          0.000000000               0.000000000    
 X_proton                           0.000000000               0.000000000    
 err_T_eos_rh                      0.3841433208E-09          0.9470509326    
 err_rho_eos_tp                     7.557622044              0.6296070824    
 err_T_eos_rp                      0.8134984203E-10          0.7144856427    
 err_T_eos_re                      0.5743055372E-09           1.052354859    
 err_rho_eos_ps                    0.1281506574E-12          0.3695877320    
 err_T_eos_ps                      0.2171663388E-10          0.9994972860    
 err_rho_eos_ph                    0.9788027582E-13          0.1073108582    
 err_T_eos_ph                      0.5544417072E-09          0.9750761359    
 err_rho_eos_th                    0.1486988310E-10           1.118101191    
 c_v                                2.000000000              0.2423260188E-15
 c_p                               0.1112329421E+11          0.7364364532E-13
 n_e                               0.5764607523E+18          0.2187964706E-15
 n_p                                0.000000000               0.000000000    
 eta                               0.1455191523E-10          0.1580138619E-15
 p_ele                             0.6542094185E+15          0.6913580364E-13
 p_pos                              0.000000000               0.000000000    
 mu                                 0.000000000               0.000000000    
 mu_e                               0.000000000               0.000000000    
 Y_e                                0.000000000               0.000000000    
 dp_dT                              10176.00000              0.1646848192E-13
 dp_drho                            1280.000000              0.4098585488E-15
 de_dT                              2.000000000              0.2423260188E-15
 de_drho                           0.8428873318E+11          0.4121034983E-13
 ds_dT                             0.3492459655E-09          0.4231569220E-15
 ds_drho                            11.06250000              0.4084356880E-13
 dh_dT                              108.0000000              0.9852352765E-14
 dh_drho                           0.1111322788E+12          0.4103086066E-13
 dp_dX_hydrogen-1                  0.4398046511E+13          0.8773657329E-15
 dp_dX_helium-3                    0.2199023256E+13          0.4479011536E-15
 dp_dX_helium-4                    0.4398046511E+13          0.5797583963E-15
 dp_dX_carbon-12                   0.4398046511E+13          0.5310898422E-15
 dp_dX_nitrogen-14                 0.5497558139E+13          0.6599054030E-15
 dp_dX_oxygen-16                   0.6597069767E+13          0.7883622546E-15
 dp_dX_neon-20                     0.5497558139E+13          0.6529005891E-15
 dp_dX_magnesium-24                0.4398046511E+13          0.5201731926E-15
 dp_dX_silicon-28                  0.6597069767E+13          0.7779752995E-15
 dp_dX_sulfur-32                   0.6597069767E+13          0.7762706921E-15
 dp_dX_argon-36                    0.5497558139E+13          0.6457917015E-15
 dp_dX_calcium-40                  0.6597069767E+13          0.7738967527E-15
 dp_dX_titanium-44                 0.6597069767E+13          0.7730370979E-15
 dp_dX_chromium-48                 0.6597069767E+13          0.7723221765E-15
 dp_dX_iron-52                     0.4398046511E+13          0.5144788500E-15
 dp_dX_iron-54                     0.5497558139E+13          0.6239941041E-15
 dp_dX_nickel-56                   0.6597069767E+13          0.7712013963E-15
 dp_dX_neutron                     0.6597069767E+13          0.5614178169E-15
 dp_dX_proton                      0.4398046511E+13          0.8773657329E-15
 de_dX_hydrogen-1                  0.2305794790E+12          0.5872123986E-07
 de_dX_helium-3                    0.1294305705E+12          0.4486071966E-07
 de_dX_helium-4                    0.3095190244E+12          0.5485465772E-07
 de_dX_carbon-12                   0.3094634051E+12          0.5289618833E-07
 de_dX_nitrogen-14                 0.3094594319E+12          0.5276160940E-07
 de_dX_oxygen-16                   0.3094564531E+12          0.5266112166E-07
 de_dX_neon-20                     0.3094522819E+12          0.5252107679E-07
 de_dX_magnesium-24                0.3094495002E+12          0.5242812439E-07
 de_dX_silicon-28                  0.3094475136E+12          0.5236193005E-07
 de_dX_sulfur-32                   0.3094460242E+12          0.5231239341E-07
 de_dX_argon-36                    0.3094448645E+12          0.5227392912E-07
 de_dX_calcium-40                  0.3094439388E+12          0.5224319854E-07
 de_dX_titanium-44                 0.3094431800E+12          0.5221808182E-07
 de_dX_chromium-48                 0.3094425482E+12          0.5219716965E-07
 de_dX_iron-52                     0.3094420132E+12          0.5217948768E-07
 de_dX_iron-54                     0.3294546939E+12          0.5291550166E-07
 de_dX_nickel-56                   0.3094415544E+12          0.5216434117E-07
 de_dX_neutron                     0.8501181041E+12          0.5566276829E-07
 de_dX_proton                      0.2305794790E+12          0.5872123986E-07
 dh_dX_hydrogen-1                  0.6820194391E+17          0.3537192864E-08
 dh_dX_helium-3                    0.4192598898E+17          0.2624766002E-08
 dh_dX_helium-4                    0.5480326730E+17          0.2922656989E-08
 dh_dX_carbon-12                   0.8213774055E+17          0.3379168412E-08
 dh_dX_nitrogen-14                 0.8409020262E+17          0.3403919017E-08
 dh_dX_oxygen-16                   0.8555455454E+17          0.3421966547E-08
 dh_dX_neon-20                     0.8760463262E+17          0.3446522449E-08
 dh_dX_magnesium-24                0.8897135993E+17          0.3462450935E-08
 dh_dX_silicon-28                  0.8994758452E+17          0.3473618829E-08
 dh_dX_sulfur-32                   0.9067976478E+17          0.3481883524E-08
 dh_dX_argon-36                    0.9124923020E+17          0.3488246297E-08
 dh_dX_calcium-40                  0.9170480597E+17          0.3493296249E-08
 dh_dX_titanium-44                 0.9207754900E+17          0.3497401575E-08
 dh_dX_chromium-48                 0.9238816533E+17          0.3500804566E-08
 dh_dX_iron-52                     0.9265100015E+17          0.3503671540E-08
 dh_dX_iron-54                     0.9276781897E+17          0.3504942202E-08
 dh_dX_nickel-56                   0.9287627977E+17          0.3506119465E-08
 dh_dX_neutron                     0.6820177856E+17          0.3537181578E-08
 dh_dX_proton                      0.6820194391E+17          0.3537192864E-08
 Gamma_1                           0.1387778781E-12          0.8223017247E-13
 soundspeed                        0.1210937500              0.4061692913E-13
 Abar                               0.000000000               0.000000000    
 Zbar                               0.000000000               0.000000000    
 dp_dA                             0.3298534883E+13          0.2599870617E-15
 dp_dZ                             0.4398046511E+13          0.3873949753E-15
 de_dA                             0.5481490555E+12          0.5037423580E-07
 de_dZ                             0.6970984274E+12          0.5176793729E-07
 dp_de_rho                         0.6389617920E-04          0.2020195316E-13
 dp_drho_e                         0.5508295557E+12          0.8206430884E-13

@zingale
Copy link
Member

zingale commented Feb 24, 2020

most things look good. It is curious that the dedX has O(1.e-8) errors but dpdX has O(1.e-15). I'll look over that.

@zingale zingale merged commit 68b72b2 into development Feb 24, 2020
@zingale zingale deleted the cxx-helmholtz branch February 24, 2020 16:57
maxpkatz added a commit that referenced this pull request Feb 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants