forked from idaholab/moose
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup periodic boundary conditions in a scalable way
when mesh is generated in parallel Refs idaholab#15501
- Loading branch information
Showing
8 changed files
with
184 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
[Mesh] | ||
[dmg] | ||
type = DistributedRectilinearMeshGenerator | ||
dim = 2 | ||
nx = 40 | ||
ny = 40 | ||
nz = 0 | ||
xmax = 40 | ||
ymax = 40 | ||
zmax = 0 | ||
[] | ||
// We need this for recovering | ||
parallel_type = distributed | ||
[] | ||
|
||
[Variables] | ||
[./u] | ||
order = FIRST | ||
family = LAGRANGE | ||
[../] | ||
[] | ||
|
||
[AuxVariables] | ||
[./periodic_dist] | ||
order = FIRST | ||
family = LAGRANGE | ||
[../] | ||
[./pid] | ||
order = CONSTANT | ||
family = monomial | ||
[] | ||
[] | ||
|
||
[AuxKernels] | ||
[./pidaux] | ||
type = ProcessorIDAux | ||
variable = pid | ||
[../] | ||
[] | ||
|
||
[Kernels] | ||
[./diff] | ||
type = Diffusion | ||
variable = u | ||
[../] | ||
|
||
[./forcing] | ||
type = GaussContForcing | ||
variable = u | ||
[../] | ||
|
||
[./dot] | ||
type = TimeDerivative | ||
variable = u | ||
[../] | ||
[] | ||
|
||
[AuxKernels] | ||
[./periodic_dist] | ||
type = PeriodicDistanceAux | ||
variable = periodic_dist | ||
point = '4 6 0' | ||
[../] | ||
[] | ||
|
||
[BCs] | ||
[./Periodic] | ||
[./all] | ||
variable = u | ||
auto_direction = 'x y' | ||
[../] | ||
[../] | ||
[] | ||
|
||
[Executioner] | ||
type = Transient | ||
dt = 1 | ||
num_steps = 20 | ||
solve_type = NEWTON | ||
[] | ||
|
||
[Outputs] | ||
execute_on = 'timestep_end' | ||
exodus = true | ||
[] |
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,38 @@ | ||
[Tests] | ||
issues = '#15501' | ||
design = 'AddPeriodicBCAction.md DistributedRectilinearMeshGenerator.md' | ||
|
||
[./2d] | ||
type = 'Exodiff' | ||
input = 'dmg_periodic_bc.i' | ||
exodiff = 'dmg_periodic_bc_out.e' | ||
min_parallel = 2 | ||
cli_args = 'Outputs/hide="pid"' | ||
abs_zero = 1e-6 | ||
rel_err = 1e-5 | ||
requirement = "MOOSE shall support periodic boundary conditions in a parallel generated mesh." | ||
[../] | ||
|
||
[./3d] | ||
type = 'Exodiff' | ||
input = 'dmg_periodic_bc.i' | ||
exodiff = 'dmg_periodic_bc_out_3d.e' | ||
min_parallel = 2 | ||
cli_args = 'Outputs/hide="pid" Outputs/file_base=dmg_periodic_bc_out_3d Mesh/dmg/dim=3 Mesh/dmg/nx=10 Mesh/dmg/ny=10 Mesh/dmg/nz=10 Mesh/dmg/zmax=40 BCs/Periodic/all/auto_direction="x y z" Kernels/forcing/x_center=6' | ||
abs_zero = 1e-6 | ||
rel_err = 1e-5 | ||
requirement = "MOOSE shall support periodic boundary conditions in a parallel generated 3D mesh." | ||
[../] | ||
|
||
[./1d] | ||
type = 'Exodiff' | ||
input = 'dmg_periodic_bc.i' | ||
exodiff = 'dmg_periodic_bc_out_1d.e' | ||
min_parallel = 2 | ||
cli_args = 'Outputs/hide="pid" Outputs/file_base=dmg_periodic_bc_out_1d Mesh/dmg/dim=1 Mesh/dmg/nx=100 Mesh/dmg/ny=0 Mesh/dmg/ymax=0 BCs/Periodic/all/auto_direction="x" AuxKernels/periodic_dist/point="1 0 0" Kernels/forcing/y_center=0 Kernels/forcing/x_center=0 ' | ||
abs_zero = 1e-6 | ||
rel_err = 1e-5 | ||
requirement = "MOOSE shall support periodic boundary conditions in a parallel generated 1D mesh." | ||
[../] | ||
|
||
[] |