[mesa-users] Gradually turning off diffusion?

Earl Bellinger bellinger at mps.mpg.de
Thu Jan 12 21:47:35 EST 2017


Hi Aaron,

Thanks for the tip - easy to implement and seems to work like a charm!

In case anyone else wants the routine, I added the following to
extras_finish_step:

  if (s% x_ctrl(1) > -1d99 .and. s% do_element_diffusion) then
    if (s% diffusion_class_factor(1) > 0) then
      s% diffusion_class_factor(:) = s% diffusion_class_factor(:) - s% x_ctrl(1)
    else
      s% do_element_diffusion = .false.
    end if
  end if

Then in an inlist where diffusion is to be waned off:

  x_ctrl(1) = 0.1

Evan, I haven't tried diffusion_v_max yet, but thanks for the heads
up. I don't really know what caused it, but things seem to be ok now.

Best regards,
Earl Bellinger

---
www.earlbellinger.com
Department of Astronomy, Yale University
Stellar Ages & Galactic Evolution Group, Max Planck Institute


On Thu, Jan 12, 2017 at 4:34 PM, Evan Bauer <ebauer at physics.ucsb.edu> wrote:
> Hi Earl,
>
> Aaron’s suggestion is definitely the right one from an engineering
> standpoint, but I’m also surprised to hear that diffusion would cause a big
> jump on the HR just by turning it off. Do you have a sense of what’s causing
> that in your model?
>
> I can think of one control that might help prevent diffusion from having too
> large of an impact on the photosphere:
>
>          !### diffusion_v_max
>
>          ! Max velocity (cm/sec).
>          ! We can get extremely large velocities in the extreme outer
> envelope
>          ! that cause problems numerically without really effecting the
> results,
>          ! so we allow a max for the velocities that should help the
> numerics
>          ! without changing the results.
>          ! Note: change `diffusion_v_max` to at least 1d-2 when using
> radiative levitation.
>
>       diffusion_v_max = 1d-5
>
> Have you tried using that at all?
>
> Cheers,
> Evan
>
> On Jan 12, 2017, at 11:50 AM, Aaron Dotter <aaron.dotter at gmail.com> wrote:
>
> Hi Earl,
>
> How about using run_star_extras?  If you're willing to add some code to
> extras_finish_step, you can change this array:
>
>          !### diffusion_class_factor(:)
>
>          ! Arbitrarily enhance or inhibit diffusion effects by class.
>
>       diffusion_class_factor(:) = 1d0
>
> Change it gradually from 1 to 0 over a number of timesteps and then, when it
> gets to zero, you can set do_element_diffusion = .false.
>
>
> Aaron
>
>
> On Thu, Jan 12, 2017 at 2:28 PM, Earl Bellinger <bellinger at mps.mpg.de>
> wrote:
>>
>> Hello mesa-users,
>>
>> I want element diffusion on the main sequence but not past that point.
>> However, switching between an inlist with diffusion and one without
>> causes a big jump in the HR diagram. Does anyone have any advice as to
>> how one should go about turning it off more gradually?
>>
>> Best regards,
>> Earl Bellinger
>>
>> ---
>> www.earlbellinger.com
>> Department of Astronomy, Yale University
>> Stellar Ages & Galactic Evolution Group, Max Planck Institute
>>
>>
>> ------------------------------------------------------------------------------
>> Developer Access Program for Intel Xeon Phi Processors
>> Access to Intel Xeon Phi processor-based developer platforms.
>> With one year of Intel Parallel Studio XE.
>> Training and support from Colfax.
>> Order your platform today. http://sdm.link/xeonphi
>> _______________________________________________
>> mesa-users mailing list
>> mesa-users at lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/mesa-users
>
>
> ------------------------------------------------------------------------------
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today.
> http://sdm.link/xeonphi_______________________________________________
> mesa-users mailing list
> mesa-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mesa-users
>
>




More information about the Mesa-users mailing list