Libmesh error when developing a custom auxkernel to solve for the flux of atoms & defects in a binary alloy #29003
-
Check these boxes if you have followed the posting rules.
QuestionI am trying to develop an auxkernel to solve for the following equation & others similarly like it to get JA, JB, JI, and JV: All onsager coefficients (L) will be materials properties, and chemical potentials (𝜇) I plan to solve for with another auxkernel. Fluxes (J) will be input into the kernels block to ultimately solve (𝜕𝑋𝐴)/𝜕𝑡 + ∇∙𝐽A = 0, etc. I am having issue compiling the custom auxkernel I have developed for J, seemingly based on libMesh issue. Please see below for more details on the custom kernel and error. I am quite new to MOOSE and am having trouble finding the solution to this issue. May I please receive some guidance on the origin of this error and how to possibly remedy this issue? Header File
Source Code
ERROR
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hello So this expression as a whole seems to evaluate to an ADVector. So this makes for an ADVector.
To turn an AD number into a regular number you can use: Real a = MetaPhysicL::raw_value(b); to turn a vector into a number, you need to either:
|
Beta Was this translation helpful? Give feedback.
Hello
So this expression as a whole seems to evaluate to an ADVector.
This makes sense because k, T are ADReal, then the Ls are Real and finially the gradients are vectors.
So this makes for an ADVector.
But the return type is a Real, so it is both:
To turn an AD number into a regular number you can use: Real a = MetaPhysicL::raw_value(b);
to turn a vector into a number, you need to either:
Which one fits here?