Picongpu: dimensions 2D/3D

Created on 27 May 2020  路  6Comments  路  Source: ComputationalRadiationPhysics/picongpu

I just want to check with you the dimensions. Since PICONGPU is in SI units, when working in 3D the units of 'e_chargeDensity' are [C/m^3] (Coulomb per cubic_metre). OK, but what are the units in 2D? I assume still [C/m^3] so that the adios-specific definition listed below will give me [C/m^3] no matter if I have 3D or 2D data. Is that correct, please?
thank you,

def get_electronsCharge(series, iteration, coord=io.Mesh_Record_Component.SCALAR):
    it = series.iterations[iteration]
    mesh = it.meshes['e_chargeDensity']
    component = mesh[coord]
    data = component[()] * component.unit_SI
    factor = component.unit_SI;
    return data, factor;

But then, if the 2D 'e_chargeDensity' comes in [C/m^3] how can I integrate it to get the number of electrons? The following operation with uXspace, uYspace being the mesh sizes, would give me the line charge desnity in [C/m].

eChargeDensity, factor = get_electronsCharge(ts, it);
ts.flush();
tc = uXspace * uYspace * eChargeDensity.sum() * factor;
numberElectrons = int(-tc/e); # line charge density [C/m]?
question

Most helpful comment

All 6 comments

I am not a physicist so please take the following with a grain of salt, and perhaps someone will come up with a better explanation. There is a note on units for 2D here. Also a similar text in our documentation. So I think even in 2D you still set up a step in z, even though everything is constant along z. And things like spatial density are still computed as if in 3d using all 3 spatial steps. So then this step can be used to get some 2d quantities out of our 3d output.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ax3l picture ax3l  路  4Comments

ax3l picture ax3l  路  4Comments

steindev picture steindev  路  4Comments

psychocoderHPC picture psychocoderHPC  路  4Comments

hightower8083 picture hightower8083  路  4Comments