Hi Narendra
We should probably put something like this in step-49. Here is a bit of
code that shows how to use the TFI manifold class:
#include <deal.II/grid/grid_generator.h>
#include <deal.II/grid/grid_out.h>
#include <deal.II/grid/manifold_lib.h>
#include <deal.II/grid/tria.h>
int main()
{
using namespace dealii;
Triangulation<2> tria;
GridGenerator::hyper_cube_with_cylindrical_hole (tria, 0.05, 0.1);
const types::manifold_id tfi_id = 1;
for (const auto cell : tria.active_cell_iterators())
{
// set all non-boundary manifold ids to the new TFI manifold id.
cell->set_manifold_id(tfi_id);
for (unsigned int face_n = 0; face_n < GeometryInfo<2>::faces_per_cell
;
++face_n)
{
if (!cell->face(face_n)->at_boundary())
cell->face(face_n)->set_manifold_id(tfi_id);
}
}
TransfiniteInterpolationManifold<2> inner_manifold;
inner_manifold.initialize(tria);
tria.set_manifold(1, inner_manifold);
tria.refine_global(2);
GridOut go;
std::ofstream out("grid.eps");
go.write_eps(tria, out);
}
This creates a nice blend between the inner circle and the outer square.
>From here you can do something like what is done in step-49 to generate the
rest of the grid from Cartesian pieces.
If you are using 8.5 instead of 9.0 you will need to make all Manifold
classes (including putting your own PolarManifold on the circle) before the
Triangulation.
I hope this helps!
Thanks,
David Wells
On Monday, May 21, 2018 at 7:06:19 PM UTC-4, Narendra Nanal wrote:
>
> Hello All,
>
> I am trying to run benchmark case of 2D flow around a cylinder. Here are
> the details-
>
> http://www.featflow.de/en/benchmarks/cfdbenchmarking/flow/dfg_benchmark1_re20.html
> .
> My question is how to use Transfinite Interpolation class to generate a
> mesh with a smooth transition. Thank you.
>
> Regards,
> Narendra
>
--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see
https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.