-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test for controlling the pressure action
- Loading branch information
Showing
2 changed files
with
142 additions
and
0 deletions.
There are no files selected for viewing
Binary file added
BIN
+75.9 KB
modules/solid_mechanics/test/tests/pressure/gold/pressure_control_test_out.e
Binary file not shown.
142 changes: 142 additions & 0 deletions
142
modules/solid_mechanics/test/tests/pressure/pressure_control_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,142 @@ | ||
[Mesh] | ||
type = FileMesh | ||
file = pressure_test.e | ||
displacements = 'disp_x disp_y disp_z' | ||
[] | ||
|
||
[Functions] | ||
[rampConstant] | ||
type = PiecewiseLinear | ||
x = '0. 1. 2.' | ||
y = '0. 1. 1.' | ||
scale_factor = 1.0 | ||
[] | ||
[zeroRamp] | ||
type = PiecewiseLinear | ||
x = '0. 1. 2.' | ||
y = '0. 0. 1.' | ||
scale_factor = 1.0 | ||
[] | ||
[rampUnramp] | ||
type = PiecewiseLinear | ||
x = '0. 1. 2.' | ||
y = '0. 1. 0.' | ||
scale_factor = 10.0 | ||
[] | ||
[] | ||
|
||
[Variables] | ||
[disp_x] | ||
order = FIRST | ||
family = LAGRANGE | ||
[] | ||
[disp_y] | ||
order = FIRST | ||
family = LAGRANGE | ||
[] | ||
[disp_z] | ||
order = FIRST | ||
family = LAGRANGE | ||
[] | ||
[] | ||
|
||
[Kernels] | ||
[SolidMechanics] | ||
displacements = 'disp_x disp_y disp_z' | ||
[] | ||
[] | ||
|
||
[BCs] | ||
[no_x] | ||
type = DirichletBC | ||
variable = disp_x | ||
boundary = 4 | ||
value = 0.0 | ||
[] | ||
[no_y] | ||
type = DirichletBC | ||
variable = disp_y | ||
boundary = 5 | ||
value = 0.0 | ||
[] | ||
[no_z] | ||
type = DirichletBC | ||
variable = disp_z | ||
boundary = 6 | ||
value = 0.0 | ||
[] | ||
[Pressure] | ||
[Side1] | ||
boundary = 1 | ||
function = rampConstant | ||
displacements = 'disp_x disp_y disp_z' | ||
control_tags = 'tag_pressure' | ||
[] | ||
[Side2] | ||
boundary = 2 | ||
function = zeroRamp | ||
displacements = 'disp_x disp_y disp_z' | ||
factor = 2.0 | ||
control_tags = 'tag_pressure' | ||
[] | ||
[Side3] | ||
boundary = 3 | ||
function = rampUnramp | ||
displacements = 'disp_x disp_y disp_z' | ||
control_tags = 'tag_pressure' | ||
[] | ||
[] | ||
[] | ||
|
||
[Materials] | ||
[Elasticity_tensor] | ||
type = ComputeElasticityTensor | ||
block = 1 | ||
fill_method = symmetric_isotropic | ||
C_ijkl = '0 0.5e6' | ||
[] | ||
[strain] | ||
type = ComputeSmallStrain | ||
displacements = 'disp_x disp_y disp_z' | ||
block = 1 | ||
[] | ||
[stress] | ||
type = ComputeLinearElasticStress | ||
block = 1 | ||
[] | ||
[] | ||
|
||
[Controls] | ||
# Turn Pressure on some boundaries for step 2, off at step 3 | ||
[pressure_crank] | ||
type = TimePeriod | ||
enable_objects = 'BCs/Pressure/Side1' | ||
disable_objects = 'BCs/Pressure/Side2 BCs/Pressure/Side3' | ||
start_time = 1 | ||
end_time = 2 | ||
# All Pressure are controlled outside of the period as well | ||
reverse_on_false = true | ||
[] | ||
[] | ||
|
||
[Executioner] | ||
type = Transient | ||
solve_type = PJFNK | ||
nl_abs_tol = 1e-10 | ||
l_max_its = 20 | ||
start_time = 0.0 | ||
dt = 1.0 | ||
num_steps = 3 | ||
end_time = 2.0 | ||
[] | ||
|
||
[Outputs] | ||
[out] | ||
type = Exodus | ||
elemental_as_nodal = true | ||
[] | ||
[controls] | ||
type = ControlOutput | ||
show_active_objects = false | ||
[] | ||
[] |