Skip to content

Extended Geometry

nsoblath edited this page May 7, 2014 · 1 revision

There are a variety of geometry-related information that can be added to the geometric elements, that goes beyond the definition and placement of shapes. In the quadrupole trap example this is in a separate file for convenience purposes only.

The extended geometry file starts by including the basic geometry file. The XML processor in Kassiopeia will read and process all of QuadrupoleTrapBasicGeometry.xml at this point. The next line re-opens the geometry configuration.

<include path="[config_path]" base="QuadrupoleTrapBasicGeometry.xml"/>

<geometry>

As a first extension of the basic geometry, we'll add some colors to the different elements of the geometry. These will be used for the visualization.

    <appearance name="app_magnet" color="0 255 96 96" arc="72" spaces="quadrupole_trap_assembly/@magnet_tag"/>
    <appearance name="app_electrode" color="255 128 0 96" arc="72" surfaces="quadrupole_trap_assembly/@electrode_tag"/>
    <appearance name="app_cell" color="96 96 255 96" arc="72" spaces="quadrupole_trap_assembly/@cell_tag"/>
    <appearance name="app_target" color="255 96 255 96" arc="72" surfaces="quadrupole_trap_assembly/@target_tag"/>
    <appearance name="app_start" color="0 255 0 96" arc="72" surfaces="quadrupole_trap_assembly/@start_tag"/>
    <appearance name="app_stop" color="255 0 0 96" arc="72" surfaces="quadrupole_trap_assembly/@stop_tag"/>

In the appearance tag a few different attributes are defined:

  • name labels the particular appearance property being defined,
  • color is a 4-element vector; each element is an integer running from 0 to 255: red, green, blue, transparency,
  • arc
  • surfaces specifies which surfaces the appearance properties should be applied to.

For the simulation of charge densities on the electrodes, we'll need to define how the surface is meshed (i.e. divided into smaller, simpler surface shapes). In this case we'll mesh the electrode surfaces with the axial_mesh since we have cylindrical symmetry in our simulation.

    <axial_mesh name="mesh_electrode" surfaces="quadrupole_trap_assembly/@electrode_tag"/>

Next we define the boundary conditions that will be used for the electrostatic simulation of the electrodes.

    <electrostatic_dirichlet name="electrode_endcap" surfaces="quadrupole_trap_assembly/top_endcap_electrode" value="0."/>
    <electrostatic_dirichlet name="electrode_endcap" surfaces="quadrupole_trap_assembly/bottom_endcap_electrode" value="0."/>
    <electrostatic_dirichlet name="electrode_ring" surfaces="quadrupole_trap_assembly/ring_electrode" value="10."/>

We specify that the solenoid object is, in fact, an electromagnet, and we give the current in Amps.

    <electromagnet name="electromagnet_solenoid" spaces="quadrupole_trap_assembly/@solenoid_tag" current="{9.5 * 50000}"/>

</geometry>
Clone this wiki locally