Contents


SLFCEM HOME

GUI

Image Gallery

Statics
Dynamics

Download

FAQ

Update

Development

Acknowledgments

Links

SLFFEA

Main
Philosophy
Preamble
GNU/Linux
Links

SLFCFD HOME





Stuff About Me

San Le

Artwork

Email

SLFCEM FAQ

Updated 1/27/10


  1. What is SLFCEM?
  2. Again, you've named it after yourself. What a surprise.
  3. What do I need to run SLFCEM?
  4. What is SS-GUI?
  5. What is the P-Winston Motion Engine?
  6. What are your qualifications to write CEM code?
  7. What motivated you to write this?
  8. Why is there no magnetism shown?
  9. What is a special feature of SLFCEM?
  10. Why does SLFCEM start with Version 1.1?
  11. Why don't you include SLFCEM as part of SLFFEA?
  12. What is the point of treating the electric field as a displacement field?
  13. How do you install Mesa ?
  14. Why am I getting the error GL/glut.h: No such file or directory?
  15. What does your /usr/X11R6/lib and /usr/include/GL look like?
  16. Does SLFCEM include mesh generators?
  17. What units does SLFCEM use?
  18. Why do I get "command not found" when I try the text executables in the data directories?

  1. What is SLFCEM?

    SLFCEM stands for San Le's Free Computational Electromagnetics. It is a package of scientific software and graphical user interfaces for use in computational electromagnetics. It is written in ANSI C by San Le and distributed under the terms of the GNU license.

    Top
  2. Again, you've named it after yourself. What a surprise.

    !!??

    Top
  3. What do I need to run SLFCEM?

    1. To compile from source, you need GNU/Linux or some form of Unix.
      1. Extraction tool, like tar xzvfp.
      2. C compiler(you should know where your cc or gcc is located so you can define the CC macro in the makefiles. Just do a:
              which gcc
        
        or
              which acc
        
        and then put the path in the Makefile. For instance, when I do a "which gcc", I get:
                    /usr/bin/gcc
        
        which is how my CC is currently defined.
      3. Mesa-3.0 (OpenGL for the PC) or higher or Open GL. If you install it, you should put it in your /usr/local/ directory.


    Top
  4. What is SS-GUI?

    SS-GUI stands for Self-Scaling GUI. If you resize the GUI window, all the text inside will rescale itself such that the text and color scale boxes maintain their proportions with the window, and it will also work the same as before. This is possible because the GUI is built on OpenGL rather than some packaged window manager.

    Top
  5. What is the P-Winston Motion Engine?

    The P-Winston Motion Engine is about 300 lines of code written by Philip Winston which he has graciously and generously allowed me to use and modify for the GUI part of SLFCEM. The P-Winston enables you to use the mouse to rotate and translate the mesh, especially to refine rotations and translations done through hot keys or the GUI. It works like a trackball, but keeps the different types of motion separate. For example, holding down the left button and moving the mouse up and down will produce translation in Z. Moving it left and right with this same button held down will rotate it on the Z axis. The middle button controls translation in X and Y, and the right button, rotation in X and Y. While this seems more complex than a typical trackball, it has the advantage of isolating the movements for fine tuning of the position at which you want to view the object. Also, the P-Winston has much less computational overhead than a Mesa trackball.

    Note that you have to have the Mesh Window active to have mouse control.

    Top
  6. What are your qualifications to write CEM code?

    I claim no qualifications to write CEM code, especially since my specialty is mechanics. Like all GNU software, you are using it at your own risk. That said, here is a bit of my academic history which you may use to judge my qualifications:

    Academic History

    Note that I'm not a PE in EE and I have never taken the EE PE exam.

    Top
  7. What motivated you to write this?

    After my first release of SLFFEA, some electrical engineers contacted me requesting an EE version. I agreed to try and went as far as I could. I then asked for help in finishing the rest, but they vanished. With so much work already done, I put a request on my sites in 2000 to solicit help from other EEs who might be interested. Some contacted me, but they disappeared after I told them what I needed.

    After 8 years of no EEs willing to help, I planned to abandon the project, but because I hate quitting anything, I decided to make one last attempt to complete it by myself. So I used the last half of 2009 to finish SLFCEM.


    Top
  8. Why is there no magnetism?

    The acronym CEM (Computational Electromagnetics) is the common label for numerical simulation in this branch of physics. I decided to use it for SLFCEM even though I focus on the electrical part.


    Top
  9. What is a special feature of SLFCEM?

    SLFCEM uses edge based interpolating elements to prevent spurious modes during modal analysis. For edge elements, you need to provide the edge connectivity in addition to the node connectivity. SLFCEM will generate the edge connectivity for you so you only have to provide data as in traditional node based FEA codes. Optionally, you can provide your own edge connectivity if you prefer.


    Top
  10. Why does SLFCEM start with Version 1.1?

    I was only planning to solve the waveguide problem and release SLFCEM when that was done. This became Version 1.0. Then I decided to add electrostatics which meant making a new Version 1.1.


    Top
  11. Why don't you include SLFCEM as part of SLFFEA?

    I don't know how much development there will be to SLFCEM beyond Version 1.1 so I have decided to separate the codes. My specialty is mechanics which is where I will focus my work from this point.


    Top
  12. What is the point of treating the electric field as a displacement field?

    Probably none.


    Top
  13. How do you install Mesa?

    For recent versions of GNU/Linux, you may not have to. (Mesa comes pre-installed on Slackware 7.1). All you need to do is add the following softlink:
       cd /usr/include/
       ln -s /usr/X11R6/include/GL/ GL
    
    if it doesn't already exist.

    If you would rather compile using the latest release of Mesa, you can do the following. From Section 16.0.0 of my GNU/Linux Installation Guide:
    16.0.0 Installing Mesa(the OpenGL graphics library):
    
    
       16.1.0  For  recent  versions  of  GNU/Linux(like  Slack-
               ware-7.1), Mesa comes pre-installed.  All you need to do is  add  the
               following softlink:
    
                     cd /usr/include/
                     ln -s /usr/X11R6/include/GL/ GL
    
               if it doesn't already exist.
    
               There  are several places where you can get Mesa.  You can get it off
               the web at:
    
                     http://sourceforge.net/project/showfiles.php?group_id=3
    
       16.1.1  For  recent  versions  of RedHat you need to add the glut libraries
               from the RPMs on the installation disk(For RedHat 8.0, it is on the
               3rd disk, for RedHat 9.0, it is on the 2nd disk):
    
                     cd /mnt/cdrom/RedHat/RPMS
                     rpm -Uhv  glut-3.7-12.i386.rpm
                     rpm -Uhv  glut-devel-3.7-12.i386.rpm
    
       16.2.0  After getting the  tarfiles,  copy  them  to  the
               directory /usr/local/ and do:
    
    
                     tar xzvfp MesaLib*.gz
                     tar xzvfp MesaDemos*.gz
    
    
       16.3.0  Compiling Mesa Programs
    
    
            16.3.1 From the /Mesa-3.4.2/README:
    
    
                        To  compile  the library, first type 'make' alone to see the
                        list of system configurations currently supported.   If  you
                        see  your  configuration  on the list, type 'make '.
                        Most popular Unix/X workstations are currently supported.
    
                   For my machine, I use:
    
                        make linux
    
    
            16.3.2 Header Files and Libraries
    
                   From the /Mesa-3.4.2/docs/INSTALL:
    
    
                        Header and library files:
                           After you've compiled Mesa and tried the demos I recommend the following
                           procedure for "installing" Mesa.
    
                           Copy the Mesa include/GL directory to /usr/local/include:
    
    
                         mkdir /usr/local/include/GL
                         cp -r include/GL/* /usr/local/include/GL/
    
    
                           Copy the Mesa library files to /usr/local/lib:
    
    
                            cp -d lib/* /usr/local/lib
    
    
    
                                (actually, use "cp -d" on Linux to preserve symbolic
                        links)
    
    
            16.3.3 Install Widgets-Mesa Library
    
                   You also need to install the Widgets-Mesa Library.  First:
    
                         cd  /usr/local/Mesa-3.4.2/widgets-mesa/
    
                   The file /usr/local/Mesa-3.4.2/widgets-mesa/INSTALL tells you to:
    
                            ./configure
                            make
                            make demo.gl
                            make demo.mesa
                            make demo.ws
                            make demo.tea
                            make install
    



    Top
  14. Why am I getting the error GL/glut.h: No such file or directory?


    Because Mesa is pretty standard on most GNU/Linux distributions, I think you are only lacking the glut libraries(and possibly some other include files) which usually aren't installed unless you install everything including development tools for Linux. I recommend that you check to see that the glut libraries are in:
       /usr/X11R6/lib
    
    and that there is a directory:
       /usr/include/GL
    
    containing all the necessary Mesa and glut files. See the next question for more information.

    Sometimes, Redhat and Fedora have glut and glut development RPMs on their installation disk in the /RedHat/RPMS directories. You may have to look around to find it. For now, I will repeat what I say above:
       To install the glut libraries from the RPMs on the installation disk(For RedHat 8.0, it is on the
       3rd disk, for RedHat 9.0, it is on the 2nd disk):
    
             cd /mnt/cdrom/RedHat/RPMS
             rpm -Uhv  glut-3.7-12.i386.rpm
             rpm -Uhv  glut-devel-3.7-12.i386.rpm
    


    Top
  15. What does your /usr/X11R6/lib and /usr/local/include/GL look like?

    After updating to Mesa-3.2.1,(Mesa-3.0 should still work), doing an ls -l in /usr/X11R6/lib gives:
    -rw-r--r--  1 root root 678504 2005-01-23 20:45 libGL.a
    lrwxrwxrwx  1 root root     12 2005-05-31 07:32 libGL.so -> libGL.so.1.2
    lrwxrwxrwx  1 root root     12 2005-05-31 07:32 libGL.so.1 -> libGL.so.1.2
    -rwxr-xr-x  1 root root 608015 2005-01-23 20:53 libGL.so.1.2
    -rw-r--r--  1 root root 659352 2005-01-23 20:45 libGLU.a
    lrwxrwxrwx  1 root root     13 2005-05-31 07:32 libGLU.so -> libGLU.so.1.3
    lrwxrwxrwx  1 root root     13 2005-05-31 07:32 libGLU.so.1 -> libGLU.so.1.3
    -rwxr-xr-x  1 root root 563990 2005-01-23 20:53 libGLU.so.1.3
    -rw-r--r--  1 root root  27902 2005-01-23 20:45 libGLw.a
    lrwxrwxrwx  1 root root     13 2005-05-31 07:32 libGLw.so -> libGLw.so.1.0
    lrwxrwxrwx  1 root root     13 2005-05-31 07:32 libGLw.so.1 -> libGLw.so.1.0
    -rwxr-xr-x  1 root root  26550 2005-01-23 20:53 libGLw.so.1.0
    lrwxrwxrwx  1 root root     12 2005-05-31 07:22 libglut.so -> libglut.so.3
    lrwxrwxrwx  1 root root     14 2005-05-31 07:22 libglut.so.3 -> libglut.so.3.7
    -rwxr-xr-x  1 root root 215332 2003-08-20 14:24 libglut.so.3.7
    
    and doing an ls -l in /usr/include/GL gives:
    -r--r--r--  1 root root   7946 2005-01-23 20:45 GLwDrawA.h
    -r--r--r--  1 root root   4433 2005-01-23 20:45 GLwDrawAP.h
    -r--r--r--  1 root root   2309 2005-01-23 20:45 GLwMDrawA.h
    -r--r--r--  1 root root   2311 2005-01-23 20:45 GLwMDrawAP.h
    -r--r--r--  1 root root  89951 2005-01-23 20:44 gl.h
    -r--r--r--  1 root root 306424 2005-01-23 20:44 glext.h
    -r--r--r--  1 root root  15981 2005-01-23 20:44 glu.h
    -r--r--r--  1 root root   9016 2005-01-23 20:44 glx.h
    -r--r--r--  1 root root  29020 2005-01-23 20:44 glxext.h
    -r--r--r--  1 root root   4257 2005-01-23 20:44 glxint.h
    -r--r--r--  1 root root   2453 2005-01-23 20:44 glxmd.h
    -r--r--r--  1 root root  71034 2005-01-23 20:44 glxproto.h
    -r--r--r--  1 root root   8878 2005-01-23 20:44 glxtokens.h
    -r--r--r--  1 root root   8349 2005-01-23 20:44 osmesa.h
    -rw-r--r--  1 root root  20844 1998-08-07 17:18 glut.h
    -rw-r--r--  1 root root   5150 1998-08-07 17:18 glsmap.h
    -rw-r--r--  1 root root   7273 1998-08-07 17:18 fglu.h
    -rw-r--r--  1 root root  10152 1998-08-07 17:18 fglut.h
    -rw-r--r--  1 root root  60468 1998-08-07 17:18 fgl.h
    


    Top
  16. Does SLFCEM include mesh generators?

    There are a few generators for specific meshes like a rectangle or a solid or hollow disk. I also have a code which converts quadrilateral meshes into triangle meshes.
    Top



    Top
  17. What units does SLFCEM use?

    I would recommend SI units, but you just need to be consistent. So you can use any system of units you want.


    Top
  18. Why do I get "command not found" when I try the text executables in the data directories?

    This is a common issue with Unices. For the quad element, instead of just "qde", type in:
       ./qde
    
    which means execute the code "qde" in your current directory. You can also add:
       export PATH=$PATH:.
    
    or
       export LD_LIBRARY_PATH=.
    
    in your ".bashrc" or ".bash_profile" (or whatever your Unix uses) to avoid having to type "./" before every executable. The reason this is not automatically done in Unix is for security reasons, so you may want to think about adding "." to your path.


    Top

I'll add more Questions and Answers as they come.

Top

Get San Le's Free Computational 
Electromagnetics at SourceForge.net. Fast, secure and Free Open Source software
downloads