Dear all,
I’m developing a data assimilation method with hybrid velocity boundary conditions based on ASPECT. To study the internal stress in the continental plates, I’m trying to fix the boundary velocities on the top surface above oceanic plates and apply a free slip boundary condition for the top surface above continental lithosphere. To realize the purpose, I add such a function in Simulator class:
template <int dim>
void
Simulator <dim>::update_hybrid_vbc_boundary_ids()
{
const std::vector<Point<dim>> points = finite_element.get_unit_support_points();
const Quadrature<dim> quadrature(points);
FEValues<dim> fe_values (finite_element, quadrature, update_quadrature_points);
typename DoFHandler<dim>::active_cell_iterator cell;
for (cell = dof_handler.begin_active();
cell != dof_handler.end(); ++cell)
{
if (!cell->is_artificial())
{
for (const unsigned int face_number : cell->face_indices())
{
const typename DoFHandler<dim>::face_iterator face = cell->face(face_number);
if (face->at_boundary())
{
if (face->boundary_id() != 0)
{
face->set_boundary_id(1);
fe_values.reinit(cell);
for (unsigned int q = 0; q < quadrature.size(); ++q)
{
const Point<dim> position = fe_values.quadrature_point(q);
const double lithosphere_age = get_lithosphere_age (position);
const double distance_from_trench = get_distance_from_trench (position);
if (!(lithosphere_age < 400 && std::abs(distance_from_trench) > 0.4))
{
face->set_boundary_id(2);
break;
}
}
}
}
}
}
}
}
The function get_lithosphere_age is to determine oceanic or continental plates and the function get_distance_from_trench is to determine the distance of a point from the trench. The top surface is divided into two boundaries, 1 and 2. One for the gplates boundary and one for the free slip boundary.
However, the results show that the velocities have been applied into the results, but not constrained in the linear systems (see the Figure).
I’d like to know how to apply the hybrid velocity boundary conditions correctly.
Thanks a lot!


