Dear Getfem users,

(first I'm sorry about the first incomplete message...It was an accident)

I would like to solve the 2D Stokes flow around a half cylinder with
symmetry and Dirichlet inlet condition.

I started building my domain with a simple unit square structured mesh, in
which  I applied  this  geometric transformation:

x'=(Rcy+y^n*(Rex-Rcy))*cos((1-x)*pi);
y'=(Rcy+y^n*(Rex-Rcy))*sin((1-x)*pi);

that gives the following result:

 ______                      __
 |          |                  /        \
 |          |     ->       /      _      \
 |_____ |              |___/    \___|
                                   |-|         Rcy
                                   |------- |   Rex

Using the test example "stokes.cc" I was able to solve this problem with
this set of boundary conditions:

1)Body (half cylinder inside) : Homogeneous Dirichlet (no-slip)
2)Inlet  (half circular exterior boundary): Non Homogeneous Dirichlet
(U=1i+0j)
3)Botton (two straight segments): Homogeneous Neumann

This case has given me good results (the vtk plots looked what I expected),
but THEN when I tried to insert "homogeneous normal component Dirichlet
condition"  to  represent Symmetry on the two faces of the bottom, I got a
SEGMENTATION FAULT.

Here is the brick sequence I tried:

 // Linearized elasticity brick.
  getfem::mdbrick_isotropic_linearized_elasticity<> ELAS(mim, mf_u, 0.0,
nu);

  // Pressure term
  getfem::mdbrick_linear_incomp<> INCOMP(ELAS, mf_p);

  // Normal Dirichlet condition brick (symmetry).
  getfem::mdbrick_normal_component_Dirichlet<> pre_final_model(INCOMP,
NORMAL_DIRICHLET_BOUNDARY_NUM, mf_rhs);

  // Defining the Full Dirichlet condition value.
  plain_vector F(nb_dof_rhs * N);
  gmm::clear(F);
  for (size_type i = 0; i < nb_dof_rhs; ++i)
      gmm::copy(sol_u(mf_rhs.point_of_dof(i)),gmm::sub_vector(F,
gmm::sub_interval(i*N, N)));

  // Full Dirichlet condition brick (cylinder and inlet).
  getfem::mdbrick_Dirichlet<> final_model(pre_final_model,
FULL_DIRICHLET_BOUNDARY_NUM);
  final_model.rhs().set(mf_rhs,F);

  // Generic solve.
  cout << "Number of variables : " << final_model.nb_dof() << endl;
  getfem::standard_model_state MS(final_model);
  gmm::iteration iter(residual, 1, 40000);
  getfem::standard_solve(MS, final_model, iter);

  // Solution extraction
  gmm::copy(ELAS.get_solution(MS), U);

Do you guys see something MISSING or overconstraining the problem? any wrong
order?

What I'm thinking to try next is to use the generalized Dirichlet brick
prescribing the h(2x2) matrix and the u(2x1) vector all over the outer
boundaries......but I don't know if it is a good way...

Thanks a lot!!

Iago
_______________________________________________
Getfem-users mailing list
[email protected]
https://mail.gna.org/listinfo/getfem-users

Reply via email to