Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python: Gas Profile Toolkit #1502

Open
ax3l opened this issue Jun 16, 2016 · 5 comments
Open

Python: Gas Profile Toolkit #1502

ax3l opened this issue Jun 16, 2016 · 5 comments
Labels
component: tools scripts, python libs and CMake
Milestone

Comments

@ax3l
Copy link
Member

ax3l commented Jun 16, 2016

For initializing density (gas) profiles via pre-discretized HDF5 files, we should provide a small tool-set with primitives so one can create such profiles easily via scripts.

Example

import picongpu.density_profiles

# create container for atoms/volume in m^-3
rho = density_profiles.new()

# create general [0.:1] objects with density
s = density_profiles.sphere(r=5.e-6, c=[1.e-4, 1.e-4, 1.e-4])
g = density_profiles.gaussianSphere(r=5.e-6, sig=1e-6, c=[1.e-4, 1.e-4, 1.e-4])

# additional constructor arguments:
# - gradient list (max-"or" combined):
#      1D: line (linear, cubic, exponential, etc.),
#      2D: box-linear, sphere-linear, etc.
# - rotations

# append to container
#   example: reduce a gaussian "blob" by a central solid sphere "imprint"
rho = 1.e27 * g - 1.e26 * s

# discretize to cells
rho.discretize(dCells=[1.e-9, 1.e-9, 1.e-9], min=[0., 0., 0.])
rho.write(file="density.h5", name="e_gasProfile") # in openPMD base standard

This might be great for a picongpu-python repository with toolkits and scripts. Same should be possible for discretized laser field initialization.

@ax3l ax3l added the component: tools scripts, python libs and CMake label Jun 16, 2016
@ax3l ax3l added this to the Future milestone Jun 16, 2016
@ax3l
Copy link
Member Author

ax3l commented Jun 16, 2016

ccing @C0nsultant: this might be a quick two-day project we can hack

@ax3l
Copy link
Member Author

ax3l commented Jun 21, 2016

ccing @Flamefire

@ax3l
Copy link
Member Author

ax3l commented Aug 16, 2016

ccing @m-zacharias (Melanie Rödel)

@PrometheusPi
Copy link
Member

great idea 👍 - for some reason I missed this issue till now

@ax3l
Copy link
Member Author

ax3l commented Sep 13, 2016

issue collection migrated to deppp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: tools scripts, python libs and CMake
Projects
None yet
Development

No branches or pull requests

2 participants