Skip to content
TumRegels edited this page Oct 16, 2013 · 8 revisions

The stop class is called as:

>> sim = stop(filename)

where filename is the name of the parametrized serpent input file e.g. sphere.spi.

Properties and methods of sim object are shown in the table below

Properties Methods
serpExe run()
saveResPar displayParameters()
name
values
isTest
isContinue
isEcho
isXSEC

Description of properties

sim.serpExe

  • String

Property to specify the name/fullname of the serpent executable sss.

Default value:

sim.serpExe = 'sss'

Example of usage:

sim.serpExe = 'sss1118' or sim.serpExe = '/absolute/path/to/sss'

sim.saveResPar

  • Cell

Property to specify the list of parameters to extract from serpent _res.m file.

Default value:

sim.saveResPar = {'ANA_KEFF';'IMP_KEFF'}

Example of usage:

sim.saveResPar = {'IMP_KEFF','TOT_POWER','FLUX','FISSXS'}

sim.name

  • String

Property to specify simulation name.

Default value:

sim.name = '' % empty string

Example of usage:

sim.name = 'test'

Warning: Each simulation must have a different name to avoid result-overwriting.

sim.values

  • Struct

Property to specify the values of parameters inside parametrized serpent input file *.spi.

Default value:

sim.values = struct() % empty structure

Example of usage:

sim.values = struct('TITLE','test','RAD',4) % parameters from sphere.spi.

sim.isTest

  • Boolean

This boolean flag is used to test the geometry of the input file. If set to true it will do something like sss input -testgeom 10000 -plot.

Default value:

sim.isTest = false

sim.isContinue

  • Boolean

This boolean flag is used to continue the calculation if it was stopped in the middle. Let say you were running 20 different serpent calculations. And the calculation was interrupted after 10. Then you just need to set the flag to true and launch the calculation again. It will continue from 10th on.

Default value:

sim.isContinue = false

Warning: For burnup calculations you need to delete manually the most recent calculation. Afterwards, launch the calculation again with sim.isContinue = true. This is a bug, which will be fixed.

sim.isEcho

  • Boolean

This boolean flag is used to show the calculation flow from within matlab's command window.

Default value:

sim.isEcho = true

sim.isXSEC

  • Boolean

This boolean flag is used if you want to generate XSEC card for Parcs.

Default value:

sim.isXSEC = false

Description of methods

sim.displayParameters()

This method shows the list of parameters inside parametrized serpent input file '*.spi'

Example of usage:

>> sim = stop('sphere.spi')
>> sim.displayParameters()
List of unique Parameters in file "sphere.spi"
    'RAD'
    'TITLE'
List of unique equations
    'RAD'
    'TITLE'

sim.run('param1', value1, 'param2', value2, ...)

This method creates an input file with specified values of parameters and then performs the simulation on serpent.

Example of usage:

>> sim = stop('sphere.spi')
>> sim.name = 'test'
>> sim.run('TITLE',sim.name,'RAD',4)

Alternatively you can use the following work-flow.

>> sim = stop('sphere.spi')
>> sim.name = 'test'
>> sim.values = struct('TITLE',sim.name,'RAD',4) % use matlab struct
>> sim.run()