double length;
double height;
- double disc_position;
- double disc_diameter;
+ double disk_position;
+ double disk_diameter;
unsigned int refinement;
};
height = 2.;
add_parameter("height", height, "height of computational domain");
- disc_position = 0.6;
+ disk_position = 0.6;
add_parameter("object position",
- disc_position,
- "x position of immersed disc center point");
+ disk_position,
+ "x position of immersed disk center point");
- disc_diameter = 0.5;
+ disk_diameter = 0.5;
add_parameter("object diameter",
- disc_diameter,
- "diameter of immersed disc");
+ disk_diameter,
+ "diameter of immersed disk");
refinement = 5;
add_parameter("refinement",
//
// The <code>setup()</code> function is the last class member that has to
// be implemented. It creates the actual triangulation that is a
- // benchmark configuration consisting of a channel with a disc obstacle, see
+ // benchmark configuration consisting of a channel with a disk obstacle, see
// @cite GuermondEtAl2018. We construct the geometry by modifying the
// mesh generated by GridGenerator::hyper_cube_with_cylindrical_hole().
// We refer to step-49, step-53, and step-54 for an overview how to
// create advanced meshes.
// We first create 4 temporary (non distributed) coarse triangulations
// that we stitch together with the GridGenerator::merge_triangulation()
- // function. We center the disc at $(0,0)$ with a diameter of
- // <code>disc_diameter</code>. The lower left corner of the channel has
- // coordinates (<code>-disc_position</code>, <code>-height/2</code>) and
- // the upper right corner has (<code>length-disc_position</code>,
+ // function. We center the disk at $(0,0)$ with a diameter of
+ // <code>disk_diameter</code>. The lower left corner of the channel has
+ // coordinates (<code>-disk_position</code>, <code>-height/2</code>) and
+ // the upper right corner has (<code>length-disk_position</code>,
// <code>height/2</code>).
template <int dim>
void Discretization<dim>::setup()
Triangulation<dim> tria1, tria2, tria3, tria4;
GridGenerator::hyper_cube_with_cylindrical_hole(
- tria1, disc_diameter / 2., disc_diameter, 0.5, 1, false);
+ tria1, disk_diameter / 2., disk_diameter, 0.5, 1, false);
GridGenerator::subdivided_hyper_rectangle(
tria2,
{2, 1},
- Point<2>(-disc_diameter, disc_diameter),
- Point<2>(disc_diameter, height / 2.));
+ Point<2>(-disk_diameter, disk_diameter),
+ Point<2>(disk_diameter, height / 2.));
GridGenerator::subdivided_hyper_rectangle(
tria3,
{2, 1},
- Point<2>(-disc_diameter, -disc_diameter),
- Point<2>(disc_diameter, -height / 2.));
+ Point<2>(-disk_diameter, -disk_diameter),
+ Point<2>(disk_diameter, -height / 2.));
GridGenerator::subdivided_hyper_rectangle(
tria4,
{6, 4},
- Point<2>(disc_diameter, -height / 2.),
- Point<2>(length - disc_position, height / 2.));
+ Point<2>(disk_diameter, -height / 2.),
+ Point<2>(length - disk_position, height / 2.));
GridGenerator::merge_triangulations({&tria1, &tria2, &tria3, &tria4},
triangulation,
triangulation.set_manifold(0, PolarManifold<2>(Point<2>()));
// We have to fix up the left edge that is currently located at
- // $x=-$<code>disc_diameter</code> and has to be shifted to
- // $x=-$<code>disc_position</code>. As a last step the boundary has to
+ // $x=-$<code>disk_diameter</code> and has to be shifted to
+ // $x=-$<code>disk_position</code>. As a last step the boundary has to
// be colorized with <code>Boundaries::do_nothing</code> on the right,
// <code>dirichlet</code> on the left and <code>free_slip</code> on the
// upper and lower outer boundaries and the obstacle.
{
for (unsigned int v = 0; v < GeometryInfo<dim>::vertices_per_cell; ++v)
{
- if (cell->vertex(v)[0] <= -disc_diameter + 1.e-6)
- cell->vertex(v)[0] = -disc_position;
+ if (cell->vertex(v)[0] <= -disk_diameter + 1.e-6)
+ cell->vertex(v)[0] = -disk_position;
}
}
{
const auto center = face->center();
- if (center[0] > length - disc_position - 1.e-6)
+ if (center[0] > length - disk_position - 1.e-6)
face->set_boundary_id(Boundaries::do_nothing);
- else if (center[0] < -disc_position + 1.e-6)
+ else if (center[0] < -disk_position + 1.e-6)
face->set_boundary_id(Boundaries::dirichlet);
else
face->set_boundary_id(Boundaries::free_slip);