Skip to content

Commit

Permalink
Added a test for transformed transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
fdkong committed Jul 9, 2020
1 parent 52d464e commit 6a21627
Show file tree
Hide file tree
Showing 5 changed files with 372 additions and 0 deletions.
Binary file not shown.
Binary file not shown.
11 changes: 11 additions & 0 deletions test/tests/transfers/multiapp_transfer_transformation/tests
@@ -0,0 +1,11 @@
[Tests]
issues = '#15567'
design = 'MultiAppInterpolationTransfer.md'

[fromsub]
type = 'Exodiff'
input = 'transfer_transformation.i'
exodiff = 'transfer_transformation_out.e transfer_transformation_out_sub0.e'
requirement = "The system shall be able to create virtually translated points during MultiApp transfers"
[]
[]
@@ -0,0 +1,170 @@
[Mesh]
[./gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 3
ny = 5
nz = 0
xmax = 0.8
xmin = 0.2
zmin = 0
zmax = 0
elem_type = QUAD4
[]

[./subdomain_id]
type = ElementSubdomainIDGenerator
input = gmg
subdomain_ids = '0 1 2
0 1 2
0 1 2
0 1 2
0 1 2'
[]

[./boundary01]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain_id
master_block = '0'
paired_block = '1'
new_boundary = 'boundary01'
[]

[./boundary10]
type = SideSetsBetweenSubdomainsGenerator
input = boundary01
master_block = '1'
paired_block = '0'
new_boundary = 'boundary10'
[]

[./boundary12]
type = SideSetsBetweenSubdomainsGenerator
input = boundary10
master_block = '1'
paired_block = '2'
new_boundary = 'boundary12'
[]

[./boundary21]
type = SideSetsBetweenSubdomainsGenerator
input = boundary12
master_block = '2'
paired_block = '1'
new_boundary = 'boundary21'
[]

[./breakmesh]
type = BreakMeshByBlockGenerator
input = boundary21
[../]

uniform_refine = 2
[]

[Variables]
[./u]
[../]
[]

[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]

[AuxVariables]
[./material_id]
order = constant
family = monomial
[../]

[./fromsub]
[]
[]

[BCs]
[./left0]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]

[./right0]
type = DirichletBC
variable = u
boundary = boundary01
value = 1
[../]

[./left1]
type = DirichletBC
variable = u
boundary = boundary10
value = 1
[../]

[./right1]
type = DirichletBC
variable = u
boundary = boundary12
value = 0
[../]

[./left2]
type = DirichletBC
variable = u
boundary = boundary21
value = 0
[../]

[./right2]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]

[Executioner]
type = Steady
solve_type = 'NEWTON'
[]

[Outputs]
exodus = true
[]

[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0.0 0.0 0.0'
execute_on = 'timestep_end'
input_files = transfer_transformation_sub.i
[]
[]

[Transfers]
[from_sub_gap_distance] # plate displacement in z only
type = MultiAppInterpolationTransfer
direction = from_multiapp
multi_app = sub
num_points = 1
shrink_gap_width = 0.2
shrink_mesh = 'source'
source_variable = 'u'
variable = 'fromsub'
[]

[to_master] # plate displacement in z only
type = MultiAppInterpolationTransfer
direction = to_multiapp
multi_app = sub
num_points = 2
source_variable = 'u'
variable = 'frommaster'
[]
[]
@@ -0,0 +1,191 @@
[Mesh]
[./gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
nz = 0
zmin = 0
zmax = 0
elem_type = QUAD4
[]

[./subdomain_id]
type = ElementSubdomainIDGenerator
input = gmg
subdomain_ids = '0 1 2 3 4
0 1 2 3 4
0 1 2 3 4
0 1 2 3 4
0 1 2 3 4'
[]

[./boundary01]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain_id
master_block = '0'
paired_block = '1'
new_boundary = 'boundary01'
[]

[./boundary10]
type = SideSetsBetweenSubdomainsGenerator
input = boundary01
master_block = '1'
paired_block = '0'
new_boundary = 'boundary10'
[]

[./boundary12]
type = SideSetsBetweenSubdomainsGenerator
input = boundary10
master_block = '1'
paired_block = '2'
new_boundary = 'boundary12'
[]

[./boundary21]
type = SideSetsBetweenSubdomainsGenerator
input = boundary12
master_block = '2'
paired_block = '1'
new_boundary = 'boundary21'
[]

[./boundary23]
type = SideSetsBetweenSubdomainsGenerator
input = boundary21
master_block = '2'
paired_block = '3'
new_boundary = 'boundary23'
[]

[./boundary32]
type = SideSetsBetweenSubdomainsGenerator
input = boundary23
master_block = '3'
paired_block = '2'
new_boundary = 'boundary32'
[]

[./boundary34]
type = SideSetsBetweenSubdomainsGenerator
input = boundary32
master_block = '3'
paired_block = '4'
new_boundary = 'boundary34'
[]

[./boundary43]
type = SideSetsBetweenSubdomainsGenerator
input = boundary34
master_block = '4'
paired_block = '3'
new_boundary = 'boundary43'
[]

[./breakmesh]
type = BreakMeshByBlockGenerator
input = boundary43
[../]

uniform_refine = 2
[]

[Variables]
[./u]
[../]
[]

[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]

[AuxVariables]
[./frommaster]
[]
[]

[BCs]
[./left0]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]

[./right0]
type = DirichletBC
variable = u
boundary = boundary01
value = 1
[../]

[./left1]
type = DirichletBC
variable = u
boundary = boundary10
value = 0
[../]

[./right1]
type = DirichletBC
variable = u
boundary = boundary12
value = 0
[../]

[./left2]
type = DirichletBC
variable = u
boundary = boundary21
value = 1
[../]

[./right2]
type = DirichletBC
variable = u
boundary = boundary23
value = 0
[../]

[./left3]
type = DirichletBC
variable = u
boundary = boundary32
value = 0
[../]

[./right3]
type = DirichletBC
variable = u
boundary = boundary34
value = 0
[../]

[./left4]
type = DirichletBC
variable = u
boundary = boundary43
value = 0
[../]

[./right4]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]

[Executioner]
type = Steady
solve_type = 'NEWTON'
[]

[Outputs]
exodus = true
[]

0 comments on commit 6a21627

Please sign in to comment.