Message: Re: simultaneous B and E fields Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Feedback Re: simultaneous B and E fields 

Keywords: magnetic field, electric field
Forum: Fields: Magnetic and Otherwise
Re: Question simultaneous B and E fields (Abigail Bickley)
Date: 16 Jul, 2007
From: Gumplinger Peter <Gumplinger Peter>

Let's assume you have a global field:

gbl_Bfield_x = 3.3*tesla;

gbl_Bfield_y = 0.0*tesla;

gbl_Bfield_z = 0.0*tesla;

fieldVector = G4ThreeVector(gbl_Bfield_x,gbl_Bfield_y,gbl_Bfield_z);

fMagneticField = new G4UniformMagField(fieldVector);

GetGlobalFieldManager()->SetDetectorField(fMagneticField);

Now you want in addition an electric field inside a subvolume:

lcl_Efield_x = 0.0*volt/m;

lcl_Efield_y = -5000.0*volt/m

lcl_EField_z = 0.0*volt/m;

fLocalField = 
new G4ElectroMagneticField(gbl_Bfield_x, gbl_Bfield_y, gbl_Bfield_z,
                           lcl_Efield_x, lcl_Efield_y, lcl_Efield_z);

fLocalFieldManager = new G4FieldManager();

fLocalFieldManager->SetDetectorField(fLocalField );

and assign this to the local LogicalVolume as usual.

> ps. In reality I would prefer to apply both a local electric field

> and a local magnetic field to different subsets of my geometry.

> Is this really not possible in Geant4?

There must be a misunderstanding. You can define as many local fields as you need and assign each to its respective logical volume. If there is no field in the space between them, then don't assign a field to the global field manager. You have to take care that in each subset of your geometry you define a field that is already the superposition of all fields in that space. What you must not do is overlap positioned logical volumes each assigned their respective field then hope that G4 somehow adds the fields in the overlap region.

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

1 Question: Re: simultaneous B and E fields   (Abigail Bickley - 16 Jul, 2007)
(_ Warning: Re: simultaneous B and E fields   (Peter Gumplinger - 17 Jul, 2007)
(_ Question: Re: simultaneous B and E fields   (Abigail Bickley - 19 Jul, 2007)
(_ Feedback: Re: simultaneous B and E fields   (Peter Gumplinger - 20 Jul, 2007)
(_ Warning: Re: simultaneous B and E fields   (Gumplinger Peter - 17 Sep, 2009)
 Add Message Add Message
to: "Re: simultaneous B and E fields"

 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 ]