getfem-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Getfem-users] Message3 - [Fwd: Getfem-users Digest, Vol 89, Issue 6]


From: Sebastien . Court
Subject: [Getfem-users] Message3 - [Fwd: Getfem-users Digest, Vol 89, Issue 6]
Date: Wed, 22 Jan 2014 13:33:01 +0100
User-agent: SquirrelMail/1.4.22

Dear Irene,

I have just read your question about a Stokes problem with an internal
obstacle.
I think that an object like "partial_mesh_fem" is more adapted than a
"mesh_fem_level_set" object for what you want to do.
Indeed the partial_mesh_fem object is - by construction - cut by the
level-set (via a mesh_im_level_set object which selects the elements to
keep), but not the mesh_fem_level_set object. However, you can cut this
latter with a range_basis algorithm in order to reduce it to your
computational domain (see /tests/crack.cc for instance).

You can find attached to this message a "clean" version of the code which
is in this path : /contrib/xfem_contact/xfem_stokes.cc
It concerns a fictitious domain approach for solving a Stokes problem
around a circle. The vtk file does not take into account what is inside
the circle.

Best regards,

Sébastien Court


http://sebastien.court.math.free.fr/

---------------------------- Original Message ----------------------------
Subject: Getfem-users Digest, Vol 89, Issue 6
From:    address@hidden
Date:    Wed, January 22, 2014 12:00 pm
To:      address@hidden
--------------------------------------------------------------------------

Send Getfem-users mailing list submissions to
        address@hidden

To subscribe or unsubscribe via the World Wide Web, visit
        https://mail.gna.org/listinfo/getfem-users
or, via email, send a message with subject or body 'help' to
        address@hidden

You can reach the person managing the list at
        address@hidden

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Getfem-users digest..."


Today's Topics:

   1. Re: pointwise constraints failed (Yves Renard)
   2. Re: add pointwise load on one node (Yves Renard)
   3. Level set (ing.ire)
   4. Re: Level set (Andriy Andreykiv)


----------------------------------------------------------------------

Message: 1
Date: Tue, 21 Jan 2014 17:51:00 +0100
From: Yves Renard <address@hidden>
To: address@hidden
Subject: Re: [Getfem-users] pointwise constraints failed
Message-ID: <address@hidden>
Content-Type: text/plain; charset="iso-8859-1"

Dear Wen,

If it is a 2D elastostatic problem, you have 3 rigid displacements (2
translations and 1 rotation). So you have to prescribe 3 constraints.
The constraints you added only prescribe the two translations. So, you
have to add another points for instance [0,1] with the direction [1 0]
if it is inside the domain, of course.

Yves.




