Declaring a Material Property as a Tensor

144 views
Skip to first unread message

patrick....@gmail.com

unread,
Sep 11, 2017, 2:37:19 PM9/11/17
to moose-users
Hello all,

Within the Combined module, I'm using the ACBulk kernel. One of the inputs for this kernel is a mobility parameter. Previously, I declared a constant scalar value for mobility in the Materials block using GenericConstantMaterial. That worked fine. 

Now, I'm trying to use GenericConstantRankTwoTensor in the materials block to declare this mobility parameter in a constant tensor form. The name that I assign the tensor matches the name I give in the ACBulk kernel, but I get the error, "Material has no property named: LTensor".

Am I using GenericConstantRankTwoTensor properly?

What should I do for ACBulk to recognize a tensor input for the mobility parameter? 

In case it's relevant, ACBulk.h says, "It is templated on the type of the mobility, which can be either a number (Real) or a tensor (RealValueTensor)." I've attached the input file.



Many thanks,
Patrick
300CNucOneBlockkLargeAnisoL.i

Daniel Schwen

unread,
Sep 11, 2017, 2:42:04 PM9/11/17
to moose-users

Look at AllenCahn and AllenCahnAniso
Both are derived from ACBulk (which cannot be used directly in a simulation)


--
You received this message because you are subscribed to the Google Groups "moose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to moose-users...@googlegroups.com.
Visit this group at https://groups.google.com/group/moose-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/moose-users/a65384e6-b0cd-404c-918d-0e74b5d608be%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

patrick....@gmail.com

unread,
Sep 11, 2017, 2:55:05 PM9/11/17
to moose-users
Hey Daniel,

Thanks for the help. 

Sorry, I was actually using the AllenCahn kernel the whole time. I just had it labeled "ACBulk". So it was actually the AllenCahn kernel that was giving me the error.

I can't find "AllenCahnAniso" when I look here. There is a "CahnHilliardAniso".

Given that I'm using the "right" kernel, is there anything else that could be causing a problem?


Thanks again,
Patrick

Daniel Schwen

unread,
Sep 11, 2017, 3:13:29 PM9/11/17
to moose-users
Oh, looks like we haven't actually added the anisotropic version of that Kernel. AllenCahn, is only the "right" kernel for scalar mobilities. We need a new kernel for tensorial mobilities.

patrick....@gmail.com

unread,
Sep 11, 2017, 3:17:43 PM9/11/17
to moose-users
Alright, I understand. And there's no way to use tensorial mobilities with the AllenCahn kernel in the meantime?

Daniel Schwen

unread,
Sep 11, 2017, 3:18:56 PM9/11/17
to moose-users
No, but adding said kernel should be quit easy.

patrick....@gmail.com

unread,
Sep 11, 2017, 3:21:30 PM9/11/17
to moose-users
OK, thanks for the help and I'll keep my eyes open for it.

patrick....@gmail.com

unread,
Sep 11, 2017, 4:52:28 PM9/11/17
to moose-users
Hey Daniel,

For the record, I tried adding an AllenCahnAniso kernel based on CahnHiliardAniso, and also modifying the types of parameters recognized by the AllenCahn kernel itself with no luck.

Is there a formal and/or proper way to submit a kernel development request to the community?


Thanks again,
Patrick 

Jaber

unread,
Dec 15, 2017, 10:04:04 AM12/15/17
to moose-users
Is there any progress on this? I am also very much interested to have anisotropic mobility (and also anisotropic interface energy) in Allen-Cahn. I'm new to MOOSE and fooling around with the source code did not help me..

Best,
Jaber

Daniel Schwen

unread,
Dec 15, 2017, 10:14:51 AM12/15/17
to moose...@googlegroups.com
Oh, right, I forgot about this. Will work on it.

Daniel Schwen

unread,
Dec 15, 2017, 12:49:34 PM12/15/17
to moose...@googlegroups.com
So... looking at this a bit more closely it turns out that anisotropy in the Allen-Cahn Equation is quite a different beast than in the Cahn-Hilliard equation. 

In CH you are multiplying the mobility by a vector (the chemical potential gradient). Whether the mobility is a scalar or a matrix, the product is always a vector again (the divergence of which is taken to get the scalar needed to determine the scalar dc/dt), so the equation does not change in form. Anisotropy is intrinsic to CH. 

In the AC equation the mobility is multiplied by a _scalar_, and only a scalar mobility yields the required scalar result. 

If you think about this a bit in terms of the underlying physics this makes total sense. The CH transport is intrinsically directional as it always requires the gradient of a chemical potential field. The AC phase change (which is not even a transport) is NOT intrinsically directional. While you _can_ have moving transformation fronts (interfaces and grain boundaries), you could also have an instantaneous phase switching in your domain (and that is not associated with any direction!).

The short answer here is that _if_ you have directional anisotropy in the AC evolution you need to add it explicitly. Meaning the mobility will still be a scalar, but a scalar that can depend on a given direction. That direction could be a function of the interface normal (order parameter gradients, etc). So, just write a mobility material that calculates your scalar mobility as function of those inputs.

There is a catch though. Look carefully at the weak form derivation of the AC kernel (http://mooseframework.org/wiki/PhysicsModules/PhaseField/DevelopingModels/) you'll notice the tnterface residual contains a gradient of your scalar mobility. This gradient is computed under the assumption that L only depends on the values of non-linear variables. If there is an additional dependence on the _gradients_ of non-linear variables, you may need to add extra terms (in form of an additional, custom kernel).

Basically we have done that for one specific model (the ACKobayashi snow.i stuff - and the InterfaceOrientationMaterial).
Cheers,
Daniel

Jaber

unread,
Dec 15, 2017, 5:29:09 PM12/15/17
to moose-users
Hi Daniel,

thanks a lot for the explanation! I was about to write a correction to my post but you were faster! You are completely right! In fact a second order tensor only makes sense for mobility in Cahn-Hilliard (M), and the gradient coefficients in Cahn-Hilliard and Allen-Cahn (\kappa) since they are operating on vectors. Mobility in Allen-Cahn (L) is operating on a scalar, and at best it could be a scalar function of an arbitrary order tensor (in the directional dependency case, we could think of a scalar function of a 1st order tensor, vector). 

I was actually looking for anisotropy in the interface energy (\kappa) in Allen-Cahn. I modified ACInterface.h and ACInterface.C where I changed _kappa and its derivatives from <Real> to <RealTensorValue>. Now kappa accepts a GenericConstantRankTwoTensor and the results look promising. If I am not mistaken this could be ACInterfaceAniso. 

I also noticed that in CHInterfaceBase.h, _kappa is still restricted to <Real> while the _M is <T>. I was wondering if there is a reason for the restriction on _kappa? Could we have both _kappa and _M anisotropic in CH? 

Best regards, 
Jaber

Patrick Shower

unread,
Jan 30, 2018, 10:17:05 AM1/30/18
to moose...@googlegroups.com
Daniel,

Thank you for the explanation. It sounds intuitive now that you describe it that way.

As you suggested, I've made L a scalar value that's a function of interface orientation, just by making a copy of the InterfaceOrientationMaterial and applying it to L. Fortunately, there don't appear to be any complications with the solve and the simulations have a lot more realism now. I really appreciate the help and the encouragement! I should have tried to do that months and months ago.


Patrick

To unsubscribe from this group and stop receiving emails from it, send an email to moose-users+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "moose-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/moose-users/3Gs4t9sfTk8/unsubscribe.
To unsubscribe from this group and all its topics, send an email to moose-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages