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

Add the name to the cells in OpenMC to improve identification #61

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

ecasglez
Copy link
Contributor

Add the name to the cells in OpenMC to improve identification. The name is the same that is used in MCNP cell.Comments, which is taken from the part names in the Step file.

In the Python input format, Cell definition will be converted from

C2 = openmc.Cell(fill=M4, region=((+S6 & -S13 & -S10) | (-S12 & -S6)))

to

C2 = openmc.Cell(name="Name of the cell in the Step file", fill=M4, region=((+S6 & -S13 & -S10) | (-S12 & -S6)))

XML files are also modified.

There is an automatic cell comment with several lines:

Automatic Generated Void Cell. Enclosure(-26.300, 26.300, -26.300, 26.300, -65.000, 31.000)
Enclosed cells : (1, 2, 3, 4, 5)

In this cases, the new line character is replaced by a ". ", so that line would be:

Automatic Generated Void Cell. Enclosure(-26.300, 26.300, -26.300, 26.300, -65.000, 31.000). Enclosed cells : (1, 2, 3, 4, 5)

I have tested it in Linux only, not in Windows.

The name is the same that is used in MCNP inputs cell.Comments
@shimwell
Copy link
Collaborator

This looks like a useful addition to me, great PR 🎉

@psauvan psauvan merged commit a96e19d into GEOUNED-org:dev Apr 23, 2024
6 checks passed
psauvan added a commit that referenced this pull request Apr 23, 2024
* update Fuzzy write function

* several stp file update

* script to color CAD document following material label

* fix rounding error of z value acos(z) evaluation

* Add a bug report template and .gitignore (#44)

* Removed unused imports and variables (#35)

* raise value error instead of exit (#41)

* Update to testing path (#40)

* changed hardcoded path to work for all users

* path update

* Update bug_report.md

* raising catchable error instead of exit (#47)

* raising catchable error instead of exit

* added new line

* added try for freecad import (#48)

* Solve SyntaxtError producing a bug (#49)

* Solve SyntaxtError producing a bug

* Limit the amount of decimals printed in the enclosure comment

* fixed error units in OpenMC output

* GEOUNED training presentation added (#53)

* Adding minimal ci to check cad converts (#52)

* added minimal CI

* all step files

* added ci yml

* removed freecadcmd arg

* Update pyproject.toml

Update url links to "GEOUNED-org"

* typo correction to test if CI is working (#54)

* typo correction

* [skip ci] added ci status badge

* opening up ci to all os systems

* fix small bug with torus (bad identification of closed mozaic faces)

* Adding minimal volume checking CI comparing CAD and CSG volumes (#56)

* added volume test to ci

* removed if os cond

* added csg vs cad volume for **most** stp files

* Added mkdocs (#57)

* added example docs

* added docs deps

* Reverting mkdocs PR 57 (#58)

* Revert "added example docs"

This reverts commit bd1c67a.

* Revert "added docs deps"

This reverts commit f31d241.

* Adding minimal particle transport tests on resulting csg files (#59)

* added transport tests

* removed files that break, raised issue

* [skip ci] remove prints

* added link to issue

* Add the name to the cells in OpenMC to improve identification (#61)

The name is the same that is used in MCNP inputs cell.Comments

* converting with no simplification = more geometry works (#62)

* reduced number of skiped geoms (#63)

* [skip ci] corrected bade to main branch (#64)

* Improved import statements (#65)

* changed single file from package to relative imports

* 2nd file converted to relative imports

* converted more fiels to relative import

* relative imports everywhere

* isort on all imports

* Add bug report and .gitignore to main (#45) (#66)

Co-authored-by: AlvaroCubi <[email protected]>

* added standard gitignore for python project (#68)

---------

Co-authored-by: psauvan <[email protected]>
Co-authored-by: Tony <[email protected]>
Co-authored-by: Jonathan Shimwell <[email protected]>
Co-authored-by: Aljaz Kolsek (F4E) <[email protected]>
Co-authored-by: Emilio Castro <[email protected]>
@AlvaroCubi AlvaroCubi mentioned this pull request Apr 24, 2024
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.

3 participants