[Mesa-users] rel_run_E_err zone
Ali Pourmand
pourmand at ualberta.ca
Mon Apr 17 19:04:41 UTC 2023
Thanks Morgan, this was pretty helpful!
best
Ali
On Mon, Apr 17, 2023 at 9:29 AM Morgan Taylor <taylormorgan32 at gmail.com>
wrote:
> Hi Ali,
>
> >and what is the exact definition?
>
> Opening up $MESA_DIR/star/defaults/controls.defaults and searching for the
> term shows:
>
> ! warn_when_large_rel_run_E_err
> ! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> ! message includes the text "WARNING: rel_run_E_err"
> ! rel_run_E_err = abs(cumulative_energy_error/total_energy)
> ! you can turn off this warning message by setting this to a large
> number.
> ! ::
> warn_when_large_rel_run_E_err = 0.01d0
>
> The definition for rel_run_E_error is then the absolute value of the
> cumulative energy error (error summed over all zones) over the total
> energy.
>
> You can change the max_abs_rel_run_E_err = 0.01d0 parameter in your
> control settings. A negative value will ignore it entirely.
>
> >I was wondering if there is a way to check when the terminal output shows
> the rel_run_E_err warning, to be able to actually see in which zone of the
> structure this rel_run_E_err is happening?
>
> To find where (zone) the largest "problem" is, you can utilize abs_rel_E_err
> = maxval(abs(s% rel_E_err(1:s% nz))).
> This parameter tells you the max value of the relative energy error from
> all the zones.
> To find the location of the max value, I suggest adding something along
> the following to your run_star_extras.90 file, perhaps in the
> extras_finish_step routine:
>
> if (s % run_rel_E_err > 0.009) then
> write(*,*) 'MAX LOCATION OF REL ENERGY ERR:', maxloc(abs(s%
> rel_E_err(1:s% nz))
> end if
>
> This checks if the run_rel_E_error gets 'near' the default error warning
> value of 0.01.
> If so, it will print to the terminal the message in the if statement. Just
> remember MESA starts its first zone at the surface ;)
>
> >Is this quantity being saved anywhere actually,
>
> If you want to report the rel_run_E_err (cumulative energy error) value
> to understand when in the evolution the error gets large,
> you can add it to what you want included in the history.data file.
> Simply add rel_run_E_err to your history_columns.list file.
> You can also add its pieces to the history_columns.list file for a more
> thorough analysis:
>
> !error_in_energy_conservation ! for this step
> ! = total_energy - (total_energy_start +
> total_energy_sources_and_sinks)
> !cumulative_energy_error ! = sum over all steps of
> error_in_energy_conservation
> !rel_cumulative_energy_error ! = cumulative_energy_error/total_energy
> !log_rel_cumulative_energy_error ! = log10 of
> rel_cumulative_energy_error
> !log_rel_run_E_err ! shorter name for rel_cumulative_energy_error
> !rel_error_in_energy_conservation ! =
> error_in_energy_conservation/total_energy
> !log_rel_error_in_energy_conservation
>
> Simply add the term(s) you want reported to your history_columns.list
> file.
> Those terms will then be reported in your history.data file.
> (A full list of possible parameters to show up in your history.data file
> is found in $MESA_DIR/star/defaults/history_columns.list.
> You can copy this to your working directory and uncomment any parameter
> you want included to the history.data file.)
>
> Hope this helps!
>
> Morgan
>
> On Mon, Apr 17, 2023 at 7:01 AM Ali Pourmand via Mesa-users <
> mesa-users at lists.mesastar.org> wrote:
>
>> Hello,
>>
>> I was wondering if there is a way to check when the terminal output shows
>> the rel_run_E_err warning, to be able to actually see in which zone of the
>> structure this rel_run_E_err is happening?
>>
>> Is this quantity being saved anywhere actually, and what is the exact
>> definition?
>>
>> best
>> Ali Pourmand
>> _______________________________________________
>> mesa-users at lists.mesastar.org
>> https://lists.mesastar.org/mailman/listinfo/mesa-users
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20230417/50b1f728/attachment.htm>
More information about the Mesa-users
mailing list