Skip to content

Commit

Permalink
remove redundant variables and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Shuaihao-Zhang committed Aug 7, 2023
1 parent cfdc472 commit b461fee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ class BaseShearStressRelaxation2ndHalfWithWall : public fluid_dynamics::Interact

using ShearStressRelaxation2ndHalfWithWall = BaseShearStressRelaxation2ndHalfWithWall<ShearStressRelaxation2ndHalf>;

//=============================================Plasticity==========================================//
//=================================================================================================//
//==============================BaseStressRelaxation1stHalfWithWall=================================//
//=================================================================================================//
template <class BaseStressRelaxation1stHalfType>
class BaseStressRelaxation1stHalfWithWall : public fluid_dynamics::InteractionWithWall<BaseStressRelaxation1stHalfType>
{
Expand All @@ -77,9 +73,6 @@ class BaseStressRelaxation1stHalfWithWall : public fluid_dynamics::InteractionWi
using StressRelaxation1stHalfWithWall = BaseStressRelaxation1stHalfWithWall<StressRelaxation1stHalf>;
using StressRelaxation1stHalfRiemannWithWall = BaseStressRelaxation1stHalfWithWall<StressRelaxation1stHalfRiemann>;
using StressRelaxation1stHalfDissipativeRiemannfWithWall = BaseStressRelaxation1stHalfWithWall<StressRelaxation1stHalfDissipativeRiemann>;
//=================================================================================================//
//===============================BaseStressRelaxation2ndHalfWithWall======================================//
//=================================================================================================//

template <class BaseStressRelaxation2ndHalfType>
class BaseStressRelaxation2ndHalfWithWall : public fluid_dynamics::InteractionWithWall<BaseStressRelaxation2ndHalfType>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@ void BaseShearStressRelaxation2ndHalfWithWall<BaseShearStressRelaxation2ndHalfTy
this->velocity_gradient_[index_i] += velocity_gradient;
}

//============================================Plasticity===========================================//
//=================================================================================================//
//============BaseStressRelaxation1stHalfWithWall & BaseStressRelaxation2ndHalfWithWall============//
//=================================================================================================//
template <class BaseStressRelaxation1stHalfType>
Vecd BaseStressRelaxation1stHalfWithWall<BaseStressRelaxation1stHalfType>::computeNonConservativeAcceleration(size_t index_i)
{
Expand Down Expand Up @@ -102,12 +98,10 @@ void BaseStressRelaxation1stHalfWithWall<BaseStressRelaxation1stHalfType>::inter
Vecd& e_ij = wall_neighborhood.e_ij_[n];
Real dW_ijV_j = wall_neighborhood.dW_ijV_j_[n];
Real r_ij = wall_neighborhood.r_ij_[n];
Vecd nablaW_ijV_j = wall_neighborhood.dW_ijV_j_[n] * wall_neighborhood.e_ij_[n];

Real face_wall_external_acceleration = (acc_prior_i - acc_ave_k[index_j]).dot(-e_ij);
Real p_in_wall = this->p_[index_i] + this->rho_[index_i] * r_ij * SMAX(Real(0), face_wall_external_acceleration);
Matd stress_tensor_in_wall = stress_tensor_i;
acceleration += (stress_tensor_i + stress_tensor_in_wall) * nablaW_ijV_j;
acceleration += 2 * stress_tensor_i * wall_neighborhood.dW_ijV_j_[n] * wall_neighborhood.e_ij_[n];
rho_dissipation += this->riemann_solver_.DissipativeUJump(this->p_[index_i] - p_in_wall) * dW_ijV_j;
}
}
Expand Down Expand Up @@ -138,10 +132,7 @@ void BaseStressRelaxation2ndHalfWithWall<BaseStressRelaxation2ndHalfType>::inter
Vecd& e_ij = wall_neighborhood.e_ij_[n];
Real dW_ijV_j = wall_neighborhood.dW_ijV_j_[n];
Vecd nablaW_ijV_j = wall_neighborhood.dW_ijV_j_[n] * wall_neighborhood.e_ij_[n];

Real beta = 1.9;
Vecd vel_in_wall = (1 - beta) * vel_i + beta * vel_ave_k[index_j];

Vecd vel_in_wall = 1.9 * vel_ave_k[index_j] - 0.9 *vel_i;
Matd velocity_gradient_ij = -(vel_i - vel_in_wall) * nablaW_ijV_j.transpose();
velocity_gradient += velocity_gradient_ij;

Expand All @@ -154,9 +145,7 @@ void BaseStressRelaxation2ndHalfWithWall<BaseStressRelaxation2ndHalfType>::inter
this->velocity_gradient_[index_i] += velocity_gradient;
this->acc_[index_i] += p_dissipation / this->rho_[index_i];
}
//=================================================================================================//
//================================BaseStressDiffusionWithWall======================================//
//=================================================================================================//

template <class BaseStressDiffusionType>
void BaseStressDiffusionWithWall<BaseStressDiffusionType>::interaction(size_t index_i, Real dt)
{
Expand Down

0 comments on commit b461fee

Please sign in to comment.