On Jul 21, 2008, at 4:17 PM, Ondrej Certik wrote:
>
> Do you have some FEM code in Python?
>

No, at the moment, it is split between Maple and MATLAB.
I use Maple to derive the mass and stiffness element matrices
and output a MATLAB function where I do the assembly and
then the solution. I derive my equations using the
Raleigh-Ritz method whereas most FEM codes I've found
appear to want the weak form derived through Galerkin. Since
Galerkin is difficult for coupled systems, I've avoided it.

I've run into roadblocks trying to implement things in
Sage because a number of the techniques I've used in Maple
don't easily translate.

> We develope sfepy (CCing sfepy-devel):
>
> http://code.google.com/p/sfepy/
>
> and we'd like to hook symbolic capabilities to it, so that you can do
> this kind of things symbolically. We just started to use SymPy for
> checking the numerical solutions symbolically and my secret plan is to
> be able to just write an equation in SymPy or Sage, optionally specify
> some boundary conditions and get it solved using FEM.
>
> Do you have some pointers to the manipulations in Mathematica? Let's
> implement the same in Sage using the same or similar syntax.
> I don't think it is difficult.

In Mathematica, you can do:

D[Transpose[a].B.c, c]

to take the derivative with respect to the vector c. It worked in
V4 of Mathematica. As I've mentioned before, neither Maple or Maxima
can do this. The Maple developers have basically told me that it
wasn't going to be done.

I know that for a course a professor had FE codes
developed in Mathematica and both the notes and the Mathematica
codes were on his web site.

I think that they are:
http://www.colorado.edu/engineering/Aerospace/CAS/courses.d/IFEM.d/

and
http://www.colorado.edu/engineering/Aerospace/CAS/courses.d/NFEM.d/Home.html

The first is for linear FEM and the second is for non-linear FEM.
However, I can't recall if they covered exactly what I'm doing.

I'm happy to share the Maple code for the FE methods I've been  
developing
since manipulations like the one above will be some time in coming
(if at all). I have two example programs in addition to the basic  
package.
E-mail me off-list if you want to see it and possibly help convert it
to Sage/sympy.

I've also been looking at basic Calculus of Variations (e.g., being
able to take a variation and manipulate it). For that, I need the  
ability
to examine integrands, integral bounds, and manipulate individual terms
(and parts of terms). In Maple, you can do this with op and various
integration commands.

Lastly, if the ability to work with symbolic vectors/matrices was added,
a nice thing to have would be to work with partitioned matrices and
vectors. For example:

A = [[ B, C],[D, E]]

where B, C, D, and E are general sub-matrices. This crops up all the  
time
in control theory.

Cheers,

Tim Lahey

---
Tim Lahey
PhD Candidate, Systems Design Engineering
University of Waterloo

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to