Strange gradient behavior #28660
Unanswered
benjamin-reilly
asked this question in
Q&A Modules: Phase field
Replies: 1 comment 4 replies
-
Hello I dont see any auxvariable or auxkernel. How are you obtaining the norm of the gradient? With paraview postprocessing? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
New user here, so I apologize in advance if this issue is a simple user error.
I am experiencing what I think is weird behavior when I have MOOSE compute the gradient of a variable. In short, I am interested in multi-phase-field modeling of non-conserved order parameters, using in particular the model outlined here so as to maintain the ability to specify different mobilities for different interfaces. This model depends on using indicator functions encoding the local number of phases with non-zero gradients, and effectively rescales the mobility in accordance with this local information. Moreover, in pure-phase regions the mobility can effectively be viewed as being set to 0 (of course, you could view this as being the case in most non-conserved phase-field models, but it is especially important in this model when generalizing to > 2 phases, and I am pointing it out here so that my example input file included below makes a bit more sense).
So, I am trying to use the norms of the gradients of my variables in order to indicate where these non-zero gradients exist (defining the indicator function simply as
if(norm>0,1,0)
). However, my gradient norms do not appear to be accurately representing the actual gradient norms of my variables. To simplify the explanation, I am including screenshots below with brief descriptions:First, the initial state of one of my phase fields:
The corresponding L2 norm of the gradient of this phase field:
Some time later, the phase field has not changed too much (although it is slightly squeezed, since it is hitting a region of the domain in which the mobility is 0-- even though the mobility should be updated to a non-zero value when the gradient becomes non-zero as the interface approaches this region):
The corresponding gradient norm at this same time, which has decreased relative to the previous time (even though, if anything, it should have increased due to the interface being slightly more confined):
Aside from it being concerning that the norms calculated by MOOSE do not appear to accurately be the gradient norms of the variables, this is especially problematic for my model because I would like to update the mobility to be non-zero as the interface advances into new regions, which is not occurring at all. Instead, the only non-zero mobilities throughout the simulation are located at the initial location of the interface, i.e. the "update" via investigating the new gradient norms is never actually occurring (and I am guessing that this is most likely related to the gradient norms misbehaving).
I am in particular using the VariableGradientMaterial material in order to compute the gradient norms, but I have experimented with other methods as well (e.g. using the VariableGradientComponent AuxKernel and then manually constructing the gradient norms in ParsedMaterial materials), to no avail. So, I think there is something I probably just don't understand regarding how MOOSE is computing the gradients of variables.
Below I am including an input file that I have created as a minimal reproducible example of this behavior. Note that I am ultimately concerned with simulating multi-phase-field models, and so even though the below input file is effectively only a single-order-parameter model, I am still using e.g. ACMultiInterface in order to incorporate the gradient energy term (so as to make this example consistent with the more complicated systems I am actually interested in).
Beta Was this translation helpful? Give feedback.
All reactions