HomerReid / scuff-em

A comprehensive and full-featured computational physics suite for boundary-element analysis of electromagnetic scattering, fluctuation-induced phenomena (Casimir forces and radiative heat transfer), nanophotonics, RF device engineering, electrostatics, and more. Includes a core library with C++ and python APIs as well as many command-line applications.
http://www.homerreid.com/scuff-em
GNU General Public License v2.0
125 stars 50 forks source link

LibScuff for Electrostatic problems #132

Closed Deadevilgrounds closed 7 years ago

Deadevilgrounds commented 7 years ago

Hi

I have been using the scuff-static solver from the command line and it works fine but recently I have been needing to parametrically generate structures in Python so I was thinking of using the LibScuff API to do the calculations. I have followed the python example and It makes sense but I was wondering how would I go about setting up a static problem.

Starting simple I have generated two plates like you would get in a capacitor, but I am now sure how I would go about assigning the Charges/Voltages of each plate. Also is it correct to still use "AssembleBEMMatrix" with the frequency set to 0 for a static problem or should I be doing something else?

Any guidance would be most appreciated.

HomerReid commented 7 years ago

Thanks for this suggestion. I'm on it and will try to post a sample electrostatic calculation in python this week.

For the time being, here are some comments regarding your question.

Hope that helps. Feel free to ask any questions and especially to post any relevant sample problems in which you are interested.

Deadevilgrounds commented 7 years ago

Thanks for the quick response. That would be great if you can open up the static solver to the python interface. I will have a look at the C++ classes you mentioned and have a go with a C++ program.

Ultimately I am hoping to use the static solver to generate the field data of a surface paul trap. We tried with the RF module but the layer distances are on the micron order with a surface area of 10x10mm so the mesh size has to be too small which makes the memory footprint go up beyond what our simulation machine is capable of. Up till now we have used the Ksinger program to generate the static fields and then generate the pond potentials after. But we want to create an interface to go from parametric design to simulation and your solver is better documented and has nice extra features like the RF solver, so we could account for nonuniform fields along large chip geometries, if only we could find a way of getting that to work for such small geometries. In the mean time, however, having the static solver would be fine.

HomerReid commented 7 years ago

As of the most recent commit to the master branch, the electrostatic module is now available from python. Here's an example of a capacitance calculation:

http://homerreid.github.io/scuff-em-documentation/examples/pythonCapacitance/pythonCapacitance/

This example doesn't address how to compute field data from python. At some point I'll probably put up an example that does.