|Message: Re: Generated electron is not affected by static magnetic field?||Not Logged In (login)|
Click on the Forum title, e.g. on the "Forums by Category" page, to read a sequence of postings to the Forum and its threads all in one page. If you are only interested in one thread or the thread following a specific posting, click the thread or the posting, which takes you to a smaller page, which contains only the part you are interested in and may be easier to navigate.
Messages are "chained" if there are only replies at the first level, i.e. 1/1.html, 1/1/1.html etc. In case of "chained" messages the message number is replaced by the icon and there is no indentation.
Inline: Display the subject line only or also the text of the posting(s); for the choice "All" the "Outline" choices are switched off.
|1||0||1||no text / full text of posting|
|2||1||All||text for level 1 only / text for All postings|
Outline: Choose the depth of the posting thread, successive toggle controls provide increasing detail.
|1||2||1||2 levels / 1 level (original posting)|
|2||3||2||3 levels / 2 levels|
|3||3||All||3 levels / all levels (all postings)|
I confirm what Tom has surmised, and experimentally verified, regarding the propagation in unphysical or sharp fields. In you wanted to simulate a field with a very sharp physical cutoff region, you would have to enclose it in a volume (solid). Only then could you guarantee that the propagation would stop at the (unphysical) edge of your field, and see the finite value inside it. Put yourself in the shoes of the Geant4 class that deals with this. At each step Geant4 must figure out what the value of the magnetic field is. To do this it samples the field at the initial step, the mid-point step of the proposed step and the endpoint. Depending on the algorithm chosen for integration, it may also sample it at the quartile points and/or other intermediate points. If you have created a setup without fringe fields, there is no way for the propagation algorithm to know that a field exists at some "random"intermediate point on a (nearly straight line) trajectory. The propagation will sample the value of the field at the few points selected - quartiles, midpoint and endpoint of the step. If these all have zero field value, then the assumption is that there is no magnetic field at any point during the track. This has to be the case - if the propagation algorithm had to sample a large number of points between the starting point and the end point of a step, it would proceed very slowly even in regions where the field was really zero. If you want a fringe field within a limited region, you can reduce the maximum allowed step size within a particular volume. But as Tom found, even this will not be very stable if the field has a sharp discontinuity. This is a bit harder to understand - but likely it is connected with the fragility mentioned above and the possibility that some steps will stop just inside the region of finite field (the effect of the field over a short segment is too small to be seen as a significant numerical error during the integration step which determines the endpoint of the step. ) John =================================================== John Apostolakis, PH Department, CERN SFT (SoFTware for Experiments) Group Office: Building 32/ room R-003 (ground floor), Mail: J27210 Email: email@example.com Office Tel: +41-22-767-7239 ------------------------------------------------------------------------------------------ On Oct 30, 2014, at 6:34 AM, Tom Roberts <firstname.lastname@example.org> wrote: > > *** Discussion title: Fields: Magnetic and Otherwise > > This has to do with the difficulty of getting good results when > attempting to simulate an unphysical world. > > A magnetic field as you describe, 6 mm wide with hard edges, cannot be > constructed in the real world, and Geant4 has difficulty simulating it. > There are two basic problems: > > 1) small features in the world require that steps be limited to comparable > size, or the features may be missed completely. Solids usually do not > have this problem, fields always do. > 2) hard-edge fields always cause problems. > > You have mentioned (1), but not (2). > > To deal with (1) you need to limit steps to something less than 6 mm, > perhaps a factor of 10 less. > > (2) can be seen this way: if a track happens to start a step right on > the edge and remains in the field for the entire step, it will see > nonzero field throughout the step and will get the result you expect. If > the step spans the hard edge, the result can vary considerably, > depending on how the integrator splits the step into integration points, > and how those points just happen to fall relative to the hard edge of > the field. > > The best way to avoid (2) is to not use hard-edge fields, use physical > ones (i.e. satisfy Maxwell's equations, which rule out hard edges). A > workaround that can work in some/many cases is to use a solid with a > geometrical boundary right at the hard edge(s) -- this prevents any step > from spanning the geometrical boundary, and thus spanning the hard edge > of the field.. > > In practice, without a boundary at the hard edge, (2) makes the result > depend on stepsize. In a quick test I had to limit steps to 0.02 mm > before the positions of tracks after the field had an accuracy of 0.1 mm > (i.e. reducing stepsize further did not move them more than 0.1 mm). > > ------------------------------------------------------------- > Visit this GEANT4 at hypernews.slac.stanford.edu message (to reply or unsubscribe) at: > http://hypernews.slac.stanford.edu/HyperNews/geant4/get/emfields/218/1/1/1.html