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

Integrate converter with custom stopping power #1174

Merged
merged 1 commit into from
Sep 4, 2023

Conversation

ostatni5
Copy link
Member

@ostatni5 ostatni5 commented Sep 1, 2023

No description provided.

@ostatni5 ostatni5 self-assigned this Sep 1, 2023
@ostatni5 ostatni5 requested a review from grzanka September 1, 2023 15:09
@grzanka grzanka added the EuroHPC features created within EuroHPC project label Sep 1, 2023
@grzanka
Copy link
Contributor

grzanka commented Sep 4, 2023

I've deployed the frontend with this branch to yap-dev, changed custom stopping power table for one material.
Then I've saved the project as editorr.json and tried to convert it using converter (on branch from yaptide/converter#135)

image

Here is the project JSON and generated SHIELD-HIT12A input files. I execpted to see LOADDEX in mat.dat but it was missing.
converter.zip

(venv) PS C:\Users\Legion\workspace\converter> python .\converter\main.py ..\..\Downloads\editorr.json workspace
File info.json:
{'version': '', 'label': '', 'simulator': 'shieldhit'}
File beam.dat:

RNDSEED         89736501     ! Random seed
JPART0          2            ! Incident particle type
TMAX0           150.0 1.5       ! Incident energy and energy spread; both in (MeV/nucl)
TCUT0       0 1000  ! energy cutoffs [MeV]
NSTAT       10000    0       ! NSTAT, Step of saving
STRAGG          2            ! Straggling: 0-Off 1-Gauss, 2-Vavilov
MSCAT           2            ! Mult. scatt 0-Off 1-Gauss, 2-Moliere
NUCRE           1            ! Nucl.Reac. switcher: 1-ON, 0-OFF
! no beam modulator
BEAMPOS         0 0 0 ! Position of the beam
BEAMDIR         0.0 0.0 ! Direction of the beam
BEAMSIGMA       0 0  ! Beam extension
! no BEAMSAD value
DELTAE          0.03   ! relative mean energy loss per transportation step

File mat.dat:
MEDIUM 1
ICRU 276
END

File detect.dat:
Geometry Cyl
    Name CylZ_Mesh
    R 0 5 1
    Z 0 20 400

Geometry Mesh
    Name YZ_Mesh
    X -0.25 0.25 1
    Y -2 2 80
    Z 0 20 400

Geometry Cyl
    Name EntrySlab
    R 0 5 1
    Z 0 0.1 1

Geometry Cyl
    Name PeakSlab
    R 0 5 1
    Z 15.3 15.4 1

Filter
    Name Protons
    Z == 1
    A == 1
Filter
    Name Primaries
    Z == 1
    A == 1
    GEN == 0
Filter
    Name Secondary_protons
    Z == 1
    A == 1
    GEN >= 1
Output
    Filename z_profile.bdo
    Geo CylZ_Mesh
    Quantity Dose
    Quantity Fluence Protons
    Quantity Fluence Primaries
    Quantity Fluence Secondary_protons

Output
    Filename yz_profile.bdo
    Geo YZ_Mesh
    Quantity Dose
    Quantity Fluence Protons
    Quantity Fluence Secondary_protons

Output
    Filename entrance.bdo
    Geo EntrySlab
    Quantity Dose
    Quantity AvgEnergy Primaries
    Quantity AvgEnergy Protons
    Quantity AvgEnergy Secondary_protons
    Quantity dLET Protons
    Quantity tLET Protons
    Quantity Fluence Protons
    Diff1 0 160 640
    Diff1Type E

Output
    Filename peak.bdo
    Geo PeakSlab
    Quantity Dose
    Quantity AvgEnergy Primaries
    Quantity AvgEnergy Protons
    Quantity AvgEnergy Secondary_protons
    Quantity dLET Protons
    Quantity tLET Protons
    Quantity Fluence Protons
    Diff1 0 160 640
    Diff1Type E

File geo.dat:

    0    0          Proton pencil beam in water
  RCC    1       0.0       0.0       0.0       0.0       0.0      20.0
                 5.0
  RCC    2       0.0       0.0      -0.5       0.0       0.0      22.0
                 5.5
  RCC    3       0.0       0.0      -1.5       0.0       0.0      24.0
                 6.0
  END
  001          +1
  002          +2     -1
  003          +3     -1     -2
  END
    1    2    3
    1 1000    0

(venv) PS C:\Users\Legion\workspace\converter> 

@grzanka grzanka added this pull request to the merge queue Sep 4, 2023
Merged via the queue into master with commit 2bc636c Sep 4, 2023
@grzanka grzanka deleted the add-custom-power-convertert branch September 4, 2023 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
EuroHPC features created within EuroHPC project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants