Message: Re: Local Electric Field: GetFieldValue() problem Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: Local Electric Field: GetFieldValue() problem 

Keywords: coordinate systems nonuniform electric field
Forum: Fields: Magnetic and Otherwise
Re: Question Local Electric Field: GetFieldValue() problem (Mario)
Re: Feedback Re: Local Electric Field: GetFieldValue() problem (Gumplinger Peter)
Date: 15 Feb, 2008
From: Mario <Mario>

Thanks Peter, that helps...knowing about the global coordinate system.  I 
also just found a .pdf presentation from John Apostolakis where it says
that the point[] and field are in global coordinates.  

But to clarify something, I was printing point[0,1,2] and magnitude whenever
the GetFieldValue() function was being called.  So I saw a print out every
time the function was called, but after looking at the /tracking/verbose 1
output, I have seen that GetFielValue() is called a large number of times
during one track step... am I right? ... Therefore, when I was seeing these
values I was thinking that it was calculating incorrect field values... but
if the program calculates many values of the E-Field at radically different 
places, perhaps based on curvature or something of this nature, then it makes
sense that I am seeing all of these values, even if they are not directly 
used as the E-Field value... but looking at the tracking/verbose 1 I see that
the protons are still only spending one step through the volume which holds
the field... see implementation:

void EMFieldConstruction::SetFieldParameters(G4ElectricField* field)
    // Create an equation of motion for this field
    equation = new G4EqMagElectricField(field); 
    //set up a 4th Order Runge Kutta stepper for this equation
    G4int nvar = 8;
    stepper = new G4ClassicalRK4(equation, nvar);       
    //set up the driver to make sure that errors are under control by talking with stepper
    intgrDriver = new G4MagInt_Driver(minFieldStep, stepper, stepper->GetNumberOfVariables());
    //define the chord finder
    chordFinder = new G4ChordFinder(intgrDriver);
    // Set this field and chord to the global field manager 
    fieldManager = new G4FieldManager(field,chordFinder);
void    EMFieldConstruction::SetMinStep(G4double s){minFieldStep = s;}

I have changed the minFieldStep to various values, but there is still 
only one step within the volume... is there another variable I should be 
setting?? The volume is Vacuum, but has a radially varying E-Field, so 
I would like there to be more than one step inside of the volume for accuracy.

Thank you Peter for a very timely response to the previous post,it is 
very appreciated.


Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 Feedback: Re: Local Electric Field: GetFieldValue() problem   (Peter Gumplinger - 18 Feb, 2008)
 Add Message Add Message
to: "Re: Local Electric Field: GetFieldValue() problem"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews

[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]