diff --git a/modules/tensor_mechanics/test/tests/central_difference/consistent/1D/1d_consistent_explicit.i b/modules/tensor_mechanics/test/tests/central_difference/consistent/1D/1d_consistent_explicit.i new file mode 100644 index 000000000000..93d83aedaa82 --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/consistent/1D/1d_consistent_explicit.i @@ -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 +[] diff --git a/modules/tensor_mechanics/test/tests/central_difference/consistent/1D/1d_consistent_implicit.i b/modules/tensor_mechanics/test/tests/central_difference/consistent/1D/1d_consistent_implicit.i new file mode 100644 index 000000000000..a93b8eaba387 --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/consistent/1D/1d_consistent_implicit.i @@ -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 +[] diff --git a/modules/tensor_mechanics/test/tests/central_difference/consistent/1D/gold/1d_consistent_explicit_out.csv b/modules/tensor_mechanics/test/tests/central_difference/consistent/1D/gold/1d_consistent_explicit_out.csv new file mode 100644 index 000000000000..075b7ef29842 --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/consistent/1D/gold/1d_consistent_explicit_out.csv @@ -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 diff --git a/modules/tensor_mechanics/test/tests/central_difference/consistent/1D/gold/1d_consistent_implicit_out.csv b/modules/tensor_mechanics/test/tests/central_difference/consistent/1D/gold/1d_consistent_implicit_out.csv new file mode 100644 index 000000000000..9a81b1992596 --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/consistent/1D/gold/1d_consistent_implicit_out.csv @@ -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 diff --git a/modules/tensor_mechanics/test/tests/central_difference/consistent/1D/tests b/modules/tensor_mechanics/test/tests/central_difference/consistent/1D/tests new file mode 100644 index 000000000000..378fc56ab5d0 --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/consistent/1D/tests @@ -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." + [../] +[] diff --git a/modules/tensor_mechanics/test/tests/central_difference/consistent/2D/2d_consistent_explicit.i b/modules/tensor_mechanics/test/tests/central_difference/consistent/2D/2d_consistent_explicit.i new file mode 100644 index 000000000000..d52e3b0a5051 --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/consistent/2D/2d_consistent_explicit.i @@ -0,0 +1,149 @@ +# Test for the central difference time integrator for a 2D mesh + +[Mesh] + type = GeneratedMesh + dim = 2 + nx = 1 + ny = 2 + xmin = 0.0 + xmax = 1.0 + ymin = 0.0 + ymax = 2.0 +[] + +[Variables] + [./disp_x] + [../] + [./disp_y] + [../] +[] + +[AuxVariables] + [./vel_x] + [../] + [./accel_x] + [../] + [./vel_y] + [../] + [./accel_y] + [../] +[] + +[Kernels] + [./DynamicTensorMechanics] + displacements = 'disp_x disp_y' + [../] + [./inertia_x] + type = InertialForce + variable = disp_x + [../] + [./inertia_y] + type = InertialForce + variable = disp_y + [../] +[] + +[AuxKernels] + [./accel_x] + type = TestNewmarkTI + variable = accel_x + displacement = disp_x + first = false + [../] + [./vel_x] + type = TestNewmarkTI + variable = vel_x + displacement = disp_x + [../] + [./accel_y] + type = TestNewmarkTI + variable = accel_y + displacement = disp_y + first = false + [../] + [./vel_y] + type = TestNewmarkTI + variable = vel_y + displacement = disp_y + [../] +[] + +[BCs] + [./y_bot] + type = DirichletBC + variable = disp_y + boundary = bottom + value = 0.0 + [../] + [./x_bot] + type = FunctionDirichletBC + boundary = bottom + variable = disp_x + function = disp + [../] +[] + +[Functions] + [./disp] + 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' # displacement + [../] +[] + +[Materials] + [./elasticity_tensor_block] + type = ComputeIsotropicElasticityTensor + youngs_modulus = 1e6 + poissons_ratio = 0.25 + block = 0 + [../] + [./strain_block] + type = ComputeIncrementalSmallStrain + block = 0 + displacements = 'disp_x disp_y' + implicit = false + [../] + [./stress_block] + type = ComputeFiniteStrainElasticStress + block = 0 + [../] + [./density] + type = GenericConstantMaterial + block = 0 + prop_names = density + prop_values = 1e4 + [../] +[] + +[Executioner] + type = Transient + start_time = 0 + end_time = 0.1 + dt = 0.005 + timestep_tolerance = 1e-6 + [./TimeIntegrator] + type = CentralDifference + [../] +[] + +[Postprocessors] + [./_dt] + type = TimestepSize + [../] + [./accel_2x] + type = PointValue + point = '1.0 2.0 0.0' + variable = accel_x + [../] + [./accel_2y] + type = PointValue + point = '1.0 2.0 0.0' + variable = accel_y + [../] +[] + +[Outputs] + exodus = false + csv = true +[] diff --git a/modules/tensor_mechanics/test/tests/central_difference/consistent/2D/2d_consistent_implicit.i b/modules/tensor_mechanics/test/tests/central_difference/consistent/2D/2d_consistent_implicit.i new file mode 100644 index 000000000000..64829a3d1198 --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/consistent/2D/2d_consistent_implicit.i @@ -0,0 +1,163 @@ +# Test for the central difference time integrator for a 2D mesh + +[Mesh] + type = GeneratedMesh + dim = 2 + nx = 1 + ny = 2 + xmin = 0.0 + xmax = 1.0 + ymin = 0.0 + ymax = 2.0 +[] + +[Variables] + [./disp_x] + [../] + [./disp_y] + [../] +[] + +[AuxVariables] + [./vel_x] + [../] + [./accel_x] + [../] + [./vel_y] + [../] + [./accel_y] + [../] +[] + +[Kernels] + [./DynamicTensorMechanics] + displacements = 'disp_x disp_y' + [../] + [./inertia_x] + type = InertialForce + variable = disp_x + [../] + [./inertia_y] + type = InertialForce + variable = disp_y + [../] +[] + +[AuxKernels] + [./accel_x] + type = TestNewmarkTI + variable = accel_x + displacement = disp_x + first = false + [../] + [./vel_x] + type = TestNewmarkTI + variable = vel_x + displacement = disp_x + [../] + [./accel_y] + type = TestNewmarkTI + variable = accel_y + displacement = disp_y + first = false + [../] + [./vel_y] + type = TestNewmarkTI + variable = vel_y + displacement = disp_y + [../] +[] + +[BCs] + [./y_bot] + type = DirichletBC + variable = disp_y + boundary = bottom + value = 0.0 + [../] + [./x_bot] + type = PresetDisplacement + boundary = bottom + variable = disp_x + beta = 0.25 + velocity = vel_x + acceleration = accel_x + function = disp + [../] +[] + +[Functions] + [./disp] + 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' # displacement + [../] +[] + +[Materials] + [./elasticity_tensor_block] + type = ComputeIsotropicElasticityTensor + youngs_modulus = 1e6 + poissons_ratio = 0.25 + block = 0 + [../] + [./strain_block] + type = ComputeIncrementalSmallStrain + block = 0 + displacements = 'disp_x disp_y' + [../] + [./stress_block] + type = ComputeFiniteStrainElasticStress + block = 0 + [../] + [./density] + type = GenericConstantMaterial + block = 0 + prop_names = density + prop_values = 1e4 + [../] +[] + +[Preconditioning] + [./andy] + type = SMP + full = true + [../] +[] + +[Executioner] + type = Transient + solve_type = NEWTON + nl_abs_tol = 1e-11 + nl_rel_tol = 1e-11 + start_time = -0.01 + end_time = 0.1 + dt = 0.005 + timestep_tolerance = 1e-6 + [./TimeIntegrator] + type = NewmarkBeta + beta = 0.25 + gamma = 0.5 + [../] +[] + +[Postprocessors] + [./_dt] + type = TimestepSize + [../] + [./accel_2x] + type = PointValue + point = '1.0 2.0 0.0' + variable = accel_x + [../] + [./accel_2y] + type = PointValue + point = '1.0 2.0 0.0' + variable = accel_y + [../] +[] + +[Outputs] + exodus = false + csv = true +[] diff --git a/modules/tensor_mechanics/test/tests/central_difference/consistent/2D/gold/2d_consistent_explicit_out.csv b/modules/tensor_mechanics/test/tests/central_difference/consistent/2D/gold/2d_consistent_explicit_out.csv new file mode 100644 index 000000000000..4b9d41af64d1 --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/consistent/2D/gold/2d_consistent_explicit_out.csv @@ -0,0 +1,22 @@ +time,_dt,accel_2x,accel_2y +0,0,0,0 +0.005,0.005,0,0 +0.01,0.005,28.571428571429,0 +0.015,0.005,-0.58775510204082,-1.3224489795918 +0.02,0.005,-1.167701457726,-2.5836874635569 +0.025,0.005,-1.7322315488546,-3.7247396251562 +0.03,0.005,-2.2741338081049,-4.691018347463 +0.035,0.005,-2.7867745552354,-5.4343209276064 +0.04,0.005,-3.2642613064064,-5.9145944681343 +0.045,0.005,-3.7015822577737,-6.101407316978 +0.05,0.005,-4.0947175640845,-5.9750735576814 +0.055,0.005,-4.440719001651,-5.5273901080225 +0.06,0.005,-4.7377556885272,-4.7619600021618 +0.065,0.005,-4.9851246947323,-3.6940904003149 +0.07,0.005,-5.1832265710011,-2.350269247516 +0.075,0.005,-5.3335070137393,-0.76723973145808 +0.08,0.005,-5.4383670248315,1.0092937836603 +0.085,0.005,-5.5010449777521,2.9262813715512 +0.09,0.005,-5.5254749293669,4.9252061420658 +0.095,0.005,-5.5161262877245,6.9441577997971 +0.1,0.005,-5.4778305335754,8.9200261525204 diff --git a/modules/tensor_mechanics/test/tests/central_difference/consistent/2D/gold/2d_consistent_implicit_out.csv b/modules/tensor_mechanics/test/tests/central_difference/consistent/2D/gold/2d_consistent_implicit_out.csv new file mode 100644 index 000000000000..9e82096a1bfb --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/consistent/2D/gold/2d_consistent_implicit_out.csv @@ -0,0 +1,24 @@ +time,_dt,accel_2x,accel_2y +-0.01,0,0,0 +-0.005,0.005,0,0 +0,0.005,28.42497472357,-0.32682119349486 +0.005,0.005,-0.58388805688809,-1.2922577493493 +0.01,0.005,-1.1601158835933,-2.5249512192521 +0.015,0.005,-1.7212181104238,-3.6406719631165 +0.02,0.005,-2.2601128563651,-4.58624612387 +0.025,0.005,-2.7702781054432,-5.3146618034604 +0.03,0.005,-3.2459102298372,-5.786776165178 +0.035,0.005,-3.6820596670774,-5.9727412901196 +0.04,0.005,-4.074739536698,-5.8530978966056 +0.045,0.005,-4.4210039018129,-5.4194979421819 +0.05,0.005,-4.7189934109761,-4.6750304336091 +0.055,0.005,-4.9679471593843,-3.634138992468 +0.06,0.005,-5.1681807474133,-2.3221343513408 +0.065,0.005,-5.3210316489497,-0.77431946212731 +0.07,0.005,-5.428774092509,0.96524123742894 +0.075,0.005,-5.4945066669397,2.8452641285874 +0.08,0.005,-5.5220167557217,4.8090448901599 +0.085,0.005,-5.5156266489176,6.7964486222408 +0.09,0.005,-5.4800267543289,8.7460202794016 +0.095,0.005,-5.4201017102661,10.597139837674 +0.1,0.005,-5.3407553791662,12.292145097897 diff --git a/modules/tensor_mechanics/test/tests/central_difference/consistent/2D/tests b/modules/tensor_mechanics/test/tests/central_difference/consistent/2D/tests new file mode 100644 index 000000000000..9d83893bb201 --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/consistent/2D/tests @@ -0,0 +1,23 @@ +[Tests] + design = 'CentralDifference.md' + issues = '#13964 #9726' + + # 2D implicit analysis with Newmark Beta time integration + [./implicit] + type = 'CSVDiff' + input = '2d_consistent_implicit.i' + csvdiff = '2d_consistent_implicit_out.csv' + requirement = "The NewmarkBeta timeintegrator shall correctly calculate " + "the response of a 2D mesh. " + [../] + + # 2D explicit analysis with Central Difference time integration + [./explicit] + type = 'CSVDiff' + input = '2d_consistent_explicit.i' + csvdiff = '2d_consistent_explicit_out.csv' + requirement = "The CentralDifference timeintegrator shall correctly calculate " + "the response of a 2D mesh when the the consistent mass matrix " + "option is used." + [../] +[] diff --git a/modules/tensor_mechanics/test/tests/central_difference/consistent/3D/3d_consistent_explicit.i b/modules/tensor_mechanics/test/tests/central_difference/consistent/3D/3d_consistent_explicit.i new file mode 100644 index 000000000000..d754f7a7b099 --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/consistent/3D/3d_consistent_explicit.i @@ -0,0 +1,193 @@ +# One element test to test the central difference time integrator in 3D. + +[Mesh] + type = GeneratedMesh + dim = 3 + nx = 1 + ny = 1 + nz = 2 + xmin = 0.0 + xmax = 1 + ymin = 0.0 + ymax = 1 + zmin = 0.0 + zmax = 2 +[] + +[Variables] + [./disp_x] + [../] + [./disp_y] + [../] + [./disp_z] + [../] +[] + +[AuxVariables] + [./vel_x] + [../] + [./accel_x] + [../] + [./vel_y] + [../] + [./accel_y] + [../] + [./vel_z] + [../] + [./accel_z] + [../] +[] + +[AuxKernels] + [./accel_x] + type = TestNewmarkTI + variable = accel_x + displacement = disp_x + first = false + [../] + [./vel_x] + type = TestNewmarkTI + variable = vel_x + displacement = disp_x + [../] + [./accel_y] + type = TestNewmarkTI + variable = accel_y + displacement = disp_y + first = false + [../] + [./vel_y] + type = TestNewmarkTI + variable = vel_y + displacement = disp_x + [../] + [./accel_z] + type = TestNewmarkTI + variable = accel_z + displacement = disp_z + first = false + [../] + [./vel_z] + type = TestNewmarkTI + variable = vel_z + displacement = disp_z + [../] +[] + +[Kernels] + [./DynamicTensorMechanics] + displacements = 'disp_x disp_y disp_z' + [../] + [./inertia_x] + type = InertialForce + variable = disp_x + [../] + [./inertia_y] + type = InertialForce + variable = disp_y + [../] + [./inertia_z] + type = InertialForce + variable = disp_z + [../] +[] + +[BCs] + [./x_bot] + type = FunctionDirichletBC + variable = disp_x + boundary = 'back' + function = dispx + [../] + [./y_bot] + type = FunctionDirichletBC + variable = disp_y + boundary = 'back' + function = dispy + [../] + [./z_bot] + type = FunctionDirichletBC + variable = disp_z + boundary = 'back' + function = dispz + [../] + [./Periodic] + [./x_dir] + variable = 'disp_x disp_y disp_z' + primary = 'left' + secondary = 'right' + translation = '1.0 0.0 0.0' + [../] + [./y_dir] + variable = 'disp_x disp_y disp_z' + primary = 'bottom' + secondary = 'top' + translation = '0.0 1.0 0.0' + [../] + [../] +[] + +[Functions] + [./dispx] + 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' # displacement + [../] + [./dispy] + type = ParsedFunction + value = 0.1*t*t*sin(10*t) + [../] + [./dispz] + type = ParsedFunction + value = 0.1*t*t*sin(20*t) + [../] +[] + +[Materials] + [./elasticity_tensor_block] + type = ComputeIsotropicElasticityTensor + youngs_modulus = 1e6 + poissons_ratio = 0.25 + block = 0 + [../] + [./strain_block] + type = ComputeIncrementalSmallStrain + block = 0 + displacements = 'disp_x disp_y disp_z' + implicit = false + [../] + [./stress_block] + type = ComputeFiniteStrainElasticStress + block = 0 + [../] + [./density] + type = GenericConstantMaterial + block = 0 + prop_names = density + prop_values = 1e4 + [../] +[] + +[Executioner] + type = Transient + start_time = -0.01 + end_time = 0.1 + dt = 0.005 + timestep_tolerance = 1e-6 + [./TimeIntegrator] + type = CentralDifference + [../] +[] + +[Postprocessors] + [./accel_6x] + type = NodalVariableValue + nodeid = 6 + variable = accel_x + [../] +[] + +[Outputs] + exodus = false + csv = true +[] diff --git a/modules/tensor_mechanics/test/tests/central_difference/consistent/3D/3d_consistent_implicit.i b/modules/tensor_mechanics/test/tests/central_difference/consistent/3D/3d_consistent_implicit.i new file mode 100644 index 000000000000..3cefc1d08ca6 --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/consistent/3D/3d_consistent_implicit.i @@ -0,0 +1,213 @@ +# One element test for the Newmark-Beta time integrator. + +[Mesh] + type = GeneratedMesh # Can generate simple lines, rectangles and rectangular prisms + dim = 3 # Dimension of the mesh + nx = 1 # Number of elements in the x direction + ny = 1 # Number of elements in the y direction + nz = 2 # Number of elements in the z direction + xmin = 0.0 + xmax = 1 + ymin = 0.0 + ymax = 1 + zmin = 0.0 + zmax = 2 +[] + +[Variables] + [./disp_x] + [../] + [./disp_y] + [../] + [./disp_z] + [../] +[] + +[AuxVariables] + [./vel_x] + [../] + [./accel_x] + [../] + [./vel_y] + [../] + [./accel_y] + [../] + [./vel_z] + [../] + [./accel_z] + [../] +[] + +[Kernels] + [./DynamicTensorMechanics] + displacements = 'disp_x disp_y disp_z' + [../] + [./inertia_x] + type = InertialForce + variable = disp_x + [../] + [./inertia_y] + type = InertialForce + variable = disp_y + [../] + [./inertia_z] + type = InertialForce + variable = disp_z + [../] +[] + +[AuxKernels] + [./accel_x] + type = TestNewmarkTI + variable = accel_x + displacement = disp_x + first = false + [../] + [./vel_x] + type = TestNewmarkTI + variable = vel_x + displacement = disp_x + [../] + [./accel_y] + type = TestNewmarkTI + variable = accel_y + displacement = disp_y + first = false + [../] + [./vel_y] + type = TestNewmarkTI + variable = vel_y + displacement = disp_y + [../] + [./accel_z] + type = TestNewmarkTI + variable = accel_z + displacement = disp_z + first = false + [../] + [./vel_z] + type = TestNewmarkTI + variable = vel_z + displacement = disp_z + [../] +[] + +[BCs] + [./x_bot] + type = PresetDisplacement + boundary = 'back' + variable = disp_x + beta = 0.25 + velocity = vel_x + acceleration = accel_x + function = dispx + [../] + [./y_bot] + type = PresetDisplacement + boundary = 'back' + variable = disp_y + beta = 0.25 + velocity = vel_y + acceleration = accel_y + function = dispy + [../] + [./z_bot] + type = PresetDisplacement + boundary = 'back' + variable = disp_z + beta = 0.25 + velocity = vel_z + acceleration = accel_z + function = dispz + [../] + [./Periodic] + [./x_dir] + variable = 'disp_x disp_y disp_z' + primary = 'left' + secondary = 'right' + translation = '1.0 0.0 0.0' + [../] + [./y_dir] + variable = 'disp_x disp_y disp_z' + primary = 'bottom' + secondary = 'top' + translation = '0.0 1.0 0.0' + [../] + [../] +[] + +[Functions] + [./dispx] + 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' # displacement + [../] + [./dispy] + type = ParsedFunction + value = 0.1*t*t*sin(10*t) + [../] + [./dispz] + type = ParsedFunction + value = 0.1*t*t*sin(20*t) + [../] +[] + +[Materials] + [./elasticity_tensor_block] + type = ComputeIsotropicElasticityTensor + youngs_modulus = 1e6 + poissons_ratio = 0.25 + block = 0 + [../] + [./strain_block] + type = ComputeIncrementalSmallStrain + block = 0 + displacements = 'disp_x disp_y disp_z' + [../] + [./stress_block] + type = ComputeFiniteStrainElasticStress + block = 0 + [../] + [./density] + type = GenericConstantMaterial + block = 0 + prop_names = density + prop_values = 1e4 + [../] +[] + +[Preconditioning] + [./andy] + type = SMP + full = true + [../] +[] + +[Executioner] + type = Transient + solve_type = NEWTON + nl_abs_tol = 1e-08 + nl_rel_tol = 1e-08 + timestep_tolerance = 1e-6 + start_time = -0.01 + end_time = 0.1 + dt = 0.005 + [./TimeIntegrator] + type = NewmarkBeta + beta = 0.25 + gamma = 0.5 + [../] +[] + +[Postprocessors] + [./accel_6x] + type = NodalVariableValue + nodeid = 6 + variable = accel_x + [../] +[] + +[Outputs] + exodus = false + csv = true +[] diff --git a/modules/tensor_mechanics/test/tests/central_difference/consistent/3D/gold/3d_consistent_explicit_out.csv b/modules/tensor_mechanics/test/tests/central_difference/consistent/3D/gold/3d_consistent_explicit_out.csv new file mode 100644 index 000000000000..7936732db1ea --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/consistent/3D/gold/3d_consistent_explicit_out.csv @@ -0,0 +1,24 @@ +time,accel_6x +-0.01,0 +-0.005,0 +0,0 +0.005,-2.9738116731031e-22 +0.01,-57.142857142857 +0.015,0.66122448979597 +0.02,1.3181037900874 +0.025,1.9663265552686 +0.03,2.6016488597863 +0.035,3.219927240928 +0.04,3.8171509468443 +0.045,4.3894731347053 +0.05,4.9332407722018 +0.055,5.4450230058806 +0.06,5.9216377719401 +0.065,6.3601764390397 +0.07,6.7580262882645 +0.075,7.1128906525163 +0.08,7.4228065561483 +0.085,7.6861597154515 +0.09,7.9016967815211 +0.095,8.0685347288584 +0.1,8.1861673156846 diff --git a/modules/tensor_mechanics/test/tests/central_difference/consistent/3D/gold/3d_consistent_implicit_out.csv b/modules/tensor_mechanics/test/tests/central_difference/consistent/3D/gold/3d_consistent_implicit_out.csv new file mode 100644 index 000000000000..67731e77bf27 --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/consistent/3D/gold/3d_consistent_implicit_out.csv @@ -0,0 +1,24 @@ +time,accel_6x +-0.01,0 +-0.005,-1.8169304820316e-21 +0,-56.977822066985 +0.005,0.65905822408202 +0.01,1.3137965415099 +0.015,1.9599286231044 +0.02,2.5932350295273 +0.025,3.2095959955271 +0.03,3.805023427227 +0.035,4.3756918598327 +0.04,4.9179681313847 +0.045,5.4284395382598 +0.05,5.9039402502619 +0.055,6.3415757766886 +0.06,6.7387452904781 +0.065,7.0931616340527 +0.07,7.402868849335 +0.075,7.6662570933641 +0.08,7.8820748222938 +0.085,8.0494381474017 +0.09,8.167837289919 +0.095,8.2371400835037 +0.1,8.2575924975586 diff --git a/modules/tensor_mechanics/test/tests/central_difference/consistent/3D/tests b/modules/tensor_mechanics/test/tests/central_difference/consistent/3D/tests new file mode 100644 index 000000000000..399e3c11fedc --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/consistent/3D/tests @@ -0,0 +1,23 @@ +[Tests] + design = 'CentralDifference.md' + issues = '#13964 #9726' + + # 3D implicit analysis with Newmark Beta time integration + [./implicit] + type = 'CSVDiff' + input = '3d_consistent_implicit.i' + csvdiff = '3d_consistent_implicit_out.csv' + requirement = "The NewmarkBeta timeintegrator shall correctly calculate " + "the response of a 3D mesh. " + [../] + + # 3D explicit analysis of the above problem with Central Difference time integration + [./explicit] + type = 'CSVDiff' + input = '3d_consistent_explicit.i' + csvdiff = '3d_consistent_explicit_out.csv' + requirement = "The CentralDifference timeintegrator shall correctly calculate " + "the response of a 3D mesh when the the consistent mass matrix " + "option is used." + [../] +[] diff --git a/modules/tensor_mechanics/test/tests/central_difference/lumped/1D/1d_lumped_explicit.i b/modules/tensor_mechanics/test/tests/central_difference/lumped/1D/1d_lumped_explicit.i new file mode 100644 index 000000000000..037795c6d036 --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/lumped/1D/1d_lumped_explicit.i @@ -0,0 +1,124 @@ +# Test for central difference integration for a 1D element + +[Mesh] + [./generated_mesh] + type = GeneratedMeshGenerator + xmin = 0 + xmax = 10 + nx = 5 + dim = 1 + [../] +[] + +[Variables] + [./disp_x] + [../] +[] + +[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.01 + end_time = 0.1 + timestep_tolerance = 2e-10 + dt = 0.005 + [./TimeIntegrator] + type = CentralDifference + solve_type = lumped + [../] +[] + +[Postprocessors] + [./accel_x] + type = PointValue + point = '10.0 0.0 0.0' + variable = accel_x + [../] +[] + +[Outputs] + exodus = false + csv = true +[] diff --git a/modules/tensor_mechanics/test/tests/central_difference/lumped/1D/1d_nodalmass_explicit.i b/modules/tensor_mechanics/test/tests/central_difference/lumped/1D/1d_nodalmass_explicit.i new file mode 100644 index 000000000000..1d9e789146ad --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/lumped/1D/1d_nodalmass_explicit.i @@ -0,0 +1,126 @@ +# Test for central difference integration for 1D elements + +[Mesh] + [./generated_mesh] + type = GeneratedMeshGenerator + xmin = 0 + xmax = 10 + nx = 5 + dim = 1 + [../] + [./all_nodes] + type = BoundingBoxNodeSetGenerator + new_boundary = 'all' + input = 'generated_mesh' + top_right = '10 0 0' + bottom_left = '0 0 0' + [../] +[] + +[Variables] + [./disp_x] + [../] +[] + +[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' + [../] +[] + +[NodalKernels] + [./force_x] + type = UserForcingFunctionNodalKernel + variable = disp_x + boundary = right + function = force_x + [../] + [./nodal_masses] + type = NodalTranslationalInertia + nodal_mass_file = 'nodal_mass_file.csv' + variable = 'disp_x' + boundary = 'all' + [../] +[] + +[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 + [../] +[] + +[Executioner] + type = Transient + start_time = -0.01 + end_time = 0.1 + dt = 0.005 + timestep_tolerance = 2e-10 + [./TimeIntegrator] + type = CentralDifference + [../] +[] + +[Postprocessors] + [./accel_x] + type = PointValue + point = '10.0 0.0 0.0' + variable = accel_x + [../] +[] + +[Outputs] + exodus = false + csv = true +[] diff --git a/modules/tensor_mechanics/test/tests/central_difference/lumped/1D/1d_nodalmass_implicit.i b/modules/tensor_mechanics/test/tests/central_difference/lumped/1D/1d_nodalmass_implicit.i new file mode 100644 index 000000000000..e2131689d67f --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/lumped/1D/1d_nodalmass_implicit.i @@ -0,0 +1,127 @@ +# Test for central difference integration for 1D elements + +[Mesh] + [./generated_mesh] + type = GeneratedMeshGenerator + xmin = 0 + xmax = 10 + nx = 5 + dim = 1 + [../] + [./all_nodes] + type = BoundingBoxNodeSetGenerator + new_boundary = 'all' + input = 'generated_mesh' + top_right = '10 0 0' + bottom_left = '0 0 0' + [../] +[] + +[Variables] + [./disp_x] + [../] +[] + +[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' + [../] +[] + +[NodalKernels] + [./force_x] + type = UserForcingFunctionNodalKernel + variable = disp_x + boundary = right + function = force_x + [../] + [./nodal_masses] + type = NodalTranslationalInertia + nodal_mass_file = 'nodal_mass_file.csv' + variable = 'disp_x' + boundary = 'all' + [../] +[] + +[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 + [../] +[] + +[Executioner] + type = Transient + start_time = -0.01 + end_time = 0.1 + dt = 0.005 + timestep_tolerance = 2e-10 + [./TimeIntegrator] + type = NewmarkBeta + beta = 0.25 + gamma = 0.5 + [../] +[] + +[Postprocessors] + [./accel_x] + type = PointValue + point = '10.0 0.0 0.0' + variable = accel_x + [../] +[] + +[Outputs] + exodus = false + csv = true +[] diff --git a/modules/tensor_mechanics/test/tests/central_difference/lumped/1D/gold/1d_lumped_explicit_out.csv b/modules/tensor_mechanics/test/tests/central_difference/lumped/1D/gold/1d_lumped_explicit_out.csv new file mode 100644 index 000000000000..bc010136451a --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/lumped/1D/gold/1d_lumped_explicit_out.csv @@ -0,0 +1,24 @@ +time,accel_x +-0.01,0 +-0.005,0 +0,0 +0.005,0 +0.01,0 +0.015,0.002 +0.02,0.003988 +0.025,0.005952108 +0.03,0.00788064692 +0.035,0.00976225937134 +0.04,0.011586009233278 +0.045,0.013341479022232 +0.05,0.015018862085266 +0.055,0.016609048703661 +0.06,0.018103705256258 +0.065,0.019495345664936 +0.07,0.020777394425371 +0.075,0.021944240614171 +0.08,0.022991282357746 +0.085,0.02391496134772 +0.09,0.024712787091384 +0.095,0.025383350692362 +0.1,0.025926328065343 diff --git a/modules/tensor_mechanics/test/tests/central_difference/lumped/1D/gold/1d_nodalmass_explicit_out.csv b/modules/tensor_mechanics/test/tests/central_difference/lumped/1D/gold/1d_nodalmass_explicit_out.csv new file mode 100644 index 000000000000..bc010136451a --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/lumped/1D/gold/1d_nodalmass_explicit_out.csv @@ -0,0 +1,24 @@ +time,accel_x +-0.01,0 +-0.005,0 +0,0 +0.005,0 +0.01,0 +0.015,0.002 +0.02,0.003988 +0.025,0.005952108 +0.03,0.00788064692 +0.035,0.00976225937134 +0.04,0.011586009233278 +0.045,0.013341479022232 +0.05,0.015018862085266 +0.055,0.016609048703661 +0.06,0.018103705256258 +0.065,0.019495345664936 +0.07,0.020777394425371 +0.075,0.021944240614171 +0.08,0.022991282357746 +0.085,0.02391496134772 +0.09,0.024712787091384 +0.095,0.025383350692362 +0.1,0.025926328065343 diff --git a/modules/tensor_mechanics/test/tests/central_difference/lumped/1D/gold/1d_nodalmass_implicit_out.csv b/modules/tensor_mechanics/test/tests/central_difference/lumped/1D/gold/1d_nodalmass_implicit_out.csv new file mode 100644 index 000000000000..69a1da55d04e --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/lumped/1D/gold/1d_nodalmass_implicit_out.csv @@ -0,0 +1,24 @@ +time,accel_x +-0.01,0 +-0.005,0 +0,0 +0.005,0.0019970067331692 +0.01,0.0039820672645447 +0.015,0.0059433425865664 +0.02,0.0078692070114051 +0.025,0.0097483521701749 +0.03,0.011569887850571 +0.035,0.013323438670723 +0.04,0.014999235630611 +0.045,0.016588201635952 +0.05,0.018082030152441 +0.055,0.019473256220017 +0.06,0.020755319136349 +0.065,0.021922616206094 +0.07,0.022970547044462 +0.075,0.023895548023604 +0.08,0.024695116549439 +0.085,0.025367824967958 +0.09,0.025913323999022 +0.095,0.02633233571078 +0.1,0.02662663615269 diff --git a/modules/tensor_mechanics/test/tests/central_difference/lumped/1D/nodal_mass_file.csv b/modules/tensor_mechanics/test/tests/central_difference/lumped/1D/nodal_mass_file.csv new file mode 100644 index 000000000000..bd87bb6dedcf --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/lumped/1D/nodal_mass_file.csv @@ -0,0 +1,6 @@ +0.0, 0.0, 0.0, 2500 +2.0, 0.0, 0.0, 5000 +4.0, 0.0, 0.0, 5000 +6.0, 0.0, 0.0, 5000 +8.0, 0.0, 0.0, 5000 +10.0, 0.0, 0.0, 2500 diff --git a/modules/tensor_mechanics/test/tests/central_difference/lumped/1D/tests b/modules/tensor_mechanics/test/tests/central_difference/lumped/1D/tests new file mode 100644 index 000000000000..936f0a05f6f9 --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/lumped/1D/tests @@ -0,0 +1,37 @@ +[Tests] + design = 'CentralDifference.md' + issues = '#13964 #9726' + + # 1D explicit analysis with nodal masses equivalent to the lumped mass solve + [./explicit_nodalmass] + type = 'CSVDiff' + input = '1d_nodalmass_explicit.i' + csvdiff = '1d_nodalmass_explicit_out.csv' + requirement = "The CentralDifference timeintegrator shall correctly calculate " + "the response of a 1D mesh with nodal masses equal to those of " + "a corresponding lumped mass system." + [../] + + # 1D implicit analysis with nodal masses equivalent to the lumped mass solve + [./implicit_nodalmass] + type = 'CSVDiff' + input = '1d_nodalmass_implicit.i' + csvdiff = '1d_nodalmass_implicit_out.csv' + requirement = "The NewmarkBeta timeintegrator shall correctly calculate " + "the response of a 1D mesh with nodal masses equal to those of " + "a corresponding lumped mass system." + [../] + + # 1D explicit analysis with lumped mass solve + [./explicit_lumped] + type = 'CSVDiff' + input = '1d_lumped_explicit.i' + cli_args = Outputs/file_base=1d_nodalmass_explicit_out + csvdiff = '1d_nodalmass_explicit_out.csv' + prereq = explicit_nodalmass + requirement = "The CentralDifference timeintegrator used with the lumped mass " + "option shall correctly calculate the response of a 1D mesh " + "and produce results that are identical to those calculated using " + "equivalent nodal masses." + [../] +[] diff --git a/modules/tensor_mechanics/test/tests/central_difference/lumped/2D/2d_lumped_explicit.i b/modules/tensor_mechanics/test/tests/central_difference/lumped/2D/2d_lumped_explicit.i new file mode 100644 index 000000000000..2bdde2b0c788 --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/lumped/2D/2d_lumped_explicit.i @@ -0,0 +1,144 @@ +# Tests for the central difference time integrator for 2D elements + +[Mesh] + [./generated_mesh] + type = GeneratedMeshGenerator + dim = 2 + xmin = 0 + xmax = 1 + ymin = 0 + ymax = 2 + nx = 1 + ny = 2 + [../] +[] + +[Variables] + [./disp_x] + [../] + [./disp_y] + [../] +[] + +[AuxVariables] + [./accel_x] + [../] + [./vel_x] + [../] + [./accel_y] + [../] + [./vel_y] + [../] +[] + +[AuxKernels] + [./accel_x] + type = TestNewmarkTI + variable = accel_x + displacement = disp_x + first = false + [../] + [./vel_x] + type = TestNewmarkTI + variable = vel_x + displacement = disp_x + [../] + [./accel_y] + type = TestNewmarkTI + variable = accel_y + displacement = disp_y + first = false + [../] + [./vel_y] + type = TestNewmarkTI + variable = vel_y + displacement = disp_y + [../] +[] + +[Kernels] + [./DynamicTensorMechanics] + displacements = 'disp_x disp_y' + [../] + [./inertia_x] + type = InertialForce + variable = disp_x + [../] + [./inertia_y] + type = InertialForce + variable = disp_y + [../] +[] + +[BCs] + [./y_bot] + type = DirichletBC + variable = disp_y + boundary = bottom + value = 0.0 + [../] + [./x_bot] + type = FunctionDirichletBC + boundary = bottom + variable = disp_x + function = disp + [../] +[] + +[Functions] + [./disp] + 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' # displacement + [../] +[] + +[Materials] + [./elasticity_tensor_block] + type = ComputeIsotropicElasticityTensor + youngs_modulus = 1e6 + poissons_ratio = 0.25 + block = 0 + [../] + [./strain_block] + type = ComputeIncrementalSmallStrain + block = 0 + displacements = 'disp_x disp_y' + implicit = false + [../] + [./stress_block] + type = ComputeFiniteStrainElasticStress + block = 0 + [../] + [./density] + type = GenericConstantMaterial + block = 0 + prop_names = density + prop_values = 1e4 + [../] +[] + +[Executioner] + type = Transient + start_time = 0 + end_time = 0.1 + dt = 0.005 + timestep_tolerance = 1e-6 + [./TimeIntegrator] + type = CentralDifference + solve_type = lumped + [../] +[] + +[Postprocessors] + [./accel_2x] + type = PointValue + point = '1.0 2.0 0.0' + variable = accel_x + [../] +[] + +[Outputs] + exodus = false + csv = true +[] diff --git a/modules/tensor_mechanics/test/tests/central_difference/lumped/2D/2d_nodalmass_explicit.i b/modules/tensor_mechanics/test/tests/central_difference/lumped/2D/2d_nodalmass_explicit.i new file mode 100644 index 000000000000..d09d3849fe65 --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/lumped/2D/2d_nodalmass_explicit.i @@ -0,0 +1,151 @@ +# One element test to test the central difference time integrator. + +[Mesh] + [./generated_mesh] + type = GeneratedMeshGenerator + dim = 2 + xmin = 0 + xmax = 1 + ymin = 0 + ymax = 2 + nx = 1 + ny = 2 + [../] + [./all_nodes] + type = BoundingBoxNodeSetGenerator + new_boundary = 'all' + input = 'generated_mesh' + top_right = '1 2 0' + bottom_left = '0 0 0' + [../] +[] + +[Variables] + [./disp_x] + [../] + [./disp_y] + [../] +[] + +[AuxVariables] + [./accel_x] + [../] + [./vel_x] + [../] + [./accel_y] + [../] + [./vel_y] + [../] +[] + +[AuxKernels] + [./accel_x] + type = TestNewmarkTI + variable = accel_x + displacement = disp_x + first = false + [../] + [./vel_x] + type = TestNewmarkTI + variable = vel_x + displacement = disp_x + [../] + [./accel_y] + type = TestNewmarkTI + variable = accel_y + displacement = disp_y + first = false + [../] + [./vel_y] + type = TestNewmarkTI + variable = vel_y + displacement = disp_y + [../] +[] + +[Kernels] + [./DynamicTensorMechanics] + displacements = 'disp_x disp_y' + [../] +[] + +[BCs] + [./y_bot] + type = DirichletBC + variable = disp_y + boundary = bottom + value = 0.0 + [../] + [./x_bot] + type = FunctionDirichletBC + boundary = bottom + variable = disp_x + function = disp + [../] +[] + +[Functions] + [./disp] + 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' # displacement + [../] +[] + +[NodalKernels] + [./nodal_mass_x] + type = NodalTranslationalInertia + variable = 'disp_x' + nodal_mass_file = 'nodal_mass_file.csv' + boundary = 'all' + [../] + [./nodal_mass_y] + type = NodalTranslationalInertia + variable = 'disp_y' + nodal_mass_file = 'nodal_mass_file.csv' + boundary = 'all' + [../] +[] + +[Materials] + [./elasticity_tensor_block] + type = ComputeIsotropicElasticityTensor + youngs_modulus = 1e6 + poissons_ratio = 0.25 + block = 0 + [../] + [./strain_block] + type = ComputeIncrementalSmallStrain + block = 0 + displacements = 'disp_x disp_y' + implicit = false + [../] + [./stress_block] + type = ComputeFiniteStrainElasticStress + block = 0 + [../] +[] + +[Executioner] + type = Transient + start_time = 0 + end_time = 0.1 + dt = 0.005 + timestep_tolerance = 1e-6 + [./TimeIntegrator] + type = CentralDifference + [../] +[] + +[Postprocessors] + [./accel_2x] + type = PointValue + point = '1.0 2.0 0.0' + variable = accel_x + [../] +[] + +[Outputs] + exodus = false + csv = true +[] diff --git a/modules/tensor_mechanics/test/tests/central_difference/lumped/2D/2d_nodalmass_implicit.i b/modules/tensor_mechanics/test/tests/central_difference/lumped/2D/2d_nodalmass_implicit.i new file mode 100644 index 000000000000..0d27fbac6baf --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/lumped/2D/2d_nodalmass_implicit.i @@ -0,0 +1,165 @@ +# One element test to test the central difference time integrator. + +[Mesh] + [./generated_mesh] + type = GeneratedMeshGenerator + dim = 2 + xmin = 0 + xmax = 1 + ymin = 0 + ymax = 2 + nx = 1 + ny = 2 + [../] + [./all_nodes] + type = BoundingBoxNodeSetGenerator + new_boundary = 'all' + input = 'generated_mesh' + top_right = '1 2 0' + bottom_left = '0 0 0' + [../] +[] + +[Variables] + [./disp_x] + [../] + [./disp_y] + [../] +[] + +[AuxVariables] + [./accel_x] + [../] + [./vel_x] + [../] + [./accel_y] + [../] + [./vel_y] + [../] +[] + +[AuxKernels] + [./accel_x] + type = TestNewmarkTI + variable = accel_x + displacement = disp_x + first = false + [../] + [./vel_x] + type = TestNewmarkTI + variable = vel_x + displacement = disp_x + [../] + [./accel_y] + type = TestNewmarkTI + variable = accel_y + displacement = disp_y + first = false + [../] + [./vel_y] + type = TestNewmarkTI + variable = vel_y + displacement = disp_y + [../] +[] + +[Kernels] + [./DynamicTensorMechanics] + displacements = 'disp_x disp_y' + [../] +[] + +[BCs] + [./y_bot] + type = DirichletBC + variable = disp_y + boundary = bottom + value = 0.0 + [../] + [./x_bot] + type = PresetDisplacement + boundary = bottom + variable = disp_x + beta = 0.25 + velocity = vel_x + acceleration = accel_x + function = disp + [../] +[] + +[Functions] + [./disp] + 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' # displacement + [../] +[] + +[NodalKernels] + [./nodal_mass_x] + type = NodalTranslationalInertia + variable = 'disp_x' + nodal_mass_file = 'nodal_mass_file.csv' + boundary = 'all' + [../] + [./nodal_mass_y] + type = NodalTranslationalInertia + variable = 'disp_y' + nodal_mass_file = 'nodal_mass_file.csv' + boundary = 'all' + [../] +[] + +[Materials] + [./elasticity_tensor_block] + type = ComputeIsotropicElasticityTensor + youngs_modulus = 1e6 + poissons_ratio = 0.25 + block = 0 + [../] + [./strain_block] + type = ComputeIncrementalSmallStrain + block = 0 + displacements = 'disp_x disp_y' + [../] + [./stress_block] + type = ComputeFiniteStrainElasticStress + block = 0 + [../] +[] + +[Preconditioning] + [./andy] + type = SMP + full = true + [../] +[] + +[Executioner] + type = Transient + solve_type = NEWTON + nl_abs_tol = 1e-11 + nl_rel_tol = 1e-11 + start_time = -0.01 + end_time = 0.1 + dt = 0.005 + timestep_tolerance = 1e-6 + [./TimeIntegrator] + type = NewmarkBeta + beta = 0.25 + gamma = 0.5 + [../] +[] + +[Postprocessors] + [./accel_2x] + type = PointValue + point = '1.0 2.0 0.0' + variable = accel_x + [../] +[] + +[Outputs] + exodus = false + csv = true +[] diff --git a/modules/tensor_mechanics/test/tests/central_difference/lumped/2D/gold/2d_lumped_explicit_out.csv b/modules/tensor_mechanics/test/tests/central_difference/lumped/2D/gold/2d_lumped_explicit_out.csv new file mode 100644 index 000000000000..b4c09e38d41c --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/lumped/2D/gold/2d_lumped_explicit_out.csv @@ -0,0 +1,22 @@ +time,accel_2x +0,0 +0.005,0 +0.01,0 +0.015,0 +0.02,0 +0.025,8.8817841970013e-20 +0.03,1.4222222226579e-09 +0.035,1.1358814814599e-08 +0.04,5.1010547991837e-08 +0.045,1.6962583370059e-07 +0.05,4.6517531559118e-07 +0.055,1.1129059833934e-06 +0.06,2.4028111240341e-06 +0.065,4.786929446982e-06 +0.07,8.9372495766838e-06 +0.075,1.5814846093508e-05 +0.08,2.6750711854538e-05 +0.085,4.3538579986057e-05 +0.09,6.8539849358513e-05 +0.095,0.0001048005412659 +0.1,0.00015618002426604 diff --git a/modules/tensor_mechanics/test/tests/central_difference/lumped/2D/gold/2d_nodalmass_explicit_out.csv b/modules/tensor_mechanics/test/tests/central_difference/lumped/2D/gold/2d_nodalmass_explicit_out.csv new file mode 100644 index 000000000000..457a576c067e --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/lumped/2D/gold/2d_nodalmass_explicit_out.csv @@ -0,0 +1,22 @@ +time,accel_2x +0,0 +0.005,0 +0.01,0 +0.015,0 +0.02,0 +0.025,5.3290705182008e-19 +0.03,1.4222222230131e-09 +0.035,1.1358814817442e-08 +0.04,5.1010547992547e-08 +0.045,1.6962583370486e-07 +0.05,4.6517531559118e-07 +0.055,1.1129059833962e-06 +0.06,2.4028111240227e-06 +0.065,4.7869294469933e-06 +0.07,8.9372495767407e-06 +0.075,1.581484609361e-05 +0.08,2.6750711854629e-05 +0.085,4.3538579986239e-05 +0.09,6.8539849358694e-05 +0.095,0.0001048005412661 +0.1,0.00015618002426631 diff --git a/modules/tensor_mechanics/test/tests/central_difference/lumped/2D/gold/2d_nodalmass_implicit_out.csv b/modules/tensor_mechanics/test/tests/central_difference/lumped/2D/gold/2d_nodalmass_implicit_out.csv new file mode 100644 index 000000000000..22d3b445dc87 --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/lumped/2D/gold/2d_nodalmass_implicit_out.csv @@ -0,0 +1,24 @@ +time,accel_2x +-0.01,0 +-0.005,0 +0,5.5370803095183e-12 +0.005,8.8519556711867e-11 +0.01,7.0741986141769e-10 +0.015,3.797507341406e-09 +0.02,1.5519124033613e-08 +0.025,5.1839927581004e-08 +0.03,1.4824410541476e-07 +0.035,3.748503909371e-07 +0.04,8.5815319834793e-07 +0.045,1.8105111731385e-06 +0.05,3.5684013138106e-06 +0.055,6.6403355598433e-06 +0.06,1.176520150638e-05 +0.065,1.9981640984266e-05 +0.07,3.2708921042825e-05 +0.075,5.1839582916063e-05 +0.08,7.9843977471852e-05 +0.085,0.00011988661214326 +0.09,0.00017595404622508 +0.095,0.00025299388052105 +0.1,0.00035706419555316 diff --git a/modules/tensor_mechanics/test/tests/central_difference/lumped/2D/nodal_mass_file.csv b/modules/tensor_mechanics/test/tests/central_difference/lumped/2D/nodal_mass_file.csv new file mode 100644 index 000000000000..962af7fde3c0 --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/lumped/2D/nodal_mass_file.csv @@ -0,0 +1,6 @@ +0.0, 0.0, 0.0, 2500 +1.0, 0.0, 0.0, 2500 +1.0, 1.0, 0.0, 5000 +0.0, 1.0, 0.0, 5000 +1.0, 2.0, 0.0, 2500 +0.0, 2.0, 0.0, 2500 diff --git a/modules/tensor_mechanics/test/tests/central_difference/lumped/2D/tests b/modules/tensor_mechanics/test/tests/central_difference/lumped/2D/tests new file mode 100644 index 000000000000..7294ffcab537 --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/lumped/2D/tests @@ -0,0 +1,37 @@ +[Tests] + design = 'CentralDifference.md' + issues = '#13964 #9726' + + # 2D explicit analysis with nodal masses equivalent to the lumped mass solve + [./explicit_nodalmass] + type = 'CSVDiff' + input = '2d_nodalmass_explicit.i' + csvdiff = '2d_nodalmass_explicit_out.csv' + requirement = "The CentralDifference timeintegrator shall correctly calculate " + "the response of a 2D mesh with nodal masses equal to those of " + "a corresponding lumped mass system." + [../] + + # 2D implicit analysis with nodal masses equivalent to the lumped mass solve + [./implicit_nodalmass] + type = 'CSVDiff' + input = '2d_nodalmass_implicit.i' + csvdiff = '2d_nodalmass_implicit_out.csv' + requirement = "The NewmarkBeta timeintegrator shall correctly calculate " + "the response of a 2D mesh with nodal masses equal to those of " + "a corresponding lumped mass system." + [../] + + # 2D explicit analysis with lumped mass solve + [./explicit_lumped] + type = 'CSVDiff' + input = '2d_lumped_explicit.i' + cli_args = Outputs/file_base=2d_nodalmass_explicit_out + csvdiff = '2d_nodalmass_explicit_out.csv' + prereq = explicit_nodalmass + requirement = "The CentralDifference timeintegrator used with the lumped mass " + "option shall correctly calculate the response of a 2D mesh " + "and produce results that are identical to those calculated using " + "equivalent nodal masses." + [../] +[] diff --git a/modules/tensor_mechanics/test/tests/central_difference/lumped/3D/3d_lumped_explicit.i b/modules/tensor_mechanics/test/tests/central_difference/lumped/3D/3d_lumped_explicit.i new file mode 100644 index 000000000000..027f2f9bf870 --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/lumped/3D/3d_lumped_explicit.i @@ -0,0 +1,182 @@ +# Test for the central difference time integrator in 3D. + +[Mesh] + [./generated_mesh] + type = GeneratedMeshGenerator + dim = 3 + nx = 1 + ny = 1 + nz = 2 + xmin = 0.0 + xmax = 1 + ymin = 0.0 + ymax = 1 + zmin = 0.0 + zmax = 2 + [../] +[] + +[Variables] + [./disp_x] + [../] + [./disp_y] + [../] + [./disp_z] + [../] +[] + +[AuxVariables] + [./vel_x] + [../] + [./accel_x] + [../] + [./vel_y] + [../] + [./accel_y] + [../] + [./vel_z] + [../] + [./accel_z] + [../] +[] + +[AuxKernels] + [./accel_x] + type = TestNewmarkTI + variable = accel_x + displacement = disp_x + first = false + [../] + [./vel_x] + type = TestNewmarkTI + variable = vel_x + displacement = disp_x + [../] + [./accel_y] + type = TestNewmarkTI + variable = accel_y + displacement = disp_y + first = false + [../] + [./vel_y] + type = TestNewmarkTI + variable = vel_y + displacement = disp_x + [../] + [./accel_z] + type = TestNewmarkTI + variable = accel_z + displacement = disp_z + first = false + [../] + [./vel_z] + type = TestNewmarkTI + variable = vel_z + displacement = disp_z + [../] +[] + +[Kernels] + [./DynamicTensorMechanics] + displacements = 'disp_x disp_y disp_z' + [../] + [./inertia_x] + type = InertialForce + variable = disp_x + [../] + [./inertia_y] + type = InertialForce + variable = disp_y + [../] + [./inertia_z] + type = InertialForce + variable = disp_z + [../] +[] + +[BCs] + [./x_bot] + type = FunctionDirichletBC + variable = disp_x + boundary = 'back' + function = dispx + [../] + [./y_bot] + type = FunctionDirichletBC + variable = disp_y + boundary = 'back' + function = dispy + [../] + [./z_bot] + type = FunctionDirichletBC + variable = disp_z + boundary = 'back' + function = dispz + [../] +[] + +[Functions] + [./dispx] + 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' # displacement + [../] + [./dispy] + type = ParsedFunction + value = 0.1*t*t*sin(10*t) + [../] + [./dispz] + type = ParsedFunction + value = 0.1*t*t*sin(20*t) + [../] +[] + +[Materials] + [./elasticity_tensor_block] + type = ComputeIsotropicElasticityTensor + youngs_modulus = 1e6 + poissons_ratio = 0.25 + block = 0 + [../] + [./strain_block] + type = ComputeIncrementalSmallStrain + block = 0 + displacements = 'disp_x disp_y disp_z' + implicit = false + [../] + [./stress_block] + type = ComputeFiniteStrainElasticStress + block = 0 + [../] + [./density] + type = GenericConstantMaterial + block = 0 + prop_names = density + prop_values = 1e4 + [../] +[] + +[Executioner] + type = Transient + start_time = -0.01 + end_time = 0.1 + dt = 0.005 + timestep_tolerance = 1e-6 + [./TimeIntegrator] + type = CentralDifference + solve_type = lumped + [../] +[] + +[Postprocessors] + [./accel_10x] + type = NodalVariableValue + nodeid = 10 + variable = accel_x + [../] +[] + +[Outputs] + exodus = false + csv = true +[] diff --git a/modules/tensor_mechanics/test/tests/central_difference/lumped/3D/3d_nodalmass_explicit.i b/modules/tensor_mechanics/test/tests/central_difference/lumped/3D/3d_nodalmass_explicit.i new file mode 100644 index 000000000000..3bcdf6c33777 --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/lumped/3D/3d_nodalmass_explicit.i @@ -0,0 +1,191 @@ +# Test for the CentralDifference time integrator + +[Mesh] + [./generated_mesh] + type = GeneratedMeshGenerator + dim = 3 + nx = 1 + ny = 1 + nz = 2 + xmin = 0.0 + xmax = 1 + ymin = 0.0 + ymax = 1 + zmin = 0.0 + zmax = 2 + [../] + [./all_nodes] + type = BoundingBoxNodeSetGenerator + new_boundary = 'all' + input = 'generated_mesh' + top_right = '1 1 2' + bottom_left = '0 0 0' + [../] +[] + +[Variables] + [./disp_x] + [../] + [./disp_y] + [../] + [./disp_z] + [../] +[] + +[AuxVariables] + [./vel_x] + [../] + [./accel_x] + [../] + [./vel_y] + [../] + [./accel_y] + [../] + [./vel_z] + [../] + [./accel_z] + [../] +[] + +[Kernels] + [./DynamicTensorMechanics] + displacements = 'disp_x disp_y disp_z' + [../] +[] + +[AuxKernels] + [./accel_x] + type = TestNewmarkTI + variable = accel_x + displacement = disp_x + first = false + [../] + [./vel_x] + type = TestNewmarkTI + variable = vel_x + displacement = disp_x + [../] + [./accel_y] + type = TestNewmarkTI + variable = accel_y + displacement = disp_y + first = false + [../] + [./vel_y] + type = TestNewmarkTI + variable = vel_y + displacement = disp_y + [../] + [./accel_z] + type = TestNewmarkTI + variable = accel_z + displacement = disp_z + first = false + [../] + [./vel_z] + type = TestNewmarkTI + variable = vel_z + displacement = disp_z + [../] +[] + +[BCs] + [./x_bot] + type = FunctionDirichletBC + boundary = 'back' + variable = disp_x + function = dispx + [../] + [./y_bot] + type = FunctionDirichletBC + variable = disp_y + boundary = back + function = dispy + [../] + [./z_bot] + type = FunctionDirichletBC + variable = disp_z + boundary = back + function = dispz + [../] +[] + +[Functions] + [./dispx] + 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' # displacement + [../] + [./dispy] + type = ParsedFunction + value = 0.1*t*t*sin(10*t) + [../] + [./dispz] + type = ParsedFunction + value = 0.1*t*t*sin(20*t) + [../] +[] + +[NodalKernels] + [./nodal_mass_x] + type = NodalTranslationalInertia + boundary = 'all' + nodal_mass_file = 'nodal_mass_file.csv' + variable = 'disp_x' + [../] + [./nodal_mass_y] + type = NodalTranslationalInertia + boundary = 'all' + nodal_mass_file = 'nodal_mass_file.csv' + variable = 'disp_y' + [../] + [./nodal_mass_z] + type = NodalTranslationalInertia + boundary = 'all' + nodal_mass_file = 'nodal_mass_file.csv' + variable = 'disp_z' + [../] +[] + +[Materials] + [./elasticity_tensor_block] + type = ComputeIsotropicElasticityTensor + youngs_modulus = 1e6 + poissons_ratio = 0.25 + block = 0 + [../] + [./strain_block] + type = ComputeIncrementalSmallStrain + block = 0 + displacements = 'disp_x disp_y disp_z' + implicit = false + [../] + [./stress_block] + type = ComputeFiniteStrainElasticStress + block = 0 + [../] +[] + +[Executioner] + type = Transient + start_time = -0.01 + end_time = 0.1 + dt = 0.005 + timestep_tolerance = 1e-6 + [./TimeIntegrator] + type = CentralDifference + [../] +[] + +[Postprocessors] + [./accel_10x] + type = NodalVariableValue + nodeid = 10 + variable = accel_x + [../] +[] + +[Outputs] + exodus = false + csv = true +[] diff --git a/modules/tensor_mechanics/test/tests/central_difference/lumped/3D/3d_nodalmass_implicit.i b/modules/tensor_mechanics/test/tests/central_difference/lumped/3D/3d_nodalmass_implicit.i new file mode 100644 index 000000000000..46958c8954ff --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/lumped/3D/3d_nodalmass_implicit.i @@ -0,0 +1,211 @@ +# Test for the Newmark-Beta time integrator + +[Mesh] + [./generated_mesh] + type = GeneratedMeshGenerator + dim = 3 + nx = 1 + ny = 1 + nz = 2 + xmin = 0.0 + xmax = 1 + ymin = 0.0 + ymax = 1 + zmin = 0.0 + zmax = 2 + [../] + [./all_nodes] + type = BoundingBoxNodeSetGenerator + new_boundary = 'all' + input = 'generated_mesh' + top_right = '1 1 2' + bottom_left = '0 0 0' + [../] +[] + +[Variables] + [./disp_x] + [../] + [./disp_y] + [../] + [./disp_z] + [../] +[] + +[AuxVariables] + [./vel_x] + [../] + [./accel_x] + [../] + [./vel_y] + [../] + [./accel_y] + [../] + [./vel_z] + [../] + [./accel_z] + [../] +[] + +[Kernels] + [./DynamicTensorMechanics] + displacements = 'disp_x disp_y disp_z' + [../] +[] + +[AuxKernels] + [./accel_x] + type = TestNewmarkTI + variable = accel_x + displacement = disp_x + first = false + [../] + [./vel_x] + type = TestNewmarkTI + variable = vel_x + displacement = disp_x + [../] + [./accel_y] + type = TestNewmarkTI + variable = accel_y + displacement = disp_y + first = false + [../] + [./vel_y] + type = TestNewmarkTI + variable = vel_y + displacement = disp_y + [../] + [./accel_z] + type = TestNewmarkTI + variable = accel_z + displacement = disp_z + first = false + [../] + [./vel_z] + type = TestNewmarkTI + variable = vel_z + displacement = disp_z + [../] +[] + +[BCs] + [./x_bot] + type = PresetDisplacement + boundary = 'back' + variable = disp_x + beta = 0.25 + velocity = vel_x + acceleration = accel_x + function = dispx + [../] + [./y_bot] + type = PresetDisplacement + boundary = 'back' + variable = disp_y + beta = 0.25 + velocity = vel_y + acceleration = accel_y + function = dispy + [../] + [./z_bot] + type = PresetDisplacement + boundary = 'back' + variable = disp_z + beta = 0.25 + velocity = vel_z + acceleration = accel_z + function = dispz + [../] +[] + +[Functions] + [./dispx] + 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' # displacement + [../] + [./dispy] + type = ParsedFunction + value = 0.1*t*t*sin(10*t) + [../] + [./dispz] + type = ParsedFunction + value = 0.1*t*t*sin(20*t) + [../] +[] + +[NodalKernels] + [./nodal_mass_x] + type = NodalTranslationalInertia + boundary = 'all' + nodal_mass_file = 'nodal_mass_file.csv' + variable = 'disp_x' + [../] + [./nodal_mass_y] + type = NodalTranslationalInertia + boundary = 'all' + nodal_mass_file = 'nodal_mass_file.csv' + variable = 'disp_y' + [../] + [./nodal_mass_z] + type = NodalTranslationalInertia + boundary = 'all' + nodal_mass_file = 'nodal_mass_file.csv' + variable = 'disp_z' + [../] +[] + +[Materials] + [./elasticity_tensor_block] + type = ComputeIsotropicElasticityTensor + youngs_modulus = 1e6 + poissons_ratio = 0.25 + block = 0 + [../] + [./strain_block] + type = ComputeIncrementalSmallStrain + block = 0 + displacements = 'disp_x disp_y disp_z' + [../] + [./stress_block] + type = ComputeFiniteStrainElasticStress + block = 0 + [../] +[] + +[Preconditioning] + [./andy] + type = SMP + full = true + [../] +[] + +[Executioner] + type = Transient + solve_type = NEWTON + nl_abs_tol = 1e-08 + nl_rel_tol = 1e-08 + timestep_tolerance = 1e-6 + start_time = -0.01 + end_time = 0.1 + dt = 0.005 + [./TimeIntegrator] + type = NewmarkBeta + beta = 0.25 + gamma = 0.5 + [../] +[] + +[Postprocessors] + [./accel_10x] + type = NodalVariableValue + nodeid = 10 + variable = accel_x + [../] +[] + +[Outputs] + exodus = false + csv = true +[] diff --git a/modules/tensor_mechanics/test/tests/central_difference/lumped/3D/gold/3d_consistent_explicit_out.csv b/modules/tensor_mechanics/test/tests/central_difference/lumped/3D/gold/3d_consistent_explicit_out.csv new file mode 100644 index 000000000000..62a60bfc3e98 --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/lumped/3D/gold/3d_consistent_explicit_out.csv @@ -0,0 +1,22 @@ +time,_dt,disp_6x,disp_6y,disp_6z +-0.01,0,0,0,0 +0.09,0.001,-0.024170698285147,-0.00026864613048231,-0.00016852614576546 +0.19,0.001,0.070530183751603,-0.00023662330117205,0.0027329144467401 +0.29,0.001,0.29482096014307,0.0052634908726238,-0.0087363174731908 +0.39,0.001,0.51388240133302,0.011030596998716,-0.006402892011708 +0.49,0.001,0.59856758075846,-0.0064134384707958,0.054166661340727 +0.59,0.001,0.56548861052134,-0.050788419899508,-0.054677231645667 +0.69,0.001,0.55899734647456,-0.064507718461395,-0.081575584029951 +0.79,0.001,0.69460574043054,0.023820149394899,0.2288914227925 +0.89,0.001,0.93368907398089,0.17401747501913,-0.085138550722429 +0.99,0.001,1.1253825088989,0.19988072730962,-0.35570857383878 +1.09,0.001,1.2185668171621,-0.043860396362627,0.53010178887413 +1.19,0.001,0.98698678984781,-0.40470615659781,0.069876670827979 +1.29,0.001,0.56342773286066,-0.46007437962574,-0.94140107654348 +1.39,0.001,0.298856822088,0.046122725801291,0.81528402198088 +1.4899999999999,0.001,0.37178548083819,0.76213203214455,0.64715925549012 +1.5899999999999,0.001,0.59463656768715,0.88851141402929,-1.8237103060299 +1.6899999999999,0.001,0.61721084779156,0.0012410668358348,0.78455979252968 +1.7899999999999,0.001,0.30655098926512,-1.2528030979147,1.8377351885239 +1.8899999999999,0.001,-0.10883852309025,-1.5256849826458,-2.7774102343742 +1.9899999999999,0.001,-0.28685208578268,-0.13995661459654,0.051193319649816 diff --git a/modules/tensor_mechanics/test/tests/central_difference/lumped/3D/gold/3d_consistent_implicit_out.csv b/modules/tensor_mechanics/test/tests/central_difference/lumped/3D/gold/3d_consistent_implicit_out.csv new file mode 100644 index 000000000000..68fb8f1db7ec --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/lumped/3D/gold/3d_consistent_implicit_out.csv @@ -0,0 +1,22 @@ +time,_dt,disp_6x,disp_6y,disp_6z +-0.01,0,0,0,0 +0.09,0.001,-0.024164442755073,-0.00025830465673385,-0.00018176895134959 +0.19,0.001,0.070533470836051,-0.00027054308008959,0.0025795136663317 +0.29,0.001,0.29481422249005,0.005128366378436,-0.0088231246673862 +0.39,0.001,0.51387308799998,0.010880343835069,-0.0068336240042661 +0.49,0.001,0.5985694135164,-0.0064187267447174,0.053793566126632 +0.59,0.001,0.56550277371712,-0.050736437852748,-0.054130660167986 +0.69,0.001,0.55900776137324,-0.064823010297727,-0.083067266922807 +0.79,0.001,0.69459728236371,0.02290503248915,0.22760880008999 +0.89,0.001,0.93366812985259,0.17309457191658,-0.082353289667231 +0.99,0.001,1.125373072941,0.20004561381375,-0.35847731285224 +1.09,0.001,1.2185705691209,-0.042406892361353,0.5257292884381 +1.19,0.001,0.98700688167158,-0.40359177480885,0.076874583615979 +1.29,0.001,0.56344754284998,-0.46152602974443,-0.94393795367183 +1.39,0.001,0.29885057997648,0.042062669871569,0.80400409381331 +1.4899999999999,0.001,0.37175086583015,0.75881222574226,0.65927089791743 +1.5899999999999,0.001,0.5946070873784,0.88990829913698,-1.821712317999 +1.6899999999999,0.001,0.61722387385653,0.007143537725417,0.76192688496004 +1.7899999999999,0.001,0.3066013691774,-1.2482713843785,1.8528866389159 +1.8899999999999,0.001,-0.10880261418876,-1.5290451553064,-2.7636999866356 +1.9899999999999,0.001,-0.28687599190422,-0.15073708087233,0.014279604572507 diff --git a/modules/tensor_mechanics/test/tests/central_difference/lumped/3D/gold/3d_lumped_explicit_out.csv b/modules/tensor_mechanics/test/tests/central_difference/lumped/3D/gold/3d_lumped_explicit_out.csv new file mode 100644 index 000000000000..e2381712d82d --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/lumped/3D/gold/3d_lumped_explicit_out.csv @@ -0,0 +1,24 @@ +time,accel_10x +-0.01,0 +-0.005,0 +0,0 +0.005,0 +0.01,-1.6643066837622e-08 +0.015,-3.2987326664726e-08 +0.02,-3.2095062521398e-08 +0.025,1.0195746408552e-07 +0.03,6.7998913810747e-07 +0.035,2.2975749862983e-06 +0.04,5.91611706934e-06 +0.045,1.293271360551e-05 +0.05,2.523684153505e-05 +0.055,4.5252379942832e-05 +0.06,7.5964085714719e-05 +0.065,0.00012092827286488 +0.07,0.00018426812576638 +0.075,0.00027065477532765 +0.08,0.000385275966325 +0.085,0.00053379482345966 +0.09,0.0007223018630355 +0.095,0.0009572639766257 +0.1,0.0012454746137377 diff --git a/modules/tensor_mechanics/test/tests/central_difference/lumped/3D/gold/3d_nodalmass_explicit_out.csv b/modules/tensor_mechanics/test/tests/central_difference/lumped/3D/gold/3d_nodalmass_explicit_out.csv new file mode 100644 index 000000000000..f840b45124b4 --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/lumped/3D/gold/3d_nodalmass_explicit_out.csv @@ -0,0 +1,24 @@ +time,accel_10x +-0.01,0 +-0.005,0 +0,0 +0.005,0 +0.01,-1.6643066837622e-08 +0.015,-3.2987326664726e-08 +0.02,-3.2095062521464e-08 +0.025,1.0195746408517e-07 +0.03,6.799891381073e-07 +0.035,2.2975749862965e-06 +0.04,5.91611706934e-06 +0.045,1.2932713605505e-05 +0.05,2.5236841535052e-05 +0.055,4.5252379942835e-05 +0.06,7.5964085714733e-05 +0.065,0.00012092827286488 +0.07,0.0001842681257664 +0.075,0.0002706547753277 +0.08,0.00038527596632506 +0.085,0.00053379482345972 +0.09,0.00072230186303569 +0.095,0.00095726397662584 +0.1,0.0012454746137378 diff --git a/modules/tensor_mechanics/test/tests/central_difference/lumped/3D/gold/3d_nodalmass_implicit_out.csv b/modules/tensor_mechanics/test/tests/central_difference/lumped/3D/gold/3d_nodalmass_implicit_out.csv new file mode 100644 index 000000000000..5a775f4282c7 --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/lumped/3D/gold/3d_nodalmass_implicit_out.csv @@ -0,0 +1,24 @@ +time,accel_10x +-0.01,0 +-0.005,-9.2232229324775e-09 +0,-7.6718515186653e-08 +0.005,-3.1507089817545e-07 +0.01,-8.6726678869281e-07 +0.015,-1.8201158045759e-06 +0.02,-3.1031765467873e-06 +0.025,-4.3915222939085e-06 +0.03,-5.0152790458935e-06 +0.035,-3.8785554346141e-06 +0.04,6.0998810719795e-07 +0.045,1.0593140338031e-05 +0.05,2.8806454978556e-05 +0.055,5.8604225099056e-05 +0.06,0.00010397010696069 +0.065,0.0001695130611589 +0.07,0.00026044996703481 +0.075,0.00038257694591206 +0.08,0.00054223207986512 +0.085,0.00074625281566343 +0.09,0.0010019318791148 +0.095,0.0013169759751306 +0.1,0.0016994718968487 diff --git a/modules/tensor_mechanics/test/tests/central_difference/lumped/3D/nodal_mass_file.csv b/modules/tensor_mechanics/test/tests/central_difference/lumped/3D/nodal_mass_file.csv new file mode 100644 index 000000000000..1b3a93ee2443 --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/lumped/3D/nodal_mass_file.csv @@ -0,0 +1,12 @@ +0.0, 0.0, 0.0, 1250 +1.0, 0.0, 0.0, 1250 +1.0, 1.0, 0.0, 1250 +0.0, 1.0, 0.0, 1250 +0.0, 0.0, 1.0, 2500 +1.0, 0.0, 1.0, 2500 +1.0, 1.0, 1.0, 2500 +0.0, 1.0, 1.0, 2500 +0.0, 0.0, 2.0, 1250 +1.0, 0.0, 2.0, 1250 +1.0, 1.0, 2.0, 1250 +0.0, 1.0, 2.0, 1250 diff --git a/modules/tensor_mechanics/test/tests/central_difference/lumped/3D/tests b/modules/tensor_mechanics/test/tests/central_difference/lumped/3D/tests new file mode 100644 index 000000000000..333bcad1b474 --- /dev/null +++ b/modules/tensor_mechanics/test/tests/central_difference/lumped/3D/tests @@ -0,0 +1,37 @@ +[Tests] + design = 'CentralDifference.md' + issues = '#13964 #9726' + + # 3D explicit analysis with nodal masses equivalent to the lumped mass solve + [./explicit_nodalmass] + type = 'CSVDiff' + input = '3d_nodalmass_explicit.i' + csvdiff = '3d_nodalmass_explicit_out.csv' + requirement = "The CentralDifference timeintegrator shall correctly calculate " + "the response of a 3D mesh with nodal masses equal to those of " + "a corresponding lumped mass system." + [../] + + # 3D implicit analysis with nodal masses equivalent to the lumped mass solve + [./implicit_nodalmass] + type = 'CSVDiff' + input = '3d_nodalmass_implicit.i' + csvdiff = '3d_nodalmass_implicit_out.csv' + requirement = "The NewmarkBeta timeintegrator shall correctly calculate " + "the response of a 3D mesh with nodal masses equal to those of " + "a corresponding lumped mass system." + [../] + + # 3D explicit analysis with lumped mass solve + [./explicit_lumped] + type = 'CSVDiff' + input = '3d_lumped_explicit.i' + cli_args = Outputs/file_base=3d_nodalmass_explicit_out + csvdiff = '3d_nodalmass_explicit_out.csv' + prereq = explicit_nodalmass + requirement = "The CentralDifference timeintegrator used with the lumped mass " + "option shall correctly calculate the response of a 3D mesh " + "and produce results that are identical to those calculated using " + "equivalent nodal masses." + [../] +[]