Example #1
0
void upper_tether_force_function(VectorValue<double>& F,
                                 const TensorValue<double>& /*FF*/,
                                 const libMesh::Point& X,
                                 const libMesh::Point& s,
                                 Elem* const /*elem*/,
                                 const vector<NumericVector<double>*>& /*system_data*/,
                                 double /*time*/,
                                 void* /*ctx*/)
{
    if (s(0) > 5.0 && s(0) < 10.0)
    {
        F.zero();
    }
    else
    {
        F = kappa_s * (s - X);
    }
    return;
} // upper_tether_force_function
Example #2
0
// Tether (penalty) force function for the thin beam.
void beam_tether_force_function(VectorValue<double>& F,
                                const TensorValue<double>& /*FF*/,
                                const libMesh::Point& X,
                                const libMesh::Point& s,
                                Elem* const /*elem*/,
                                const vector<NumericVector<double>*>& /*system_data*/,
                                double /*time*/,
                                void* /*ctx*/)
{
    const double r = sqrt((s(0) - 0) * (s(0) - 0));
    if (r <= fixed_L)
    {
        F = kappa_s * (s - X);
    }
    else
    {
        F.zero();
    }
    return;
} // beam_tether_force_function
Example #3
0
void
beam_tether_force_function(VectorValue<double>& F,
                           const TensorValue<double>& /*FF*/,
                           const libMesh::Point& X,
                           const libMesh::Point& s,
                           Elem* const /*elem*/,
                           const unsigned short int side,
                           const vector<NumericVector<double>*>& /*system_data*/,
                           double /*time*/,
                           void* /*ctx*/)
{
    if (side == 1 || side == 3)
    {
        F = beam_kappa_s * (s - X);
    }
    else
    {
        F.zero();
    }
    return;
} // beam_tether_force_function