-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Alfoa/scale6.2 #608
Alfoa/scale6.2 #608
Changes from 8 commits
f398217
ed5b733
73afd6e
51240e2
7c86e53
dd057dd
6ce3311
35bc473
cc4df33
a1cca50
d3f7b97
08c2544
6f571a6
d9d3e59
ef39eb1
096d41c
ac86a52
2542406
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,8 @@ \subsection{Generic Interface} | |
edit the correct values. For example, if a geometry-building script specifies | ||
inner\_radius, outer\_radius, and thickness, the generic interface cannot | ||
calculate the thickness given the outer and inner radius, or vice versa. | ||
In this case, the \textit{function} method explained in the Samplers (see \ref{sec:Samplers}) | ||
and Optimizers (see \ref{sec:Optimizers}) sections can be used. | ||
|
||
An example of the code interface is shown here. The input parameters are read | ||
from the input files \texttt{gen.one} and \texttt{gen.two} respectively. | ||
|
@@ -2381,7 +2383,7 @@ \subsubsection{Files} | |
\end{itemize} | ||
} | ||
|
||
Remeber also that a MELCOR simulation run is considered successfull (i.e., the simualtion did not crash) if it terminates with the | ||
Remember also that a MELCOR simulation run is considered successful (i.e., the simulation did not crash) if it terminates with the | ||
following message: | ||
|
||
\textcolor{red}{Normal termination} | ||
|
@@ -2620,3 +2622,327 @@ \subsubsection{DataObjects} | |
\end{lstlisting} | ||
As mentioned before, this will create $4$ DataObjects. | ||
% | ||
%%%%%%%%%%%%%%%%%%%%%%% | ||
%%%%%% SCALE INTERFACE %%%%%% | ||
%%%%%%%%%%%%%%%%%%%%%%% | ||
\subsection{SCALE Interface} | ||
This section presents the main aspects of the interface between RAVEN and SCALE system, | ||
the consequent RAVEN input adjustments and the modifications of the SCALE | ||
files required to run the two coupled codes. | ||
\\ \textcolor{red}{ | ||
\textbf{\textit{\nb Considering the large amount of SCALE sequences, this interface is | ||
currently limited in driving the following SCALE calculation codes:}} | ||
\begin{itemize} | ||
\item \textbf{\textit{ORIGEN}} | ||
\item \textbf{\textit{TRITON (using NEWT as transport solver)}} | ||
\end{itemize} | ||
} | ||
|
||
In the following sections a short explanation on how to use RAVEN coupled with SCALE is reported. | ||
|
||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
|
||
\subsubsection{Models} | ||
As for any other Code, in order to activate the SCALE interface, a \xmlNode{Code} XML node needs to be inputted, within the | ||
main XML node \xmlNode{Models}. | ||
\\The \xmlNode{Code} XML node contains the | ||
information needed to execute the specific External Code. | ||
|
||
\attrsIntro | ||
% | ||
\vspace{-5mm} | ||
\begin{itemize} | ||
\itemsep0em | ||
\item \nameDescription | ||
\item \xmlAttr{subType}, \xmlDesc{required string attribute}, specifies the | ||
code that needs to be associated to this Model. | ||
% | ||
\nb See Section~\ref{sec:existingInterface} for a list of currently supported | ||
codes. | ||
% | ||
\end{itemize} | ||
\vspace{-5mm} | ||
|
||
\subnodesIntro | ||
% | ||
\begin{itemize} | ||
\item \xmlNode{executable} \xmlDesc{string, required field} specifies the path | ||
of the executable to be used. | ||
% | ||
\nb Either an absolute or relative path can be used. | ||
\item \aliasSystemDescription{Code} | ||
% | ||
\end{itemize} | ||
|
||
In addition (and specifc for the SCALE interface), the \xmlNode{Code} can contain the following optional nodes: | ||
|
||
\begin{itemize} | ||
\item \xmlNode{sequence}, optional, comma separated list. In this node the user can specify a list of sequences that need to be | ||
executed in sequence. For example, if a TRITON calculation needs to be followed by an ORIGEN decay heat calculation the user | ||
would input here the sequence ``\textit{triton,origen}''. \default{triton}. | ||
\\\nb Currently only the following entries are supported: | ||
\begin{itemize} | ||
\item ``\textit{triton}'' | ||
\item ``\textit{origen}'' | ||
\item ``\textit{triton,origen}'' | ||
\end{itemize} | ||
\item \xmlNode{timeUOM}, optional, string. In this node the user can specify the \textit{units} for the independent variable ``time''. | ||
If the outputs are exported by SCALE in a different unit (e.g days, years, etc.), the SCALE interface will convert all the different | ||
time scales into the unit here specified (in order to have a consistent (and unique) time scale). Available are: | ||
\begin{itemize} | ||
\item ``\textit{s}'', seconds | ||
\item ``\textit{m}'', minutes | ||
\item ``\textit{h}'', hours | ||
\item ``\textit{d}'', days | ||
\item ``\textit{y}'', years | ||
\end{itemize} | ||
\default{s} | ||
\end{itemize} | ||
|
||
An example is shown below: | ||
\begin{lstlisting}[style=XML] | ||
<Models> | ||
<Code name="MyScale" subType="Scale"> | ||
<executable>path/to/scalerte</executable> | ||
<sequence>triton,origen</sequence> | ||
<timeUOM>d</timeUOM> | ||
</Code> | ||
</Models> | ||
\end{lstlisting} | ||
|
||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
\subsubsection{Files} | ||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
The \xmlNode{Files} XML node has to contain all the files required by the particular | ||
sequence (s) of the external code (SCALE) to be run. | ||
This involves not only the input file(s) (.inp) but also the auxiliary files that might be needed (e.g. binary initial compositions, etc.). | ||
As mentioned, the current SCALE interface only supports TRITON and ORIGEN sequences. For this reason, depending on the | ||
type of sequence (see previous section) to be run, the relative input files need to be marked with the sequence they are associated | ||
with. This means that the type of the input file must be either ``triton'' or ``origen''. The auxiliary files that might be needed by | ||
a particular sequence (e.g. binary initial compositions, etc.) should not be marked with any specific type (i.e. \textit{type=``''}). | ||
Example: | ||
\begin{lstlisting}[style=XML] | ||
<Files> | ||
<Input name="triton_input" type="triton">pwr_depletion.inp</Input> | ||
<Input name="origen_input" type="origen">decay_calc.inp</Input> | ||
<Input name="binary_comp" type="">pwr_depletion.f71</Input> | ||
</Files> | ||
\end{lstlisting} | ||
All the files here mentioned in this section | ||
need, then, to be placed into the working directory specified | ||
by the \xmlNode{workingDir} node in the \xmlNode{RunInfo} XML node. | ||
|
||
\paragraph{Output Files conversion} | ||
Since RAVEN expects to receive a CSV file containing the outputs of the simulation, the results in the SCALE output | ||
files need to be converted by the code interface. | ||
\\As mentioned, the current interface \textcolor{red}{ is able to collect data from TRITON and ORIGEN sequences only}. | ||
%% TRITON | ||
\\The following information is collected from TRITON output: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. from the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. addressed |
||
\begin{itemize} | ||
\item \textit{\textbf{k-eff and k-inf time-dep information}} | ||
\begin{lstlisting}[basicstyle=\tiny] | ||
Outer Eigenvalue Eigenvalue Max Flux Max Flux Max Fuel Max Fuel Wall Elapsed Iteration CPU Inners | ||
Iter. # Delta Delta Location(r,g) Delta Location(r,g) Clock CPU Time CPU Time Usage Converged | ||
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | ||
1 1.00000 0.000E+00 6.480E+09 ( 4,252) 1.000E+00 ( 614, 0) 14:16:42 89.9 s 89.9 s 92.7% F | ||
2 0.35701 1.801E+00 4.149E+01 ( 319, 4) 2.673E+00 ( 7035, 0) 14:18:16 182.8 s 92.9 s 98.8% F | ||
k-eff = 0.94724509 Time= 0.00d Nominal conditions | ||
|
||
Four-Factor Estimate of k-infinity. Fast/Thermal boundary: 0.6250 eV | ||
Fiss. neutrons/thermal abs. (eta): 1.279827 | ||
Thermal utilization (f): 0.960903 | ||
Resonance Escape probability (p): 0.706209 | ||
Fast-fission factor (epsilon): 1.091716 | ||
-------------- | ||
Infinite neutron multiplication 0.948143 | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just to be sure: are we allowed to publish this data? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think so. They are not suitable for "reverse-engineering" |
||
\end{lstlisting} | ||
that will be converted in the following way (CSV): | ||
\begin{table}[h] | ||
\centering | ||
\caption{CSV transport info} | ||
\label{CSVkeff} | ||
\tabcolsep=0.11cm | ||
\tiny | ||
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|} | ||
time & keff & iter\_number & keff\_delta & max\_flux\_delta & kinf & kinf\_epsilon & kinf\_p & kinf\_f & kinf\_eta \\ | ||
0.00 & 0.94724509 & 2 & 1.801E+00 & 4.149e+01 & 0.948143 & 1.091716 & 0.706209 & 0.960903 & 1.279827 | ||
\end{tabular} | ||
\end{table} | ||
|
||
\item \textit{\textbf{material powers}} | ||
\begin{lstlisting}[basicstyle=\tiny] | ||
--- Material powers for depletion pass no. 1 (MW/MITHM) --- | ||
Time = 0.00 days ( 0.000 y), Burnup = 0.000 GWd/MTIHM, Transport k= 0.9473 | ||
|
||
Total Fractional Mixture Mixture Mixture | ||
Mixture Power Power Power Thermal Flux Total Flux | ||
Number (MW/MTIHM) (---) (MW/MTIHM) n/(cm^2*sec) n/(cm^2*sec) | ||
13 32.985 0.99054 32.985 5.3666e+13 1.2574e+14 | ||
6 0.252 0.00757 N/A 2.7587e+13 9.1781e+13 | ||
Total 33.300 1.00000 | ||
\end{lstlisting} | ||
that will be converted in the following way (CSV): | ||
\begin{table}[h] | ||
\centering | ||
\caption{CSV material powers} | ||
\label{CSVmatPowers} | ||
\tabcolsep=0.11cm | ||
\tiny | ||
\begin{tabular}{|c|c|c|c|c|c|c|c|c|c|l} | ||
\cline{1-10} | ||
time & bu & tot\_power\_mix\_13 & fract\_power\_mix\_13 & th\_flux\_mix\_13 & tot\_flux\_mix\_13 & tot\_power\_mix\_6 & fract\_power\_mix\_6 & th\_flux\_mix\_6 & tot\_flux\_mix\_6 & \\ \cline{1-10} | ||
1.0E-06 & 0.0 & 32.985 & 0.99054 & 5.3666e+13 & 1.2574e+14 & 0.252 & 0.00757 & 2.7587e+13 & 9.1781e+13 & \\ \cline{1-10} | ||
\end{tabular} | ||
\end{table} | ||
|
||
|
||
\item \textit{\textbf{nuclide/element tables}} | ||
\begin{lstlisting}[basicstyle=\tiny] | ||
| nuclide concentrations | ||
| time: days | ||
grams | 0.00e+00d | ||
------------+-------------------- | ||
u235 | 2.9619e+04 | ||
u238 | 9.6993e+05 | ||
subtotal | 1.0010e+06 | ||
total | 1.1858e+06 | ||
\end{lstlisting} | ||
that will be converted in the following way (CSV): | ||
\begin{table}[h] | ||
\centering | ||
\caption{CSV Nuclide/element Tables} | ||
\label{CSVnuclideTables} | ||
\tabcolsep=0.11cm | ||
\tiny | ||
\begin{tabular}{|c|c|c|} | ||
time & u235\_conc & u238\_conc \\ | ||
0.00 & 2.9619e+04 & 9.6993e+05 | ||
\end{tabular} | ||
\end{table} | ||
\end{itemize} | ||
%% ORIGEN | ||
The following information is collected from ORIGEN output: | ||
\begin{itemize} | ||
\item \textit{\textbf{history overview}} | ||
\begin{lstlisting}[basicstyle=\tiny] | ||
========================================================================================================================= | ||
= History overview for case 'decay' (#1/1) = | ||
------------------------------------------------------------------------------------------------------------------------- | ||
step t0 t1 dt t flux fluence power energy | ||
(-) (sec) (sec) (s) (s) (n/cm2-s) (n/cm2) (MW) (MWd) | ||
1 0.0000E+00 1.0000E-06 1.0000E-06 1.0000E-06 0.0000E+00 0.0000E+00 0.0000E+00 0.0000E+00 | ||
\end{lstlisting} | ||
that will be converted in the following way (CSV): | ||
\begin{table}[h] | ||
\centering | ||
\caption{CSV History Overview} | ||
\label{CSVhistoryOverview} | ||
\tabcolsep=0.11cm | ||
\tiny | ||
\begin{tabular}{|c|c|c|c|c|c|c|c|} | ||
\hline | ||
time & t0 & t1 & dt & flux & fluence & power & energy \\ | ||
1.0E-06 & 0.0 & 1.0E-06 & 1.0E-06 & 0.0 & 0.0 & 0.0 & 0.0 | ||
\end{tabular} | ||
\end{table} | ||
|
||
\item \textit{\textbf{concentration tables}} | ||
\begin{lstlisting}[basicstyle=\tiny] | ||
========================================================================================================================= | ||
= Nuclide concentrations in watts, actinides for case 'decay' (#1/1) = | ||
------------------------------------------------------------------------------------------------------------------------- | ||
(relative cutoff; integral of concentrations over time > 1.00E-04 % of integral of all concentrations over time) | ||
. | ||
0.0E+00sec 1.0E-06sec | ||
th231 8.6167E-08 8.6167E-08 | ||
th234 7.7763E-09 7.7763E-09 | ||
------------ | ||
totals 4.6831E+03 4.6831E+03 | ||
========================================================================================================================= | ||
. | ||
. | ||
========================================================================================================================= | ||
= Nuclide concentrations in watts, fission products for case 'decay' (#1/1) = | ||
------------------------------------------------------------------------------------------------------------------------- | ||
(relative cutoff; integral of concentrations over time > 1.00E-04 % of integral of all concentrations over time) | ||
. | ||
0.0E+00sec 1.0E-06sec | ||
ga74 2.4264E-01 2.4264E-01 | ||
ga75 1.8106E+00 1.8106E+00 | ||
------------ | ||
totals 1.2266E+06 1.2266E+06 | ||
\end{lstlisting} | ||
that will be converted in the following way (CSV): | ||
\begin{table}[h] | ||
\centering | ||
\caption{CSV Concentration Tables} | ||
\label{CSVconcentrationTables} | ||
\tabcolsep=0.11cm | ||
\tiny | ||
\begin{tabular}{|c|c|c|c|c|c|c|c|} | ||
\hline | ||
time & ga74\_watts & ga75\_watts & subtotals\_fission\_products & th231\_watts & th234\_watts & subtotals\_actinides & totals\_watts \\ \hline | ||
0.0E+00 & 2.4264E-01 & 1.8106E+00 & 1.2266E+06 & 8.6167E-08 & 7.7763E-09 & 4.6831E+03 & 1.2313E+06 \\ | ||
1.0E-06 & 2.4264E-01 & 1.8106E+00 & 1.2266E+06 & 8.6167E-08 & 7.7763E-09 & 4.6831E+03 & 1.2313E+06 | ||
\end{tabular} | ||
\end{table} | ||
\end{itemize} | ||
|
||
\textbf{Remember also that a SCALE simulation run is considered successful (i.e., the simulation did not crash) if it does not contain, in | ||
the last 20 lines, the following message:} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we check through all the file for this error instead of considering the last 20 lines? I recall something similar for the RELAP5 interface There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In case of scale, that message is always printed at the end since it is printed by the main driver. |
||
|
||
\textcolor{red}{terminated due to errors} | ||
|
||
\textbf{If the a SCALE simulation terminates with this message, the simulation is considered ``failed'', i.e., it will not be saved.} | ||
|
||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
\subsubsection{Samplers or Optimizers} | ||
In the \xmlNode{Samplers} or \xmlNode{Optimizers} block we want to define the variables that are going | ||
to be sampled or optimized. | ||
% | ||
\\The perturbation or optimization of the input of any SCALE sequence is performed using the approach detailed in the \textit{Generic Interface} section (see \ref{subsec:genericInterface}). Briefly, this approach uses | ||
``wild-cards'' (placed in the original input files) for injecting the perturbed values. | ||
For example, if the original input file (that needs to be perturbed) is the following: | ||
\begin{lstlisting}[language=python] | ||
=origen | ||
case(actual_mass){ | ||
lib{ file="end7dec" } | ||
mat{ iso=[zr-95=1.0] units="moles" } | ||
time=[1.0] %1 day | ||
} | ||
end | ||
\end{lstlisting} | ||
and the initial moles of ``zr-95'' need to be perturbed, a RAVEN ``wild-card'' will be defined: | ||
\begin{lstlisting}[language=python] | ||
=origen | ||
case(actual_mass){ | ||
lib{ file="end7dec" } | ||
mat{ iso=[zr-95=$RAVEN-zrMoles$] units="moles" } | ||
time=[1.0] %1 day | ||
} | ||
end | ||
\end{lstlisting} | ||
|
||
Finally, the variable \textbf{\textit{zrMoles}} needs to be specified in the specific Sampler or Optimizer that will be used: | ||
|
||
\begin{lstlisting}[style=XML] | ||
... | ||
<Samplers> | ||
<aSampler name='aUserDefinedName' > | ||
<variable name='zrMoles'> | ||
... | ||
</variable> | ||
</aSampler> | ||
</Samplers> | ||
... | ||
<Optimizers> | ||
<anOptimizer name='aUserDefinedName' > | ||
<variable name='zrMoles'> | ||
... | ||
</variable> | ||
</anOptimizer> | ||
</Samplers> | ||
... | ||
\end{lstlisting} | ||
% |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the files mentioned in this section
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done