forked from idaholab/moose
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add analytical function test and fixup bug in ElectrostaticContactCon…
…dition (idaholab#31)
- Loading branch information
1 parent
199d304
commit 77f37e3
Showing
4 changed files
with
198 additions
and
4 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
189 changes: 189 additions & 0 deletions
189
modules/electromagnetics/test/tests/interfacekernels/analytic_solution_test.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,189 @@ | ||
# Regression test for ElectrostaticContactCondition with analytic solution | ||
# | ||
# dim = 1D | ||
# X = [0,2] | ||
# Interface at X = 1 | ||
# | ||
# stainless_steel graphite | ||
# +------------------+------------------+ | ||
# | ||
# Left BC: Potential = 1 | ||
# Right BC: Potential = 0 | ||
# Center Interface: ElectrostaticContactCondition | ||
# | ||
|
||
[Mesh] | ||
[./line] | ||
type = GeneratedMeshGenerator | ||
dim = 1 | ||
nx = 4 | ||
xmax = 2 | ||
[../] | ||
[./break] | ||
type = SubdomainBoundingBoxGenerator | ||
input = line | ||
block_id = 1 | ||
block_name = 'graphite' | ||
bottom_left = '1 0 0' | ||
top_right = '2 0 0' | ||
[../] | ||
[./block_name] | ||
type = RenameBlockGenerator | ||
input = break | ||
old_block_id = 0 | ||
new_block_name = 'stainless_steel' | ||
[../] | ||
[./interface] | ||
type = SideSetsBetweenSubdomainsGenerator | ||
input = block_name | ||
primary_block = 'stainless_steel' | ||
paired_block = 'graphite' | ||
new_boundary = 'ssg_interface' | ||
[../] | ||
[] | ||
|
||
[Variables] | ||
[./potential_graphite] | ||
block = graphite | ||
[../] | ||
[./potential_stainless_steel] | ||
block = stainless_steel | ||
[../] | ||
[] | ||
|
||
[AuxVariables] | ||
[./analytic_potential_stainless_steel] | ||
block = stainless_steel | ||
[../] | ||
[./analytic_potential_graphite] | ||
block = graphite | ||
[../] | ||
[] | ||
|
||
[Kernels] | ||
[./electric_graphite] | ||
type = ConductivityLaplacian | ||
variable = potential_graphite | ||
conductivity_coefficient = electrical_conductivity | ||
block = graphite | ||
[../] | ||
[./electric_stainless_steel] | ||
type = ConductivityLaplacian | ||
variable = potential_stainless_steel | ||
conductivity_coefficient = electrical_conductivity | ||
block = stainless_steel | ||
[../] | ||
[] | ||
|
||
[AuxKernels] | ||
[./analytic_function_aux_stainless_steel] | ||
type = FunctionAux | ||
function = potential_fxn_stainless_steel | ||
variable = analytic_potential_stainless_steel | ||
block = stainless_steel | ||
[../] | ||
[./analytic_function_aux_graphite] | ||
type = FunctionAux | ||
function = potential_fxn_graphite | ||
variable = analytic_potential_graphite | ||
block = graphite | ||
[../] | ||
[] | ||
|
||
[BCs] | ||
[./elec_left] | ||
type = ADDirichletBC | ||
variable = potential_stainless_steel | ||
boundary = left | ||
value = 1 | ||
[../] | ||
[./elec_right] | ||
type = ADDirichletBC | ||
variable = potential_graphite | ||
boundary = right | ||
value = 0 | ||
[../] | ||
[] | ||
|
||
[InterfaceKernels] | ||
[./electric_contact_conductance_ssg] | ||
type = ElectrostaticContactCondition | ||
variable = potential_stainless_steel | ||
neighbor_var = potential_graphite | ||
boundary = ssg_interface | ||
mean_hardness = mean_hardness | ||
mechanical_pressure = 3000 | ||
[../] | ||
[] | ||
|
||
[Materials] | ||
#graphite (at 300 K) | ||
[./sigma_graphite] | ||
type = ADGenericConstantMaterial | ||
prop_names = electrical_conductivity | ||
prop_values = 73069.2 | ||
temperature = temperature_graphite | ||
block = graphite | ||
[../] | ||
|
||
#stainless_steel (at 300 K) | ||
[./sigma_stainless_steel] | ||
type = ADGenericConstantMaterial | ||
prop_names = electrical_conductivity | ||
prop_values = 1.41867e6 | ||
temperature = temperature_stainless_steel | ||
block = stainless_steel | ||
[../] | ||
|
||
# harmonic mean of graphite and stainless steel hardness | ||
[./mean_hardness] | ||
type = ADGenericConstantMaterial | ||
prop_names = mean_hardness | ||
prop_values = 2.4797e9 | ||
[../] | ||
[] | ||
|
||
[Functions] | ||
[./potential_fxn_stainless_steel] | ||
type = ElectricalContactTestFunc | ||
domain = stainless_steel | ||
[../] | ||
[./potential_fxn_graphite] | ||
type = ElectricalContactTestFunc | ||
domain = graphite | ||
[../] | ||
[] | ||
|
||
[Postprocessors] | ||
[./error_stainless_steel] | ||
type = ElementL2Error | ||
variable = potential_stainless_steel | ||
function = potential_fxn_stainless_steel | ||
block = stainless_steel | ||
[../] | ||
[./error_graphite] | ||
type = ElementL2Error | ||
variable = potential_graphite | ||
function = potential_fxn_graphite | ||
block = graphite | ||
[../] | ||
[] | ||
|
||
|
||
[Preconditioning] | ||
[./SMP] | ||
type = SMP | ||
full = true | ||
[../] | ||
[] | ||
|
||
[Executioner] | ||
type = Steady | ||
solve_type = NEWTON | ||
automatic_scaling = true | ||
[] | ||
|
||
[Outputs] | ||
csv = true | ||
perf_graph = true | ||
[] |
3 changes: 3 additions & 0 deletions
3
modules/electromagnetics/test/tests/interfacekernels/gold/analytic_solution_test_out.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,3 @@ | ||
time,error_graphite,error_stainless_steel | ||
0,0,0 | ||
1,1.7691842306039e-07,9.1122582866556e-09 |
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