TensorMechanicsMaterial::TensorMechanicsMaterial(const std::string & name, InputParameters parameters) : Material(name, parameters), _grad_disp_x(coupledGradient("disp_x")), _grad_disp_y(coupledGradient("disp_y")), _grad_disp_z(_mesh.dimension() == 3 ? coupledGradient("disp_z") : _grad_zero), _grad_disp_x_old(_fe_problem.isTransient() ? coupledGradientOld("disp_x") : _grad_zero), _grad_disp_y_old(_fe_problem.isTransient() ? coupledGradientOld("disp_y") : _grad_zero), _grad_disp_z_old(_fe_problem.isTransient() && _mesh.dimension() == 3 ? coupledGradientOld("disp_z") : _grad_zero), _stress(declareProperty<RankTwoTensor>("stress")), _elastic_strain(declareProperty<RankTwoTensor>("elastic_strain")), _elasticity_tensor(declareProperty<ElasticityTensorR4>("elasticity_tensor")), _Jacobian_mult(declareProperty<ElasticityTensorR4>("Jacobian_mult")), //_d_stress_dT(declareProperty<RankTwoTensor>("d_stress_dT")), _euler_angle_1(getParam<Real>("euler_angle_1")), _euler_angle_2(getParam<Real>("euler_angle_2")), _euler_angle_3(getParam<Real>("euler_angle_3")), _Cijkl_vector(getParam<std::vector<Real> >("C_ijkl")), _all_21(getParam<bool>("all_21")), _Cijkl(), _Euler_angles(_euler_angle_1, _euler_angle_2, _euler_angle_3), _has_T(isCoupled("temperature")), _T(_has_T ? &coupledValue("temperature") : NULL) { // fill in the local tensors from the input vector information _Cijkl.fillFromInputVector(_Cijkl_vector, _all_21); }
INSMomentumNoBCBCBase::INSMomentumNoBCBCBase(const InputParameters & parameters) : IntegratedBC(parameters), // Coupled variables _u_vel(coupledValue("u")), _v_vel(_mesh.dimension() >= 2 ? coupledValue("v") : _zero), _w_vel(_mesh.dimension() == 3 ? coupledValue("w") : _zero), _p(coupledValue("p")), // Gradients _grad_u_vel(coupledGradient("u")), _grad_v_vel(_mesh.dimension() >= 2 ? coupledGradient("v") : _grad_zero), _grad_w_vel(_mesh.dimension() == 3 ? coupledGradient("w") : _grad_zero), // Variable numberings _u_vel_var_number(coupled("u")), _v_vel_var_number(_mesh.dimension() >= 2 ? coupled("v") : libMesh::invalid_uint), _w_vel_var_number(_mesh.dimension() == 3 ? coupled("w") : libMesh::invalid_uint), _p_var_number(coupled("p")), // Required parameters _gravity(getParam<RealVectorValue>("gravity")), _component(getParam<unsigned>("component")), _integrate_p_by_parts(getParam<bool>("integrate_p_by_parts")), // Material properties _mu(getMaterialProperty<Real>("mu_name")), _rho(getMaterialProperty<Real>("rho_name")) { }
SurfaceMechanicsBC::SurfaceMechanicsBC(const std::string & name, InputParameters parameters) : IntegratedBC(name, parameters), _dim(_mesh.dimension()), _component(getParam<unsigned int>("component")), _surface_euler_angle_1(getParam<Real>("surface_euler_angle_1")), _surface_euler_angle_2(getParam<Real>("surface_euler_angle_2")), _surface_euler_angle_3(getParam<Real>("surface_euler_angle_3")), _Csijkl_vector(getParam<std::vector<Real> >("Cs_ijkl")), //added this line _taus(getParam<Real>("taus")), // _component(getParam<unsigned int>("component")), _Csijkl(), _surface_euler_angles(_surface_euler_angle_1, _surface_euler_angle_2, _surface_euler_angle_3), _grad_disp_x(coupledGradient("disp_x")), _grad_disp_y(coupledGradient("disp_y")), _grad_disp_z(_dim == 3 ? coupledGradient("disp_z") : _grad_zero) { // fill in the local tensors from the input vector information _Csijkl.surfaceFillFromInputVector (_Csijkl_vector); //rotate the _Csijkl tensor RotationTensor R(_surface_euler_angles); _Csijkl.rotate(R); }
Nonlinear3D::Nonlinear3D( SolidModel & solid_model, const std::string & name, InputParameters parameters ) :Element( solid_model, name, parameters ), _grad_disp_x(coupledGradient("disp_x")), _grad_disp_y(coupledGradient("disp_y")), _grad_disp_z(coupledGradient("disp_z")), _grad_disp_x_old(coupledGradientOld("disp_x")), _grad_disp_y_old(coupledGradientOld("disp_y")), _grad_disp_z_old(coupledGradientOld("disp_z")), _decomp_method( RashidApprox ), _incremental_rotation(3,3), _Uhat(3,3) { std::string increment_calculation = solid_model.getParam<std::string>("increment_calculation"); std::transform( increment_calculation.begin(), increment_calculation.end(), increment_calculation.begin(), ::tolower ); if ( increment_calculation == "rashidapprox" ) { _decomp_method = RashidApprox; } else if ( increment_calculation == "eigen" ) { _decomp_method = Eigen; } else { mooseError( "The options for the increment calculation are RashidApprox and Eigen."); } }
INSMomentum::INSMomentum(const InputParameters & parameters) : Kernel(parameters), // Coupled variables _u_vel(coupledValue("u")), _v_vel(coupledValue("v")), _w_vel(coupledValue("w")), _p(coupledValue("p")), // Gradients _grad_u_vel(coupledGradient("u")), _grad_v_vel(coupledGradient("v")), _grad_w_vel(coupledGradient("w")), // Variable numberings _u_vel_var_number(coupled("u")), _v_vel_var_number(coupled("v")), _w_vel_var_number(coupled("w")), _p_var_number(coupled("p")), // Required parameters _mu(getParam<Real>("mu")), _rho(getParam<Real>("rho")), _gravity(getParam<RealVectorValue>("gravity")), _component(getParam<unsigned>("component")) // Material properties // _dynamic_viscosity(getMaterialProperty<Real>("dynamic_viscosity")) { }
NSIntegratedBC::NSIntegratedBC(const InputParameters & parameters) : IntegratedBC(parameters), _u_vel(coupledValue(NS::velocity_x)), _v_vel(_mesh.dimension() >= 2 ? coupledValue(NS::velocity_y) : _zero), _w_vel(_mesh.dimension() == 3 ? coupledValue(NS::velocity_z) : _zero), _rho(coupledValue(NS::density)), _rho_u(coupledValue(NS::momentum_x)), _rho_v(_mesh.dimension() >= 2 ? coupledValue(NS::momentum_y) : _zero), _rho_w(_mesh.dimension() == 3 ? coupledValue(NS::momentum_z) : _zero), _rho_E(coupledValue(NS::total_energy)), _grad_rho(coupledGradient(NS::density)), _grad_rho_u(coupledGradient(NS::momentum_x)), _grad_rho_v(_mesh.dimension() >= 2 ? coupledGradient(NS::momentum_y) : _grad_zero), _grad_rho_w(_mesh.dimension() == 3 ? coupledGradient(NS::momentum_z) : _grad_zero), _grad_rho_E(coupledGradient(NS::total_energy)), // Variable numberings _rho_var_number(coupled(NS::density)), _rhou_var_number(coupled(NS::momentum_x)), _rhov_var_number(_mesh.dimension() >= 2 ? coupled(NS::momentum_y) : libMesh::invalid_uint), _rhow_var_number(_mesh.dimension() == 3 ? coupled(NS::momentum_z) : libMesh::invalid_uint), _rhoE_var_number(coupled(NS::total_energy)), _dynamic_viscosity(getMaterialProperty<Real>("dynamic_viscosity")), _viscous_stress_tensor(getMaterialProperty<RealTensorValue>("viscous_stress_tensor")), // FluidProperties UserObject _fp(getUserObject<IdealGasFluidProperties>("fluid_properties")) { }
TensorMechanicsMaterial::TensorMechanicsMaterial(const std::string & name, InputParameters parameters) : Material(name, parameters), _grad_disp_x(coupledGradient("disp_x")), _grad_disp_y(coupledGradient("disp_y")), _grad_disp_z(_mesh.dimension() == 3 ? coupledGradient("disp_z") : _grad_zero), _grad_disp_x_old(_fe_problem.isTransient() ? coupledGradientOld("disp_x") : _grad_zero), _grad_disp_y_old(_fe_problem.isTransient() ? coupledGradientOld("disp_y") : _grad_zero), _grad_disp_z_old(_fe_problem.isTransient() && _mesh.dimension() == 3 ? coupledGradientOld("disp_z") : _grad_zero), _stress(declareProperty<RankTwoTensor>("stress")), _total_strain(declareProperty<RankTwoTensor>("total_strain")), _elastic_strain(declareProperty<RankTwoTensor>("elastic_strain")), _elasticity_tensor(declareProperty<ElasticityTensorR4>("elasticity_tensor")), _Jacobian_mult(declareProperty<ElasticityTensorR4>("Jacobian_mult")), // _d_stress_dT(declareProperty<RankTwoTensor>("d_stress_dT")), _euler_angle_1(getParam<Real>("euler_angle_1")), _euler_angle_2(getParam<Real>("euler_angle_2")), _euler_angle_3(getParam<Real>("euler_angle_3")), _Cijkl_vector(getParam<std::vector<Real> >("C_ijkl")), _Cijkl(), _Euler_angles(_euler_angle_1, _euler_angle_2, _euler_angle_3), _has_T(isCoupled("temperature")), _T(_has_T ? &coupledValue("temperature") : NULL), _fill_method((RankFourTensor::FillMethod)(int)getParam<MooseEnum>("fill_method")) { _Cijkl.fillFromInputVector(_Cijkl_vector, _fill_method); const std::vector<FunctionName> & fcn_names( getParam<std::vector<FunctionName> >("initial_stress") ); const unsigned num = fcn_names.size(); if (!(num == 0 || num == 3*3)) mooseError("Either zero or " << 3*3 << " initial stress functions must be provided to TensorMechanicsMaterial. You supplied " << num << "\n"); _initial_stress.resize(num); for (unsigned i = 0 ; i < num ; ++i) _initial_stress[i] = &getFunctionByName(fcn_names[i]); }
PolarMaterial::PolarMaterial(const std::string & name, InputParameters parameters) :Material(name, parameters), _polars(declareProperty<std::vector<Real> >("polars")), _polar_grads(declareProperty<std::vector<RealGradient> >("polar_grads")), _alpha1(declareProperty<Real>("alpha1")), _alpha11(declareProperty<Real>("alpha11")), _alpha12(declareProperty<Real>("alpha12")), _alpha111(declareProperty<Real>("alpha111")), _alpha112(declareProperty<Real>("alpha112")), _alpha123(declareProperty<Real>("alpha123")), _G11(declareProperty<Real>("G11")), _G12(declareProperty<Real>("G12")), _G44(declareProperty<Real>("G44")), _G44P(declareProperty<Real>("G44P")), _alpha1_i(getParam<Real>("alpha1")), _alpha11_i(getParam<Real>("alpha11")), _alpha12_i(getParam<Real>("alpha12")), _alpha111_i(getParam<Real>("alpha111")), _alpha112_i(getParam<Real>("alpha112")), _alpha123_i(getParam<Real>("alpha123")), _G110_i(getParam<Real>("G110")), _G11_i(getParam<Real>("G11/G110")*_G110_i), _G12_i(getParam<Real>("G12/G110")*_G110_i), _G44_i(getParam<Real>("G44/G110")*_G110_i), _G44P_i(getParam<Real>("G44P/G110")*_G110_i), _polar_x_val(coupledValue("polar_x")), _polar_y_val(coupledValue("polar_y")), _polar_z_val(coupledValue("polar_z")), _polar_x_grad(coupledGradient("polar_x")), _polar_y_grad(coupledGradient("polar_y")), _polar_z_grad(coupledGradient("polar_z")) { }
SbaArtificialDissipation::SbaArtificialDissipation(const std::string & name, InputParameters parameters) : Kernel(name, parameters), // Declare equation types _equ_type("VOLUME_FRACTION CONTINUITY XMOMENTUM ENERGY INVALID", getParam<std::string>("equation_name")), // Boolean _isLiquid(getParam<bool>("isLiquid")), // Coupled auxilary variables _rho(coupledValue("density")), _pressure(coupledValue("pressure")), _grad_rho(coupledGradient("density")), _grad_press(coupledGradient("pressure")), _vel_x(coupledValue("velocity_x")), _grad_vel_x(coupledGradient("velocity_x")), _rhoe(coupledValue("internal_energy")), _grad_rhoe(coupledGradient("internal_energy")), _area(coupledValue("area")), _alpha_liq(coupledValue("liquid_volume_fraction")), _grad_alpha_liq(coupledGradient("liquid_volume_fraction")), // Get material property: viscosity coefficient. _mu(_isLiquid ? getMaterialProperty<Real>("mu_liq") : getMaterialProperty<Real>("mu_gas")), _kappa(_isLiquid ? getMaterialProperty<Real>("kappa_liq") : getMaterialProperty<Real>("kappa_gas")), _beta(_isLiquid ? getMaterialProperty<Real>("beta_liq") : getMaterialProperty<Real>("beta_gas")) { mooseAssert(_mesh.dimension() != 1, "The function "<<this->name()<<" can only be used with a 1-D mesh"); }
PorousFlow2PhasePP::PorousFlow2PhasePP(const InputParameters & parameters) : PorousFlowVariableBase(parameters), _phase0_porepressure(_nodal_material ? coupledDofValues("phase0_porepressure") : coupledValue("phase0_porepressure")), _phase0_gradp_qp(coupledGradient("phase0_porepressure")), _phase0_porepressure_varnum(coupled("phase0_porepressure")), _p0var(_dictator.isPorousFlowVariable(_phase0_porepressure_varnum) ? _dictator.porousFlowVariableNum(_phase0_porepressure_varnum) : 0), _phase1_porepressure(_nodal_material ? coupledDofValues("phase1_porepressure") : coupledValue("phase1_porepressure")), _phase1_gradp_qp(coupledGradient("phase1_porepressure")), _phase1_porepressure_varnum(coupled("phase1_porepressure")), _p1var(_dictator.isPorousFlowVariable(_phase1_porepressure_varnum) ? _dictator.porousFlowVariableNum(_phase1_porepressure_varnum) : 0), _pc_uo(getUserObject<PorousFlowCapillaryPressure>("capillary_pressure")) { if (_num_phases != 2) mooseError("The Dictator announces that the number of phases is ", _dictator.numPhases(), " whereas PorousFlow2PhasePP can only be used for 2-phase simulation. When you " "have an efficient government, you have a dictatorship."); }
CoupledConvectionReactionSub::CoupledConvectionReactionSub(const InputParameters & parameters) // You must call the constructor of the base class first :Kernel(parameters), // coupledGradient will give us a reference to the gradient of another // variable in the computation. We are going to use the gradient of p // to calculate our velocity vector. _weight(getParam<Real>("weight")), _log_k (getParam<Real>("log_k")), _sto_u(getParam<Real>("sto_u")), _sto_v(getParam<std::vector<Real> >("sto_v")), _cond(getMaterialProperty<Real>("conductivity")), _grad_p(coupledGradient("p")) { int n = coupledComponents("v"); _vars.resize(n); _vals.resize(n); _grad_vals.resize(n); for (unsigned int i=0; i<_vals.size(); ++i) { _vars[i] = coupled("v", i); _vals[i] = &coupledValue("v", i); _grad_vals[i] = &coupledGradient("v", i); } }
INSSplitMomentum::INSSplitMomentum(const InputParameters & parameters) : Kernel(parameters), // Coupled variables _u_vel(coupledValue("u")), _v_vel(_mesh.dimension() >= 2 ? coupledValue("v") : _zero), _w_vel(_mesh.dimension() == 3 ? coupledValue("w") : _zero), _a1(coupledValue("a1")), _a2(_mesh.dimension() >= 2 ? coupledValue("a2") : _zero), _a3(_mesh.dimension() == 3 ? coupledValue("a3") : _zero), // Gradients _grad_u_vel(coupledGradient("u")), _grad_v_vel(_mesh.dimension() >= 2 ? coupledGradient("v") : _grad_zero), _grad_w_vel(_mesh.dimension() == 3 ? coupledGradient("w") : _grad_zero), // Variable numberings _u_vel_var_number(coupled("u")), _v_vel_var_number(_mesh.dimension() >= 2 ? coupled("v") : libMesh::invalid_uint), _w_vel_var_number(_mesh.dimension() == 3 ? coupled("w") : libMesh::invalid_uint), _a1_var_number(coupled("a1")), _a2_var_number(_mesh.dimension() >= 2 ? coupled("a2") : libMesh::invalid_uint), _a3_var_number(_mesh.dimension() == 3 ? coupled("a3") : libMesh::invalid_uint), // Required parameters _gravity(getParam<RealVectorValue>("gravity")), _component(getParam<unsigned>("component")), // Material properties _mu(getMaterialProperty<Real>("mu_name")), _rho(getMaterialProperty<Real>("rho_name")) { }
PorousFlow2PhasePS::PorousFlow2PhasePS(const InputParameters & parameters) : PorousFlowVariableBase(parameters), _phase0_porepressure(_nodal_material ? coupledNodalValue("phase0_porepressure") : coupledValue("phase0_porepressure")), _phase0_gradp_qp(coupledGradient("phase0_porepressure")), _phase0_porepressure_varnum(coupled("phase0_porepressure")), _pvar(_dictator.isPorousFlowVariable(_phase0_porepressure_varnum) ? _dictator.porousFlowVariableNum(_phase0_porepressure_varnum) : 0), _phase1_saturation(_nodal_material ? coupledNodalValue("phase1_saturation") : coupledValue("phase1_saturation")), _phase1_grads_qp(coupledGradient("phase1_saturation")), _phase1_saturation_varnum(coupled("phase1_saturation")), _svar(_dictator.isPorousFlowVariable(_phase1_saturation_varnum) ? _dictator.porousFlowVariableNum(_phase1_saturation_varnum) : 0), _sat_lr(getParam<Real>("sat_lr")), _dseff_ds(1.0 / (1.0 - _sat_lr)), _pc_uo(parameters.isParamSetByUser("capillary_pressure") ? &getUserObject<PorousFlowCapillaryPressure>("capillary_pressure") : nullptr) { if (_dictator.numPhases() != 2) mooseError("The Dictator proclaims that the number of phases is ", _dictator.numPhases(), " whereas PorousFlow2PhasePS can only be used for 2-phase simulation. Be aware " "that the Dictator has noted your mistake."); }
SchottkyEmissionBC::SchottkyEmissionBC(const InputParameters & parameters) : IntegratedBC(parameters), _r_units(1. / getParam<Real>("position_units")), _r(getParam<Real>("r")), // Coupled Variables _grad_potential(coupledGradient("potential")), _potential_id(coupled("potential")), _mean_en(coupledValue("mean_en")), _mean_en_id(coupled("mean_en")), _ip_var(*getVar("ip", 0)), _ip(coupledValue("ip")), _grad_ip(coupledGradient("ip")), _ip_id(coupled("ip")), _muem(getMaterialProperty<Real>("muem")), _d_muem_d_actual_mean_en(getMaterialProperty<Real>("d_muem_d_actual_mean_en")), _massem(getMaterialProperty<Real>("massem")), _e(getMaterialProperty<Real>("e")), // _Avogadro(getMaterialProperty<Real>("Avogadro")), _sgnip(getMaterialProperty<Real>("sgn" + _ip_var.name())), _muip(getMaterialProperty<Real>("mu" + _ip_var.name())), _Dip(getMaterialProperty<Real>("diff" + _ip_var.name())), _se_coeff(getMaterialProperty<Real>("se_coeff")), _work_function(getMaterialProperty<Real>("work_function")), _field_enhancement(getMaterialProperty<Real>("field_enhancement")), _Richardson_coefficient(getMaterialProperty<Real>("Richardson_coefficient")), _cathode_temperature(getMaterialProperty<Real>("cathode_temperature")), _a(0.5), _v_thermal(0), _ion_flux(0, 0, 0), _n_gamma(0), _d_v_thermal_d_u(0), _d_v_thermal_d_mean_en(0), _d_ion_flux_d_potential(0, 0, 0), _d_ion_flux_d_ip(0, 0, 0), _d_n_gamma_d_potential(0), _d_n_gamma_d_ip(0), _d_n_gamma_d_u(0), _d_n_gamma_d_mean_en(0), _actual_mean_en(0), _tau(getParam<Real>("tau")), _relax(getParam<bool>("relax")), _potential_units(getParam<std::string>("potential_units")) { if (_potential_units.compare("V") == 0) { _voltage_scaling = 1.; } else if (_potential_units.compare("kV") == 0) { _voltage_scaling = 1000; } _dPhi_over_F = 3.7946865E-5 * sqrt(_voltage_scaling); // eV*sqrt(m/kV) (if _voltage_scaling = 1000) }
//Constructor PolarElectricPStrong::PolarElectricPStrong(const std::string & name, InputParameters parameters) :Kernel(name, parameters), _component(getParam<unsigned int>("component")), _potential_int_grad(coupledGradient("potential_int")), _potential_ext_grad(coupledGradient("potential_ext")), _len_scale(getParam<Real>("len_scale")), _energy_scale(getParam<Real>("energy_scale")) {}
AuxGradientEnergy::AuxGradientEnergy(const InputParameters & parameters) : AuxKernel(parameters), _grad_c(coupledGradient("c")), _grad_OP(coupledGradient("OP")), _kappa_c(getMaterialProperty<Real>("kappa_c")), _kappa_OP(getMaterialProperty<Real>("kappa_n")) { }
// DEPRECATED CONSTRUCTOR SolidMechZ::SolidMechZ(const std::string & deprecated_name, InputParameters parameters) :SolidMech(deprecated_name, parameters), _x_var(coupled("x")), _x(coupledValue("x")), _grad_x(coupledGradient("x")), _y_var(coupled("y")), _y(coupledValue("y")), _grad_y(coupledGradient("y")) {}
SolidMechZ::SolidMechZ(const InputParameters & parameters) :SolidMech(parameters), _x_var(coupled("x")), _x(coupledValue("x")), _grad_x(coupledGradient("x")), _y_var(coupled("y")), _y(coupledValue("y")), _grad_y(coupledGradient("y")) {}
PlaneStrain::PlaneStrain(SolidModel & solid_model, const std::string & name, InputParameters parameters) :Element(solid_model, name, parameters), _large_strain(solid_model.getParam<bool>("large_strain")), _grad_disp_x(coupledGradient("disp_x")), _grad_disp_y(coupledGradient("disp_y")) { }
IonBolosKernelEnergyForm::IonBolosKernelEnergyForm(const InputParameters & parameters) : Kernel(parameters), _em(coupledValue("em")), _grad_em(coupledGradient("em")), _em_id(coupled("em")), _grad_potential(coupledGradient("potential")), _potential_id(coupled("potential")), _mean_en(coupledValue("mean_en")), _mean_en_id(coupled("mean_en")), // Material Properties _muem(getMaterialProperty<Real>("muem")), _diffem(getMaterialProperty<Real>("diffem")), _muip(getMaterialProperty<Real>("muip")), _diffip(getMaterialProperty<Real>("diffip")), _Ar(getMaterialProperty<Real>("Ar")), _iz_coeff_energy_a(getMaterialProperty<Real>("iz_coeff_energy_a")), _iz_coeff_energy_b(getMaterialProperty<Real>("iz_coeff_energy_b")), _iz_coeff_energy_c(getMaterialProperty<Real>("iz_coeff_energy_c")), _N_A(getMaterialProperty<Real>("N_A")), _alpha_iz(getMaterialProperty<Real>("alpha_iz")), _d_iz_d_actual_mean_en(getMaterialProperty<Real>("d_iz_d_actual_mean_en")), _d_muem_d_actual_mean_en(getMaterialProperty<Real>("d_muem_d_actual_mean_en")), _d_diffem_d_actual_mean_en(getMaterialProperty<Real>("d_diffem_d_actual_mean_en")) // Kernel members // _alpha(0.0), // _Pe(0.0), // _vd_mag(0.0), // _delta(0.0), // _townsend(getParam<bool>("townsend")), // _use_interp_for_townsend(getParam<bool>("use_interp_for_townsend")), // // _estim_jac_with_function(getParam<bool>("estim_jac_with_function")), // _actual_mean_en(0.0), // _iz(0.0), // _d_iz_d_actual_mean_en_member(0.0), // _d_actual_mean_en_d_em(0.0), // _d_actual_mean_en_d_mean_en(0.0), // _d_iz_d_em(0.0), // _d_iz_d_mean_en(0.0), // _electron_flux(0.0,0.0,0.0), // _d_electron_flux_d_potential(0.0,0.0,0.0), // _d_electron_flux_d_em(0.0,0.0,0.0), // _electron_flux_mag(0.0), // _d_electron_flux_mag_d_potential(0.0), // _d_electron_flux_mag_d_em(0.0), // _source_term(0.0), // _d_source_term_d_em(0.0), // _d_source_term_d_mean_en(0.0), // _d_source_term_d_potential(0.0) { // if ( !_townsend && _use_interp_for_townsend ) // std::cerr << "Not a consistent specification of the ionization problem." << std::endl; }
DriftDiffusionFluxAux::DriftDiffusionFluxAux(const InputParameters & parameters) : AuxKernel(parameters), _sgn(getParam<bool>("positive_charge") ? 1 : -1), _grad_potential(coupledGradient("potential")), _u(coupledValue("u")), _grad_u(coupledGradient("u")), _component(getParam<int>("component")) { }
FieldEmissionBC::FieldEmissionBC(const InputParameters & parameters) : IntegratedBC(parameters), _r_units(1. / getParam<Real>("position_units")), _r(getParam<Real>("r")), // Coupled Variables _grad_potential(coupledGradient("potential")), _potential_id(coupled("potential")), _mean_en(coupledValue("mean_en")), _mean_en_id(coupled("mean_en")), _ip_var(*getVar("ip", 0)), _ip(coupledValue("ip")), _grad_ip(coupledGradient("ip")), _ip_id(coupled("ip")), _muem(getMaterialProperty<Real>("muem")), _d_muem_d_actual_mean_en(getMaterialProperty<Real>("d_muem_d_actual_mean_en")), _massem(getMaterialProperty<Real>("massem")), _e(getMaterialProperty<Real>("e")), _sgnip(getMaterialProperty<Real>("sgn" + _ip_var.name())), _muip(getMaterialProperty<Real>("mu" + _ip_var.name())), _Dip(getMaterialProperty<Real>("diff" + _ip_var.name())), _se_coeff(getMaterialProperty<Real>("se_coeff")), _work_function(getMaterialProperty<Real>("work_function")), _field_enhancement(getMaterialProperty<Real>("field_enhancement")), _a(0.5), _v_thermal(0), _ion_flux(0, 0, 0), _n_gamma(0), _d_v_thermal_d_u(0), _d_v_thermal_d_mean_en(0), _d_ion_flux_d_potential(0, 0, 0), _d_ion_flux_d_ip(0, 0, 0), _d_n_gamma_d_potential(0), _d_n_gamma_d_ip(0), _d_n_gamma_d_u(0), _d_n_gamma_d_mean_en(0), _actual_mean_en(0), _tau(getParam<Real>("tau")), _relax(getParam<bool>("relax")), _potential_units(getParam<std::string>("potential_units")) { if (_potential_units.compare("V") == 0) { _voltage_scaling = 1.; } else if (_potential_units.compare("kV") == 0) { _voltage_scaling = 1000; } FE_a = 1.541434E-6 * pow(_voltage_scaling, 2); // A eV/kV^2 (if _voltage_scaling == 1000) FE_b = 6.830890E9 / _voltage_scaling; // kV/m-eV^1.5 (if _voltage_scaling == 1000) FE_c = 1.439964E-9 * _voltage_scaling; // eV^2*m/kV (if _voltage_scaling == 1000) }
HomogenizedThermalConductivity::HomogenizedThermalConductivity(const InputParameters & parameters) : ElementAverageValue(parameters), _grad_temp_x(coupledGradient("temp_x")), _grad_temp_y(_subproblem.mesh().dimension() >= 2 ? coupledGradient("temp_y") : _grad_zero), _grad_temp_z(_subproblem.mesh().dimension() == 3 ? coupledGradient("temp_z") : _grad_zero), _component(getParam<unsigned int>("component")), _diffusion_coefficient(getMaterialProperty<Real>("diffusion_coefficient")), _scale(getParam<Real>("scale_factor")) { }
SolidMechX::SolidMechX(const InputParameters & parameters) : SolidMech(parameters), _mesh_dimension(_mesh.dimension()), _y_var(coupled("y")), _y(coupledValue("y")), _grad_y(coupledGradient("y")), _z_var(_mesh_dimension == 3 ? coupled("z") : 1000000), _z(_mesh_dimension == 3 ? coupledValue("z") : _zero), _grad_z(_mesh_dimension == 3 ? coupledGradient("z"): _grad_zero) {}
AxisymmetricRZ::AxisymmetricRZ(SolidModel & solid_model, const std::string & name, InputParameters parameters) :Element(solid_model, name, parameters), _disp_r(coupledValue("disp_r")), _disp_z(coupledValue("disp_z")), _large_strain(solid_model.getParam<bool>("large_strain")), _grad_disp_r(coupledGradient("disp_r")), _grad_disp_z(coupledGradient("disp_z")) { }
Linear::Linear(SolidModel & solid_model, const std::string & name, const InputParameters & parameters) :Element(solid_model, name, parameters), _large_strain(solid_model.getParam<bool>("large_strain")), _grad_disp_x(coupledGradient("disp_x")), _grad_disp_y(coupledGradient("disp_y")), _grad_disp_z(parameters.get<SubProblem *>("_subproblem")->mesh().dimension() == 3 ? coupledGradient("disp_z") : _grad_zero), _volumetric_locking_correction(solid_model.getParam<bool>("volumetric_locking_correction")) { }
Nonlinear3D::Nonlinear3D( SolidModel & solid_model, const std::string & name, const InputParameters & parameters ) :Nonlinear( solid_model, name, parameters ), _grad_disp_x(coupledGradient("disp_x")), _grad_disp_y(coupledGradient("disp_y")), _grad_disp_z(coupledGradient("disp_z")), _grad_disp_x_old(coupledGradientOld("disp_x")), _grad_disp_y_old(coupledGradientOld("disp_y")), _grad_disp_z_old(coupledGradientOld("disp_z")) { }
FluxBasedStrainIncrement::FluxBasedStrainIncrement(const InputParameters & parameters) : DerivativeMaterialInterface<Material>(parameters), _grad_jx(&coupledGradient("xflux")), _has_yflux(isCoupled("yflux")), _has_zflux(isCoupled("zflux")), _grad_jy(_has_yflux ? &coupledGradient("yflux") : nullptr), _grad_jz(_has_zflux ? &coupledGradient("zflux") : nullptr), _gb(isCoupled("gb") ? coupledValue("gb") : _zero), _strain_increment( declareProperty<RankTwoTensor>(getParam<MaterialPropertyName>("property_name"))) { }
NonlinearRZ::NonlinearRZ( SolidModel & solid_model, const std::string & name, const InputParameters & parameters ) :Nonlinear( solid_model, name, parameters ), _grad_disp_r(coupledGradient("disp_r")), _grad_disp_z(coupledGradient("disp_z")), _grad_disp_r_old(coupledGradientOld("disp_r")), _grad_disp_z_old(coupledGradientOld("disp_z")), _disp_r(coupledValue("disp_r")), _disp_r_old(coupledValueOld("disp_r")) { }
TensorMechanicsMaterial::TensorMechanicsMaterial(const InputParameters & parameters) : Material(parameters), _grad_disp_x(coupledGradient("disp_x")), _grad_disp_y(coupledGradient("disp_y")), _grad_disp_z(_mesh.dimension() == 3 ? coupledGradient("disp_z") : _grad_zero), _grad_disp_x_old(_fe_problem.isTransient() ? coupledGradientOld("disp_x") : _grad_zero), _grad_disp_y_old(_fe_problem.isTransient() ? coupledGradientOld("disp_y") : _grad_zero), _grad_disp_z_old(_fe_problem.isTransient() && _mesh.dimension() == 3 ? coupledGradientOld("disp_z") : _grad_zero), _base_name(isParamValid("base_name") ? getParam<std::string>("base_name") + "_" : ""), _stress(declareProperty<RankTwoTensor>(_base_name + "stress")), _total_strain(declareProperty<RankTwoTensor>(_base_name + "total_strain")), _elastic_strain(declareProperty<RankTwoTensor>(_base_name + "elastic_strain")), _elasticity_tensor_name(_base_name + "elasticity_tensor"), _elasticity_tensor(declareProperty<RankFourTensor>(_elasticity_tensor_name)), _Jacobian_mult(declareProperty<RankFourTensor>(_base_name + "Jacobian_mult")), _Euler_angles(getParam<Real>("euler_angle_1"), getParam<Real>("euler_angle_2"), getParam<Real>("euler_angle_3")), _Cijkl(getParam<std::vector<Real>>("C_ijkl"), (RankFourTensor::FillMethod)(int)getParam<MooseEnum>("fill_method")), _prefactor_function(isParamValid("elasticity_tensor_prefactor") ? &getFunction("elasticity_tensor_prefactor") : NULL) { mooseDeprecated("EigenStrainBaseMaterial is deprecated. Please use the TensorMechanics " "plug-and-play system instead: " "http://mooseframework.org/wiki/PhysicsModules/TensorMechanics/" "PlugAndPlayMechanicsApproach/"); const std::vector<FunctionName> & fcn_names( getParam<std::vector<FunctionName>>("initial_stress")); const unsigned num = fcn_names.size(); if (!(num == 0 || num == 3 * 3)) mooseError( "Either zero or ", 3 * 3, " initial stress functions must be provided to TensorMechanicsMaterial. You supplied ", num, "\n"); _initial_stress.resize(num); for (unsigned i = 0; i < num; ++i) _initial_stress[i] = &getFunctionByName(fcn_names[i]); }