Le 20/01/2014 16:48, Wen Jiang a ?crit :
> Dear all,
>
> I was trying to add the pointwise constraints for a pure Neumann
> problem. In elastostatic.cc example, I eliminated the Dirichelet bc's
> and added pointwise constraints, see below
>
> /***************************************************************/
> /* top and bottom are selected as Neumann bc's*/
>  void elastostatic_problem::select_boundaries(void) {
>      size_type N = mesh.dim();
>      getfem::mesh_region border_faces;
>      getfem::outer_faces_of_mesh(mesh, border_faces);
>      for (getfem::mr_visitor i(border_faces); !i.finished(); ++i) {
>          base_node un = mesh.normal_of_face_of_convex(i.cv
> <http://i.cv>(), i.f());
>          un /= gmm::vect_norm2(un);
>          if (gmm::abs(un[0] - 0.0) < 0.1) { // new Neumann face
>              mesh.region(NEUMANN_BOUNDARY_NUM).add(i.cv
> <http://i.cv>(), i.f());
>          }
>      }
>  }
> /***************************************************************/
>
> /***************************************************************/
> /* add pointwise constraint
>    fixed the x and y components of (0.0,0.0) point */
>
>   std::vector<scalar_type> cpoints(4);
>   cpoints[0] = 0.0; cpoints[1] = 0.0;
>   cpoints[2] = 0.0; cpoints[3] = 0.0;
>   std::vector<scalar_type> cunitv(4);
>   cunitv[0] = 1.0; cunitv[1] = 0.0;
>   cunitv[2] = 0.0; cunitv[3] = 1.0;
>   model.add_initialized_fixed_size_data("cpoints", cpoints);
>   model.add_initialized_fixed_size_data("cunitv",cunitv);
>
> getfem::add_pointwise_constraints_with_multipliers(model,"u","cpoints","cunitv");
> /***************************************************************/
>
>
> The output is
> /***************************************************************/
> Number of dof for u: 51842
> Total number of variables : 51844
> Trace 2 in ../getfem_models.cc, line 3265: Stiffness matrix assembly
> for isotropic linearized elasticity
> Trace 2 in ../getfem_models.cc, line 1522: Source term assembly
> Trace 2 in ../getfem_models.cc, line 1657: source term assembly
> Level 1 Warning in ../getfem_superlu.cc, line 216: SuperLU solve
> failed: info =51845condition number: 8.47747e+17
>
> terminate called after throwing an instance of 'gmm::gmm_error'
>   what():  Error in ../elastostatic.cc, line 542 int main(int, char**):
> Solve has failed
> /***************************************************************/
>
> It seems that the rigid displacements are not correctly enforced.
> Could anyone tell me where I was wrong? Thanks.
>
> Regards,
> Wen
>
>
> _______________________________________________
> Getfem-users mailing list
> address@hidden
> https://mail.gna.org/listinfo/getfem-users


-- 

  Yves Renard (address@hidden)       tel : (33) 04.72.43.87.08
  Pole de Mathematiques, INSA-Lyon             fax : (33) 04.72.43.85.29
  20, rue Albert Einstein
  69621 Villeurbanne Cedex, FRANCE
  http://math.univ-lyon1.fr/~renard

---------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: </public/getfem-users/attachments/20140121/993db86d/attachment.html>

------------------------------

Message: 2
Date: Tue, 21 Jan 2014 17:53:13 +0100
From: Yves Renard <address@hidden>
To: address@hidden
Subject: Re: [Getfem-users] add pointwise load on one node
Message-ID: <address@hidden>
Content-Type: text/plain; charset="iso-8859-1"


The source term brick accept "explicit rhs". An explicit rhs correspond
to nodal forces in elastostatic problems. So you have to add an explicit
rhs with a vector having all the components equal to zero except the
degree of freedom you where you want to add a pointwise load.

Yves.


Le 20/01/2014 17:06, Wen Jiang a ?crit :
> Dear all,
>
> Could anyone tell me how to add  pointwise-load on one node in
> getfem++? Thanks.
>
> Regards,
> Wen
>
>
> _______________________________________________
> Getfem-users mailing list
> address@hidden
> https://mail.gna.org/listinfo/getfem-users


-- 

  Yves Renard (address@hidden)       tel : (33) 04.72.43.87.08
  Pole de Mathematiques, INSA-Lyon             fax : (33) 04.72.43.85.29
  20, rue Albert Einstein
  69621 Villeurbanne Cedex, FRANCE
  http://math.univ-lyon1.fr/~renard

---------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: </public/getfem-users/attachments/20140121/46866c13/attachment.html>

------------------------------

Message: 3
Date: Wed, 22 Jan 2014 10:30:47 +0100
From: "ing.ire" <address@hidden>
To: address@hidden
Subject: [Getfem-users] Level set
Message-ID:
        <address@hidden>
Content-Type: text/plain; charset="iso-8859-1"

Hello,
I'm using getfem to solve Stokes problem in a cube (as in tests/stokes.cc),
but I want to put a sphere inside the cube, as if it was a solid particle
in a volume of fluid, so I don't want to solve stokes inside the sphere.
I'm using level-sets to cut the mesh and the option INTEGRATE_OUTSIDE to
solve the problem only outside the region cut by the level set function.
How can I set no-slip boundary conditions on the sphere, i.e. Dirichlet
condition?
Is there any way to export the cut mesh in vtk? I tried with

getfem::vtk_export vtkp("stokes.vtk");
vtkp.exporting(mfls);
vtkp.write_mesh();

where mfls is a mesh_fem_level_set object, but loading the stokes.vtk file
in paraview I see the whole mesh, and no sign of the cut.

Thank you in advance.
Irene
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </public/getfem-users/attachments/20140122/64a24f5b/attachment.html>

------------------------------

Message: 4
Date: Wed, 22 Jan 2014 10:51:13 +0100
From: Andriy Andreykiv <address@hidden>
To: "ing.ire" <address@hidden>
Cc: "address@hidden" <address@hidden>
Subject: Re: [Getfem-users] Level set
Message-ID:
        <address@hidden>
Content-Type: text/plain; charset="windows-1252"

Dear Irene,

I understand that the surface of the sphere is not conforming to the mesh
of the cube, right?
So you want to impose no-slip boundary conditions through the mesh of the
cube.
I know two ways to do it.
 One through pure fictitious domain method, and the other through
fictitious domain method with XFem.
For the second you can look into implementation of
contrib/xfem_contact/xfem_dirichlet.cc
(you can find it in your Getfem installation).
Pure fictitious domain method (with LS integration, as you mentioned it) is
described in detail in:
Legay A, Chessa J, Belytschko T. An Eulerian?Lagrangian method for fluid
structure interaction based on level sets.
Computer Methods in Applied Mechanics and Engineering 2006;
195(17?18):2070?2087.
It's also possible to implement it in Getfem as well. A similar Level set
based fictitious domain contact algorithm exists in Getfem and you can see
the example of it usage in contrib/level_set_contact (it has a reference to
the corresponding article inside)

Regarding the post-processing, I think you should use the technique of
slices, as it's used in XFem examples of Getfem (although I've never used
it myself).

Best regards,
                       Andriy


On 22 January 2014 10:30, ing.ire <address@hidden> wrote:

> Hello,
> I'm using getfem to solve Stokes problem in a cube (as in
> tests/stokes.cc), but I want to put a sphere inside the cube, as if it was
> a solid particle in a volume of fluid, so I don't want to solve stokes
> inside the sphere. I'm using level-sets to cut the mesh and the option
> INTEGRATE_OUTSIDE to solve the problem only outside the region cut by the
> level set function.
> How can I set no-slip boundary conditions on the sphere, i.e. Dirichlet
> condition?
> Is there any way to export the cut mesh in vtk? I tried with
>
> getfem::vtk_export vtkp("stokes.vtk");
> vtkp.exporting(mfls);
> vtkp.write_mesh();
>
> where mfls is a mesh_fem_level_set object, but loading the stokes.vtk file
> in paraview I see the whole mesh, and no sign of the cut.
>
> Thank you in advance.
> Irene
>
> _______________________________________________
> Getfem-users mailing list
> address@hidden
> https://mail.gna.org/listinfo/getfem-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </public/getfem-users/attachments/20140122/6e3ecc38/attachment.html>

------------------------------

_______________________________________________
Getfem-users mailing list
address@hidden
https://mail.gna.org/listinfo/getfem-users


End of Getfem-users Digest, Vol 89, Issue 6
*******************************************

Attachment: xfem_stokes.cc
Description: Text document

Attachment: xfem_stokes.param
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]