Skip to content
Draft
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
38 changes: 38 additions & 0 deletions DockerfileTrelis
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# You will need the dagmc plugin (trelis17.1_ubuntu18.04.tar.gz) and Trelis
# (trelis17.1_ubuntu18.04.tar.gz) downloaded and in the same folder as this
# Dockerfile

# buid with the following command
# sudo docker build -t paramak_with_trelis .

# run with the following command
# sudo docker run -p 8888:8888 -p 5053:5053 paramak_with_trelis


FROM ukaea/paramak

COPY trelis17.1_ubuntu18.04.tar.gz .
#this command installs trelis

RUN mkdir -p /opt/Trelis-17.1/

RUN tar -xf trelis17.1_ubuntu18.04.tar.gz -C /opt/Trelis-17.1

COPY Trelis-17.1.0-Lin64.deb .
RUN dpkg -i Trelis-17.1.0-Lin64.deb

RUN cd /opt/Trelis-17.1/bin && \
ln -s plugins/svalinn/libdagmc.so . && \
ln -s plugins/svalinn/libiGeom.so . && \
ln -s plugins/svalinn/libmakeWatertight.so . && \
ln -s plugins/svalinn/libmcnp2cad.so . && \
ln -s plugins/svalinn/libMOAB.so . && \
ln -s plugins/svalinn/libMOAB.so.5 .

# puts the path for trelis into the PATH env
ENV PATH=$PATH:/opt/Trelis-17.1/bin

# adds the license details, network or VPN connection will be needed
RUN echo 'HOST trelis-lic-1.services.l ANY 5053\nISV csimsoft' >> /opt/Trelis-17.1/bin/licenses/remote2.lic

# now trelis should run in --batch --nographics mode
19 changes: 15 additions & 4 deletions paramak/neutronics_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,13 @@ def get_neutronics_results_from_statepoint_file(
_save_2d_mesh_tally_as_png(
score=score,
tally=tally,
filename=tally.name.replace('(', '').replace(')', '').replace(',', '-')
)
filename=tally.name.replace(
'(',
'').replace(
')',
'').replace(
',',
'-'))

elif '_on_3D_mesh' in tally.name:
mesh_id = 1
Expand Down Expand Up @@ -278,8 +283,14 @@ def get_neutronics_results_from_statepoint_file(
tally_label=tally.name,
tally_data=data,
error_data=error,
outfile=tally.name.replace('(', '').replace(')', '').replace(',', '-') + '.vtk'
)
outfile=tally.name.replace(
'(',
'').replace(
')',
'').replace(
',',
'-') +
'.vtk')

else:
# this must be a standard score cell tally
Expand Down