Skip to content

Commit 1acaaa8

Browse files
authored
Merge pull request #655 from ZhentongWang/Eulerian_codes_update
modify the velocity in wall boundary condition in a general form.
2 parents 129179c + c75ceb2 commit 1acaaa8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/shared/particle_dynamics/fluid_dynamics/eulerian_fluid_dynamics/eulerian_fluid_integration.hpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,14 +65,15 @@ void EulerianIntegration1stHalf<Contact<Wall>, RiemannSolverType>::interaction(s
6565
{
6666
StdLargeVec<Vecd> &n_k = *(wall_n_[k]);
6767
StdLargeVec<Real> &Vol_k = *(wall_Vol_[k]);
68+
StdLargeVec<Vecd> &vel_ave_k = *(wall_vel_ave_[k]);
6869
Neighborhood &wall_neighborhood = (*contact_configuration_[k])[index_i];
6970
for (size_t n = 0; n != wall_neighborhood.current_size_; ++n)
7071
{
7172
size_t index_j = wall_neighborhood.j_[n];
7273
Vecd &e_ij = wall_neighborhood.e_ij_[n];
7374
Real dW_ijV_j = wall_neighborhood.dW_ij_[n] * Vol_k[index_j];
7475

75-
Vecd vel_in_wall = -state_i.vel_;
76+
Vecd vel_in_wall = 2.0 * vel_ave_k[index_j] - state_i.vel_;
7677
Real p_in_wall = state_i.p_;
7778
Real rho_in_wall = state_i.rho_;
7879
FluidStateIn state_j(rho_in_wall, vel_in_wall, p_in_wall);
@@ -132,14 +133,15 @@ void EulerianIntegration2ndHalf<Contact<Wall>, RiemannSolverType>::interaction(s
132133
{
133134
StdLargeVec<Vecd> &n_k = *(this->wall_n_[k]);
134135
StdLargeVec<Real> &Vol_k = *(this->wall_Vol_[k]);
136+
StdLargeVec<Vecd> &vel_ave_k = *(wall_vel_ave_[k]);
135137
Neighborhood &wall_neighborhood = (*contact_configuration_[k])[index_i];
136138
for (size_t n = 0; n != wall_neighborhood.current_size_; ++n)
137139
{
138140
size_t index_j = wall_neighborhood.j_[n];
139141
Vecd &e_ij = wall_neighborhood.e_ij_[n];
140142
Real dW_ijV_j = wall_neighborhood.dW_ij_[n] * Vol_k[index_j];
141143

142-
Vecd vel_in_wall = -state_i.vel_;
144+
Vecd vel_in_wall = 2.0 * vel_ave_k[index_j] - state_i.vel_;
143145
Real p_in_wall = state_i.p_;
144146
Real rho_in_wall = state_i.rho_;
145147

0 commit comments

Comments
 (0)