Creating multiple non-uniform electric Fields

Hello,
I posted a while ago about creating non-uniform electric fields. I have been away while I created such electric fields in COMSOL. An electric field is created by a voltage (-50 to -100 V) on a sharp tip in the neighbourhood (~20 nm) of a grounded surface. I found before that the strength of the electric field can vary by up to 6 orders of magnitude from the immediate neighbourhood of the tip to the secondary electron detector (a few mm away). Hence I need a very short miss distance near to the tip, but further away I need a longer miss distance so that the electrons jump further with each step (otherwise I presume it would take forever before they reach the detector). Therefore, I have created a series of logical volumes around the tip (using G4Tubs) a bit like a set of Russian dolls. Each volume has a different electric field (and hence a different miss distance) associated with it. Now I am trying to view the electric fields. I can use

/vis/scene/add/electricField 15 lightArrow

and I see the electric field over the whole volume. However, I would like to zoom in and look at the electric field closer to the tip. Hence I type

/vis/set/extentForField -.005 .005 -.005 .005 0 .005

and I can see the electric field over a smaller volume, but the arrows are not more dense than before. The arrows are still in the same position, so I am not viewing the electric field with a finer mesh.

Is there a way to zoom in on the detail in an electric field as I am trying to do? Or is there a way to only view the field associated with a logical volume? Am I taking the right approach here and splitting my electric field into different logical volumes rather than using a global electric field ?

Thanks in advance
Chris

I don’t know about how to set up your field, but regarding visualisation, the first parameter, nDataPointsPerHalfScene of /vis/scene/add/electricFieldcontrols the spacing of the arrows that represent the field, and refers to the whole scene (even though you have restricted the extent). Also, perhaps, provide a unit for /vis/set/extentForField (perhaps the command should insist on it). So, for example

/vis/set/extentForField -.005 .005 -.005 .005 0 .005 m
/vis/scene/add/electricField 100 lightArrow

Hi John,
Thanks for the quick response. I have managed to get some more detail on the field. However, I was hoping I could zoom right in to the nm scale of the tip. I find if I go too far in zooming in, I get a crash
( e.g. /vis/set/extentForField -.0005 .0005 -.0005 .0005 0 .0005 m
/vis/scene/add/electricField 500 lightArrow )

I presume the program attempts to create points for all locations in the model, not just the ones that are within the extentForField range ?

Best Wishes
Chris

Thanks for the feedback, Chris. I’ll have a look at that.

Hi Chris

If you can rebuild your app, please try G4VFieldModel.hh (4.5 KB) G4VFieldModel.cc (11.7 KB) . I have changed it so that the first parameter, ‘nDataPointsPerHalfScene’, applies to the extent set by the user. (I will rename it to ‘nDataPointsPerHalfExtent’.) So try

/vis/set/extentForField -5 5 -5 -5 0 5 mm
/vis/scene/add/electricField

You might find that takes a lot of time. The default is nDataPointsPerHalfScene=10, which calculates 9261 arrows. Try

/vis/scene/add/electricField 5 lightArrow

If your experience is positive, we will propose inclusion in the next release.

Note: You are allowed to have multiple field models. If you wish to replace a model, you should

/vis/scene/list
/vis/scene/activateModel Field false # De-activates existing field model

then add the new model.

Hi John,
My experience is generally positive.

One slight problem seems to be that if I set
/vis/set/extentForField -0.001 0.001 -0.001 0.001 0 0.001 mm

then I see the field quite nicely with reasonable detail. However, if I set
/vis/set/extentForField -0.0005 0.0005 -0.0005 0.0005 0 0.0005 mm

then it says
No Electric Field in this extent

This could be a problem in the way I have setup the field, but I was expecting to see a field all the way down to 10nm extent. I am just surprised that I can see good detail with 1 um limits, but it says no Electric Field at 0.5 um limits. Apart from that it works well. I will look into my program to see if it is something I have done that is a bit silly…

Best Wishes
Chris

Dear John,
I have found the problem with the No Electric Field in the extent. I can now zoom right in to the nm scale. Everything works fine.

Best Wishes
Chris

That’s great, Chris. Thanks for letting us know.