pymcnp.outp Subpackage¶
pymcnp.outp contains the OUTP parser. PyMCNP implements an object-oriented recursive
descent parser, approximating OUTP as the following context-free-grammar described in modified Backus-Naur form:
...
Table of Contents¶
AST Classes¶
PyMCNP represents OUTP non-terminals with AST classes and stores them in nested subpackages. These AST class have methods for translating between PyMCNP and OUTP:
from_mcnp. Parses OUTP source, checking for syntax and semantic errors.to_mcnp. Generates OUTP source from PyMCNP objects, reformatting.
AnalysisTallyFluctuation Class¶
- class pymcnp.outp.AnalysisTallyFluctuation(tally: String, nps: String, normed_average_per_history: String, unnormed_average_per_history: String, tally_relative_error: String, tally_variance_variance: String, relative_error_zero: String, relative_error_nonzero: String, number_nonzero: String, efficiency_nonzero: String, largest_history: String, largest_unormalized: String, largest_per_average: String, largest_per_verage_nonzero: String, confidence_per_mean: String, shifted_confidence: String, nps_mean: String, nps_plus_mean: String, nps_times_mean: String, nps_relative_error: String, nps_plus_relative_error: String, nps_times_relative_error: String, nps_variance_variance: String, nps_plus_variance_variance: String, nps_times_variance_variance: String, nps_shifted_center: String, nps_plus_shifted_center: String, nps_times_shifted_center: String, nps_merit: String, nps_plus_merit: String, nps_times_merit: String, message: String, histories_per_minute: String, singal_noise: String, singal_noise_squared: String, fom: String)¶
Represents OUTP 160 tables.
- tally¶
Tally number.
- nps¶
Tally nps.
- normed_average_per_history¶
Normed average tally per history.
- unnormed_average_per_history¶
Unnormed average tally per history.
- tally_relative_error¶
Estimated tally elative error.
- tally_variance_variance¶
Estimated variance of the variance.
- relative_error_zero¶
Relative error from zero tallies.
- relative_error_nonzero¶
Relative error from nonzero scroes.
- number_nonzero¶
Number of nonzero hsitory tallies.
- efficiency_nonzero¶
Efficiency for the nonzero tallies.
- largest_history¶
History number of largest tally.
- largest_unormalized¶
Largest unnormalized history tally.
- largest_per_average¶
Largest tally by average tally.
- largest_per_verage_nonzero¶
Largest tally by average nonzero tally.
- confidence_per_mean¶
Confidence interval shift by mean.
- shifted_confidence¶
Shifted confidence interval center.
- nps_mean¶
Mean at nps.
- nps_plus_mean¶
Mean at nps+1.
- nps_times_mean¶
Mean times nps+1/nps-1.
- nps_relative_error¶
Relative error nps.
- nps_plus_relative_error¶
Relative error nps+1.
- nps_times_relative_error¶
Relative error nps+1/nps-1.
- nps_variance_variance¶
Variance of the variance nps.
- nps_plus_variance_variance¶
Variance of the variance nps+1.
- nps_times_variance_variance¶
Variance of the variance nps+1/nps-1.
- nps_shifted_center¶
Shifted center nps.
- nps_plus_shifted_center¶
Shifted center nps+1.
- nps_times_shifted_center¶
Shifted center nps+1/nps-1.
- nps_merit¶
Figure of merit nps.
- nps_plus_merit¶
Figure of merit nps+1.
- nps_times_merit¶
Figure of merit nps+1/nps-1.
- message¶
Diagnostic message.
- histories_per_minute¶
Histories per minute.
- singal_noise¶
Signal-to-noise ratio.
- singal_noise_squared¶
Signal to-noise ratio squared.
- fom¶
Figure of merit.
- static from_mcnp(source: str)¶
Generates AnalysisTallyFluctuation from OUTP.
- Parameters:
source – OUTP for AnalysisTallyFluctuation.
- Returns:
AnalysisTallyFluctuation.
- to_mcnp()¶
Generates OUTP from AnalysisTallyFluctuation.
- Returns:
OUTP for AnalysisTallyFluctuation.
Header Class¶
- class pymcnp.outp.Header(name: String, logo: String, box: String)¶
Represents OUTP header tables.
- name¶
name name & version
- static from_mcnp(source: str)¶
Generates Header from OUTP.
- Parameters:
source – OUTP for Header.
- Returns:
Header.
- Raises:
OutpError – SYNTAX_TABLE.
- to_mcnp()¶
Generates OUTP from Header.
- Returns:
OUTP for Header.
Mcnp Class¶
- class pymcnp.outp.Mcnp(version: String, code_date: String, run_date: String, run_time: String, probid: String, command: String, lines: String, random_generator: String, random_seed: String, random_multiplier: String, random_adder: String, random_bits: String, random_stride: String, messages: String)¶
Represents OUTP 1mcnp tables.
- version¶
Simulation version.
- code_date¶
Simulation compilation date.
- run_date¶
Simulation run date.
- run_time¶
Simulation run time.
- probid¶
Simulation problem ID.
- command¶
Simulation command.
- random_generator¶
Simulation random number generator.
- random_seed¶
Simulation random number seed.
- random_multiplier¶
Simulation random number multiplier.
- random_adder¶
Simulation random number adder.
- random_bits¶
Simulation random number bits.
- random_stride¶
Simulation random number stride.
- lines¶
Input lines.
- messages¶
Input messages.
- static from_mcnp(source: str)¶
Generates Mcnp from OUTP.
- Parameters:
source – OUTP for Mcnp.
- Returns:
Mcnp.
- Raises:
OutpError – SYNTAX_TABLE.
- to_mcnp()¶
Generates OUTP from Mcnp.
- Returns:
OUTP for Mcnp.
NeutronActivity Class¶
- class pymcnp.outp.NeutronActivity(cells: String, total_tracks: String, total_population: String, total_collisions: String, total_weighted_collisions: String)¶
Represents OUTP 1neutron activity in each cell blocks.
- cells¶
Activity table.
- total_tracks¶
Total trackes entering.
- total_population¶
Total population.
- total_collisions¶
Total collisions.
- total_weighted_collisions¶
Total weighted collisions per history.
- static from_mcnp(source: str)¶
Generates NeutronActivity from OUTP.
- Parameters:
source – OUTP for NeutronActivity.
- Returns:
NeutronActivity.
- to_mcnp()¶
Generates OUTP from NeutronActivity.
- Returns:
OUTP for NeutronActivity.
PhotonActivity Class¶
- class pymcnp.outp.PhotonActivity(cells: String, total_tracks: String, total_population: String, total_collisions: String, total_weighted_collisions: String)¶
Represents OUTP 1photon activity in each cell blocks.
- cells¶
Activity table.
- total_tracks¶
Total trackes entering.
- total_population¶
Total population.
- total_collisions¶
Total collisions.
- total_weighted_collisions¶
Total weighted collisions per history.
- static from_mcnp(source: str)¶
Generates PhotonActivity from OUTP.
- Parameters:
source – OUTP for PhotonActivity.
- Returns:
PhotonActivity.
- to_mcnp()¶
Generates OUTP from PhotonActivity.
- Returns:
OUTP for PhotonActivity.
ProblemSummary Class¶
- class pymcnp.outp.ProblemSummary(histories: String, datetime: String, histories_rate: String, title: String, probid: String, neutron_data: String, proton_data: String, computer_time: String, max_bank: String, computer_mcrun: String, bank_overflows: String, source_per_minute: String, random_numbers: String, most_random: String, most_history: String, range_lower: String, range_upper: String)¶
Represents OUTP 1starting mcrun blocks.
- histories¶
Particle histories done.
- datetime¶
Run datetime.
- probid¶
Run problem id.
- neutron_data¶
Neutron creation data.
- proton_data¶
Proton creation data.
- computer_time¶
Computer time so far.
- max_bank¶
Maximum number ever in bank.
- computer_mcrun¶
Computer time in mcrun.
- bank_overflows¶
Bank overflow to backup.
- source_per_minute¶
Source particles per minute.
- random_numbers¶
Random numbers generated.
- most_random¶
Most random number used.
- most_history¶
History with most random number used.
- range_lower¶
Range of sampled source lower.
- range_upper¶
Range of sampled source upper.
- static from_mcnp(source: str)¶
Generates ProblemSummary from OUTP.
- Parameters:
source – OUTP for ProblemSummary.
- Returns:
ProblemSummary.
- to_mcnp()¶
Generates OUTP from ProblemSummary.
- Returns:
OUTP for ProblemSummary.
StartingMcrun Class¶
- class pymcnp.outp.StartingMcrun(cp0: String, title: String, data: String)¶
Represents OUTP 1starting mcrun blocks.
- cp0¶
Geometry error.
- title¶
Problem title.
- data¶
First 50 source particles.
- static from_mcnp(source: str)¶
Generates StartingMcrun from OUTP.
- Parameters:
source – OUTP for StartingMcrun.
- Returns:
StartingMcrun.
- to_mcnp()¶
Generates OUTP from StartingMcrun.
- Returns:
OUTP for StartingMcrun.
Tally_1A Class¶
- class pymcnp.outp.Tally_1A(number: ~pymcnp.types.String.String, nps: ~pymcnp.types.String.String, tally_type: ~pymcnp.types.String.String, particles: ~pymcnp.types.String.String, subtallies: ~pymcnp.types.Tuple.Tuple.<locals>._Tuple, stats_desired: ~pymcnp.types.String.String, stats_observed: ~pymcnp.types.String.String, stats_passed: ~pymcnp.types.String.String, asymmetric_interval: ~pymcnp.types.String.String, symmetric_interval: ~pymcnp.types.String.String)¶
Represents OUTP 1tally 1 nps blocks.
- number¶
Tally number.
- nps¶
Tally nps.
- tally_type¶
Tally type.
- particles¶
Tally particles.
- subtallies¶
Subtallies.
- stats_desired¶
Statistical checks desired.
- stats_observed¶
Statistical checks observed.
- stats_passed¶
Statistical checks passed.
- asymmetric_interval¶
Estimated asymmetric confidence interval.
- symmetric_interval¶
Estimated symmetric condifence interval.
- static from_mcnp(source: str)¶
Generates Tally_1A from OUTP.
- Parameters:
source – OUTP for Tally_1A.
- Returns:
Tally_1A.
- to_dataframe()¶
Generates pandas.DataFrame from Tally_1A.
- Returns:
pandas.DataFrame.
- to_mcnp()¶
Generates OUTP from Tally_1A.
- Returns:
OUTP for Tally_1A.
Tally_1B Class¶
- class pymcnp.outp.Tally_1B(number: ~pymcnp.types.String.String, nps: ~pymcnp.types.String.String, tally_type: ~pymcnp.types.String.String, particles: ~pymcnp.types.String.String, subtallies: ~pymcnp.types.Tuple.Tuple.<locals>._Tuple, stats_desired: ~pymcnp.types.String.String, stats_observed: ~pymcnp.types.String.String, stats_passed: ~pymcnp.types.String.String, fails: ~pymcnp.types.String.String)¶
Represents OUTP 1tally 1 nps blocks.
- number¶
Tally number.
- nps¶
Tally nps.
- tally_type¶
Tally type.
- particles¶
Tally particles.
- subtallies¶
Subtallies.
- stats_desired¶
Statistical checks desired.
- stats_observed¶
Statistical checks observed.
- stats_passed¶
Statistical checks passed.
- fails¶
Number of failed statistics checks.
- static from_mcnp(source: str)¶
Generates Tally_1B from OUTP.
- Parameters:
source – OUTP for Tally_1B.
- Returns:
Tally_1B.
- to_dataframe()¶
Generates pandas.DataFrame from Tally_1B.
- Returns:
pandas.DataFrame.
- to_mcnp()¶
Generates OUTP from Tally_1B.
- Returns:
OUTP for Tally_1B.
Tally_2 Class¶
- class pymcnp.outp.Tally_2(number: ~pymcnp.types.String.String, nps: ~pymcnp.types.String.String, tally_type: ~pymcnp.types.String.String, particles: ~pymcnp.types.String.String, surface: ~pymcnp.types.String.String, surface_value: ~pymcnp.types.String.String, subtallies: ~pymcnp.types.Tuple.Tuple.<locals>._Tuple, stats_desired: ~pymcnp.types.String.String, stats_observed: ~pymcnp.types.String.String, stats_passed: ~pymcnp.types.String.String, asymmetric_interval: ~pymcnp.types.String.String, symmetric_interval: ~pymcnp.types.String.String)¶
Represents OUTP 1tally 2 nps blocks.
- number¶
Tally number.
- nps¶
Tally nps.
- tally_type¶
Tally type.
- particles¶
Tally particles.
- surface¶
Surface number.
- surface_value¶
Surface value.
- subtallies¶
Subtallies.
- stats_desired¶
Statistical checks desired.
- stats_observed¶
Statistical checks observed.
- stats_passed¶
Statistical checks passed.
- asymmetric_interval¶
Estimated asymmetric confidence interval.
- symmetric_interval¶
Estimated symmetric condifence interval.
- static from_mcnp(source: str)¶
Generates Tally_2 from OUTP.
- Parameters:
source – OUTP for Tally_2.
- Returns:
Tally_2.
- to_dataframe()¶
Generates pandas.DataFrame from Tally_2.
- Returns:
pandas.DataFrame.
- to_mcnp()¶
Generates OUTP from Tally_2.
- Returns:
OUTP for Tally_2.
Tally_4 Class¶
- class pymcnp.outp.Tally_4(number: ~pymcnp.types.String.String, nps: ~pymcnp.types.String.String, tally_type: ~pymcnp.types.String.String, particles: ~pymcnp.types.String.String, cell: ~pymcnp.types.String.String, cell_value: ~pymcnp.types.String.String, subtallies: ~pymcnp.types.Tuple.Tuple.<locals>._Tuple, stats_desired: ~pymcnp.types.String.String, stats_observed: ~pymcnp.types.String.String, stats_passed: ~pymcnp.types.String.String, asymmetric_interval: ~pymcnp.types.String.String, symmetric_interval: ~pymcnp.types.String.String)¶
Represents OUTP 1tally 4 nps blocks.
- number¶
Tally number.
- nps¶
Tally nps.
- tally_type¶
Tally type.
- particles¶
Tally particles.
- cell¶
Cell number.
- cell_value¶
Cell value.
- subtallies¶
Subtallies.
- stats_desired¶
Statistical checks desired.
- stats_observed¶
Statistical checks observed.
- stats_passed¶
Statistical checks passed.
- asymmetric_interval¶
Estimated asymmetric confidence interval.
- symmetric_interval¶
Estimated symmetric condifence interval.
- static from_mcnp(source: str)¶
Generates Tally_4 from OUTP.
- Parameters:
source – OUTP for Tally_4.
- Returns:
Tally_4.
- to_dataframe()¶
Generates pandas.DataFrame from Tally_4.
- Returns:
pandas.DataFrame.
- to_mcnp()¶
Generates OUTP from Tally_4.
- Returns:
OUTP for Tally_4.
Tally_8A Class¶
- class pymcnp.outp.Tally_8A(number: ~pymcnp.types.String.String, nps: ~pymcnp.types.String.String, tally_type: ~pymcnp.types.String.String, particles: ~pymcnp.types.String.String, message: ~pymcnp.types.String.String, subtallies: ~pymcnp.types.Tuple.Tuple.<locals>._Tuple, stats_desired: ~pymcnp.types.String.String, stats_observed: ~pymcnp.types.String.String, stats_passed: ~pymcnp.types.String.String, asymmetric_interval: ~pymcnp.types.String.String, symmetric_interval: ~pymcnp.types.String.String)¶
Represents OUTP 1tally 8 nps blocks.
- number¶
Tally number.
- nps¶
Tally nps.
- tally_type¶
Tally type.
- particles¶
Tally particles.
- message¶
Tally modification message.
- subtallies¶
Subtallies.
- stats_desired¶
Statistical checks desired.
- stats_observed¶
Statistical checks observed.
- stats_passed¶
Statistical checks passed.
- asymmetric_interval¶
Estimated asymmetric confidence interval.
- symmetric_interval¶
Estimated symmetric condifence interval.
- static from_mcnp(source: str)¶
Generates Tally_8A from OUTP.
- Parameters:
source – OUTP for Tally_8A.
- Returns:
Tally_8A.
- to_dataframe()¶
Generates pandas.DataFrame from Tally_8A.
- Returns:
pandas.DataFrame.
- to_mcnp()¶
Generates OUTP from Tally_8A.
- Returns:
OUTP for Tally_8A.
Tally_8B Class¶
- class pymcnp.outp.Tally_8B(number: ~pymcnp.types.String.String, nps: ~pymcnp.types.String.String, tally_type: ~pymcnp.types.String.String, particles: ~pymcnp.types.String.String, message: ~pymcnp.types.String.String, subtallies: ~pymcnp.types.Tuple.Tuple.<locals>._Tuple, stats_desired: ~pymcnp.types.String.String, stats_observed: ~pymcnp.types.String.String, stats_passed: ~pymcnp.types.String.String, fails: ~pymcnp.types.String.String)¶
Represents OUTP 1tally 8 nps blocks.
- number¶
Tally number.
- nps¶
Tally nps.
- tally_type¶
Tally type.
- particles¶
Tally particles.
- message¶
Tally modification message.
- subtallies¶
Subtallies.
- stats_desired¶
Statistical checks desired.
- stats_observed¶
Statistical checks observed.
- stats_passed¶
Statistical checks passed.
- fails¶
Number of failed statistics checks.
- static from_mcnp(source: str)¶
Generates Tally_8B from OUTP.
- Parameters:
source – OUTP for Tally_8B.
- Returns:
Tally_8B.
- to_dataframe()¶
Generates pandas.DataFrame from Tally_8B.
- Returns:
pandas.DataFrame.
- to_mcnp()¶
Generates OUTP from Tally_8B.
- Returns:
OUTP for Tally_8B.
UnnormedTallyDensity Class¶
- class pymcnp.outp.UnnormedTallyDensity(tally: String, mean: String, nps: String, chart: String)¶
Represents 1unnormed tally density blocks.
- tally¶
Tally number.
- mean¶
Nonzero tally mean.
- nps¶
Tally nps.
- chart¶
Tally chart.
- static from_mcnp(source: str)¶
Generates UnnormedTallyDensity from OUTP.
- Parameters:
source – OUTP for UnnormedTallyDensity.
- Returns:
UnnormedTallyDensity.
- to_mcnp()¶
Generates OUTP from UnnormedTallyDensity.
- Returns:
OUTP for UnnormedTallyDensity.