How to extract nodal forces?

Asked by Patrick Majors

Dear FEniCS team,

I am a new user, experimenting with various hyperelastic problems. I would like to ask whether there is built-in functionality to assist in the extraction of nodal forces. In particular, I am setting certain boundaries to zero displacement, and others to controlled displacements, analogous to your demo_hyperelasticity.py. I would like to extract or compute the nodal forces on those boundaries. I have not found built-in functions, but I may be looking for incorrect key words.

Thank you for considering this question and for the beautiful FEniCS Project and Book.

Pat Majors

Question information

Language:
English Edit question
Status:
Solved
For:
FEniCS Project Edit question
Assignee:
No assignee Edit question
Solved by:
Anders Logg
Solved:
Last query:
Last reply:
Revision history for this message
Anders Logg (logg) said :
#1

On Sat, Aug 04, 2012 at 09:51:03PM -0000, Patrick Majors wrote:
> New question #205025 on FEniCS Project:
> https://answers.launchpad.net/fenics/+question/205025
>
> Dear FEniCS team,
>
> I am a new user, experimenting with various hyperelastic problems.
> I would like to ask whether there is built-in functionality to
> assist in the extraction of nodal forces. In particular, I am
> setting certain boundaries to zero displacement, and others to
> controlled displacements, analogous to your demo_hyperelasticity.py.
> I would like to extract or compute the nodal forces on those
> boundaries. I have not found built-in functions, but I may be
> looking for incorrect key words.
>
> Thank you for considering this question and for the beautiful FEniCS
> Project and Book.

Can you explain in more detail? Do you want to compute the stress
tensor at a point? Or the boundary traction at a point on the surface?

--
Anders

Revision history for this message
Patrick Majors (pmajorsbcw) said :
#2

I would like to know the boundary traction vectors at each node on the surfaces which have displacements specified.

Thank you Anders.

Revision history for this message
Best Anders Logg (logg) said :
#3

On Mon, Aug 06, 2012 at 04:46:09PM -0000, Patrick Majors wrote:
> Question #205025 on FEniCS Project changed:
> https://answers.launchpad.net/fenics/+question/205025
>
> Status: Answered => Open
>
> Patrick Majors is still having a problem:
> I would like to know the boundary traction vectors at each node on the
> surfaces which have displacements specified.

Then I suggest projecting the boundary traction to a Function:

  a = dot(u, v)*ds
  L = dot(sigma, n)*ds

Make the Function piecewise discontinuous and constant (or whatever
suits your needs).

The above system will be singular, which you can get around by calling
A.ident_zeros() on the system matrix.

--
Anders

Revision history for this message
Patrick Majors (pmajorsbcw) said :
#4

Thank you Anders. I'll give this a try.

Revision history for this message
Patrick Majors (pmajorsbcw) said :
#5

Thanks Anders Logg, that solved my question.