示例#1
0
Order
ScalarCoupleable::coupledScalarOrder(const std::string & var_name, unsigned int comp)
{
  if (!isCoupledScalar(var_name, comp))
    return _sc_fe_problem.getMaxScalarOrder();

  return getScalarVar(var_name, comp)->order();
}
示例#2
0
VariableValue &
ScalarCoupleable::coupledScalarValueOld(const std::string & var_name, unsigned int comp)
{
  if (!isCoupledScalar(var_name, comp))
    return *getDefaultValue(var_name);

  MooseVariableScalar * var = getScalarVar(var_name, comp);
  return (_sc_is_implicit) ? var->slnOld() : var->slnOlder();
}
示例#3
0
VariableValue &
ScalarCoupleable::coupledScalarValueOlder(const std::string & var_name, unsigned int comp)
{
  checkVar(var_name);
  if (!isCoupledScalar(var_name, comp))
    return *getDefaultValue(var_name);

  validateExecutionerType(var_name, "coupledScalarValueOlder");
  MooseVariableScalar * var = getScalarVar(var_name, comp);
  if (_sc_is_implicit)
    return var->slnOlder();
  else
    mooseError("Older values not available for explicit schemes");
}
示例#4
0
NonlinearPlaneStrain::NonlinearPlaneStrain( SolidModel & solid_model,
                                            const std::string & name,
                                            const InputParameters & parameters )
  :Nonlinear( solid_model, name, parameters ),
   ScalarCoupleable(parameters),
   _grad_disp_x(coupledGradient("disp_x")),
   _grad_disp_y(coupledGradient("disp_y")),
   _have_strain_zz(isCoupled("strain_zz")),
   _strain_zz(_have_strain_zz?coupledValue("strain_zz"):_zero),
   _have_scalar_strain_zz(isCoupledScalar("scalar_strain_zz")),
   _scalar_strain_zz(_have_scalar_strain_zz?coupledScalarValue("scalar_strain_zz"):_zero),
   _grad_disp_x_old(coupledGradientOld("disp_x")),
   _grad_disp_y_old(coupledGradientOld("disp_y")),
   _strain_zz_old(_have_strain_zz?coupledValueOld("strain_zz"):_zero),
   _scalar_strain_zz_old(_have_scalar_strain_zz?coupledScalarValueOld("scalar_strain_zz"):_zero)
{
}
示例#5
0
PlaneStrain::PlaneStrain(SolidModel & solid_model,
                         const std::string & name,
                         const InputParameters & parameters)
  :Element(solid_model, name, parameters),
   ScalarCoupleable(&solid_model),
   _large_strain(solid_model.getParam<bool>("large_strain")),
   _grad_disp_x(coupledGradient("disp_x")),
   _grad_disp_y(coupledGradient("disp_y")),
   _have_strain_zz(isCoupled("strain_zz")),
   _strain_zz(_have_strain_zz?coupledValue("strain_zz"):_zero),
   _have_scalar_strain_zz(isCoupledScalar("scalar_strain_zz")),
   _scalar_strain_zz(_have_scalar_strain_zz?coupledScalarValue("scalar_strain_zz"):_zero),
   _volumetric_locking_correction(solid_model.getParam<bool>("volumetric_locking_correction"))
{
  if (_have_strain_zz && _have_scalar_strain_zz)
      mooseError("Must define only one of strain_zz or scalar_strain_zz");
}
ComputePlaneIncrementalStrain::ComputePlaneIncrementalStrain(const InputParameters & parameters)
  : Compute2DIncrementalStrain(parameters),
    _scalar_out_of_plane_strain_coupled(isCoupledScalar("scalar_out_of_plane_strain")),
    _scalar_out_of_plane_strain(_scalar_out_of_plane_strain_coupled
                                    ? coupledScalarValue("scalar_out_of_plane_strain")
                                    : _zero),
    _scalar_out_of_plane_strain_old(_scalar_out_of_plane_strain_coupled
                                        ? coupledScalarValueOld("scalar_out_of_plane_strain")
                                        : _zero),
    _out_of_plane_strain_coupled(isCoupled("out_of_plane_strain")),
    _out_of_plane_strain(_out_of_plane_strain_coupled ? coupledValue("out_of_plane_strain")
                                                      : _zero),
    _out_of_plane_strain_old(_out_of_plane_strain_coupled ? coupledValueOld("out_of_plane_strain")
                                                          : _zero)
{
  if (_out_of_plane_strain_coupled && _scalar_out_of_plane_strain_coupled)
    mooseError("Must define only one of out_of_plane_strain or scalar_out_of_plane_strain");
}
示例#7
0
ComputePlaneFiniteStrain::ComputePlaneFiniteStrain(const InputParameters & parameters) :
    Compute2DFiniteStrain(parameters),
    _scalar_strain_zz(isCoupledScalar("scalar_strain_zz") ? coupledScalarValue("scalar_strain_zz") : _zero),
    _scalar_strain_zz_old(isCoupledScalar("scalar_strain_zz") ? coupledScalarValueOld("scalar_strain_zz") : _zero)
{
}