Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

recent code cause runtime error for UKAEA openmc workshop task12 #14

Closed
qingfengxia opened this issue Sep 30, 2020 · 1 comment
Closed

Comments

@qingfengxia
Copy link

qingfengxia commented Sep 30, 2020

here is error message
task12 code

use a plain point source coming with OpenMC official is fine, as suggested by Jonathon. see the code tweak at the end.

===============> FIXED SOURCE TRANSPORT SIMULATION <===============

Simulating batch 1
WARNING: WARNING: WARNING: Could not find the cell containing particle 1
WARNING: Could not find the cell containing particle 501

Could not find the cell containing particle 876

Could not find the cell containing particle 251
WARNING: Could not find the cell containing particle 751
WARNING: Could not find the cell containing particle 626
WARNING: Could not find the cell containing particle 376
WARNING: Could not find the cell containing particle 126
Traceback (most recent call last):
File "example_unstructured_mesh_simulation.py", line 99, in
model.run()
File "/home/qxia/.local/lib/python3.8/site-packages/openmc/model/model.py", line 228, in run
openmc.run(**kwargs)
File "/home/qxia/.local/lib/python3.8/site-packages/openmc/executor.py", line 218, in run
_run(args, output, cwd)
File "/home/qxia/.local/lib/python3.8/site-packages/openmc/executor.py", line 28, in _run
raise subprocess.CalledProcessError(p.returncode, ' '.join(args),
subprocess.CalledProcessError: Command 'openmc' died with <Signals.SIGSEGV: 11>.

# creates a source object
source = openmc.Source()
if False:
    plasma_params = {
        "elongation": 2.9,
        "ion_density_origin": 1.09e20,
        "ion_density_peaking_factor": 1,
        "ion_density_pedestal": 1.09e20,
        "ion_density_separatrix": 3e19,
        "ion_temperature_origin": 45.9,
        "ion_temperature_peaking_factor": 8.06,
        "ion_temperature_pedestal": 6.09,
        "ion_temperature_separatrix": 0.1,
        "major_radius": 1.9*100,
        "minor_radius": 1.118*100,
        "pedestal_radius": 0.8 *  1.118*100,
        "plasma_id": 1,
        "shafranov_shift": 0.44789,
        "triangularity": 0.270,
        "ion_temperature_beta": 6,
    }

    plasma = PlasmaSource(**plasma_params)
    # this creates a neutron distribution with the shape of a tokamak plasma

    #source = openmc.Source()
    source.library = SOURCE_SAMPLING_PATH
    source.parameters = str(plasma)
else:
    # point source from task4
    source.space = openmc.stats.Point((0, 0, 0))
    source.angle = openmc.stats.Isotropic()
    source.energy = openmc.stats.Discrete([14e6], [1])

sett.source = source
@makeclean
Copy link
Owner

Ive no idea on this im afraid, with a volume source its possible that particles are being born on surfaces, which is naughty, but not really a parametric plasma source problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants