@@ -3525,6 +3525,10 @@ std::cout<<"Preparing interpolated solution for restart"<<std::endl;
35253525 {
35263526 working_map_points(3*i) = comp_dom.old_map_points(3*i);
35273527 working_map_points(3*i+1) = comp_dom.old_map_points(3*i+1);
3528+ if (comp_dom.flags[i] & near_inflow)
3529+ {
3530+ working_map_points(3*i+2) = comp_dom.old_map_points(3*i+2);
3531+ }
35283532 }
35293533 else if ( !(comp_dom.flags[i] & near_water) &&
35303534 (comp_dom.flags[i] & boat) &&
@@ -5297,6 +5301,11 @@ int FreeSurface<dim>::residual_and_jacobian(const double t,
52975301 working_map_points(3*i+1) = comp_dom.old_map_points(3*i+1);
52985302 jacobian_matrix.add(3*i,3*i,1.0);
52995303 jacobian_matrix.add(3*i+1,3*i+1,1.0);
5304+ if (comp_dom.flags[i] & near_inflow)
5305+ {
5306+ working_map_points(3*i+2) = comp_dom.old_map_points(3*i+2);
5307+ jacobian_matrix.add(3*i+2,3*i+2,1.0);
5308+ }
53005309 //cout<<"& "<<3*i<<" "<<3*i+1<<endl;
53015310 }
53025311 else if ( !(comp_dom.flags[i] & near_water) &&
@@ -6784,12 +6793,14 @@ int FreeSurface<dim>::residual_and_jacobian(const double t,
67846793 { //cout<<q<<" "<<phi_dot_rhs_fun[q].val()<<endl;
67856794 fad_double wave_damping_pressure = 0.0;
67866795 //if (comp_dom.no_boat && q_point(0).val() > 0.0)
6787- // wave_damping_pressure = -fad_double(1)*pow(q_point(0).val(),2.0)/pow(50.0,2.0)*q_dphi_dn;
6796+ fad_double Lx_boat = comp_dom.boat_model.boatWetLength;
6797+ if (q_point(0).val() > Lx_boat*2.0)
6798+ wave_damping_pressure = -fad_double(1.0)*pow(q_point(0).val()-Lx_boat*2.0,2.0)/pow(Lx_boat*4.0,2.0)*q_dphi_dn;
67886799
67896800 eta_dot_rhs_fun[q] = phi_grad*Point<3,fad_double>(fad_double(0.0),fad_double(0.0),fad_double(1.0)) +
67906801 eta_grad*(q_nodes_vel-fluid_vel[q]);
67916802 phi_dot_rhs_fun[q] = phi_grad*phi_grad/2 - q_point*gg + phi_surf_grad_corrected*(q_nodes_vel-fluid_vel[q])-
6792- breaking_wave_added_pressure;
6803+ breaking_wave_added_pressure +
67936804 + (1-eta_dry)*fad_double(g*q_init(2)) + wave_damping_pressure;
67946805 //if ( (q_point(0).val() < 3.10) && (q_point(0).val() > 3.03) &&
67956806 // (q_point(1).val() < 0.12) && (q_point(1).val() > 0) &&
@@ -8209,8 +8220,9 @@ Vector<double> & FreeSurface<dim>::differential_components()
82098220 }
82108221 // all other are edges dofs and have first and second algebraic components, third is differential
82118222 else
8212- {// only exception is when node is a transom_on_water node. in such case it's all algebraic
8213- if (comp_dom.vector_flags[3*i] & transom_on_water)
8223+ {// only exception is when node is a transom_on_water and near_inflow nodes. in such case it's all algebraic
8224+ if (comp_dom.vector_flags[3*i] & transom_on_water ||
8225+ comp_dom.vector_flags[3*i] & near_inflow)
82148226 {
82158227 for (unsigned int j=0; j<dim; ++j)
82168228 {
0 commit comments