On 06/04/2012 01:46 PM, Steve Spicklemire wrote:
Hi Robert,
On Jun 4, 2012, at 1:44 AM, Robert Cimrman wrote:
Hi Steve,
On 06/04/2012 06:01 AM, steve wrote:
Hi Folks,
I'm extremely new to finite elements in general and sfepy in particular, but I have a couple of problems I'm interested in, and I'm hoping that sfepy may provide an easy way to get started. Both of these problems (1 acoustic normal modes in cavities with cylindrical symmetry and 2 electrostatic fields in cavities bounded by various equipotential surfaces) have in common a axisymmetric or cylindrical symmetry. I found this discussion
<http://groups.google.com/group/sfepy-devel/msg/17364ae1fcc57259>
but I didn't see any real follow up. Has there been more done on this?
I am slowly working on the plate/shell aspect, but not on the symmetry.
also.. I've spent the last couple of days skimming Hughes finite element analysis book to get my head screwed on straight WRT FEM and I found this interesting tidbit:
<http://books.google.com/books? id=cHH2n_qBK0IC&printsec=frontcover&dq=finite%20element%20method %20hughes&hl=en&sa=X&ei=ywHMT- bKBcfK2AWowNzZCw&output=reader&pg=GBS.PA101>
The link jumps to the front page - could you tell us the page?
Sorry.. it's page 101:
I used the google web page mailer to send... bad wrapping apparently!
Or my browser sucks. Anyway, I have found [1], where one can browse all the pages...
[1] http://seeinside.doverpublications.com/dover/0486411818
Since heat conduction is extremely similar to electrostatics (and only a term or so different from acoustics) I hoped that it might be possible to get away with a 2D mesh for my problem(s) rather than running a full 3D mesh of the highly symmetric cases. So.. I guess my question is, what's the easiest way to implement this feature in sfepy? Can anyone suggest a path to follow?
There are at least two paths:
a) Because the terms in symmetrical formulations are often just like the terms in the cartesian grid but multiplied by a coordinate-dependent factor (e.g. 1/r), the easiest way IMHO is to incorporate those factors to a material parameter of each term. The material parameters can be given as general functions of coordinates, and you get the coordinates, so all the information is there. Not all terms, however, would be possible to reuse in this way. The Laplacian operator, for example, would have to be reimplemented as a new term for the cylindrical symmetry.
This sounds like a reasonable approach.... so I guess that means I'd need to create a subclass of terms.termsLaplace.LaplaceTerm, maybe like "CylindricalLaplaceTerm" or something?
Or DiffusionTerm (LaplaceTerm is just a very simple subclass of that). The name could be DiffusionCylindricalTerm (dw_diffusion_cyl ?) so that it stays next to the original term in the term table. Anyway, it would be great if you could give it a shot. Here are some comments:
Do you already have the equations written in the weak form? If not, start with that, I would like to see them. Maybe more than one term would be needed/better.
I would pass in the values of r as a material parameter. In that way a user just writes a function for computing it given the physical quadrature point coordinates. It seems to me a little bit easier, than computing r in the term (using "qps = self.get_physical_qps()", self is a term instance).
Writing a new term is not that simple, as it often requires going into C+Cython - the Python class then just dispatches the data. It is also probably under-documented (and changes), so ask in case of troubles.
I suppose there would have to be some kind of convention about the meaning of different dimensions, like x -> r, y -> z or vice-versa?
I would suggest the mapping used in Hughes: x -> r, y -> z, z -> phi.
r.
Would be nice to solve this in a general way.. but first things first. ;-)
b) Support somehow the symmetry internally, that is, do the above under the hood. This would be more difficult, and I am not sure if it is worth it. It depends on the number of new terms/reused terms that would have to implemented/or not in the case (a). Essentially, (b) == (a) with automatic use of the right terms given the symmetry.
Yes.. I agree.. that sounds like a lot more work. ;-)
thanks for the input! -steve
So solving your problems should be possible, with some work. I think I raised more questions than answered, so feel free to ask!
Also, if others have some remarks/opinions, do not hesitate to write them here.
Cheers, r.