getfem-users
[Top][All Lists]
Advanced

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

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


From: Zhenghuai Guo
Subject: [Getfem-users] How to apply hydraulic pressure on the boundary
Date: Sun, 28 Apr 2019 10:14:55 +0000

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; }

 


reply via email to

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