[mesa-users] Change Mesh Resolution Dynamically?

Spencer C Wallace spencerw at email.arizona.edu
Mon Sep 8 19:52:16 EDT 2014


Hello,

I have added some code to the 'other_mixing' routine that mixes material at
the convective boundary according to a 1D entrainment law. At each time
step, I calculate some deltaM according to how much material should be
entrained and crank up the diffusion coefficient in all zones that fall
within deltaM of the convective boundary.

In the types of models I am working with, this deltaM often only covers one
or two extra zones. This introduces some noise, as the difference between
mixing one and two extra zones can be quite dramatic.

Now the most obvious solution is to increase the mesh resolution, which
does fix the problem. I understand that I can do this by changing the
inlist parameters, but that requires some trial and error, as there no way
to know how many zones the entrainment will cover at each time step until
you actually run the model.

I was wondering how I could make the mesh resolution scale with the
entrainment strength. My 'other_mixing' routine calculates a deltaM at each
time step, which is then translated into some number of zones, deltaN. If
deltaN is too small, is there some way I can temporarily bump up the mesh
resolution?

I saw that there is an 'other_mesh' hook that I can add code to, but I
didn't see any variables in 'star_data.inc' that looked like they would
allow me to tweak the mesh resolution. Any suggestions?

Spencer Wallace
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20140908/c925de50/attachment.html>


More information about the Mesa-users mailing list