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,
Yves
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 ([email protected]) tel : (33) 04.72.43.87.08
INSA-Lyon
20, rue Albert Einstein
69621 Villeurbanne Cedex, FRANCE
http://math.univ-lyon1.fr/~renard
---------