Low level basis function operations in UFL

I would like to model a post-tensioned concrete slab, similar to this paper: (PDF) Layout optimization of post-tensioned cables in concrete slabs

Treating the tensioning cable as a spatial curve (e.g. a Bspline), the shell nodal forces due to the cable {f}_{pe} (three force components, two moments) can be expressed using virtual work. The so-called cable strain matrix B_p (Eq 7) relates the three shell displacements and two rotations to the axial strain of the cable (here shown for one node).



Here a,b,c are constants (the components of the cable’s normalized tangent vector).

My question is how to best implement something like this B in UFL. The Jacobian components I get via ufl.Jacobian and ufl.JacobianInverse, but I do not remember how to access the basis functions and derivatives. Perhaps there is a more elegant formulation for the nodal forces.

I’m using the linear Naghdi model in fenics-shells as a starting point (@jackhale). Appreciate any suggestions!

Hello @niewiarowski. I’m pretty sure I’m too late, but I think for reference it’s worth mentioning that the UFL language is pretty natural. As detailed here, you can access the derivative along the i coordinate of a function f by a simple f.dx(i).

As for basis functions, in the UFL sense of the term these would simple be : ufl.TestFunction(E) and ufl.TrialFunction(E).

Hi @hawkspar, thank you for the response. I haven’t looked at this problem in a few weeks, while I have a quasi working solution, it is not ideal. I posted a (hopefully) clearer version of my question here: UPDATED: Constructing nodal force vector involving shape function derivatives - #2 by niewiarowski if you have any advice, thanks again