Picongpu: Transforming the FoilLCT example into a 3D model

Created on 28 Nov 2019  路  3Comments  路  Source: ComputationalRadiationPhysics/picongpu

Hello,
I successfully ran the 2D FoilLCT example after removing all particle except the carbon atoms and the electrons and I wish to transform it in a 3D version. I do this because I need to simulate a carbon nanotube (~1.5 nm radius ) and I will need to arrange the carbon atoms in 3D
What I did:

  1. changed the density.param to define homoegenous using Homogenous = HomogenousImpl; and used it in speciesInitialization.param
  2. changed the delta_t in the grid.param files as
    constexpr float_64 DELTA_T_SI = CELL_WIDTH_SI / ( 1.732 * SPEED_OF_LIGHT_SI );
  3. changed the memory.param to
using SuperCellSize = typename mCT::shrinkTo<
        mCT::Int< 8, 8, 4 >,
        simDim
    >::type;
  1. changed the dimension.param to
#define SIMDIM DIM3

The error I get is

(mpl_::failed ************(Courant_Friedrichs_Levy_condition_failure____check_your_grid_param_file_________157::************)(pmacc::StaticAssertError))

Feature request: it would be great if you could modify the pic-compile shell script such that it colours the word "error" in red and the word "warning" in blue so that users can spot them easily in the terminal.

which made me aware that the time step is larger than necessary but I also feel that since now sim_dim = 3 I must reallocate memory on the GPU. I tried to use the memory allocator python script (page 240 in the manual) but from picongpu.utils import MemoryCalculator fails and indeed the file /home/cristi/src/spack/opt/spack/linux-linuxmint19-westmere/gcc-7.4.0/picongpu-0.4.3-gsy5h4idvpfvsvlf2e2qj6xbaptdvg7h/lib/python/picongpu/utils/__init__.py is empty.

What can I do in this case?
Thank you.

CNT_B.zip

examples question

All 3 comments

@cbontoiu thanks for your report.
I believe that error with the CFL was caused by rounding off sqrt(3) to the wrong side and so getting slightly above it. Also please keep in mind that we recommend being close to the limit, but not right at it due to rounding errors in floating-point arithmetic. Multiplying your right-hand side of DELTA_T_SI by something like 0.99 should both resolve the error and be in line with our recommendations.

Highlighting of errors and warnings makes sense to me. @psychocoderHPC do you know if there is an easy way to do it, or perhaps as terminal or .profile settings to make it optional?

With memory allocation: good thinking, sorry the tool did not work, not sure why. You can try its version from the repo directly, since it's Python and should work out-of-the box. As a starting point, you might consider having about the same amount of macroparticles per GPU as in the original setup. Taking into account your number of cells per GPU and number of macroparticles per cell (not sure if you change that, compared to 2d).

Hi, @cbontoiu I was also simulating similar things and had similar output before. One possible problem is as mentioned by @sbastrakov. The other one may due to CELL_WIDTH_SI is not the smallest among the three-axis when you change the resolution. You could instead try CELL_HEIGHT_SI or CELL_DEPTH_SI, whichever is smaller forDELTA_T_SI input

Thanks for sharing your experience @StevE-Ong !

Was this page helpful?
0 / 5 - 0 ratings

Related issues

psychocoderHPC picture psychocoderHPC  路  4Comments

cbontoiu picture cbontoiu  路  3Comments

berceanu picture berceanu  路  3Comments

hightower8083 picture hightower8083  路  4Comments

ax3l picture ax3l  路  4Comments