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

Feature/43 reorganize electrons #55

Merged
merged 21 commits into from
Jun 9, 2024
Merged

Conversation

retkiewi
Copy link
Collaborator

No description provided.

@retkiewi retkiewi changed the title Feature/43 reorganize hadrons Feature/43 reorganize electrons May 25, 2024
@retkiewi
Copy link
Collaborator Author

retkiewi commented May 25, 2024

Hi @jbrage, I've been rewriting the electrons package to python and I've noticed that in the original implementation of continuous_beam_PDEsolver we return the f as a series of

(step_initialized - step_recombined) / step_initialized

I wanted to unify the results for pulsed and continuous PDE solvers, but we can't do the same series for pulsed beam as step_initialized is 0 for all time steps > 0. For now I went with something similar to a marching average, where we do something like this:

initialized # sum of ions initialized in current + previous time steps (for pulsed - ions initialized in the first time step)
recombined # sum of ions recombined in current + previous time steps
(initialized - recombined) / step_initialized

What do you think - does this approach make sense? Maybe there is some other metric applicable to both scenarios that would be preferable.

class GenericElectronSolver(ABC):
# Simulation parameters
electron_density_per_cm3: float # fluence-rate [/cm^2/s]
voltage_V: float # [V/cm] magnitude of the electric field
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jbrage should this be volts or volts/cm? The argument says that it should be volts, but the comment says otherwise.

electrons/python/generic_electron_solver.py Outdated Show resolved Hide resolved
electrons/python/generic_electron_solver.py Outdated Show resolved Hide resolved
electrons/python/continuous_e_beam.py Outdated Show resolved Hide resolved
electrons/python/continuous_e_beam.py Outdated Show resolved Hide resolved
electrons/python/generic_electron_solver.py Outdated Show resolved Hide resolved
electrons/python/generic_electron_solver.py Show resolved Hide resolved
electrons/python/generic_electron_solver.py Outdated Show resolved Hide resolved
electrons/python/run_simulation.py Outdated Show resolved Hide resolved
@retkiewi retkiewi merged commit 377d0f5 into master Jun 9, 2024
3 checks passed
retkiewi added a commit that referenced this pull request Jun 14, 2024
commit 377d0f5
Merge: 3448172 e4bc7ec
Author: retkiewi <58555777+retkiewi@users.noreply.github.com>
Date:   Sun Jun 9 15:50:22 2024 +0200

    Merge pull request #55 from jbrage/feature/43-reorganize-hadrons

    Feature/43 reorganize electrons

commit e4bc7ec
Author: retkiewi <krzret@student.agh.edu.pl>
Date:   Sat Jun 8 19:57:37 2024 +0200

    improve runners, beam simulation and use more numpy

commit 532ac8e
Author: retkiewi <krzret@student.agh.edu.pl>
Date:   Sat May 25 20:45:01 2024 +0200

    fix nit

commit 13ed258
Author: retkiewi <krzret@student.agh.edu.pl>
Date:   Sat May 25 20:39:26 2024 +0200

    move calculate method to generic solver

commit 08bc588
Author: retkiewi <krzret@student.agh.edu.pl>
Date:   Sat May 25 20:31:17 2024 +0200

    only return f in run simulation for continous

commit f2157e3
Author: retkiewi <krzret@student.agh.edu.pl>
Date:   Sat May 25 20:22:43 2024 +0200

    unify calculate method for pulsed and continous beams

commit 9a1247c
Author: retkiewi <krzret@student.agh.edu.pl>
Date:   Sat May 25 20:10:25 2024 +0200

    return f as an array of results after each time step

commit 2323a81
Author: retkiewi <krzret@student.agh.edu.pl>
Date:   Sat May 25 19:27:42 2024 +0200

    fix getting solver name in runner

commit 5ed8619
Author: retkiewi <krzret@student.agh.edu.pl>
Date:   Sat May 25 19:14:38 2024 +0200

    update simulation runners

commit a2c3e3b
Author: retkiewi <krzret@student.agh.edu.pl>
Date:   Sat May 25 18:32:33 2024 +0200

    use dataclasses for solvers

commit 55aa3aa
Author: retkiewi <krzret@student.agh.edu.pl>
Date:   Sun May 19 16:32:29 2024 +0200

    add simulation runners, fix bugs

commit 3240b58
Author: retkiewi <krzret@student.agh.edu.pl>
Date:   Sun May 19 15:29:12 2024 +0200

    optimize constant calculations

commit 6c77bb7
Author: retkiewi <krzret@student.agh.edu.pl>
Date:   Sun May 19 15:27:00 2024 +0200

    remove parameter dict in generic solver

