[Mesa-users] calculation clarification
Evan Bauer
evan.bauer.astro at gmail.com
Thu Sep 14 17:39:42 UTC 2023
Ah, thanks for pointing that out! That comment in profile_columns.list is erroneous. Will fix for future MESA versions.
Cheers,
Evan
> On Sep 14, 2023, at 6:36 PM, Biswas, Anwesha [PHYSA] <anwesha at iastate.edu> wrote:
>
> Hi Evan,
>
> Thank you so much. I get it now. I was looking at the profiles_column.list there it mentions log_tau was at center of the zone, so I got confused.
>
> Also just a quick question, if I want to specify how much mass can a cell have before it splits or merges then i need to change mass fraction limit in control section from 1d-14 to something lower.
>
> Get Outlook for iOS <https://aka.ms/o0ukef>
> From: Evan Bauer <evan.bauer.astro at gmail.com>
> Sent: Thursday, September 14, 2023 12:30:52 PM
> To: Biswas, Anwesha [PHYSA] <anwesha at iastate.edu>
> Cc: mesa-users <mesa-users at lists.mesastar.org>
> Subject: Re: [Mesa-users] calculation clarification
>
> Hi Anwesha,
>
> You can find where the profile column outputs are calculated in $MESA_DIR/star/private/profile_getval.f90. Here's a link to the relevant code for log_P_face: https://github.com/MESAHub/mesa/blob/e785ea5d61aae0fd96c8051f2bb761327a4874cd/star/private/profile_getval.f90#L1165 <https://github.com/MESAHub/mesa/blob/e785ea5d61aae0fd96c8051f2bb761327a4874cd/star/private/profile_getval.f90#L1165>
> if (s% u_flag) val = safe_log10(s% P_face_ad(k)%val)
>
> So there you can see that quantity is only calculated for the case when hydrodynamics is on (u_flag = .true.).
>
> The answer to your other question about logtau can be found in $MESA_DIR/star_data/public/star_data_step_work.inc, where lots of members of the star_info structure are defined with some comments:
> real(dp), pointer :: tau(:) ! optical depth at cell outer boundary
>
> So this says that tau is a quantity that is always given for cell faces.
>
> Cheers,
> Evan
>
>
>> On Sep 14, 2023, at 3:06 AM, Biswas, Anwesha [PHYSA] via Mesa-users <mesa-users at lists.mesastar.org <mailto:mesa-users at lists.mesastar.org>> wrote:
>>
>> Another quick question, if log(tau) is given for center of a cell in the output file (from profile_columns.list), then how is using that tau value, when the temperature is calculated, it gives the face temperature of the cell instead of the temperature at center of the cell (the question I asked in 1st email of this thread regarding the difference)?
>>
>> I am using varying opacity with the Eddington model for the boundary condition Temperature and Pressure.
>> my surface of the model is set at tau=25
>> so anything above that will be atmosphere?
>>
>>
>> Anwesha
>>
>>
>> ________________________________________
>> From: Biswas, Anwesha [PHYSA] <anwesha at iastate.edu <mailto:anwesha at iastate.edu>>
>> Sent: Wednesday, September 13, 2023 20:42
>> To: mesa-users at lists.mesastar.org <mailto:mesa-users at lists.mesastar.org>
>> Subject: Re: calculation clarification
>>
>> Okay So using profile.T_face instead of profile.T solves the issue(I could match the calculation with the output shown) (outer location vs. midpoint in the cell). However now, A new question is why the profile.log_P_face = 0 for all the cells in a single profile? (it means that pressure at the surface of each cell is 1) while the pressure at the midpoints of the same cells (profile.pressure) outputs are different?
>>
>> Anwesha
>>
>>
>> ________________________________________
>> From: Biswas, Anwesha [PHYSA] <anwesha at iastate.edu <mailto:anwesha at iastate.edu>>
>> Sent: Wednesday, September 13, 2023 19:57
>> To: mesa-users at lists.mesastar.org <mailto:mesa-users at lists.mesastar.org>
>> Subject: calculation clarification
>>
>> Hi,
>>
>> I need a little help with clarification of some calculations
>>
>> Using Eddington Grey atmosphere, varying opacity controls, when I am reading the profile of interest using mesa reader in python (loading it as profile say)
>>
>> so,
>> profile.Teff --> gives me the effective temperature of that profile which is Teff = 10813.33 [K]
>>
>> tau_factor = 37.5 --> tau_surface = (2/3)*37.5 = 25
>> sets my outermost grid of the stellar model to an optical depth of tau_surface = 25 (I can match this calculation from output profile.logtau[0]~1.4)
>>
>> so, the temperature of the surface of this model is calculated by the relation --> T^4 = (3/4)(Teff^4) (tau_surface +2/3) = (3/4)(10813.33^4)(25+2/3)
>> giving me T_surface = 22649.94 [K] which means Temperature at tau=25 is 22649.94 [K]
>>
>> when I read the temperature from profile file at grid 0 (since it is surface to center)
>> profile.temperature[0] = 33247.17 [K]
>> which means temperature at tau=25 is showing as 33247.17[K]
>>
>> can someone explain to me why is the difference?
>>
>>
>> Anwesha
>> _______________________________________________
>> mesa-users at lists.mesastar.org <mailto: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/20230914/6dbd5aeb/attachment.htm>
More information about the Mesa-users
mailing list