Skip to content

Instantly share code, notes, and snippets.

@pshriwise
pshriwise / dagmc_material_swap.ipynb
Last active October 24, 2023 05:10
How to swap materials in a DAGMC .h5m file using PyMOAB
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pshriwise
pshriwise / SFR.ipynb
Last active September 2, 2023 01:50
SFR Model ID Weridness
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pshriwise
pshriwise / angular_filters_after.ipynb
Last active August 10, 2023 20:36
SurfaceFilter and MuFitler combination
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pshriwise
pshriwise / decay_heat_ex.ipynb
Last active August 1, 2023 18:35
Example of depletion cooling times and decay heat extraction for Radiant GAIN
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pshriwise
pshriwise / main.cpp
Last active October 12, 2022 15:06
Plucker Triangle Test Functions
#include "position.h"
#include "plucker.h"
int main() {
}
@pshriwise
pshriwise / build_cardinal_aurora.sh
Created August 18, 2022 04:37
Script for building Cardinal & Aurora with same MOOSE installation. All dependencies use the HDF5 version from MOOSE
#!/bin/bash
# stop script on returned error code
set -e
# SCRIPT PARAMETERS
topdir=$HOME/aurora_build
compile_cores=20
# GLOBAL VARS
@pshriwise
pshriwise / triso_compact_mats.ipynb
Last active July 13, 2022 04:48
Example of fuel material per compact in TRISO problem
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pshriwise
pshriwise / Session1.ipynb
Created May 25, 2022 14:24
Session1 Notebook ICTP Summer School 2022
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@pshriwise
pshriwise / lattice_ex.py
Created March 2, 2022 12:56
Lattice within manually defined cells
import openmc
# constants
l = 1.0
h = 1.0
model = openmc.model.Model()
# materials
@pshriwise
pshriwise / check_homogenous.py
Last active February 5, 2022 03:46
Check for axial homogeneity in OpenMC model
#!/usr/bin/env python
import numpy as np
from progressbar import progressbar
import openmc
import openmc.lib
# main parameters
n_axial = 500