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.
CentralDifference timeintegrator tests for structural dynamics. Refs i…
- Loading branch information
1 parent
96bd15e
commit 08f6d2f
Showing
41 changed files
with
3,014 additions
and
0 deletions.
There are no files selected for viewing
135 changes: 135 additions & 0 deletions
135
...les/tensor_mechanics/test/tests/central_difference/consistent/1D/1d_consistent_explicit.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,135 @@ | ||
# Test for central difference integration for a 1D element | ||
# Consistent mass matrix | ||
|
||
[Mesh] | ||
type = GeneratedMesh | ||
xmin = 0 | ||
xmax = 10 | ||
nx = 5 | ||
dim = 1 | ||
[] | ||
|
||
[Variables] | ||
[./disp_x] | ||
order = FIRST | ||
family = LAGRANGE | ||
[../] | ||
[] | ||
|
||
[AuxVariables] | ||
[./accel_x] | ||
[../] | ||
[./vel_x] | ||
[../] | ||
[] | ||
|
||
[AuxKernels] | ||
[./accel_x] | ||
type = TestNewmarkTI | ||
variable = accel_x | ||
displacement = disp_x | ||
first = false | ||
[../] | ||
[./vel_x] | ||
type = TestNewmarkTI | ||
variable = vel_x | ||
displacement = disp_x | ||
[../] | ||
[] | ||
|
||
[Kernels] | ||
[./DynamicTensorMechanics] | ||
displacements = 'disp_x' | ||
[../] | ||
[./inertia_x] | ||
type = InertialForce | ||
variable = disp_x | ||
[../] | ||
[] | ||
|
||
[NodalKernels] | ||
[./force_x] | ||
type = UserForcingFunctionNodalKernel | ||
variable = disp_x | ||
boundary = right | ||
function = force_x | ||
[../] | ||
[] | ||
|
||
[Functions] | ||
[./force_x] | ||
type = PiecewiseLinear | ||
x = '0.0 1.0 2.0 3.0 4.0' # time | ||
y = '0.0 1.0 0.0 -1.0 0.0' # force | ||
scale_factor = 1e3 | ||
[../] | ||
[] | ||
|
||
[BCs] | ||
[./fixx1] | ||
type = DirichletBC | ||
variable = disp_x | ||
boundary = left | ||
value = 0.0 | ||
[../] | ||
[] | ||
|
||
[Materials] | ||
[./elasticity_tensor_block] | ||
type = ComputeIsotropicElasticityTensor | ||
youngs_modulus = 1e6 | ||
poissons_ratio = 0.25 | ||
block = 0 | ||
[../] | ||
[./strain_block] | ||
type = ComputeIncrementalSmallStrain | ||
block = 0 | ||
displacements = 'disp_x' | ||
implicit = false | ||
[../] | ||
[./stress_block] | ||
type = ComputeFiniteStrainElasticStress | ||
block = 0 | ||
[../] | ||
[./density] | ||
type = GenericConstantMaterial | ||
block = 0 | ||
prop_names = density | ||
prop_values = 2500 | ||
[../] | ||
[] | ||
|
||
[Executioner] | ||
type = Transient | ||
start_time = -0.005 | ||
end_time = 0.1 | ||
dt = 0.005 | ||
timestep_tolerance = 1e-6 | ||
[./TimeIntegrator] | ||
type = CentralDifference | ||
[../] | ||
[] | ||
|
||
[Postprocessors] | ||
[./disp_x] | ||
type = NodalVariableValue | ||
nodeid = 1 | ||
variable = disp_x | ||
[../] | ||
[./vel_x] | ||
type = NodalVariableValue | ||
nodeid = 1 | ||
variable = vel_x | ||
[../] | ||
[./accel_x] | ||
type = NodalVariableValue | ||
nodeid = 1 | ||
variable = accel_x | ||
[../] | ||
[] | ||
|
||
[Outputs] | ||
exodus = false | ||
csv = true | ||
perf_graph = false | ||
[] |
140 changes: 140 additions & 0 deletions
140
...les/tensor_mechanics/test/tests/central_difference/consistent/1D/1d_consistent_implicit.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,140 @@ | ||
# Test for Newmark Beta integration for a 1D element | ||
# Consistent mass matrix | ||
|
||
[Mesh] | ||
type = GeneratedMesh | ||
xmin = 0 | ||
xmax = 10 | ||
nx = 5 | ||
dim = 1 | ||
[] | ||
|
||
[Variables] | ||
[./disp_x] | ||
order = FIRST | ||
family = LAGRANGE | ||
[../] | ||
[] | ||
|
||
[AuxVariables] | ||
[./accel_x] | ||
[../] | ||
[./vel_x] | ||
[../] | ||
[] | ||
|
||
[AuxKernels] | ||
[./accel_x] | ||
type = TestNewmarkTI | ||
variable = accel_x | ||
displacement = disp_x | ||
first = false | ||
[../] | ||
[./vel_x] | ||
type = TestNewmarkTI | ||
variable = vel_x | ||
displacement = disp_x | ||
[../] | ||
[] | ||
|
||
[Kernels] | ||
[./DynamicTensorMechanics] | ||
displacements = 'disp_x' | ||
[../] | ||
[./inertia_x] | ||
type = InertialForce | ||
variable = disp_x | ||
[../] | ||
[] | ||
|
||
[NodalKernels] | ||
[./force_x] | ||
type = UserForcingFunctionNodalKernel | ||
variable = disp_x | ||
boundary = right | ||
function = force_x | ||
[../] | ||
[] | ||
|
||
[Functions] | ||
[./force_x] | ||
type = PiecewiseLinear | ||
x = '0.0 1.0 2.0 3.0 4.0' # time | ||
y = '0.0 1.0 0.0 -1.0 0.0' # force | ||
scale_factor = 1e3 | ||
[../] | ||
[] | ||
|
||
[BCs] | ||
[./fixx1] | ||
type = DirichletBC | ||
variable = disp_x | ||
boundary = left | ||
value = 0.0 | ||
[../] | ||
[] | ||
|
||
[Materials] | ||
[./elasticity_tensor_block] | ||
type = ComputeIsotropicElasticityTensor | ||
youngs_modulus = 1e6 | ||
poissons_ratio = 0.25 | ||
block = 0 | ||
[../] | ||
[./strain_block] | ||
type = ComputeIncrementalSmallStrain | ||
block = 0 | ||
displacements = 'disp_x' | ||
[../] | ||
[./stress_block] | ||
type = ComputeFiniteStrainElasticStress | ||
block = 0 | ||
[../] | ||
[./density] | ||
type = GenericConstantMaterial | ||
block = 0 | ||
prop_names = density | ||
prop_values = 2500 | ||
[../] | ||
[] | ||
|
||
[Executioner] | ||
type = Transient | ||
solve_type = NEWTON | ||
nl_rel_tol = 1e-8 | ||
nl_abs_tol = 1e-8 | ||
dtmin = 1e-4 | ||
timestep_tolerance = 1e-6 | ||
start_time = -0.005 | ||
end_time = 0.1 | ||
dt = 0.005 | ||
[./TimeIntegrator] | ||
type = NewmarkBeta | ||
beta = 0.25 | ||
gamma = 0.5 | ||
[../] | ||
[] | ||
|
||
[Postprocessors] | ||
[./disp_x] | ||
type = NodalVariableValue | ||
nodeid = 1 | ||
variable = disp_x | ||
[../] | ||
[./vel_x] | ||
type = NodalVariableValue | ||
nodeid = 1 | ||
variable = vel_x | ||
[../] | ||
[./accel_x] | ||
type = NodalVariableValue | ||
nodeid = 1 | ||
variable = accel_x | ||
[../] | ||
[] | ||
|
||
[Outputs] | ||
exodus = false | ||
csv = true | ||
perf_graph = false | ||
[] |
23 changes: 23 additions & 0 deletions
23
...mechanics/test/tests/central_difference/consistent/1D/gold/1d_consistent_explicit_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,23 @@ | ||
time,accel_x,disp_x,vel_x | ||
-0.005,0,0,0 | ||
0,0,0,0 | ||
0.005,0,0,0 | ||
0.01,0,4.1436464088398e-10,0 | ||
0.015,1.6574585635359e-05,1.6003243185495e-09,4.1436464088398e-08 | ||
0.02,3.0863801471262e-05,3.804846976061e-09,1.6003243185495e-07 | ||
0.025,4.074251919384e-05,7.1193220258194e-09,3.390482335177e-07 | ||
0.03,4.4398095689874e-05,1.1445470925808e-08,5.5189977072699e-07 | ||
0.035,4.0466954009212e-05,1.6475332065695e-08,7.6406239497471e-07 | ||
0.04,2.8148489595917e-05,2.1687449163889e-08,9.3560100398753e-07 | ||
0.045,7.2902383322897e-06,2.6360552538336e-08,1.024197823808e-06 | ||
0.05,-2.1560548949864e-05,2.9605096937386e-08,9.8852204726411e-07 | ||
0.055,-5.7142359015901e-05,3.0412047636432e-08,7.917647773497e-07 | ||
0.06,-9.7503748000116e-05,2.7717330230721e-08,4.0514950980966e-07 | ||
0.065,-0.00014006672419035,2.0479421852843e-08,-1.8877667066649e-07 | ||
0.07,-0.00018172763888661,7.7667044796874e-09,-9.9326257835889e-07 | ||
0.075,-0.00021899235981116,-1.1149535818318e-08,-1.9950625751033e-06 | ||
0.08,-0.00024814091699396,-3.6701160801643e-08,-3.1628957671161e-06 | ||
0.085,-0.00026541538741283,-6.8933375272109e-08,-4.4467865281331e-06 | ||
0.09,-0.00026722357948562,-1.0742434328978e-07,-5.7783839453792e-06 | ||
0.095,-0.0002503501418883,-1.512194636539e-07,-7.072318248814e-06 | ||
0.1,-0.00021216609385766,-1.9878527116729e-07,-8.2286088381789e-06 |
23 changes: 23 additions & 0 deletions
23
...mechanics/test/tests/central_difference/consistent/1D/gold/1d_consistent_implicit_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,23 @@ | ||
time,accel_x,disp_x,vel_x | ||
-0.005,0,0,0 | ||
0,0,0,0 | ||
0.005,1.6013134600965e-05,1.0008209125603e-10,4.0032836502412e-08 | ||
0.01,2.9819541119612e-05,5.867004970217e-10,1.5461452580386e-07 | ||
0.015,3.9366857488491e-05,1.7921881173416e-09,3.2758052232411e-07 | ||
0.02,4.2903780968237e-05,3.9442822193167e-09,5.3325711846593e-07 | ||
0.025,3.9111733543566e-05,7.1231647773452e-09,7.3829590474544e-07 | ||
0.03,2.7214767241552e-05,1.1229184930979e-08,9.0411215670824e-07 | ||
0.035,7.0618824261821e-06,1.5963974774944e-08,9.8980378087757e-07 | ||
0.04,-2.0822914571155e-05,2.0826987228426e-08,9.5540120051514e-07 | ||
0.045,-5.5226130240261e-05,2.512868670093e-08,7.652785884866e-07 | ||
0.05,-9.4267683791053e-05,2.8020743305667e-08,3.9154405340832e-07 | ||
0.055,-0.0001354613860638,2.8542656886116e-08,-1.8277862122883e-07 | ||
0.06,-0.00017581155427771,2.5683307902837e-08,-9.6096097208261e-07 | ||
0.065,-0.00021194270731049,1.8455038907498e-08,-1.9303466260531e-06 | ||
0.07,-0.00024025776572936,5.9770528207335e-09,-3.0608478086527e-06 | ||
0.075,-0.00025711881192722,-1.2435789832884e-08,-4.3042892527942e-06 | ||
0.08,-0.00025904330343472,-3.7183249317867e-08,-5.594694541199e-06 | ||
0.085,-0.00024290772476157,-6.8293915950089e-08,-6.8495721116898e-06 | ||
0.09,-0.00020615004916603,-1.0534838759559e-07,-7.9722165465087e-06 | ||
0.095,-0.00014696209047675,-1.474164212009e-07,-8.8549968956157e-06 | ||
0.1,-6.4462873988623e-05,-1.9301281170688e-07,-9.3835593067791e-06 |
23 changes: 23 additions & 0 deletions
23
modules/tensor_mechanics/test/tests/central_difference/consistent/1D/tests
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,23 @@ | ||
[Tests] | ||
design = 'CentralDifference.md' | ||
issues = '#13964 #9726' | ||
|
||
# 1D implicit analysis with Newmark-Beta time integration | ||
[./implicit] | ||
type = 'CSVDiff' | ||
input = '1d_consistent_implicit.i' | ||
csvdiff = '1d_consistent_implicit_out.csv' | ||
requirement = "The NewmarkBeta timeintegrator shall correctly calculate " | ||
"the response of a 1D mesh. " | ||
[../] | ||
|
||
# 1D explicit analysis with Central Difference time integration | ||
[./explicit] | ||
type = 'CSVDiff' | ||
input = '1d_consistent_explicit.i' | ||
csvdiff = '1d_consistent_explicit_out.csv' | ||
requirement = "The CentralDifference timeintegrator shall correctly calculate " | ||
"the response of a 1D mesh when the the consistent mass matrix " | ||
"option is used." | ||
[../] | ||
[] |
Oops, something went wrong.