-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28736 from GiudGiud/PR_patch_physics_restart
- Loading branch information
Showing
36 changed files
with
930 additions
and
75 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
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
2 changes: 2 additions & 0 deletions
2
modules/heat_transfer/test/tests/physics/restart/gold/default.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,2 @@ | ||
time,max_T,min_T | ||
0,300,300 |
2 changes: 2 additions & 0 deletions
2
modules/heat_transfer/test/tests/physics/restart/gold/from_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,2 @@ | ||
time,max_T,min_T | ||
0,100,100 |
2 changes: 2 additions & 0 deletions
2
modules/heat_transfer/test/tests/physics/restart/gold/restart_user_ics.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,2 @@ | ||
time,max_T,min_T | ||
1,100,100 |
2 changes: 2 additions & 0 deletions
2
modules/heat_transfer/test/tests/physics/restart/gold/user_ics.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,2 @@ | ||
time,max_T,min_T | ||
0,100,100 |
86 changes: 86 additions & 0 deletions
86
modules/heat_transfer/test/tests/physics/restart/test_fv.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,86 @@ | ||
[Mesh] | ||
active = 'cmg' | ||
[cmg] | ||
type = CartesianMeshGenerator | ||
dim = 2 | ||
dx = 10 | ||
dy = 10 | ||
[] | ||
[fmg_restart] | ||
type = FileMeshGenerator | ||
file = user_ics.e | ||
use_for_exodus_restart = true | ||
[] | ||
[] | ||
|
||
[Debug] | ||
show_actions=true | ||
[] | ||
|
||
[Physics] | ||
[HeatConduction] | ||
[FiniteVolume] | ||
[h1] | ||
temperature_name = 'T' | ||
|
||
# Thermal properties | ||
thermal_conductivity_functor = 'k0' | ||
specific_heat = 5 | ||
density = 10 | ||
|
||
# Boundary conditions | ||
heat_flux_boundaries = 'left right' | ||
boundary_heat_fluxes = '0 500' | ||
insulated_boundaries = 'top' | ||
fixed_temperature_boundaries = 'bottom' | ||
boundary_temperatures = '300' | ||
[] | ||
[] | ||
[] | ||
[] | ||
|
||
[Executioner] | ||
type = Transient | ||
num_steps = 1 | ||
verbose = true | ||
[] | ||
|
||
[Problem] | ||
solve = false | ||
[] | ||
|
||
[FunctorMaterials] | ||
[mat_k] | ||
type = ADGenericFunctorMaterial | ||
prop_names = 'k0' | ||
prop_values = '1' | ||
[] | ||
[] | ||
|
||
[Outputs] | ||
# Used to set up a restart from checkpoint | ||
checkpoint = true | ||
# Used to set up a restart from exodus file | ||
[exodus] | ||
type = Exodus | ||
execute_on = TIMESTEP_END | ||
[] | ||
# Used to check results | ||
csv = true | ||
execute_on = INITIAL | ||
[] | ||
|
||
[Postprocessors] | ||
[min_T] | ||
type = ElementExtremeValue | ||
variable = 'T' | ||
value_type = 'min' | ||
execute_on = 'INITIAL' | ||
[] | ||
[max_T] | ||
type = ElementExtremeValue | ||
variable = 'T' | ||
value_type = 'max' | ||
execute_on = 'INITIAL' | ||
[] | ||
[] |
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,45 @@ | ||
[Tests] | ||
issues = '#28730' | ||
# Note: ICs are handled by the parent class HeatConductionPhysics | ||
design = 'HeatConductionFV.md HeatConductionCG.md' | ||
[restart] | ||
requirement = 'The system shall be able to restart the temperature variable in the shorthand Physics-syntax' | ||
[default] | ||
type = CSVDiff | ||
input = test_fv.i | ||
csvdiff = 'default.csv' | ||
cli_args = 'Outputs/file_base=default' | ||
detail = 'using the default initial condition,' | ||
[] | ||
[user_ics] | ||
type = CSVDiff | ||
input = test_fv.i | ||
csvdiff = 'user_ics.csv' | ||
cli_args = 'Physics/HeatConduction/FiniteVolume/h1/initial_temperature=100 Outputs/file_base=user_ics' | ||
detail = 'with a user-defined initial condition,' | ||
[] | ||
[restart_with_user_ics] | ||
type = CSVDiff | ||
input = test_fv.i | ||
csvdiff = 'restart_user_ics.csv' | ||
cli_args = "Physics/HeatConduction/FiniteVolume/h1/initial_temperature=100 | ||
Problem/restart_file_base=default_cp/LATEST Problem/allow_initial_conditions_with_restart=true | ||
Outputs/file_base=restart_user_ics" | ||
detail = 'when performing a regular checkpoint restart, but still obeying the user-defined initial condition,' | ||
[] | ||
[restart_from_file] | ||
type = CSVDiff | ||
input = test_fv.i | ||
csvdiff = 'from_file.csv' | ||
cli_args = "Mesh/active='fmg_restart' Physics/HeatConduction/FiniteVolume/h1/initialize_variables_from_mesh_file=true Outputs/file_base=from_file" | ||
detail = 'when performing manual restart from a mesh file, ignoring the default initial condition.' | ||
[] | ||
[] | ||
[error] | ||
type = RunException | ||
input = test_fv.i | ||
cli_args = 'Physics/HeatConduction/FiniteVolume/h1/initial_temperature=100 Physics/HeatConduction/FiniteVolume/h1/initialize_variables_from_mesh_file=true' | ||
expect_err = 'Initial temperature should not be set if the variables should be initialized from the mesh file' | ||
requirement = 'The system shall error if the user specifies initial conditions while also requesting variables be loaded from a mesh file.' | ||
[] | ||
[] |
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
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
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
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
Oops, something went wrong.