Creation of a reference solution file
Creating a reference solution file enables direct initialization of the required infiltration profile without the need to run a separate simulation. This page outlines a streamlined workflow to create a reference solution file, which can dynamically initialize the infiltration profile during stress analysis. The reference solution file is generated once for a given graphite geometry, enabling multiple simulations based on infiltration without redundancy.
To achieve this, two tasks are performed sequentially. First, ten infiltration profile simulations are conducted with varying infiltration levels, ranging from 10% to 100% in 10% increments. Then, the outputs from these simulations are combined into a single output file, which can be used to assign infiltration profiles for subsequent analyses.
Parametric Study
To complete the first task, the same input file as mentioned in creation of infiltration profiles is used. The ten simulations are run simultaneously using the Parametric Study Object within the MOOSE Stochastic Tools. The input file is shown below.
# ==============================================================================
# Parametric study input file to generate output files corresponding to different infiltration amounts
# Application : MOOSE
# ------------------------------------------------------------------------------
# Idaho Falls, INL, 2025
# Author(s): V Prithivirajan, Ben Spencer
# If using or referring to this model, please cite as explained on
# https://mooseframework.inl.gov/virtual_test_bed/citing.html
# ==============================================================================
[ParameterStudy]
input = 2D_CreateInfiltrationProfile.i
parameters = 'vol_frac_threshold'
sampling_type = input-matrix
input_matrix = '0.1;0.2;0.3;0.4;0.5;0.6;0.7;0.8;0.9;1.0'
min_procs_per_sample = 4
[](msr/graphite_model/infiltration/2_create_reference_solution_file/parametric_study.i)In these simulations, the 2D_CreateInfiltrationProfile.i file is run ten times, varying the vol_frac_threshold parameter.
To run this model in parallel using the MOOSE combined module executable and start the ten simulations simultaneously, use the following command:
mpiexec -n 100 /path/to/app/combined-opt -i parametric_study.i
The following output files will be produced:
Ten Exodus result files:
param_study_out_study_appXX_exodus.eTen CSV result files:
param_study_out_study_appXX_csv.csv
Note: XX corresponds to the simulation case varying from 01 to 10, representing various infiltration amounts from 10% to 100%, respectively.
Combining the output files
In this step, the simulation output files generated in the previous section are combined into a single output file to facilitate further analysis. The input file for this task is given below.
# ==============================================================================
# Input file to create a reference solution output file
# Application : MOOSE
# ------------------------------------------------------------------------------
# Idaho Falls, INL, 2025
# Author(s): V Prithivirajan, Ben Spencer
# If using or referring to this model, please cite as explained on
# https://mooseframework.inl.gov/virtual_test_bed/citing.html
# ==============================================================================
[Mesh]
file = '../1_create_infiltration_profile/2D/msre2D_1X.e'
[]
#SolutionUserObjects below read the data corresponding
#to the diffused variable from the external solution files
[UserObjects]
[sol1]
type = SolutionUserObject
mesh = parametric_study_out_study_app0.e
system_variables = diffused
timestep = LATEST
[]
[sol2]
type = SolutionUserObject
mesh = parametric_study_out_study_app1.e
system_variables = diffused
timestep = LATEST
[]
[sol3]
type = SolutionUserObject
mesh = parametric_study_out_study_app2.e
system_variables = diffused
timestep = LATEST
[]
[sol4]
type = SolutionUserObject
mesh = parametric_study_out_study_app3.e
system_variables = diffused
timestep = LATEST
[]
[sol5]
type = SolutionUserObject
mesh = parametric_study_out_study_app4.e
system_variables = diffused
timestep = LATEST
[]
[sol6]
type = SolutionUserObject
mesh = parametric_study_out_study_app5.e
system_variables = diffused
timestep = LATEST
[]
[sol7]
type = SolutionUserObject
mesh = parametric_study_out_study_app6.e
system_variables = diffused
timestep = LATEST
[]
[sol8]
type = SolutionUserObject
mesh = parametric_study_out_study_app7.e
system_variables = diffused
timestep = LATEST
[]
[sol9]
type = SolutionUserObject
mesh = parametric_study_out_study_app8.e
system_variables = diffused
timestep = LATEST
[]
[sol10]
type = SolutionUserObject
mesh = parametric_study_out_study_app9.e
system_variables = diffused
timestep = LATEST
[]
[]
#SolutionFunctions below obtatins the data from the SolutionUserObject and
#makes it available as a function for the current simulation
[Functions]
[func1]
type = SolutionFunction
solution = sol1
from_variable = diffused
[]
[func2]
type = SolutionFunction
solution = sol2
from_variable = diffused
[]
[func3]
type = SolutionFunction
solution = sol3
from_variable = diffused
[]
[func4]
type = SolutionFunction
solution = sol4
from_variable = diffused
[]
[func5]
type = SolutionFunction
solution = sol5
from_variable = diffused
[]
[func6]
type = SolutionFunction
solution = sol6
from_variable = diffused
[]
[func7]
type = SolutionFunction
solution = sol7
from_variable = diffused
[]
[func8]
type = SolutionFunction
solution = sol8
from_variable = diffused
[]
[func9]
type = SolutionFunction
solution = sol9
from_variable = diffused
[]
[func10]
type = SolutionFunction
solution = sol10
from_variable = diffused
[]
[combine]
type = ParsedFunction
expression = '(t=0.1)*func1 + (t=0.2)*func2 + (t=0.3)*func3 + (t=0.4)*func4 + (t=0.5)*func5 + (t=0.6)*func6 + (t=0.7)*func7 + (t=0.8)*func8 + (t=0.9)*func9 + (t=1)*func10 '
symbol_names = ' func1 func2 func3 func4 func5 func6 func7 func8 func9 func10 '
symbol_values = ' func1 func2 func3 func4 func5 func6 func7 func8 func9 func10 '
[]
[]
[AuxVariables]
[diffuse]
[]
[]
[Variables]
[dummy]
[]
[]
[Problem]
kernel_coverage_check = false
solve = false #?
[]
[AuxKernels]
[diffuse]
type = FunctionAux
function = combine
variable = diffuse
[]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1 #s
[]
[Outputs]
exodus = true
[](msr/graphite_model/infiltration/2_create_reference_solution_file/CombinedExodus_AllResults.i)This is accomplished using the SolutionUserObject and SolutionFunction MOOSE objects. The SolutionUserObject reads data from external solution files, capturing the variable diffused at the latest time step. The SolutionFunction then makes this data available as functions within the current simulation. The ParsedFunction effectively combines outputs from these solution functions and stores the infiltration profile at specific time steps. For example, a 10% infiltration corresponds to a time step of 0.1. This approach facilitates easy interpolation for any arbitrary user-defined infiltration amount.
To run this model using the MOOSE combined module executable, use the following command:
mpiexec -n 10 /path/to/app/combined-opt -i CombinedExodus_AllResults.i
The following Exodus output file will be produced:CombinedExodus_AllResults_out.e.