|
From: Chris M. <cma...@uc...> - 2015-03-02 19:14:43
|
Hi Ehsan,
Just modifying s% D_mix is the way it's supposed to work, and it has in the
past. I'm curious so I did a much simpler test:
subroutine test_other_D_mix(id, ierr)
integer, intent(in) :: id
integer, intent(out) :: ierr
type (star_info), pointer :: s
ierr = 0
call star_ptr(id, s, ierr)
if (ierr /= 0) return
s% D_mix(:) = 1e20
end subroutine test_other_D_mix
This works as expected.
We might need to see your full routine to judge whether v_diff * s% r(k) is
really a macroscopic quantity. If you're getting v_diff from MLT, then
naturally it's zero in regions for which MLT was never called.
Chris
On Sun, Mar 1, 2015 at 6:16 AM, Ehsan Moravveji <e.m...@gm...>
wrote:
> Dear MESA users,
> I am trying to plug in an ad-hoc linear diffusive mixing coefficient,
> through using other_D_mix; however, I have little progress, since I don't
> get what I expect!
> So, typical, right? :-)
>
> In brief, I use v.7385, and set use_other_D_mix to .true. in my inlist.
> Also, I set
> s% other_D_mix => Change_D_mix
> in extras_controls(). In the latter procedure, I have the following simple
> do loop:
>
> do k = 1, nz
> ok_to_mix = .false. ! reset to default at each mesh
> ok_to_mix = ((s% mixing_type(k) > softened_convective_mixing)
> .or. &
> (s% mixing_type(k) == 0))
> if (.not. ok_to_mix) cycle
>
> s% D_mix(k) = D_0 + v_diff * s% r(k)
> s% D_mix_non_rotation(k) = s% D_mix(k)
> print*, k, s% D_mix(k)
> enddo
>
> With the print statement, I just make sure that this procedure works, and
> some mesh points, k, that are not convective, overshooting and softening
> are correctly selected to tweak s% D_mix(k). The printed value of D_mix
> that I want to set is also OK. However, when I plot the profile of
> log_D_mix and log_D_mix_non_rotation, I cannot see the envisaged increasing
> linear trend in radiative parts of the model. A plot is attached.
>
> Digging and "grep"ing in star/private/mix_info.f90 also did not take me
> any further.
> So, my question is: Which of the star_info variables are allowed to be
> changed through other_D_mix procedure?
> How can I see what I expect? ;-)
>
> Kind regards
> Ehsan
>
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website,
> sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for
> all
> things parallel software development, from weekly thought leadership blogs
> to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> mesa-users mailing list
> mes...@li...
> https://lists.sourceforge.net/lists/listinfo/mesa-users
>
>
|