MURE
|
Define a MCNP Connector. More...
#include <MCNPConnector.hxx>
Public Member Functions | |
Constructor methods | |
Connector () | |
~Connector () | |
Connector (const Connector &plugin) | |
copy constructor | |
ConnectorPlugin * | Clone () override |
Clone method. | |
xsdir methods | |
void | BuildXSDIR () override |
build the xsdir according to the BaseSummary.dat file | |
Detectors related methods | |
void | BuildDetectors () override |
build automatic tallies for standard evolution | |
void | UpdateSigmaPhiDetectors () override |
update (read from MC output) automatic tallies for standard evolution | |
void | BuildMultiGroupDetectors () override |
build automatic tallies for in a multigroup evolution | |
void | BuildMultiGroupDetectors (vector< Material * > &MaterialVector) |
build automatic tallies for in a multigroup evolution | |
void | UpdateMultiGroupSigmaPhiDetectors () override |
update (read from MC output) automatic tallies for multigroup evolution | |
void | UpdateMultiGroupSigmaPhiDetectors (vector< Material * > &MaterialVector) |
update (read from MC output) automatic tallies for multigroup evolution | |
void | UpdateKeff () override |
read from MC output the keff and give it to MURE | |
void | FindDetectorMCUserFile () override |
Find tallies in a MCUser input files. | |
void | SumOutputDetectorFile (string DetectorBaseFileName, int N, string SumDetectorFileName) override |
string | GetMCDetectorOutputFileName (string InputFileName, bool OnlyKeff=false) override |
MCNP exec command | |
string | GetMCExecCommandString (string InputFileName, string Arg="", string FileArg="") override |
void | BuildTHMultiGroupDetectors () override |
void | UpdateTHMultiGroupSigmaPhiDetectors () override |
MCNP specific methods | |
void | SetPRDMP (string prdmp="2J -1 1") |
void | SetRemove_r_files (bool flag=true) |
bool | GetRemove_r_files () |
bool | IsMCNP4B () |
void | SetMCNP4B (bool flag=true) |
Writing file methods | |
void | BuildMCFile (string FileString="") override |
Build the MC input file from the MURE one. | |
void | BuildPinCells (bool Auto=false) override |
void | FindMissingVolume () override |
void | UpdateTallyBinVolume () override |
Reread all bins and assign necessary volume. | |
string | Print (Cell *TheCell) override |
Print a cell in the cell block (1st bloc) of MCNP's input file. | |
string | Print (Material *mat) override |
Print a material in the 3rd block of MCNP's input file. | |
string | PrintModeratorMaterial (Material *mat) override |
print MT card associated to a Material | |
string | Print (Transformation *Transfo) override |
print transformation (translation &rotation) card | |
void | WriteMCFileWithoutDetector (string FileName="inp", bool tmpvol=false) override |
void | WriteLine (string line, ostream &Out=cout, int IsComment=0, int IsTruncated=0, char separator='&') |
Write a MCNP line. | |
Public Member Functions inherited from ConnectorPlugin | |
ConnectorPlugin () | |
virtual | ~ConnectorPlugin () |
ConnectorPlugin (const ConnectorPlugin &plugin) | |
copy constructor | |
bool | IsTHMultiGroupTalliesUsed () |
void | SetMCSource (MCSource *source) |
set the MC particle source to the Connector | |
MCSource * | GetMCSource () |
string | GetMCGlobalOutputFileName (string InputFileName) |
virtual string | PrintMaterialId (int id) |
bool | IsSerpentConnector () |
Internal methods to be used ONLY by developpers | |
string | fPRDMP |
PRDMP argument (default=2J -1 1) | |
bool | fRemove_r_files |
Whether to remove "r" files of MCNP. | |
bool | fMCNP4B |
If MCNP4B is used (use for PVM argument) | |
TMctal * | fMCOutput |
A result tallies from a MCNP m's files. | |
string | fDATAPATH |
path to xsdir and cross sections | |
Node * | GetNewNode (int sign) override |
a way to obrain a new node (here a MCNP::Node) from every where | |
SimpleBin * | GetNewSimpleBin () override |
a way to obtain a new SimpleBin (here a MureSimpleBin) from every where | |
GroupBin * | GetNewGroupBin () override |
a way to obtain a new roupBin (here a MureGroupBin) from every where | |
string | PrintId (Material *material) override |
print a "generic" id name to material number (e.g. "m"=>m1) | |
string | PrintId (Cell *cell) override |
print a "generic" id name to cell number (e.g. "c"=>c1) | |
void | CheckXSDIR () |
Check if a xsdir exist ; if not call MCNP::Connector::BuildXSDIR. | |
void | BuildGlobalTallies () |
build global tallies for global reaction rates (Control Rod, ...) for special evolution controls | |
void | UpdateGlobalTallies () |
update the global tallies | |
void | ReadDetectorFile () |
void | FindTallyInMCNPUserFile () |
void | TryToFindVolumeFromMCNPTable () |
no MCNP run is performed, just read of table 50 | |
void | StochasticVolumeCalculation () |
a stochastic volume calculation is performed to find missing volumes for tallies | |
void | FillTallyBinVolume () |
fill tally bins volume (SD card) | |
void | WriteCell (ostream &Out) |
write MCNP all cells in the cell block (1st bloc) of MCNP's input file | |
void | WriteSurface (ostream &Out, bool tmpvol=false) |
write MCNP all surface cards in the surface block (2nd bloc) of MCNP's input file | |
void | WriteMaterial (ostream &Out) |
write MCNP materials in the 3rd block of MCNP's input file | |
void | WriteMCNPFile (string FileName="inp", bool tmpvol=false) |
write the MCNP input file on disk | |
void | CopyMCNPFile (string FileName) |
copy part of the MCNP user defined geometry | |
Additional Inherited Members | |
Protected Member Functions inherited from ConnectorPlugin | |
bool | IsVolumeCalculationNeeded () |
scan tallies to find if a bin need a volume that is, for now, unknown | |
Protected Attributes inherited from ConnectorPlugin | |
bool | fRebuildDetector |
whether or not rebuild detectors (for thermo-hydraulics) | |
MCSource * | fSource |
The MC particle source. | |
string | fMCGlobalOutputSuffix |
"o" file for MCNP and it should be "_res.m" file for Serpent | |
string | fMCDetectorOutputSuffix |
"m" files for MCNP or "_det0.m" for Serpent | |
bool | fPinCellBuilt |
whether or not PinCell have already been built | |
bool | fTHMultigroupTallies |
True in Thermal hydraulics multigroup calculation. | |
bool | fIsSerpentConnector |
This allows to have direct interaction with MCNP (writing files, reading output, setting special cards, ...).
MCNP::Connector::Connector | ( | ) |
MCNP::Connector::~Connector | ( | ) |
MCNP::Connector::Connector | ( | const Connector & | plugin | ) |
copy constructor
|
overridevirtual |
build automatic tallies for standard evolution
Implements ConnectorPlugin.
|
private |
build global tallies for global reaction rates (Control Rod, ...) for special evolution controls
|
overridevirtual |
Build the MC input file from the MURE one.
Implements ConnectorPlugin.
|
overridevirtual |
build automatic tallies for in a multigroup evolution
Implements ConnectorPlugin.
void MCNP::Connector::BuildMultiGroupDetectors | ( | vector< Material * > & | MaterialVector | ) |
build automatic tallies for in a multigroup evolution
|
overridevirtual |
Build Pincells. MURE has implemented the Serpent "pin" cell in a PinCell class. This is a very useful and elegant way of defining general pins. This methods transforms these PinCells in real MCNP Cells. The Auto flag is used only in the "Serpent" version.
Auto | :not used in MCNP::Connector |
Implements ConnectorPlugin.
|
overridevirtual |
Implements ConnectorPlugin.
|
overridevirtual |
build the xsdir according to the BaseSummary.dat file
Implements ConnectorPlugin.
|
private |
Check if a xsdir exist ; if not call MCNP::Connector::BuildXSDIR.
|
inlineoverridevirtual |
|
private |
copy part of the MCNP user defined geometry
|
private |
fill tally bins volume (SD card)
|
overridevirtual |
Find tallies in a MCUser input files.
Implements ConnectorPlugin.
|
overridevirtual |
Find Missing cell volumes for tallies. Tallies are normalized by the volume of the cells. Thus each Tally bin must know its volume (or area). The search is performed in 2 passes: the 1st one try to find in the table 50 of MCNP the missing volumes/areas. If after this pass, still some volumes are missing, a stochastic run is done (using a inward sphere surface source correctly weigthed together withe the "VOID" MCNP's card). Precisions on the result ca be increased via MURE::SetVolumeNPS().
Implements ConnectorPlugin.
|
private |
|
inlineoverridevirtual |
Reimplemented from ConnectorPlugin.
|
overridevirtual |
MC exec command line. This return the string to exec (via system()) to run a MC. It takes input file name (e.g. inp000), arguments (e.g. "task N n=) and file argument (e.g. s=inps).
InputFileName | : input file name |
Arg | : argument between exec name and input file name (task ...) |
FileArg | : argument after input file name (s=...) |
Reimplemented from ConnectorPlugin.
|
inlineoverridevirtual |
a way to obtain a new roupBin (here a MureGroupBin) from every where
< a way to obtain a new GroupBin (here a MCNP::GroupBin) from every where
Implements ConnectorPlugin.
|
overridevirtual |
a way to obrain a new node (here a MCNP::Node) from every where
Reimplemented from ConnectorPlugin.
|
inlineoverridevirtual |
a way to obtain a new SimpleBin (here a MureSimpleBin) from every where
< a way to obtain a new SimpleBin (here a MCNP::SimpleBin) from every where
Implements ConnectorPlugin.
|
inline |
< returns flag to remove MCNP "r" file during the evolution
|
inline |
< return true if MCNP version is 4b (change the way of calling TASK in PVM)
|
overridevirtual |
Print a cell in the cell block (1st bloc) of MCNP's input file.
Implements ConnectorPlugin.
|
overridevirtual |
Print a material in the 3rd block of MCNP's input file.
Implements ConnectorPlugin.
|
overridevirtual |
print transformation (translation &rotation) card
Implements ConnectorPlugin.
|
inlineoverridevirtual |
print a "generic" id name to cell number (e.g. "c"=>c1)
< not used in MCNP::Connector
Implements ConnectorPlugin.
|
inlineoverridevirtual |
print a "generic" id name to material number (e.g. "m"=>m1)
< not used in MCNP::Connector
Implements ConnectorPlugin.
|
overridevirtual |
print MT card associated to a Material
Implements ConnectorPlugin.
|
private |
|
inline |
< return true if MCNP version is 4b (change the way of calling TASK)
|
inline |
< Set the PRDMP MC card
|
inline |
< remove MC "r" file during the evolution
|
private |
a stochastic volume calculation is performed to find missing volumes for tallies
|
overridevirtual |
Sum MC detector output in multi run mode. The multi run mode (set via MURE::SetRunMultiMC) allow to run, for each MC step, N MC calculations to smooth fluactuations ; Then, this method is used to buid the sum result of each individual MC run, in a unique Detector output file ("m" file of MCNP or "_det0.m" file for Serpent.
DetectorBaseFileName | : base name of individual run (real name are DetectorBaseFileNameX where X=0..N) |
N | : number of multi-run in a MC step |
SumDetectorFileName | : sum of all individual run in this file (it has the same format than each individual one) |
Implements ConnectorPlugin.
|
private |
no MCNP run is performed, just read of table 50
|
private |
update the global tallies
|
overridevirtual |
read from MC output the keff and give it to MURE
Implements ConnectorPlugin.
|
overridevirtual |
update (read from MC output) automatic tallies for multigroup evolution
Implements ConnectorPlugin.
void MCNP::Connector::UpdateMultiGroupSigmaPhiDetectors | ( | vector< Material * > & | MaterialVector | ) |
update (read from MC output) automatic tallies for multigroup evolution
|
overridevirtual |
update (read from MC output) automatic tallies for standard evolution
Implements ConnectorPlugin.
|
overridevirtual |
Reread all bins and assign necessary volume.
Implements ConnectorPlugin.
|
overridevirtual |
Implements ConnectorPlugin.
|
private |
void MCNP::Connector::WriteLine | ( | string | line, |
ostream & | Out = cout , |
||
int | IsComment = 0 , |
||
int | IsTruncated = 0 , |
||
char | separator = '&' |
||
) |
Write a MCNP line.
Write a MCNP line (i.e of length <80 chars).
line | : the line to write |
Out | : where to write |
IsComment | : whether (1) or not (0) it is a comment (i.e., need a "C " at beginning or an " &" at the end) |
IsTruncated | : whether (1) or not (0) the line has less than 80 chars |
separator | : character to be put at the end of line |
|
private |
|
overridevirtual |
build a MCNP file without tally just to obtain keff for void, temperature coefficient, ...
Reimplemented from ConnectorPlugin.
|
private |
write the MCNP input file on disk
|
private |
|
private |
path to xsdir and cross sections
|
private |
If MCNP4B is used (use for PVM argument)
|
private |
A result tallies from a MCNP m's files.
|
private |
PRDMP argument (default=2J -1 1)
|
private |
Whether to remove "r" files of MCNP.