getfem-users
[Top][All Lists]
Advanced

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

Re: [Getfem-users] Define a scalar variable computed over a surface


From: Konstantinos Poulios
Subject: Re: [Getfem-users] Define a scalar variable computed over a surface
Date: Thu, 26 Apr 2018 14:08:58 +0200

Dear David,

If you use C++, here is some sample code that could help you:

      getfem::ga_workspace workspace(md);
      workspace.add_expression("1", mim, B_BOUNDARY, 0);
      workspace.assembly(0);
      scalar_type area = workspace.assembled_potential();
      workspace.clear_expressions();
      workspace.add_expression("u(1)", mim, B_BOUNDARY, 0);
      workspace.assembly(0);
      scalar_type dx = workspace.assembled_potential()/area;

This snippet finds the displacement dx of the centroid of a mesh region B_BOUNDARY due to a displacement field u.

Best regards
Kostas


On Thu, Apr 26, 2018 at 10:03 AM, David Danan <address@hidden> wrote:
Dear GetFEM++ users,

i was wondering whether it was possible to define a scalar variable computed over a surface, namely in my case a volume bounded by surfaces.

That is to say, something along the lines of
Volume= (1/3) int_{Gamma} Det(Grad_u+Id(3)) Normal.Inv(Grad_u+Id(3)).(X+u) dGamma
where we denote by:
-Gamma, the surfaces in the undeformed configuration
-u, the displacement field
-X, the position in the undeformed configuration

Also, out of curiosity, is it possible to compute such a thing in post-processing?

Thanks in advance,
David.


reply via email to

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