|
| 1 | +import openmc |
| 2 | +import numpy as np |
| 3 | + |
| 4 | +def control_rod(gr_sq_neg, |
| 5 | + gr_extra_regions, |
| 6 | + inter_elem_channel, |
| 7 | + fuel_hole, |
| 8 | + fuel, |
| 9 | + moder): |
| 10 | + """Create universe for control rod element with control rod fully inserted. |
| 11 | + Based on specification in Roberton, 1971. |
| 12 | +
|
| 13 | + Parameters |
| 14 | + ---------- |
| 15 | + gr_sq_neg : openmc.Intersection |
| 16 | + The region bounding the outer surface of the 6 in. x 6 in. graphite |
| 17 | + element. |
| 18 | + gr_extra_regions : list of (openmc.Region, str) |
| 19 | + 'Add-on' regions and their names for the graphite element. |
| 20 | + Includes ribs, rib tips, and gap-filling regions. |
| 21 | + inter_elem_channel : openmc.Region, list of (openmc.Region, str) |
| 22 | + Inter-element channel region(s). |
| 23 | + fuel_hole : openmc.ZCylinder |
| 24 | + Central fuel hole in graphite element. |
| 25 | + fuel : openmc.Material |
| 26 | + Fuel salt material |
| 27 | + moder : openmc.Material |
| 28 | + Graphite material |
| 29 | +
|
| 30 | + Returns |
| 31 | + ------- |
| 32 | + cr : openmc.Universe |
| 33 | + Univerese for control rod element with control rod fully insterted. |
| 34 | + """ |
| 35 | + |
| 36 | + s1 = openmc.ZCylinder(r=4.7625, name='control_rod') |
| 37 | + |
| 38 | + c1 = openmc.Cell(fill=moder, region=-s1, name='control_rod') |
| 39 | + c2 = openmc.Cell(fill=fuel, region=(+s1 & -fuel_hole), name='cr_fuel_inner') |
| 40 | + c3 = openmc.Cell(fill=moder, region=(+fuel_hole & |
| 41 | + gr_sq_neg & |
| 42 | + inter_elem_channel), |
| 43 | + name='cr_moderator') |
| 44 | + c4 = openmc.Cell(fill=fuel, region= (~gr_sq_neg & inter_elem_channel), |
| 45 | + name='cr_fuel_outer') |
| 46 | + #universe_id=3 |
| 47 | + cr = openmc.Universe(name='control_rod', cells=[c1, c2, c3, c4]) |
| 48 | + |
| 49 | + for (reg, name) in gr_extra_regions: |
| 50 | + cr.add_cell(openmc.Cell(fill=moder, region=reg, |
| 51 | + name=f'cr_moderator_{name}')) |
| 52 | + |
| 53 | + return cr |
| 54 | + |
| 55 | +def control_rod_channel(gr_sq_neg, |
| 56 | + gr_extra_regions, |
| 57 | + inter_elem_channel, |
| 58 | + fuel_hole, |
| 59 | + fuel, |
| 60 | + moder): |
| 61 | + """Create universe for control rod element with control rod fully withdrawn. |
| 62 | + Based on specification in Roberton, 1971. |
| 63 | +
|
| 64 | + Parameters |
| 65 | + ---------- |
| 66 | + gr_sq_neg : openmc.Intersection |
| 67 | + The region bounding the outer surface of the 6 in. x 6 in. graphite |
| 68 | + element. |
| 69 | + gr_extra_regions : list of (openmc.Region, str) |
| 70 | + 'Add-on' regions and their names for the graphite element. |
| 71 | + Includes ribs, rib tips, and gap-filling regions. |
| 72 | + inter_elem_channel : openmc.Region, list of (openmc.Region, str) |
| 73 | + Inter-element channel region(s). |
| 74 | + fuel_hole : openmc.ZCylinder |
| 75 | + Central fuel hole in graphite element. |
| 76 | + fuel : openmc.Material |
| 77 | + Fuel salt material |
| 78 | + moder : openmc.Material |
| 79 | + Graphite material |
| 80 | +
|
| 81 | + Returns |
| 82 | + ------- |
| 83 | + crc : openmc.Universe |
| 84 | + Universe for control rod element with control rod fully withdrawn. |
| 85 | + """ |
| 86 | + |
| 87 | + c1 = openmc.Cell(fill=fuel, region=(-fuel_hole), name='crc_fuel_inner') |
| 88 | + |
| 89 | + c2 = openmc.Cell(fill=moder, region=(+fuel_hole & |
| 90 | + gr_sq_neg & |
| 91 | + inter_elem_channel), |
| 92 | + name='crc_moderator') |
| 93 | + c3 = openmc.Cell(fill=fuel, region=(~gr_sq_neg & inter_elem_channel), |
| 94 | + name='crc_fuel_outer') |
| 95 | + |
| 96 | + # universe_id=4 |
| 97 | + crc = openmc.Universe(name='control_rod_channel', cells=[c1, c2, c3]) |
| 98 | + |
| 99 | + for (reg, name) in gr_extra_regions: |
| 100 | + crc.add_cell(openmc.Cell(fill=moder, region=reg, |
| 101 | + name=f'crc_moderator_{name}')) |
| 102 | + |
| 103 | + return crc |
0 commit comments