commit 70a3ef5
Author: retkiewi <krzret@student.agh.edu.pl>
Date:   Sun May 19 15:09:51 2024 +0200

    fix generic_electron_solver formatting

commit d29a577
Author: retkiewi <krzret@student.agh.edu.pl>
Date:   Sat May 18 19:28:05 2024 +0200

    extract post beam electron density calculation to a separate method

commit 1305350
Author: retkiewi <krzret@student.agh.edu.pl>
Date:   Sat May 18 19:18:20 2024 +0200

    extract common init

commit 841d56a
Author: retkiewi <krzret@student.agh.edu.pl>
Date:   Sat May 18 18:53:48 2024 +0200

    small cleanup of pulsed_e_beam.py

commit 68e9ff2
Author: retkiewi <krzret@student.agh.edu.pl>
Date:   Sat May 18 18:50:46 2024 +0200

    convert electrons/continous_e_beam.py to python

commit 6b4df88
Author: retkiewi <krzret@student.agh.edu.pl>
Date:   Sat May 18 18:42:14 2024 +0200

    large cleanup in electrons/continous_e_beam.py

commit 541d5cc
Author: retkiewi <krzret@student.agh.edu.pl>
Date:   Sat May 18 18:41:46 2024 +0200

    small cleanup in initial_recombination.py

commit a404c04
Author: retkiewi <krzret@student.agh.edu.pl>
Date:   Sat May 18 18:03:00 2024 +0200

    convert electrons/continous_e_beam.py to python

commit 3448172
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Apr 1 15:23:06 2024 +0000

    Bump actions/setup-python from 5.0.0 to 5.1.0

    Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.0.0 to 5.1.0.
    - [Release notes](https://github.com/actions/setup-python/releases)
    - [Commits](actions/setup-python@v5.0.0...v5.1.0)

    ---
    updated-dependencies:
    - dependency-name: actions/setup-python
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

commit d6c0035
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Dec 11 15:54:38 2023 +0000

    Bump actions/setup-python from 4.7.1 to 5.0.0

    Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4.7.1 to 5.0.0.
    - [Release notes](https://github.com/actions/setup-python/releases)
    - [Commits](actions/setup-python@v4.7.1...v5.0.0)

    ---
    updated-dependencies:
    - dependency-name: actions/setup-python
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

commit a246282
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Oct 2 20:37:55 2023 +0000

    Bump actions/checkout from 3 to 4

    Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
    - [Release notes](https://github.com/actions/checkout/releases)
    - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
    - [Commits](actions/checkout@v3...v4)

    ---
    updated-dependencies:
    - dependency-name: actions/checkout
      dependency-type: direct:production
      update-type: version-update:semver-major
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

commit 8ef4655
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Oct 2 15:30:14 2023 +0000

    Bump actions/setup-python from 4.5.0 to 4.7.1

    Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4.5.0 to 4.7.1.
    - [Release notes](https://github.com/actions/setup-python/releases)
    - [Commits](actions/setup-python@v4.5.0...v4.7.1)

    ---
    updated-dependencies:
    - dependency-name: actions/setup-python
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

commit 0dce892
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Jan 16 15:46:26 2023 +0000

    Bump actions/setup-python from 4.4.0 to 4.5.0

    Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4.4.0 to 4.5.0.
    - [Release notes](https://github.com/actions/setup-python/releases)
    - [Commits](actions/setup-python@v4.4.0...v4.5.0)

    ---
    updated-dependencies:
    - dependency-name: actions/setup-python
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

commit b5ca6d8
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Dec 26 15:06:08 2022 +0000

    Bump actions/setup-python from 4.3.1 to 4.4.0

    Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4.3.1 to 4.4.0.
    - [Release notes](https://github.com/actions/setup-python/releases)
    - [Commits](actions/setup-python@v4.3.1...v4.4.0)

    ---
    updated-dependencies:
    - dependency-name: actions/setup-python
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

commit 24ecd26
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Date:   Mon Dec 12 15:08:26 2022 +0000

    Bump actions/setup-python from 4.3.0 to 4.3.1

    Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4.3.0 to 4.3.1.
    - [Release notes](https://github.com/actions/setup-python/releases)
    - [Commits](actions/setup-python@v4.3.0...v4.3.1)

    ---
    updated-dependencies:
    - dependency-name: actions/setup-python
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...

    Signed-off-by: dependabot[bot] <support@github.com>

commit d2f22ba
Merge: ee90579 70d9bce
Author: retkiewi <58555777+retkiewi@users.noreply.github.com>
Date:   Thu Dec 8 20:45:07 2022 +0100

    Merge pull request #45 from jbrage/feature/43-reorganize-hadrons

    Reorganize hadrons package
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant