pirs.scf2 subpackage

This package provides a low-level interface to the SCF code.

Docstrings

class pirs.scf2.Input(version='2.5')

O-O representation of all keywords, tables and switches of the SCF input file.

Input is a list, but string indexes are accepted as well.

>>> scf = Input()

Particular elements can be found using indexes or the find method.

>>> print scf.find('relative_heat')[0]
file = this_file
relative_axial_location   relative_heat_flux
!
>>> print scf['relative_heat']
file = this_file
relative_axial_location   relative_heat_flux
!
clear()

Clears all data from variables, switchs, tables.

find(*names)

Returns list of all groups and group elements (i.e. switches, tables, variables) whose names contain name as a substring.

The first argument controls what is searched.

‘a’ – (default) search all: group names, variables, switches and tables. ‘g’ – search group names only ‘v’, ‘s’ or ‘t’ – search only among instances of the ScfVarible, ScfSwitch or ScfTable class, respectively.

If the first argument has another value, ‘a’ is assumed.

run(mode='r', **kwargs)

Prepares content of the input file and starts an SCF job.

wp

Instance of the ScfWorkPlace() class.

Prepares working directory for SCF and starts the code.

class pirs.scf2.OutputTable(columns, cnames, N=0)

O-O representation of tables in the output.txt. It provides access to data and column names. Usualy, instances of this class are created by the function read_output(), see below.

column(name_upper, name_lower=None)

Returns a copy of the data column whose heading’s upper part is name_upper.

column_names

List of column names. Each element of the list is a tuple specifying the upper and lower part of the column’s heading. Usually, it is the column data name and dimension.

columns

List of data columns.

fmt

Format string used to convert table to a strinng (when e.g. printing the table).

Can be a string or a list of strings, representing valid format specifications, as understood by the str.format() method.

If a string is given, it is used for all columns. If a list of strings is given, its length must coincide with the number of columns in the table. In this case, each column gets its own format string.

not implemented: If fmt is None, each column’s width is defined by its header’s length.

row(i)

Returns a copy of i-th row.

class pirs.scf2.RodMaterial

Container for data necessary for the tables describing rod material properties.

Physical units are those used in SCF.

update(othr, part='all')

Update properties of the RodMaterial instance by the values stored in othr.

part: ‘all’ – all properties will be updated
‘fuel’ – only fuel-related properties will be updated ‘clad’ – only clad-related properties will be updated ‘gap’ – only gap-related properties will be updated.
class pirs.scf2.RodMaterialCollection(iv=1, step=1)

Collection of rod materials.

Initializes new collection.

iv: initial value, the first elements index. step: step for indices.

Table Of Contents

Previous topic

pirs.mcnp subpackage

Next topic

pirs.hli.mcnp subpackage

This Page