[mesa-users] Change Mesh Resolution Dynamically?

Spencer C Wallace spencerw at email.arizona.edu
Sun Dec 14 19:47:41 EST 2014


Couple of questions about 'other_mesh_fcn_data':

1. Do changes I make to the 'vals1' array trigger changes to the mesh
during the current time step, or do I have to wait until the next time step
to see the effects?

2. How exactly does the 'vals1' array affect the mesh? If I want to
increase resolution between zones k and k+n in a model, do I set
vals1(k:k+n) to some constant nonzero value, or is the change in 'vals1'
between adjacent zones that actually triggers mesh refinement?

Spencer Wallace

On Tue, Sep 9, 2014 at 1:10 PM, Bill Paxton <paxton at kitp.ucsb.edu> wrote:
>
>
> On Sep 9, 2014, at 12:49 PM, Spencer C Wallace wrote:
>
> Thanks! I didn't realize I modify the inlist controls through the star
> pointer.
>
>
> it is always an option to change inlist parameters from your
> run_star_extras routines.
> all of the &controls parameters are defined in the star_info structure, so
> s% xtra_coef_b_l_nb_czb = 0.5 has the same effect as setting it in the
> inlist.
> the &star_job controls are also accessible, but keep in mind that they are
> defined inside a substructure of star_info called "job".
> so from your code you'd write something like s% job% pgstar_flag = .true.
>
> Is it safe to change the mesh tolerance parameters from 'other_mixing', or
> do you suggest writing a routine through 'other_mesh' to do it?
>
>
> The parameters will be used during the remesh, and that happens at the
> start of the step.
> 'other_mixing' is called after the remesh, so that's not what you want (at
> least not if you want the change to happen for the current step).
> by 'other_mesh' I assume you mean 'how_many_other_mesh_fcns' and
> 'other_mesh_fcn_data' -- they are called when 'use_other_mesh_functions' is
> true.   you could set the mesh parameters from either of those.
>
> The easiest thing would be to set them in extras_finish_step so you don't
> need to use a hook -- they'll take effect with the next step.
>
>
> Good luck,
> Bill
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20141214/e12c9ad6/attachment.html>


More information about the Mesa-users mailing list