Line data Source code
1 : // Mastodon includes 2 : #include "LinearSoilMaterial.h" 3 : 4 : registerMooseObject("MastodonApp", LinearSoilMaterial); 5 : 6 : InputParameters 7 81 : LinearSoilMaterial::validParams() 8 : { 9 81 : InputParameters params = Material::validParams(); 10 81 : params += LayeredMaterialInterface<>::validParams(); 11 162 : params.setDocString("layer_ids", 12 : "Vector of layer ids that map one-to-one " 13 : "with the 'shear_modulus' and 'density' " 14 : "input parameters."); 15 162 : params.addRequiredParam<std::vector<Real>>("shear_modulus", 16 : "Vector of shear modules values that map one-to-one " 17 : "with the number 'layer_ids' parameter."); 18 162 : params.addRequiredParam<std::vector<Real>>( 19 : "density", 20 : "Vector of density values that map one-to-one with the number " 21 : "'layer_ids' parameter."); 22 81 : params.addClassDescription("Material for computing the shear wave speed " 23 : "and minimum element size as a function " 24 : "of shear modulus and density."); 25 81 : return params; 26 0 : } 27 : 28 61 : LinearSoilMaterial::LinearSoilMaterial(const InputParameters & parameters) 29 : : LayeredMaterialInterface<Material>(parameters), 30 61 : _shear_wave_speed(declareProperty<Real>("shear_wave_speed")), 31 61 : _layer_shear_modulus(getLayerParam<Real>("shear_modulus")), 32 121 : _layer_density(getLayerParam<Real>("density")) 33 : { 34 60 : } 35 : 36 : void 37 892674 : LinearSoilMaterial::computeQpProperties() 38 : { 39 892674 : _shear_wave_speed[_qp] = std::sqrt(_layer_shear_modulus[_qp] / _layer_density[_qp]); 40 892674 : }