mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-29 06:35:48 -04:00
Added supportfor group-wise betas
This commit is contained in:
parent
2c20dc0f83
commit
be16cb750d
5 changed files with 131 additions and 44 deletions
|
|
@ -4,11 +4,15 @@
|
|||
<cell id="2" material="2" region="2 -3" universe="0" />
|
||||
<cell id="3" material="3" region="3 -4" universe="0" />
|
||||
<cell id="4" material="4" region="4 -5" universe="0" />
|
||||
<cell id="5" material="5" region="5 -6" universe="0" />
|
||||
<cell id="6" material="6" region="6 -7" universe="0" />
|
||||
<surface boundary="reflective" coeffs="0.0" id="1" type="x-plane" />
|
||||
<surface coeffs="232.3625" id="2" type="x-plane" />
|
||||
<surface coeffs="464.725" id="3" type="x-plane" />
|
||||
<surface coeffs="697.0875000000001" id="4" type="x-plane" />
|
||||
<surface boundary="vacuum" coeffs="929.45" id="5" type="x-plane" />
|
||||
<surface coeffs="154.90833333333333" id="2" type="x-plane" />
|
||||
<surface coeffs="309.81666666666666" id="3" type="x-plane" />
|
||||
<surface coeffs="464.725" id="4" type="x-plane" />
|
||||
<surface coeffs="619.6333333333333" id="5" type="x-plane" />
|
||||
<surface coeffs="774.5416666666666" id="6" type="x-plane" />
|
||||
<surface boundary="vacuum" coeffs="929.45" id="7" type="x-plane" />
|
||||
</geometry>
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<materials>
|
||||
|
|
@ -29,6 +33,14 @@
|
|||
<density units="macro" value="1.0" />
|
||||
<macroscopic name="mat_4" />
|
||||
</material>
|
||||
<material id="5" name="vec group beta">
|
||||
<density units="macro" value="1.0" />
|
||||
<macroscopic name="mat_5" />
|
||||
</material>
|
||||
<material id="6" name="matrix group beta">
|
||||
<density units="macro" value="1.0" />
|
||||
<macroscopic name="mat_6" />
|
||||
</material>
|
||||
</materials>
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<settings>
|
||||
|
|
@ -38,7 +50,7 @@
|
|||
<inactive>5</inactive>
|
||||
<source strength="1.0">
|
||||
<space type="box">
|
||||
<parameters>0.0 -1000.0 -1000.0 232.3625 1000.0 1000.0</parameters>
|
||||
<parameters>0.0 -1000.0 -1000.0 154.90833333333333 1000.0 1000.0</parameters>
|
||||
</space>
|
||||
</source>
|
||||
<output>
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
k-combined:
|
||||
9.928704E-01 2.679667E-02
|
||||
1.003463E+00 2.173155E-02
|
||||
|
|
|
|||
|
|
@ -85,6 +85,29 @@ def create_library():
|
|||
mat_4.set_total(total)
|
||||
mg_cross_sections_file.add_xsdata(mat_4)
|
||||
|
||||
# Make the base data that uses chi & nu-fiss vectors with a group-wise beta
|
||||
mat_5 = openmc.XSdata('mat_5', groups)
|
||||
mat_5.order = 1
|
||||
mat_5.num_delayed_groups = 2
|
||||
mat_5.set_beta(np.stack([beta] * groups.num_groups))
|
||||
mat_5.set_nu_fission(np.multiply(nu, fiss))
|
||||
mat_5.set_absorption(absorption)
|
||||
mat_5.set_scatter_matrix(scatter)
|
||||
mat_5.set_total(total)
|
||||
mat_5.set_chi(chi)
|
||||
mg_cross_sections_file.add_xsdata(mat_5)
|
||||
|
||||
# Make a version that uses a nu-fission matrix with a group-wise beta
|
||||
mat_6 = openmc.XSdata('mat_6', groups)
|
||||
mat_6.order = 1
|
||||
mat_6.num_delayed_groups = 2
|
||||
mat_6.set_beta(np.stack([beta] * groups.num_groups))
|
||||
mat_6.set_nu_fission(np.outer(np.multiply(nu, fiss), chi))
|
||||
mat_6.set_absorption(absorption)
|
||||
mat_6.set_scatter_matrix(scatter)
|
||||
mat_6.set_total(total)
|
||||
mg_cross_sections_file.add_xsdata(mat_6)
|
||||
|
||||
# Write the file
|
||||
mg_cross_sections_file.export_to_hdf5('2g.h5')
|
||||
|
||||
|
|
@ -99,8 +122,10 @@ class MGXSTestHarness(PyAPITestHarness):
|
|||
|
||||
def test_mg_basic_delayed():
|
||||
create_library()
|
||||
model = slab_mg(num_regions=4, mat_names=['vec beta', 'vec no beta',
|
||||
'matrix beta', 'matrix no beta'])
|
||||
model = slab_mg(num_regions=6, mat_names=['vec beta', 'vec no beta',
|
||||
'matrix beta', 'matrix no beta',
|
||||
'vec group beta',
|
||||
'matrix group beta'])
|
||||
|
||||
harness = PyAPITestHarness('statepoint.10.h5', model)
|
||||
harness.main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue