Message: Simultaneous E and B Fields??? Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Simultaneous E and B Fields??? 

Keywords: electric magnetic field simultaneous
Forum: Fields: Magnetic and Otherwise
Date: 07 Jun, 2005
From: Daniel McDevitt <Daniel McDevitt>

Iím trying to create an electric AND magnetic field, simultaneously 
inside a portion of my geometry into which I will be shooting positrons.  
Iím using a global magnetic field (cannibalized from /novice/exampleN02)
and a local electric field.  

// For global mag field
    G4double fieldValue = 0.5687*tesla; 
    fpMagField = new ExN02MagneticField(G4ThreeVector (0.,0.,fieldValue));

//  Local Electric Field
     G4double pfieldValue = 0.001*volt/cm;
     G4UniformElectricField* myElectricField = new G4UniformElectricField(G4ThreeVector(pfieldValue,0,0));
     G4EqMagElectricField *myeEquation= new G4EqMagElectricField(myElectricField);
     G4int nvar = 8;
     G4MagIntegratorStepper* myStepper = new G4ClassicalRK4(myeEquation,nvar);
     G4MagInt_Driver* myIntgrDriver=new G4MagInt_Driver(1.0e-3*mm, myStepper, myStepper->GetNumberOfVariables());
     G4ChordFinder* myChordFinder = new G4ChordFinder(myIntgrDriver);
     G4bool fieldChangesEnergy = true;
     G4FieldManager* pFieldMgr = new G4FieldManager(myElectricField,myChordFinder,fieldChangesEnergy);

When the electric field is turned on inside the geometry (ie pFieldMgr 
is inserted into the Logical volume as shown below), the magnetic field
no longer works.  However, the electric field functions.

// Aerogel Hi
 solidAerogelhi1 = new G4Box("Aerogel_hi1Box", aerogelx,aerogely,aerogelz);
 logicAerogelhi1 = new G4LogicalVolume(solidAerogelhi1 , AerogelhiMater, "Aerogel_hi1",0,0,0);
 physiAerogelhi1 = new G4PVPlacement(0,              // no rotation
                                  positionAerogelhi1, // at (x,y,z)
                                  logicAerogelhi1,    // its logical volume
                                  "Aerogel_hi1",  // its name
                                  logicWorld,      // its mother  volume
                                  false,           // no boolean operations
                                  0);              // copy number
// Aerogel hi replicated
     = new G4Box("Aeroghi1ColumnBox",1.0*cm,0.25*cm,0.025*cm);
     = new G4LogicalVolume(solidAeroghi1Column,AerogelhiMater,"logicAeroghi1Column",pFieldMgr,0,0);
  physiAeroghi1Column = new G4PVReplica("physiAeroghi1Column",logicAeroghi1Column,
                  logicAerogelhi1, kZAxis,100,0.05*cm);

It appears that the electric field pre-empts the magnetic field and I 
am left with the options of either one or the other, depending on which
one I do not implement.

How does one create both a magnetic and electric field, simultaneously 
in a geometry?



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

1 Feedback: Re: Simultaneous E and B Fields???   (Peter Gumplinger - 07 Jun, 2005)
 Add Message Add Message
to: "Simultaneous E and B 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 ]