mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 22:26:08 -04:00
first round of adapting tests
This commit is contained in:
parent
8726744ef2
commit
d4ff02d2a2
4 changed files with 6 additions and 5 deletions
|
|
@ -18,7 +18,7 @@ final_time = 5*24*60*60 # s
|
|||
time_steps = np.full(final_time // time_step, time_step)
|
||||
|
||||
chain_file = './chain_simple.xml'
|
||||
power = 180 # W/cm, for 2D simulations only (use W for 3D)
|
||||
power = 174 # W/cm, for 2D simulations only (use W for 3D)
|
||||
|
||||
###############################################################################
|
||||
# Load previous simulation results
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ def cecm(operator, timesteps, power, print_out=True):
|
|||
x_end = deplete(chain, x[0], op_results[1], dt, print_out)
|
||||
|
||||
# Create results, write to disk
|
||||
Results.save(operator, x, op_results, [t, t + dt], i)
|
||||
Results.save(operator, x, op_results, [t, t + dt], p, i)
|
||||
|
||||
# Advance time, update vector
|
||||
t += dt
|
||||
|
|
@ -75,4 +75,4 @@ def cecm(operator, timesteps, power, print_out=True):
|
|||
op_results = [operator(x[0], power[-1])]
|
||||
|
||||
# Create results, write to disk
|
||||
Results.save(operator, x, op_results, [t, t], len(timesteps))
|
||||
Results.save(operator, x, op_results, [t, t], p, len(timesteps))
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ class DummyOperator(TransportOperator):
|
|||
|
||||
"""
|
||||
def __init__(self):
|
||||
self.prev_res = None
|
||||
pass
|
||||
|
||||
def __call__(self, vec, power, print_out=False):
|
||||
|
|
|
|||
|
|
@ -72,8 +72,8 @@ def test_results_save(run_in_tmpdir):
|
|||
|
||||
op_result1 = [OperatorResult(k, rates) for k, rates in zip(eigvl1, rate1)]
|
||||
op_result2 = [OperatorResult(k, rates) for k, rates in zip(eigvl2, rate2)]
|
||||
Results.save(op, x1, op_result1, t1, 0)
|
||||
Results.save(op, x2, op_result2, t2, 1)
|
||||
Results.save(op, x1, op_result1, t1, 0, 0)
|
||||
Results.save(op, x2, op_result2, t2, 0, 1)
|
||||
|
||||
# Load the files
|
||||
res = ResultsList("depletion_results.h5")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue