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

Simulate optionally rebuilds model #655

Merged
merged 2 commits into from
Jan 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/dockerhub-publish-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
with:
dockerfile: DockerfileDependances
push: true
tags: ukaea/paramak:latest
tags: ukaea/paramak:dependances
build-args: |
cq_version=master
compile_cores=2
Expand Down
19 changes: 10 additions & 9 deletions paramak/parametric_neutronics/neutronics_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,17 +269,19 @@ def create_neutronics_geometry(self, method=None):

Arguments:
method: (str): The method to use when making the imprinted and
merged geometry. Options are "ppp", "trelis", "pymoab".
Defaults to None.
merged geometry. Options are "ppp", "trelis", "pymoab" and
None. Defaults to None.
"""

os.system('rm dagmc_not_watertight.h5m')
os.system('rm dagmc.h5m')

if method not in ['ppp', 'trelis', 'pymoab']:
if method in ['ppp', 'trelis', 'pymoab']:
os.system('rm dagmc_not_watertight.h5m')
os.system('rm dagmc.h5m')
elif method is None and Path.is_file('dagmc.h5m'):
print('Using previously made dagmc.h5m file')
else:
raise ValueError(
"the method using in create_neutronics_geometry \
should be either ppp or trelis not", method)
should be either ppp, trelis, pymoab or None.", method)

if method == 'ppp':

Expand Down Expand Up @@ -322,8 +324,7 @@ def create_neutronics_geometry(self, method=None):
filename='dagmc.h5m',
tolerance=self.faceting_tolerance
)

print('neutronics model saved as dagmc.h5m')
return 'dagmc.h5m'

def _make_watertight(self):
"""Runs the DAGMC make_watertight script thatt seals the facetets of
Expand Down