Discussion ClosedThis discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one,click here.

Using multiple components simultaneously

Please login with a confirmed email address before reporting spam

Hello,

I am wondering what would be the best solution to the problem described below. If anybody has some tips or hints, I would be very grateful.

I want to simulate an electrostatic beamline, which consists of several electrostatic elements. To make it simple, let's take two different kinds: electrostatic quadrupoles and spherical deflectors (two concentric spherical electrodes with a voltage across them to deflect the beam). Since the diversity of these elements (2) is not too large, both could be solved and kept in memory simultaneously. I thought about the following scenario (I am doing everything in Java, so complex algorithms are not a problem):
- I create 2 components, each describing one of these elements. These components would have the corresponding geometry node, an Electrostatic Physics node to solve the field of that specific device, and a charged particle tracing node to trace particles within this device.
- I create a list of devices (device instances), each element of the list would contain
a) a link to one of the above components (devices)
b) a transformation to describe the location/orientation of that specific instance of that device
- I start following the particles in Java (straight line outside of the devices). As soon as they enter the first/next device, I transform the particle coordinates into the local coordinate system of that device, and set up the charged particle tracing node of that component to follow the particles within that device.
- when the particles exit the volume of the device, I transform back their coordinates to the global CS, and follow them assuming a straight line. Etc for the following devices

In this way I can have as many instances of the devices as I wish, without an overhead: I only keep one single field-solution of each device. It is even possible to individually set the voltages of the device instances by specifying a scaled force in the charged particle tracing node. Still without the overhead, i.e. keeping only one fieldmap per device.

The problem is that my devices (created from a Java class) are parametric, each of them create and use a set of parameters. The parameters are 'global' (i.e. not specific to a given component). There could and will be therefore a parameter name clash when having multiple components. Can this be avoided in some way? Is there a better solution to this problem? Any comments, brainstorming etc is welcome.

Thank you
DAniel

0 Replies Last Post 2014年3月17日 GMT+1 15:51
COMSOL Moderator

Hello

Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.

If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.

Note that while COMSOL employees may participate in the discussion forum, COMSOL®software users who are on-subscription should submit their questions via theSupport Centerfor a more comprehensive response from the Technical Support team.

Baidu
map