Skip to content

Commit

Permalink
Modify test names and add new tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cticenhour committed May 18, 2022
1 parent 8e071bb commit 646b230
Show file tree
Hide file tree
Showing 5 changed files with 157 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
[Mesh]
[./box]
type = CartesianMeshGenerator
dim = 2
dx = '0.5 0.5'
dy = '0.25 0.5 0.25'
ix = '20 20'
iy = '10 20 10'
subdomain_id = '1 1
2 3
1 1'
[../]
[./rename_subdomains]
type = RenameBlockGenerator
input = box
old_block_id = '1 2'
new_block_name = 'stainless_steel graphite'
[../]
[./create_interface]
type = SideSetsBetweenSubdomainsGenerator
input = rename_subdomains
master_block = stainless_steel
paired_block = graphite
new_boundary = 'ssg_interface'
[../]
[./delete_block]
type = BlockDeletionGenerator
input = create_interface
block_id = 3
[../]
[]

[Problem]
coord_type = RZ
[]

[Variables]
[./potential_graphite]
block = graphite
[../]
[./potential_stainless_steel]
block = stainless_steel
[../]
[]

[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
[../]
[]

[BCs]
[./elec_top]
type = DirichletBC
variable = potential_stainless_steel
boundary = top
value = 1
[../]
[./elec_bottom]
type = DirichletBC
variable = potential_stainless_steel
boundary = bottom
value = 0
[../]
[]

[InterfaceKernels]
[./contact_resistance]
type = ElectrostaticContactCondition
variable = potential_stainless_steel
neighbor_var = potential_graphite
boundary = ssg_interface
mean_hardness = mean_hardness
mechanical_pressure = 8.52842e10 # resulting contact resistance should be ~1.47e5 as described in Cincotti et al (https://doi.org/10.1002/aic.11102)
[../]
[]

[Materials]
#graphite
[./sigma_graphite]
type = GenericConstantMaterial
prop_names = 'electrical_conductivity'
prop_values = 3.33e2
block = graphite
[../]

#stainless_steel
[./sigma_stainless_steel]
type = GenericConstantMaterial
prop_names = 'electrical_conductivity'
prop_values = 1.429e6
block = stainless_steel
[../]

#mean hardness
[./harmonic_mean_hardness]
type = ADGenericConstantMaterial
prop_names = 'mean_hardness'
prop_values = 2.4797e9
[../]
[]

[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]

[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -ksp_grmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 101 preonly ilu 1'
#petsc_options = '-snes_test_jacobian'
automatic_scaling = true
[]

[Outputs]
exodus = true
perf_graph = true
[]
Binary file not shown.
32 changes: 26 additions & 6 deletions modules/electromagnetics/test/tests/interfacekernels/tests
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,35 @@
input = 'combined_props.i'
exodiff = 'combined_props_out.e'
[../]
[./electrostatic_contact_resistance]
[./electrostatic_contact_resistance_supplied]
type = Exodiff
input = 'contact_resistance.i'
exodiff = 'contact_resistance_out.e'
input = 'contact_resistance_supplied.i'
exodiff = 'contact_resistance_supplied_out.e'
[../]
[./electrostatic_contact_resistance_jacobian]
[./electrostatic_contact_resistance_supplied_jacobian]
type = PetscJacobianTester
input = 'contact_resistance.i'
input = 'contact_resistance_supplied.i'
run_sim = false
difference_tol = 2e-8 #default = 1e-8, first evaluation is 1.15e-8
difference_tol = 2e-8 #default = 1e-8, first evaluation is 1.15647e-8
prereq = electrostatic_contact_resistance_supplied
[../]
[./electrostatic_contact_resistance_error]
type = RunException
input = 'contact_resistance_supplied.i'
cli_args = 'InterfaceKernels/contact_resistance/mean_hardness=1.0'
expect_err = 'In contact_resistance, both user-supplied electrical contact resistance'
prereq = electrostatic_contact_resistance_supplied
[../]
[./electrostatic_contact_resistance_calculated]
type = Exodiff
input = 'contact_resistance_calculated.i'
exodiff = 'contact_resistance_calculated_out.e'
[../]
[./electrostatic_contact_resistance_calculated_jacobian]
type = PetscJacobianTester
input = 'contact_resistance_calculated.i'
run_sim = false
difference_tol = 2e-8 #default = 1e-8, first evaluation is 1.15647e-8
prereq = electrostatic_contact_resistance_calculated
[../]
[]

0 comments on commit 646b230

Please sign in to comment.