Closed Deadevilgrounds closed 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.
The integral-equation formulation implemented by the SCUFF-EM core library only works at nonzero frequencies. (It solves for the surface current distribution induced by incident fields, but in the DC limit this reduces to just a surface charge distribution, and there are multiple current distributions that reduce to the same DC charge distribution, so the problem is ill-defined.) So you can't call AssembleBEMMatrix
in the core library with zero frequency.
Instead, you want to use the routines built into the scuff-static
standalone executable program. In the code for this program there is a separate C++ class called SSSolver
("SCUFF static solver") that implements an electrostatic surface-integral formulation for electrostatic problems. This solver has its own routine called AssembleBEMMatrix
which is the one you want to be calling for electrostatic problems. Also, in the file OutputModules.cc
there is a routine called GetCapacitanceMatrix
which will return the capacitance matrix for a system of conductors (possibly with dielectrics in the problem too).
The way things are set up at the moment, the electrostatics implementation is a separate standalone application code not included in the SCUFF core library, so those functions won't be available through the standard python interface. I will have to look into figuring out how to address this problem, either by incorporating the electrostatic solver into the core library or (more likely) retaining it as a separate library and configuring the SWIG python stub generator to include it in the python interface.
Hope that helps. Feel free to ask any questions and especially to post any relevant sample problems in which you are interested.
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.
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.
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.