[aspect-devel] problem with latent heat model

Juliane Dannberg judannberg at gmail.com
Mon Jun 25 14:25:44 PDT 2018


Hi Felipe,

in general, if you want to debug your model setup, I would recommend to 
start from a simple setup that works (which in your case could be the 
setup without the compositional field, but with the phase transition) 
and then to make it more complex step by step.

So you could start by adding one compositional field, but in a passive 
way so that it does not change any material properties.

Once this works, you can change the material properties of this one 
field to the properties you want to use one by one.

Then you can repeat this step with all the other fields you want to have.

This way, you do everything step by step, starting from a file that 
works, and as soon as you start to see any convergence problems, you 
will know exactly what caused this.

Also, as long as you are still debugging the setup, it is helpful to run 
ASPECT in Debug mode and with Floating point exceptions enabled, so that 
when you get error messages, they will show you much more precisely 
where in the code the problem is (for example, if the density is 
negative anywhere in your model, you will get an error message telling 
you that instead of just getting a message that the advection solver did 
not converge).

I hope that helps!
Juliane


On 06/19/2018 12:43 PM, FELIPE ORELLANA ROVIROSA wrote:
>
>  Hello Juliane,
>
>    I hope you are doing great.
>
>    I have been trying to setup ASPECT with a latent heat material 
> model, and compositional fields.
>
>   As I wrote you previously, if I don't put the compositional field, 
> it works no problem.
>
>   I am trying to add some compositional fields, which are layers. For 
> testing, just trying one layer, defined by depth.
>
>   I have a phase transition defined by pressure, which by itself 
> works. So, this transition divides the model domain into two 
> subdomains: above and below.
>
>   I have tried two strategies to implement the compositional field:
>
>   a) The simple one: I just define a layer with a density contrast, 
> somehow not taking care of any relationship with the two subdomains. 
> When I run it, it syntactically works, but it crashes on time step 0, 
> by non-convergence of the advection solver.
>
>  b) The complex one: I define the same layer with density contrast, 
> but this time, its interface is defined using another phase transition 
> (a ghost phase transition), with 0 density contrast, 0 latent heat. I 
> do this cause in other material models, a compositional field layer 
> must be bounded by a depth where some properties may change (e.g. 
> viscosity prefactors). When I run it, it syntactically works, but 
> similarly, it crashes on time step 0, by non-convergence of the 
> advection solver.
>
> What modifications should I make?
> the thing is, that both strategies as syntactically correct, but not 
> possible of being handled by the advection solver..
>
> cheers,
>
> Felipe
>
>
>
>
>
> On Sat, Jun 16, 2018 at 8:15 PM, FELIPE ORELLANA ROVIROSA 
> <f_orellana at berkeley.edu <mailto:f_orellana at berkeley.edu>> wrote:
>
>
>      Hallo Juliane,
>
>           Thanks for replying.
>
>           I have been trying turning off compositional fields, and
>     nullifying some stuff. I set the CS to zero, and it worked; then I
>     turned on (CS = -2.6 MPa/K), and it worked too !
>
>          What is causing trouble here is the compositional field I
>     have in a certain region of the domain.
>
>          If I just superimpose the compositional field (defined by z
>     coordinate), it crashes with the non-convergence of the advection
>     solver.
>         If I disguise the compositional field via an interface with a
>     phase change (with density jump=0 and CS = 0, or infinite), it
>     crashes with the same error "The iterative advection solver " "did
>     not converge.''
>        I am a little lost on what's wrong here, but, following the
>     debugs and trials I have performed, it is certainly a problem in
>     my compositional field definition, which is playing over this
>     latent heat model implementation (I had successfully implemented
>     compositional fields but with other material models).
>
>     do you have advices on how the compositional field (depth-pressure
>     dependent layer) should be defined, in this latent heat model?
>
>     thank you,
>     cheers,
>     Felipe
>
>
>     On Sat, Jun 16, 2018 at 3:28 PM, Juliane Dannberg
>     <judannberg at gmail.com <mailto:judannberg at gmail.com>> wrote:
>
>         Hi Felipe,
>
>         the error message you sent just tells us that the advection
>         solver does not converge. That can have many different reasons.
>
>         To test if this is really a problem with the latent heat
>         release, you can set the Clapeyron slopes of your phase
>         transitions to zero, which means that no latent heat will be
>         released any more. If you have assigned a density jump to
>         these transitions, and your model runs after this change, you
>         will also see where in your model the transitions are.
>
>         To answer your other question, you assign a phase transition
>         temperature and pressure/depth, and this is the temperature
>         where the phase transition occurs for this pressure. You also
>         provide a Clapeyron slope that describes how this temperature
>         changes with pressure. So if material crosses a phase
>         transition and is fast enough, it should follow this Clapeyron
>         slope (until all material has undergone the phase transition),
>         and after that follow the adiabat again. So the phase
>         transition temperature you provide is both the temperature
>         above and below the phase transition, if you take into account
>         how it changes with pressure.
>
>         And yes, to be consistent, your initial condition should
>         include the temperature change across phase transitions. But
>         if you only care about the long time evolution of the model,
>         the temperature profile will evolve to a state that includes
>         these temperature changes anyway, so it is not strictly
>         necessary.
>
>         --Juliane
>
>
>         On 06/14/2018 10:38 PM, FELIPE ORELLANA ROVIROSA wrote:
>>
>>         Hi all,
>>
>>            I am trying to implement a model of a 3D convecting system
>>         with phase changes interfaces. I am using the latent heat
>>         material model. For testing, I am implementing only one
>>         transition (at 660 km).
>>
>>            My model runs, so I assume the syntax is correct. But, my
>>         model fails on timestep 0. I pasted the error message at the end.
>>
>>            I have some questions regarding the implementation of this
>>         material model:
>>
>>            When setting the Phase transition temperatures, what
>>         temperature should be provided? the T above or below the
>>         phase transition interface, or before or after the transition
>>         occurs? I tried both cases but the model fails similarly.
>>
>>            Because the phase transitions exo/endo-termic, they will
>>         release/absorve latent heat, and alter the temperature field
>>         during convection (I have turned on and off the heating
>>         model). So, does the Temperature Initial Condition needs to
>>         match the expected jump in temperature due to the phase
>>         change across the interface where it is occurring? I have
>>         tried doing and not doing this but the model fails anyways.
>>
>>           what is going on?
>>
>>         cheers,
>>
>>         Felipe
>>         ----------------------------------------------------
>>         Exception on processing:
>>
>>         --------------------------------------------------------
>>         An error occurred in line <479> of file
>>         </root/SEISMO/usr-local-src/aspect/aspect-1.5.0/source/simulator/solver.cc>
>>         in function
>>             double aspect::Simulator<dim>::solve_advection(const
>>         aspect::Simulator<dim>::AdvectionField&) [with int dim = 3]
>>         The violated condition was:
>>             false
>>         The name and call sequence of the exception was:
>>             ExcMessage (std::string("The iterative advection solver "
>>         "did not converge. It reported the following error:\n\n") +
>>         exc.what())
>>         Additional Information:
>>         The iterative advection solver did not converge. It reported
>>         the following error:
>>
>>
>>         --------------------------------------------------------
>>         An error occurred in line <1042> of file
>>         </share/apps/deal.II/include/deal.II/lac/solver_gmres.h> in
>>         function
>>             void dealii::SolverGMRES<VectorType>::solve(const
>>         MatrixType&, VectorType&, const VectorType&, const
>>         PreconditionerType&) [with MatrixType =
>>         dealii::TrilinosWrappers::SparseMatrix, PreconditionerType =
>>         dealii::TrilinosWrappers::PreconditionILU, VectorType =
>>         dealii::TrilinosWrappers::MPI::Vector]
>>         The violated condition was:
>>             iteration_state == SolverControl::success
>>         The name and call sequence of the exception was:
>>             SolverControl::NoConvergence (accumulated_iterations,
>>         last_res)
>>         Additional Information:
>>         Iterative method reported convergence failure in step 0. The
>>         residual in the last step was nan.
>>
>>         This error message can indicate that you have simply not
>>         allowed a sufficiently large number of iterations for your
>>         iterative solver to converge. This often happens when you
>>         increase the size of your problem. In such cases, the last
>>         residual will likely still be very small, and you can make
>>         the error go away by increasing the allowed number of
>>         iterations when setting up the SolverControl object that
>>         determines the maximal number of iterations you allow.
>>         The other situation where this error may occur is when your
>>         matrix is not invertible (e.g., your matrix has a
>>         null-space), or if you try to apply the wrong solver to a
>>         matrix (e.g., using CG for a matrix that is not symmetric or
>>         not positive definite). In these cases, the residual in the
>>         last iteration is likely going to be large.
>>         --------------------------------------------------------
>>
>>         --------------------------------------------------------
>>
>>         Aborting!
>>         ----------------------------------------------------
>>         --------------------------------------------------------------------------
>>         mpiexec noticed that the job aborted, but has no info as to
>>         the process
>>         that caused that situation.
>>         ---------------------------------------------
>>
>>
>>         _______________________________________________
>>         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>
>
>         ----------------------------------------------------------------------
>         Juliane Dannberg
>         Project Scientist, UC Davis
>         jdannberg.github.io <https://jdannberg.github.io/>
>
>
>
>

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


More information about the Aspect-devel mailing list