Message: Re: non-uniform electric field in chamber Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

None Re: non-uniform electric field in chamber 

Forum: Fields: Magnetic and Otherwise
Re: Question non-uniform electric field in chamber
Re: None Re: non-uniform electric field in chamber
Re: Feedback Re: non-uniform electric field in chamber (Gumplinger Peter)
Re: None Re: non-uniform electric field in chamber
Re: News Re: non-uniform electric field in chamber (Sunring Ling)
Date: 13 Mar, 2012
From: John Apostolakis <John Apostolakis>

Hello,

I suggest to you to check extended example field 02 to see how to set up the field module for an electric field.  You can find this in your Geant4  distribution at the directory  
examples/extended/field/field02/
and in LXR at http://www-geant4.kek.jp/lxr/source/examples/extended/field/field02/

The simplest way would be to copy the class F02ElectricFieldSetup and modify it for your needs.  You will need also the field messenger, if you do not comment it out.

http://www-geant4.kek.jp/lxr/source/examples/extended/field/field02/src/F02ElectricFieldSetup.cc

The line you will certainly need to change is the one that creates the field.  

 67   fEMfield = new G4UniformElectricField(
68                  G4ThreeVector(0.0,100000.0*kilovolt/cm,0.0));

Potentially you can pass a pointer to a field that you have created elsewhere to the constructor, if there are many such fields.

http://www-geant4.kek.jp/lxr/source/examples/extended/field/field02/src/F02ElectricFieldSetup.cc#L71

Best regards,
John Apostolakis, 

On Mar 12, 2012, at 10:28 AM, Sunring Ling wrote:

> 
> *** Discussion title: Fields: Magnetic and Otherwise
> 
> hello i found out the problem. please change the code
> 
> G4MagIntegratorStepper* myStepperEF3 = new G4ClassicalRK4(myEquationEF3,8);
> 
> to
> 
> G4MagIntegratorStepper* myStepperEF3 = new G4ClassicalRK4(myEquationEF3,5);
> 
> If you check the G4ClassicalRK4 class, you will find the number of
> Variables of stepper function is 5. So you can try.
> 
> -------------------------------------------------------------
> Visit this GEANT4 at hypernews.slac.stanford.edu message (to reply or unsubscribe) at: 
> http://hypernews.slac.stanford.edu/HyperNews/geant4/get/emfields/152/1/1/1/1.html 

 Add Message Add Message
to: "Re: non-uniform electric field in chamber"

 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 ]