[Top][All Lists]

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

Re: [Getfem-users] How to apply hydraulic pressure on the boundary

From: Yves Renard
Subject: Re: [Getfem-users] How to apply hydraulic pressure on the boundary
Date: Tue, 30 Apr 2019 08:54:10 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

Dear Zhenghuai Guo,

The parameter you called "__fmal” is an _expression_ of the weak form language describing the quantity to be contracted against the unit normal vector representing the Neumann term. In fact

getfem::add_normal_source_term_brick(model, mim_1,"u_1", "(your _expression_)", boundary_top_1);

is equivalent to

getfem::add_source_term_brick(model, mim_1,"u_1","(your _expression_).Normal", boundary_top_1);

or even to

getfem::add_source_term(model, mim_1,"((your _expression_).Normal).Test_u_1", boundary_top_1);

Best regards,


Le 30/04/2019 à 06:38, Zhenghuai Guo a écrit :

Hi Yves,


Thank you very much for the advice. The “getfem::add_source_term_brick(model, mim_1,"u_1", "(your _expression_).Normal", boundary_top_1);” is extremely helpful – making the operation 100 times simpler.


Could you please let me know about the parameter “__fmal” in getfem::add_normal_source_term_brick? Where can I find the documentation or example for it?


Thank you very much


Zhenghuai Guo


From: Yves Renard <address@hidden>
Sent: Tuesday, April 30, 2019 12:42 AM
To: Zhenghuai Guo <address@hidden>; address@hidden
Cc: address@hidden; Konstantinos Poulios <address@hidden>
Subject: Re: How to apply hydraulic pressure on the boundary



Dear Zhenghuai Guo,


Yes, it shoudl work for __fmal = "F" and "u_1" the variable on which you add a source term. Alternatively, If you have an explicit _expression_, you can just use


getfem::add_source_term_brick(model, mim_1,"u_1", "(your _expression_).Normal", boundary_top_1);


Best regards,




Le 28/04/2019 à 12:14, Zhenghuai Guo a écrit :

Hi , Andriy and Yves and Konstantinos,


I would like to add a source term to represent the liquid hydraulic pressure acting on the boundary boundary_top_1. After some study of the getfem, I suspect I can do it as codes below. Could you please advise whether my thinking is right or not? Or is there another better way to do so – because I find it hard to get the outward unit normals according to the geometrical coordinates. Thank you very much.

Zhenghuai Guo


dim_type N = mesh1.dim();

getfem::mesh_fem mf_rhs(mesh1,N);

size_type nb_dof_rhs = mf_rhs.nb_basic_dof();

plain_vector F(nb_dof_rhs*N);

getfem::interpolation_function(mf_rhs, F, neumann_val, boundary_top_1);

model.add_initialized_fem_data("hydraylic_pressure", mf_rhs, F);

mf_rhs.set_finite_element(getfem::fem_descriptor("FEM_PK(2, 1)"));

model.add_initialized_scalar_data("hydraylic_pressure", pressure);

getfem::add_normal_source_term_brick(model, mim_1,"u_1",__fmal, boundary_top_1);


where neumann_val  is a function which gives the hydraulic pressure * outward unit normal at the point x on the boundary:

base_small_vector neumann_val(const base_node &x)

{ return hydraulic pressure * ourward unit normal at x; }



  Yves Renard (address@hidden)       tel : (33)
  20, rue Albert Einstein
  69621 Villeurbanne Cedex, FRANCE


  Yves Renard (address@hidden)       tel : (33)
  20, rue Albert Einstein
  69621 Villeurbanne Cedex, FRANCE


reply via email to

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