Dear Wolfgang Sorry for late response. Due to internet censorship in Iran, I didn't have access to google group for few days. I consider a specific region on triangulation for Neumann BC (a force vector in 3D space). There must be some mistakes in my program, but I couldn't figure out.
I tried to follow your instruction on: https://groups.google.com/g/dealii/c/_4eeywhhxk4/m/myLiTWCqBgAJ . So, I used this: for (unsigned int i = 0; i < dofs_per_cell; ++i) { for (unsigned int q_point = 0; q_point < n_face_q_points ; ++q_point) { const Tensor<1,dim> n = fe_face_values.normal_vector(q_point); cell_rhs (i)+=( (n*traction_component*fe_face_values.shape_value(i, q_point))* fe_face_values.JxW(q_point)); }//for q_point }//for dof_per_cell But in computation of cell rhs i get this error: /home/amir/eclipse-workspace/mech1/mech.cc:983:22: error: no match for ‘operator+=’ (operand types are ‘double’ and ‘dealii::Tensor<1, 3>’) 983 | cell_rhs (i)+=( (n*traction_component*fe_face_values.shape_value(i, q_point))* | ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 984 | fe_face_values.JxW(q_point)); As error says, the normal vector with 3 component cannot be multiplied by double values in other terms. Additionally, my traction component (for example in x-direction) is preserved for dofs of other directions. I know these mistakes, but I cannot figure out proper solution for them. I have read steps 7, 18, 20, 21 and also reviewed lectures 21.~21.65. But I couldn't find similar codes. Thanks for your consideration. Best regards Amir On Thursday, July 13, 2023 at 4:43:37 AM UTC+3:30 Wolfgang Bangerth wrote: > On 7/11/23 05:32, Mohammad Amir Kiani Fordoei wrote: > > Screenshot from 2023-07-11 14-01-30.png > > As I understood, I just need to specify a boundary_id on triangulation > and > > apply traction force on that with code like this: > > { - loop over cells > > -loop over faces per cell && controlling being at_boundary > > -loop over quadrature points of face > > -loop over dof per cell && controlling intended boundary_id_NBC > > -finally adding this term to rhs as > > cell_rhs (i)+= > > (fe_face_values.shape_value (i,q_point) > > > > *traction_component > > > > *fe_face_values.JxW(q_point));} > > But, I didn't see noticble variation of displacement or norm of stress > in my > > solution, even for large traction force. > > is it necessary to multiply traction_component to "* present_timestep * > > velocity " (like Dirichlet BC displacement)? (I tried this too, but > similar to > > previous one no significant effect of load was observed.) > > Is this a boundary where you are still *also* applying a prescribed > displacement? You can only do one or the other. > > Best > W. > > -- > ------------------------------------------------------------------------ > Wolfgang Bangerth email: [email protected] > www: http://www.math.colostate.edu/~bangerth/ > > > -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/7f105f4d-a4eb-473d-8396-9a4190c2ab14n%40googlegroups.com.
