On Aug 13, 2008, at 3:20 PM, Anders Logg wrote:

> On Wed, Aug 13, 2008 at 01:18:32PM -0500, Catherine Micek wrote:
>> Hi,
>>
>> I'm a (relatively) new user to the Fenics system and have a
>> question.  I'm not sure if this is the correct place to send this,
>> but I couldn't find anything
>> in the repository or the manuals (perhaps there's a relevant example
>> somewhere I missed ... ?), so I ended up here.
>>
>> I'm using Fenics to study the equations of linear elasticity (in a
>> mixed Stokes formulation), which allows me to directly compute a
>> displacement U and
>> pressure P.  In addition to these two variables, I am interested in
>> the stress of the system. I have been able to obtain the stress by
>> defining a suitable
>> projection:
>>
>>      stresselement = VectorElement("Discontinuous Lagrange", "triangle",
>> 1, 9)
>>      S = TrialFunction(stresselement)
>>      T = TestFunction(stresselement)
>>
>>      a = dot(S, T)*dx
>>      # Sigma is the symmetric stress computed from the displacement, U
>>      L = dot(Sigma, t)*dx
>>
>> and then solving the resulting linear system for S.  Next, I would
>> like to do some calculations with the stresses; for example,
>> integrate the stress along a boundary.
>> To do this, I need the stress vector, s = Sn, where n is the normal
>> on the boundary.  However, I am unclear how to do this, as I have
>> defined the stress as a 9-component
>> vector instead of a 3x3 matrix (and n will be defined as a 3
>> component vector if I use the FacetNormal function).
>>
>> Any suggestions on how to handle this?  Thanks!
>>
>> Katy
>
> We frequently compute normal and shear stresses on the boundary for
> Navier-Stokes from a computed velocity field U and pressure P.
>
> I've attached the code we use. See if you can make sense of it.

I've played around with it a bit, and it looks like this will help me  
get started.
Thanks!

>
> -- 
> Anders<stress.py>_______________________________________________
> DOLFIN-dev mailing list
> [email protected]
> http://www.fenics.org/mailman/listinfo/dolfin-dev

_______________________________________________
DOLFIN-dev mailing list
[email protected]
http://www.fenics.org/mailman/listinfo/dolfin-dev

Reply via email to