[aspect-devel] mesh refinement strategy question

Magali Billen mibillen at ucdavis.edu
Thu Jun 7 23:51:40 PDT 2018


Thank you Renee and Felipe 
Both the time-dependent approach or restarting are good options for me. I had read that it
could be time-dependent, but it had not registered. Also, I might first run this initial model as purely conductive for a few million years to smooth the temperature discontinuity at the top of the slab before running the full dynamic simulation.  

Also, thanks for clarifying that the refinement scheme does re-evaluate the initial temperature field at
each initial refinement. I was wondering about that when I tried that, but I had not fully thought about
how to control the amount of refinement with the refinement parameters. I’m guessing that whatever parameters I would need to get this to work for the first time-step would end up being in appropriate for
the rest of the run, but its useful to think about, as it could also be used with the restart option, as this
initial temperature field would only need to be created once and then could be re-used for various models
exploring other things (like the rheology). 

And don’t worry, I’m not planning on using  Time steps between mesh refinement = 1, I’m just slowly 
building the model input and testing these before moving to a time-dependent simulation.

-Magali


> On Jun 8, 2018, at 12:38 AM, Rene Gassmoeller <rene.gassmoeller at mailbox.org> wrote:
> 
> Hi Magali,
> there are several ways to achieve this, with slightly different effects, so you will probably want to try a number of them so see what works best for you. The simplest guess is probably to make the minimum refinement criterion time-dependent. E.g. you can replace the following line for the minimum refinement function:
> 
>     set Function expression = if( (YMAX-y<=LITH)||((YMAX-y<=SM)&&(x<=XTR+3*RC)&&(x>=XTR-0.5*RC)),9,0)
> 
> by this:
> 
>     set Function expression = if (t<1e5, if( (YMAX-y<=LITH)||((YMAX-y<=SM)&&(x<=XTR+3*RC)&&(x>=XTR-0.5*RC)),9,0), 0)
> 
> which would disable the minimum refinement function after 100kyr (or any other time you want). I do not quite remember if you have to put 't' into the list of variable names of the function for this to work, or not (try that if it does not work out of the box). 
> 
> A second approach could be to run a model with an end time of 0 and write a checkpoint once it has finished (see Section 4.5 in the manual, and the parameter 'Termination criteria/Checkpoint on termination'). You can then restart from this checkpoint and remove the mimum refinement function for the restarted model (this also works at any point later in time).
> 
> Lastly, the brute force approach of starting at the finest resolution and only coarsen should also work. I do this occasionally for testing purposes, but for production models it is often too expensive.
> 
> Let us know if one of those approaches works for your purpose.
> 
> A final remark, you mentioned "...  It does not work to just use Strategy = temperature, because this just refines on the temperature field defined on the coarsest mesh (see picture).  ...". I do not think this is what we do, we reapply the initial conditions before every initial refinement on the new mesh and then make the next initial refinement (this happens in lines 1593-1625 in core.cc if you use ASPECT 2.0, might be slightly different for other versions). 
> What could be a problem though is that ASPECT's algorithm looks to refine a certain "percentage" of the error in a particular field. It looks like your initial condition has a discontinuous jump in temperature right at the slab edge. Thus, the algorithm might select some cells right at the edge, and then decide since the refined error is so much bigger than everything else, that is has already refined the error "enough", and just coarsen the rest of the cells. This is of course not what we would want in this case, but without changes to the underlying algorithm or the initial condition this could be 'technically correct'.
> 
> Hope that helps a bit,
> Rene
> 
> 
> On 06/07/2018 08:48 AM, Magali Billen wrote:
>> Hello,
>> 
>> I am starting a project for subduction modeling in Aspect and I have a 	question about how certain mesh refinement strategies work together. Specifically, I need to define a “proto-slab” based on temperature,
>>  which is needed to start the subduction process. However, once the slab starts sinking its location in the model domain depends on the dynamics and it can move 1000s of kilometers from its starting location.  
>> 
>> So, I have first set this up using the  Strategy = minimum refinement function (see below for the 
>> full subsection definition). And, I can get a nice looking initial slab (see below).  However, after the initialization,
>> I would like the mesh refinement to depend on things like the temperature, (and later composition, and strain-rate).  It does not work to just use Strategy = temperature, because this just refines on the temperature field defined on the coarsest mesh (see picture).  
>> 
>> So, what is not clear to me is whether there is a way to use one Strategy during the initial adaptive refinement
>> and a different (set) of criteria after that point, or to combine them such that the minimum refinement function 
>> is no longer have much impact after the first step.
>> 
>> Has anyone else had a problem like this?  Any ideas?  
>> Instead of thinking about refining, should I start with a really fine mesh everywhere and then use the 
>> Strategy = temperature to coarsen the mesh where refinement isn’t needed. It doesn’t seem like it set up
>> to work that way?
>> 
>> - Magali
>> Here’s the prm file for the nice looking slab using the function to refine based on location:
>> 
>> 
>> 
>> Here’s just the mesh  refinement section:
>> 
>> subsection Mesh refinement
>>   set Initial global refinement                = 4
>>   set Minimum refinement level                 = 4
>>   set Initial adaptive refinement              = 5
>>   set Time steps between mesh refinement       = 1
>>   set Strategy = minimum refinement function
>>   subsection Minimum refinement function
>>     set Coordinate system   = cartesian
>>     set Variable names      = x,y
>>     set Function constants = YMAX=1e6,LITH=1.5e5,SM=2.5e5,XTR=2.2e6,RC=4e5
>>     set Function expression = if( (YMAX-y<=LITH)||((YMAX-y<=SM)&&(x<=XTR+3*RC)&&(x>=XTR-0.5*RC)),9,0)
>>   end
>> end
>> 
>> And, here are some screen-shots
>> 
>> Full domain
>> 
>> 
>> 
>> 
>> 
>> 
>> Zoom-in on slab 
>> 
>> 
>> 
>> 
>> This is what happens if I just use Strategy = temperature 
>> 
>> 
>> 
>> And if I combine them  (this is just the 0th time-step), I need to set up some other things before
>> I can run forward in time.
>> 
>> 
>> 
>> ____________________________________________________________
>> Professor of Geophysics 
>> Earth & Planetary Sciences Dept., UC Davis
>> Davis, CA 95616
>> 2129 Earth & Physical Sciences Bldg.
>> Office Phone: (530) 752-4169
>> http://magalibillen.faculty.ucdavis.edu <http://magalibillen.faculty.ucdavis.edu/>
>> 
>> Currently on Sabbatical at Munich University (LMU)
>> Department of Geophysics (PST + 9 hr)
>> 
>> Avoid implicit bias - check before you submit: 
>> http://www.tomforth.co.uk/genderbias/ <http://www.tomforth.co.uk/genderbias/>
>> ___________________________________________________________
>> 
>> 
>> 
>> _______________________________________________
>> Aspect-devel mailing list
>> Aspect-devel at geodynamics.org <mailto:Aspect-devel at geodynamics.org>
>> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/aspect-devel <http://lists.geodynamics.org/cgi-bin/mailman/listinfo/aspect-devel>
> -- 
> Rene Gassmoeller
> https://gassmoeller.github.io/ <https://gassmoeller.github.io/>_______________________________________________
> Aspect-devel mailing list
> Aspect-devel at geodynamics.org
> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/aspect-devel

____________________________________________________________
Professor of Geophysics 
Earth & Planetary Sciences Dept., UC Davis
Davis, CA 95616
2129 Earth & Physical Sciences Bldg.
Office Phone: (530) 752-4169
http://magalibillen.faculty.ucdavis.edu

Currently on Sabbatical at Munich University (LMU)
Department of Geophysics (PST + 9 hr)

Avoid implicit bias - check before you submit: 
http://www.tomforth.co.uk/genderbias/
___________________________________________________________

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geodynamics.org/pipermail/aspect-devel/attachments/20180608/c7d1feec/attachment-0001.html>


More information about the Aspect-devel mailing list