Beispiel #1
0
CHInterface::CHInterface(const std::string & name, InputParameters parameters) :
    DerivativeMaterialInterface<JvarMapInterface<Kernel> >(name, parameters),
    _kappa(getMaterialProperty<Real>("kappa_name")),
    _M(getMaterialProperty<Real>("mob_name")),
    _dMdc(getMaterialPropertyDerivative<Real>("mob_name", _var.name())),
    _d2Mdc2(getMaterialPropertyDerivative<Real>("mob_name", _var.name(), _var.name())),
    _second_u(second()),
    _second_test(secondTest()),
    _second_phi(secondPhi()),
    _nvar(_coupled_moose_vars.size()),
    _dMdarg(_nvar),
    _d2Mdcdarg(_nvar),
    _d2Mdargdarg(_nvar),
    _coupled_grad_vars(_nvar)
{
  // Iterate over all coupled variables
  for (unsigned int i = 0; i < _nvar; ++i)
  {
    //Set material property values
    _dMdarg[i] = &getMaterialPropertyDerivative<Real>("mob_name", _coupled_moose_vars[i]->name());
    _d2Mdcdarg[i] = &getMaterialPropertyDerivative<Real>("mob_name", _var.name(), _coupled_moose_vars[i]->name());
    _d2Mdargdarg[i].resize(_nvar);
    for (unsigned int j = 0; j < _nvar; ++j)
      _d2Mdargdarg[i][j] = &getMaterialPropertyDerivative<Real>("mob_name", _coupled_moose_vars[i]->name(), _coupled_moose_vars[j]->name());

    //Set coupled variable gradients
    _coupled_grad_vars[i] = &coupledGradient("args", i);
  }
}
Beispiel #2
0
RichardsFlux::RichardsFlux(const std::string & name,
                                             InputParameters parameters) :
    Kernel(name,parameters),
    _pp_name_UO(getUserObject<RichardsPorepressureNames>("porepressureNames_UO")),
    _pvar(_pp_name_UO.pressure_var_num(_var.index())),

    // This kernel gets lots of things from the material
    _viscosity(getMaterialProperty<std::vector<Real> >("viscosity")),
    _gravity(getMaterialProperty<RealVectorValue>("gravity")),
    _permeability(getMaterialProperty<RealTensorValue>("permeability")),

    _seff(getMaterialProperty<std::vector<Real> >("s_eff")), // not actually used
    _dseff(getMaterialProperty<std::vector<std::vector<Real> > >("ds_eff")),
    _d2seff(getMaterialProperty<std::vector<std::vector<std::vector<Real> > > >("d2s_eff")),

    _rel_perm(getMaterialProperty<std::vector<Real> >("rel_perm")),
    _drel_perm(getMaterialProperty<std::vector<Real> >("drel_perm")),
    _d2rel_perm(getMaterialProperty<std::vector<Real> >("d2rel_perm")),

    _density(getMaterialProperty<std::vector<Real> >("density")),
    _ddensity(getMaterialProperty<std::vector<Real> >("ddensity")),
    _d2density(getMaterialProperty<std::vector<Real> >("d2density")),

    _second_u(getParam<bool>("linear_shape_fcns") ? _second_zero : (_is_implicit ? _var.secondSln() : _var.secondSlnOld())),
    _second_phi(getParam<bool>("linear_shape_fcns") ? _second_phi_zero : secondPhi()),

    _tauvel_SUPG(getMaterialProperty<std::vector<RealVectorValue> >("tauvel_SUPG")),
    _dtauvel_SUPG_dgradp(getMaterialProperty<std::vector<RealTensorValue> >("dtauvel_SUPG_dgradp")),
    _dtauvel_SUPG_dp(getMaterialProperty<std::vector<RealVectorValue> >("dtauvel_SUPG_dp"))

{
}
Beispiel #3
0
CHInterface::CHInterface(const std::string & name, InputParameters parameters) :
    Kernel(name, parameters),
    _kappa_name(getParam<std::string>("kappa_name")),
    _mob_name(getParam<std::string>("mob_name")),
    _Dmob_name(getParam<std::string>("Dmob_name")),
    _grad_mob_name(getParam<std::string>("grad_mob_name")),
    _kappa(getMaterialProperty<Real>(_kappa_name)),
    _M(getMaterialProperty<Real>(_mob_name)),
    _has_MJac(getParam<bool>("has_MJac")),
    _DM(_has_MJac ? &getMaterialProperty<Real>(_Dmob_name) : NULL),
    _grad_M(getMaterialProperty<RealGradient>(_grad_mob_name)),
    _Dgrad_Mnp(_has_MJac ? &getMaterialProperty<RealGradient>("Dgrad_Mnp") : NULL),
    _Dgrad_Mngp(_has_MJac ? &getMaterialProperty<Real>("Dgrad_Mngp") : NULL),
    _second_u(second()),
    _second_test(secondTest()),
    _second_phi(secondPhi())
{
}
Beispiel #4
0
RichardsFlux::RichardsFlux(const InputParameters & parameters) :
    Kernel(parameters),
    _richards_name_UO(getUserObject<RichardsVarNames>("richardsVarNames_UO")),
    _pvar(_richards_name_UO.richards_var_num(_var.number())),

    // This kernel gets lots of things from the material
    _flux(getMaterialProperty<std::vector<RealVectorValue> >("flux")),
    _dflux_dv(getMaterialProperty<std::vector<std::vector<RealVectorValue> > >("dflux_dv")),
    _dflux_dgradv(getMaterialProperty<std::vector<std::vector<RealTensorValue> > >("dflux_dgradv")),
    _d2flux_dvdv(getMaterialProperty<std::vector<std::vector<std::vector<RealVectorValue> > > >("d2flux_dvdv")),
    _d2flux_dgradvdv(getMaterialProperty<std::vector<std::vector<std::vector<RealTensorValue> > > >("d2flux_dgradvdv")),
    _d2flux_dvdgradv(getMaterialProperty<std::vector<std::vector<std::vector<RealTensorValue> > > >("d2flux_dvdgradv")),

    _second_u(getParam<bool>("linear_shape_fcns") ? _second_zero : (_is_implicit ? _var.secondSln() : _var.secondSlnOld())),
    _second_phi(getParam<bool>("linear_shape_fcns") ? _second_phi_zero : secondPhi()),

    _tauvel_SUPG(getMaterialProperty<std::vector<RealVectorValue> >("tauvel_SUPG")),
    _dtauvel_SUPG_dgradv(getMaterialProperty<std::vector<std::vector<RealTensorValue> > >("dtauvel_SUPG_dgradv")),
    _dtauvel_SUPG_dv(getMaterialProperty<std::vector<std::vector<RealVectorValue> > >("dtauvel_SUPG_dv"))
{
}