In [5]:
import ongp
reload(ongp)

evol_params = {
    'hhe_eos_option':'scvh',
    'z_eos_option':'reos water',
    'atm_option':'f11_tables jup', 
    'path_to_data':'/Users/chris/Dropbox/planet_models/ongp/data'
}
e = ongp.evol(evol_params)

static_params = {
    'mtot':'jup', 
    't1':165., 
    'z1':0.07, 
    'z2':0.1, 
    'y1':0.265, 
    'y2':0.280, 
    'transition_pressure':3.35, 
    'mcore':3.25
}
print(static_params)
e.static(static_params)


{'mtot': 'jup', 't1': 165.0, 'z1': 0.07, 'z2': 0.1, 'y1': 0.265, 'y2': 0.28, 'transition_pressure': 3.35, 'mcore': 3.25}
Out[5]:
(6901060386.4945278, 165.0, 125.3312058182319)

In [ ]:
evolve_params = {
    'mtot':'jup',
    'start_t':2e3,
    'end_t':160.,
    'which_t':'t1',
    'y1':0.265,
    'y2':0.280,
    'z1':0.07,
    'z2':0.1,
    'mcore':3.25,
    'transition_pressure':3.35,
    'stdout_interval':5
}
e.evolve(evolve_params)


        step        iters           t1          t10         teff       radius       s_mean        dt_yr      age_gyr  nz_gradient     nz_shell           y1     walltime 
           0           40     2000.000     3052.609     1022.900    1.255e+10       10.287    0.000e+00        0.000            0            0        0.265        0.929
           5           38     1760.478     2856.527      909.960    1.163e+10       10.064    1.112e+05        0.000            0            0        0.265        5.483
          10           46     1549.641     2645.151      813.578    1.092e+10        9.853    1.876e+05        0.001            0            0        0.265       10.110
          15           37     1364.054     2420.167      721.450    1.034e+10        9.645    3.240e+05        0.003            0            0        0.265       14.523
          20           35     1200.693     2186.078      636.776    9.862e+09        9.439    5.543e+05        0.005            0            0        0.265       18.670
          25           34     1056.897     1960.537      556.400    9.459e+09        9.240    9.622e+05        0.009            0            0        0.265       22.774
          30           34      930.321     1750.000      481.727    9.120e+09        9.047    1.688e+06        0.016            0            0        0.265       26.880
          35           34      818.905     1558.245      422.676    8.827e+09        8.858    2.836e+06        0.027            0            0        0.265       30.944
          40           34      720.832     1384.822      376.008    8.569e+09        8.671    4.569e+06        0.046            0            0        0.265       34.781
          45           34      634.504     1227.918      333.204    8.337e+09        8.483    7.430e+06        0.077            0            0        0.265       38.784

In [ ]:
plt.plot(e.history['age'], e.history['t1'])
plt.hlines(165, 0, 5, linestyle=':', color='grey', lw=1)
plt.ylim(150, 300)
plt.legend()
plt.xlabel(r'Age (Gyr)')
plt.ylabel(r'$T_{1}\ (\rm K)$')