|Message: Re: simultaneous B and E fields||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)|
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);
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();
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:||Outline Depth:||Add message:|