命令行

CRANE本质上是一个命令行程序,它通过各种命令行来执行计算、绘制可视化图表等,CRANE的命令行可以分为以下两类:

  1. 基本命令行,该类命令行形式为 crane COMMAND [ARGS],是CRANE最基本的命令行,如 crane run、 crane visualize、crane compare 等;

  2. 交互式命令行,该类命令行必须通过 crane visualize 进入交互式命令行界面后执行,为模型及结果可视化相关的命令行工具, 如 模型可视化、功率分布可视化 等。

基本命令行

crane run

Main command of CRANE. Run a CRANE simulation.

INPUT_FILE is the name of file with path in which the model defined, both yaml or json format are acceptable.

crane run [OPTIONS] INPUT_FILE

Options

-l, --library <library>

The nuclear data library file name with path, only used by micro-xs cases. Nuclear data library file installed in package will be used as default.

-d, --device-ids <device_ids>

The device ids of which GPU used, multi device ids should be linked with comma, such as ‘0,1,2’. Device ids of GPU available on this platform used if None.

--visualize, -V, --no-visualize

Enter the visualize shell or not after simulation.

Default:

True

-o, --output-file <output_file>

The name of output file with path, the model name (name defined in core object) with current directory will be used as default.

-c, --compare-to <compare_to>

The reference file which has the results you want to compare to. Both HDF5 and yaml file are acceptable.

-b, --burnup-interval <burnup_interval>

The burnup interval used to perform less-statepoints depletion calculation.

-r, --reference-file <reference_file>

Use the burnup point from this file if it defined.

Arguments

INPUT_FILE

Required argument

crane check-region-overlap

Check whether the input model have overlapped regions, plotting planes which have overlapped regions, pass the checking if none overlapped region found in all planes.

FILENAME is the name of file with path in which the model defined, both yaml and json format are acceptable.

crane check-region-overlap [OPTIONS] FILENAME

Options

--save-fig, -S, --no-save-fig

Whether to save the plotting figure.

Default:

False

Arguments

FILENAME

Required argument

crane compare

Compare results of two files and generating chart and figures of the comparation.

FILENAME is the name of file with path in which the model defined. Only HDF5 result file acceptable for The first file while the both HDF5 and excel file are acceptable for the second file.

crane compare [OPTIONS] FILENAME [REFERENCE_FILE]...

Options

--dpi <dpi>

The DPI used to save figures.

Default:

200

-rn, --reference-name <reference_name>

The name of the reference result with which we compare.

Default:

'Measure'

-dc, --design-code <design_code>

The name of the design code with which we compare.

Default:

'Design Code'

--lppt, -L, --no-lppt

Whether compare the low power physic tests result.

Default:

True

--boron-letdown, -B, --no-boron-letdown

Whether compare the boron letdown curve.

Default:

True

--axial-offset, -AO, --no-axial-offset

Whether compare the axial offset.

Default:

True

-di, --delta-i, --no-delta-i

Whether compare the delta I.

Default:

False

-a, --assembly-power, --no-assembly-power

Whether compare the integral assembly power distribution.

Default:

False

-d2, --detector-2d, --no-detector-2d

Whether compare the detector reaction 2D distribution.

Default:

False

-d3, --detector-3d, --no-detector-3d

Whether compare the detector reaction 3D distribution.

Default:

False

-p, --compare-dc, --no-compare-dc

Whether compare the result of design code with measurement.

Default:

False

-c, --criticals, --no-criticals

Whether compare the critical calculation results.

Default:

False

-r, --crw, --no-crw

Whether compare the control rod worths.

Default:

False

-w, --crwc, --no-crwc

Whether compare the control rod worths curve.

Default:

False

Arguments

FILENAME

Required argument

REFERENCE_FILE

Optional argument(s)

crane visualize

Start a interactive command line mode, which contains rich visualization functions.

FILENAME is the name of file with path in which the model defined, both yaml and json format are acceptable. Or the name of output file in HDF5 format with path.

crane visualize [OPTIONS] FILENAME [REFERENCE_FILE]...

Options

--wtype <wtype>

The result show type.

Default:

'plot'

Arguments

FILENAME

Required argument

REFERENCE_FILE

Optional argument(s)

交互式可视化命令行

plot-mass-flow-distribution

plot-mass-flow-distribution [OPTIONS]

Options

--mass-flow-type <mass_flow_type>

Which type of cross mass distribution to plot. [default: liquid]

Default:

'channel-coolant-outlet'

Options:

channel-coolant-outlet | channel-coolant-radial | channel-coolant-axial | gap-coolant-crosswise

--map-color-by <map_color_by>

Map the color by the data of all model or the current plane. [default: all]

Default:

'plane'

Options:

all | plane

--axial-height <axial_height>

The axial height of the 2D slice if we choose radial direction, plot slices of each plane if None.

--axial-slice-coef <axial_slice_coef>

The coefficients (a, b, c) of the 2D slice ‘ax+by+c=0’ if we choose axial direction. [default: 0.0, 1.0, 0.0].

Default:

0.0, 1.0, 0.0

--burnup <burnup>

The burnup (MWd/tU) of which state point data used to plot, a nearest one would be choosed.

--efpd <efpd>

The effective full power days of which state point data used to plot, a nearest one would be choosed.

--state-index <state_index>

The index of which state point data used to plot.

Default:

0

--show-peak-location, --no-show-peak-location

Whether to show the location of peak values

Default:

False

--difference-type <difference_type>

The type of difference when comparing two results, relative or absolute. [default: relative]

Default:

'relative'

Options:

relative | absolute

--save-fig, --no-save-fig

Whether to save the plotting figure.

Default:

False

plot-timing-statistics

plot-timing-statistics [OPTIONS]

Options

--save-fig, --no-save-fig
Default:

False