-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added MOOSE interface Generic File perturbation (#1141)
* added possibility to perturb external input file in MOOSE INTERFACE * Closes #1140
- Loading branch information
Showing
19 changed files
with
685 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
151 changes: 151 additions & 0 deletions
151
tests/framework/CodeInterfaceTests/MOOSEBaseApps/MooseExample18OnlyGenericFile/ex18.i
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
[Mesh] | ||
type = GeneratedMesh | ||
dim = 2 | ||
xmin = 0 | ||
xmax = 1 | ||
ymin = 0 | ||
ymax = 1 | ||
nx = 10 | ||
ny = 10 | ||
elem_type = QUAD4 | ||
[] | ||
|
||
[Functions] | ||
# ODEs | ||
[./exact_x_fn] | ||
type = ParsedFunction | ||
value = (-1/3)*exp(-t)+(4/3)*exp(5*t) | ||
[../] | ||
[./exact_y_fn] | ||
type = ParsedFunction | ||
value = (2/3)*exp(-t)+(4/3)*exp(5*t) | ||
[../] | ||
[] | ||
|
||
[Variables] | ||
[./diffused] | ||
order = FIRST | ||
family = LAGRANGE | ||
[../] | ||
|
||
# ODE variables | ||
[./x] | ||
family = SCALAR | ||
order = FIRST | ||
initial_condition = 1 | ||
[../] | ||
[./y] | ||
family = SCALAR | ||
order = FIRST | ||
initial_condition = 2 | ||
[../] | ||
|
||
[] | ||
|
||
[Kernels] | ||
[./td] | ||
type = TimeDerivative | ||
variable = diffused | ||
[../] | ||
[./diff] | ||
type = Diffusion | ||
variable = diffused | ||
[../] | ||
[] | ||
|
||
[ScalarKernels] | ||
[./td1] | ||
type = ODETimeDerivative | ||
variable = x | ||
[../] | ||
[./ode1] | ||
type = ImplicitODEx | ||
variable = x | ||
y = y | ||
[../] | ||
|
||
[./td2] | ||
type = ODETimeDerivative | ||
variable = y | ||
[../] | ||
[./ode2] | ||
type = ImplicitODEy | ||
variable = y | ||
x = x | ||
[../] | ||
[] | ||
|
||
|
||
[BCs] | ||
[./right] | ||
type = ScalarDirichletBC | ||
variable = diffused | ||
boundary = 1 | ||
scalar_var = x | ||
[../] | ||
|
||
[./left] | ||
type = ScalarDirichletBC | ||
variable = diffused | ||
boundary = 3 | ||
scalar_var = y | ||
[../] | ||
[] | ||
|
||
[Postprocessors] | ||
# to print the values of x, y into a file so we can plot it | ||
[./x] | ||
type = ScalarVariable | ||
variable = x | ||
execute_on = timestep_end | ||
[../] | ||
|
||
[./y] | ||
type = ScalarVariable | ||
variable = y | ||
execute_on = timestep_end | ||
[../] | ||
|
||
[./exact_x] | ||
type = FunctionValuePostprocessor | ||
function = exact_x_fn | ||
execute_on = timestep_end | ||
point = '0 0 0' | ||
[../] | ||
|
||
[./exact_y] | ||
type = FunctionValuePostprocessor | ||
function = exact_y_fn | ||
execute_on = timestep_end | ||
point = '0 0 0' | ||
[../] | ||
|
||
# Measure the error in ODE solution for 'x'. | ||
[./l2err_x] | ||
type = ScalarL2Error | ||
variable = x | ||
function = exact_x_fn | ||
[../] | ||
|
||
# Measure the error in ODE solution for 'y'. | ||
[./l2err_y] | ||
type = ScalarL2Error | ||
variable = y | ||
function = exact_y_fn | ||
[../] | ||
[] | ||
|
||
|
||
[Executioner] | ||
type = Transient | ||
start_time = 0 | ||
dt = 0.01 | ||
num_steps = 10 | ||
|
||
#Preconditioned JFNK (default) | ||
solve_type = 'PJFNK' | ||
[] | ||
|
||
[Outputs] | ||
exodus = true | ||
[] |
5 changes: 5 additions & 0 deletions
5
.../CodeInterfaceTests/MOOSEBaseApps/MooseExample18OnlyGenericFile/generic_external_file.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
time,power | ||
0.,10 | ||
1.0,20 | ||
2.0,$RAVEN-p2.0$ | ||
3.0,$RAVEN-p3.0$ |
12 changes: 12 additions & 0 deletions
12
...mework/CodeInterfaceTests/MOOSEBaseApps/MooseExample18OnlyGenericFile/myMC/1/out~ex18.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
time,exact_x,exact_y,l2err_x,l2err_y,x,y | ||
0,0,0,0,0,1,2 | ||
0.01,1.0716781839183,2.0617280176675,0.0017975847110658,0.0018467608635113,1.0734757686294,2.063574778531 | ||
0.02,1.1468283329986,2.1270270063054,0.0037839718620896,0.0038813479623196,1.1506123048607,2.1309083542677 | ||
0.03,1.2256304791215,2.19607601267,0.0059738448989899,0.0061184592775807,1.2316043240205,2.2021944719476 | ||
0.04,1.3082738644961,2.2690633036484,0.008382904883361,0.0085738102126549,1.3166567693795,2.2776371138611 | ||
0.05,1.3949574140834,2.3461868385841,0.011027936581653,0.011264199685733,1.4059853506651,2.3574510382699 | ||
0.06,1.4858902322399,2.4276547658242,0.013926878676188,0.014207580343858,1.4998171109161,2.441862346168 | ||
0.07,1.5812921248224,2.5136859447283,0.017098898346571,0.017423133144702,1.5983910231689,2.531109077873 | ||
0.08,1.6813941480595,2.6045104944461,0.020564470486559,0.020931346578875,1.701958618546,2.625441841025 | ||
0.09,1.7864391855631,2.7003703708344,0.024345461837806,0.024754100802847,1.810784647401,2.7251244716372 | ||
0.1,1.8966825549215,2.8015199729575,0.028465220336359,0.028914756989218,1.9251477752579,2.8304347299467 |
12 changes: 12 additions & 0 deletions
12
...mework/CodeInterfaceTests/MOOSEBaseApps/MooseExample18OnlyGenericFile/myMC/2/out~ex18.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
time,exact_x,exact_y,l2err_x,l2err_y,x,y | ||
0,0,0,0,0,1,2 | ||
0.01,1.0716781839183,2.0617280176675,0.0017975847110658,0.0018467608635113,1.0734757686294,2.063574778531 | ||
0.02,1.1468283329986,2.1270270063054,0.0037839718620896,0.0038813479623196,1.1506123048607,2.1309083542677 | ||
0.03,1.2256304791215,2.19607601267,0.0059738448989899,0.0061184592775807,1.2316043240205,2.2021944719476 | ||
0.04,1.3082738644961,2.2690633036484,0.008382904883361,0.0085738102126549,1.3166567693795,2.2776371138611 | ||
0.05,1.3949574140834,2.3461868385841,0.011027936581653,0.011264199685733,1.4059853506651,2.3574510382699 | ||
0.06,1.4858902322399,2.4276547658242,0.013926878676188,0.014207580343858,1.4998171109161,2.441862346168 | ||
0.07,1.5812921248224,2.5136859447283,0.017098898346571,0.017423133144702,1.5983910231689,2.531109077873 | ||
0.08,1.6813941480595,2.6045104944461,0.020564470486559,0.020931346578875,1.701958618546,2.625441841025 | ||
0.09,1.7864391855631,2.7003703708344,0.024345461837806,0.024754100802847,1.810784647401,2.7251244716372 | ||
0.1,1.8966825549215,2.8015199729575,0.028465220336359,0.028914756989218,1.9251477752579,2.8304347299467 |
Empty file.
Oops, something went wrong.