-
Initial question: 'I have been trying to create the ADMatReactionNodalKernel class because I think it would be very useful for TMAP8, but I am running into an issue that I have not been able to fix. I updated conda and moose both this morning again, but when I try to ‘make’ TMAP8 with the new files, I get the following error: Compiling C++ (in opt mode) /Users/simopa/projects/TMAP8/build/unity_src/nodal_kernels_Unity.C... I do not understand how to solve it. Looking at the ADMatReaction kernel, it also uses ‘getADMaterialProperty’ and I don’t see why it should be different here. Any suggestions? Thank you!' |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 10 replies
-
Answer: 'Nodal kernels won’t work with the current material system unfortunately. Materials are associated with subdomains, e.g. volumes. You can imagine that at an interface between materials, unless you specify an element side, the value of a material property can be discontinuous and worse undefined. What value for the property should be used? It could be even worse for a node: you could be at the corner of 8 subdomains for a hex mesh! If it’s an expression you have, and your property is not a function of the nonlinear degrees of freedom, why not use a function parameter to keep the expression in the NodalKernel generic? The AD system can still handle the derivatives of that for you. For the general question of kernel vs nodal kernel: let’s use the correct mathematical solution. If we don’t have spatial derivatives I think we should do nodal kernels. And as to the practical challenge of how we implement it (a function, a material, hard-coded in the kernel) let’s just do what’s quickest and easiest for now and I think in the future we will have better solutions (although a function still could be a great solution even going forward depending on your use case). For instance I have plans for doing on-demand property evaluation at any point in the domain. This would be a viable solution even when your property is a function of the nonlinear degrees of freedom.' |
Beta Was this translation helpful? Give feedback.
Answer:
'Nodal kernels won’t work with the current material system unfortunately. Materials are associated with subdomains, e.g. volumes. You can imagine that at an interface between materials, unless you specify an element side, the value of a material property can be discontinuous and worse undefined. What value for the property should be used? It could be even worse for a node: you could be at the corner of 8 subdomains for a hex mesh!
If it’s an expression you have, and your property is not a function of the nonlinear degrees of freedom, why not use a function parameter to keep the expression in the NodalKernel generic? The AD system can still handle the derivatives of that for you.
F…