I am trying to create an element T1 (linear triangle) to solve the steady, incompressible Navier-Stokes equations. Therefore, my SMSTemplate command reads as follows

"SMSTopology"-> "T1",
"SMSDomainDataNames"->{"nu -kinematic viscosity","rho -density"},

including a linear interpolation for velocity "D" and pressure "p". In total, this leads to 9 degrees of freedom at 6 nodes per element. Afterwards, I defined subroutines for Gauss points, discretization and constitutive equations to use the SMSStandardModule "Tangent and residual". The residual vector 'p' has then a size of 9 and the stiffness matrix 's' of 9x9. But if I start AceFEM, define a boundary value problem and start the analysis with SMTAnalysis, the following error message occurs:

enter image description here

Does someone know this problem or have an idea? Moreover, I am unsure what the output 'Nodes: {1,4,2}' means.

If you want me to give you more of my code, just let me know.

Thank you in advance


1 Answer 1


Since you defined in the element that you have $SMSNoNodes==6$, you have to provide 6 nodes when you generate the element in AceFEM. It seems that You defined mesh "T1" so one element was allocated global indices $\{1,4,6\}$

If you want displacement nodes and pressure nodes at same points (i.e. triangle corners), you have to specify that pressure nodes are to be placed on corners, this you can do with additional option in $SMSTemplate$:

"SMSAdditionalNodes" ->  Hold[({#1, #2, #3} &)]

which means you have 6 nodes but the last 3 nodes are ADDED automaticvally by ACeFEM on same position as displacement nodes, so you only need to provide 3.

Just for info, if you had Second order dispalcemet and linear pressure (6+3 nodes), you can use T1 linear element and specify that middle nodes for dis. and corner nodes for pressure are added automatically:

"SMSAdditionalNodes" -> Hold[({(#1 + #2)/2, (#2 + #3)/2, (#3 + #1)/2, #1, #2, #3} &)]

You can check more in help in $SMSTemplate$, there is a link to: "Cubic triangle, Additional nodes" in $SMSAdditionalNodes$ option.

  • $\begingroup$ Thanks a lot! Now it works. $\endgroup$ Mar 17, 2023 at 16:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.