Improving the flexibility of nuclear reactors to meet fluctuating demand on grids with high renewable energy generation penetration is key to improving reactor economics. Economic optimization using the code HERON gives maximum profit of coupling high temperature gas reactors (HTGRs) to thermal energy storage (TES) systems in the configuration shown in Figure 1 when following the demand in Figure 3. We look to model the physics of operation for a HTGR-TES using the HYBRID library in the code Modelica.