Skip to content

Commit

Permalink
many of Andrew's changes
Browse files Browse the repository at this point in the history
  • Loading branch information
isaacgsmith committed Aug 3, 2022
1 parent d910c1e commit e58caa5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion docs/physics/montecarlo/estimators.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Volume-Based Estimators
***********************

Besides from just tracking the propagation of our packets, TARDIS also uses the Monte Carlo iteration is to determine certain useful information about the light traveling through the supernova (also called the radiation field). This information that will eventually be used to help :doc:`update the plasma state <../update_and_conv/update_and_conv>` as well as :doc:`generate different types of spectra <../spectrum/index>`. We determine this information through volume-based estimators. The concept was originally developed by :cite:`Lucy1999` and successively refined by :cite:`Lucy1999a`, :cite:`Lucy2002` and :cite:`Lucy2003`.
Besides from just tracking the propagation of our packets, TARDIS also uses the Monte Carlo iteration is to determine useful information about the light traveling through the supernova (also called the radiation field). This information will eventually be used to help :doc:`update the plasma state <../update_and_conv/update_and_conv>` as well as :doc:`generate different types of spectra <../spectrum/index>`. We determine this information through volume-based estimators. The concept was originally developed by :cite:`Lucy1999` and successively refined by :cite:`Lucy1999a`, :cite:`Lucy2002` and :cite:`Lucy2003`.


Theory
Expand Down
12 changes: 6 additions & 6 deletions docs/physics/update_and_conv/update_and_conv.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@
"and\n",
"$$W_\\mathrm{estimated} = \\frac{\\sum_i \\varepsilon_i l_i}{4\\sigma_{\\mathrm{R}} T_{\\mathrm{rad\\ estimated}}^4V\\Delta t} = \\frac{\\mathrm{real\\ j\\ estimator}}{4\\sigma_{\\mathrm{R}} T_{\\mathrm{rad\\ estimated}}^4V\\Delta t}.$$\n",
"\n",
"While TARDIS can then update the plasma state using the estimated values, there is a good chance that these estimated values would “overshoot” the true value we want to converge to (for example, if the current value of the dilution factor in some cell the dilution factor is .4, and the true steady-state value TARDIS wants to find is .45, there is a good chance that the estimated value will be greater than .45). This could make the simulation take longer to converge or, at worst, make it so the simulation does not converge at all. To account for this, users can set (in the convergence configuration) a \"damping constant\" for both the radiative temperature ($d_{T_\\mathrm{rad}}$) and the dilution factor ($d_W$). When ``advance_state`` is called, these quantities update as follows:\n",
"While TARDIS can then update the plasma state using the estimated values, there is a good chance that these estimated values would “overshoot” the true value we want to converge to (for example, if the current value of the dilution factor in some cell the dilution factor is 0.4, and the true steady-state value TARDIS wants to find is 0.45, there is a good chance that the estimated value will be greater than 0.45). This could make the simulation take longer to converge or, at worst, make it so the simulation does not converge at all. To account for this, users can set (in the convergence configuration) a \"damping constant\" for both the radiative temperature ($d_{T_\\mathrm{rad}}$) and the dilution factor ($d_W$). When ``advance_state`` is called, these quantities update as follows:\n",
"\n",
"$$T_\\mathrm{rad\\ updated} = T_\\mathrm{rad\\ current} + d_{T_\\mathrm{rad}}(T_\\mathrm{rad\\ estimated}-T_\\mathrm{rad\\ current})$$\n",
" \n",
"and\n",
" \n",
"$$ W_\\mathrm{updated} = W_\\mathrm{current} + d_W(W_\\mathrm{estimated}-W_\\mathrm{current}).$$\n",
"\n",
"This means, for example, if the damping constant is .5, the updated value is halfway between the current value and the estimated value. If the damping constant is .7, the updated value is 70% of the way between the current value and the estimated value, and so on. **If the damping constant is 1, then the updated value is exactly the estimated value, and if the damping constant is zero, the value stays the same throughout the simulation and is not updated.**\n",
"This means, for example, if the damping constant is 0.5, the updated value is halfway between the current value and the estimated value. If the damping constant is 0.7, the updated value is 70% of the way between the current value and the estimated value, and so on. **If the damping constant is 1, then the updated value is exactly the estimated value, and if the damping constant is zero, the value stays the same throughout the simulation and is not updated.**\n",
"\n",
"The updated $T_\\mathrm{rad}$ and $W$ are then used as inputs to the updated [plasma calculations](../setup/plasma/index.rst) which account for the effect of the Monte Carlo packets on the plasma state."
]
Expand Down Expand Up @@ -187,10 +187,10 @@
"\n",
"# We manually put in the damping constants and t_inner_update_exponent for\n",
"# illustrative purposes:\n",
"d_t_rad = .5\n",
"d_w = .3\n",
"d_t_inner = .7\n",
"t_inner_update_exponent = -.5\n",
"d_t_rad = 0.5\n",
"d_w = 0.3\n",
"d_t_inner = 0.7\n",
"t_inner_update_exponent = -0.5\n",
"\n",
"# We set the above values into the configuration:\n",
"tardis_config.montecarlo.convergence_strategy.t_rad.damping_constant = d_t_rad\n",
Expand Down

0 comments on commit e58caa5

Please sign in to comment.