Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

change getInterParticleDiffusionCoeff() of Dirichlet wall boundary #389

Merged
merged 6 commits into from
Aug 1, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class DiffusionRelaxationDirichlet
{
protected:
StdVec<StdVec<StdLargeVec<Real> *>> contact_gradient_species_;
void getDiffusionChangeRateDirichletContact(
void getDiffusionChangeRateDirichlet(
size_t particle_i, size_t particle_j, Vecd &e_ij, Real surface_area_ij,
const StdVec<StdLargeVec<Real> *> &gradient_species_k);

Expand All @@ -199,7 +199,7 @@ class DiffusionRelaxationNeumann
StdVec<StdLargeVec<Vecd> *> contact_n_;

protected:
void getDiffusionChangeRateNeumannContact(size_t particle_i, size_t particle_j,
void getDiffusionChangeRateNeumann(size_t particle_i, size_t particle_j,
Real surface_area_ij_Neumann, StdLargeVec<Real> &heat_flux_k);

public:
Expand All @@ -223,7 +223,7 @@ class DiffusionRelaxationRobin
StdVec<StdLargeVec<Vecd> *> contact_n_;

protected:
void getDiffusionChangeRateRobinContact(size_t particle_i, size_t particle_j, Real surface_area_ij_Robin, StdLargeVec<Real> &convection_k, Real &T_infinity_k);
void getDiffusionChangeRateRobin(size_t particle_i, size_t particle_j, Real surface_area_ij_Robin, StdLargeVec<Real> &convection_k, Real &T_infinity_k);

public:
explicit DiffusionRelaxationRobin(BaseContactRelation &contact_relation);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,13 +159,13 @@ DiffusionRelaxationDirichlet<ParticlesType, ContactParticlesType, KernelGradient
//=================================================================================================//
template <class ParticlesType, class ContactParticlesType, class KernelGradientType>
void DiffusionRelaxationDirichlet<ParticlesType, ContactParticlesType, KernelGradientType>::
getDiffusionChangeRateDirichletContact(size_t particle_i, size_t particle_j, Vecd &e_ij,
getDiffusionChangeRateDirichlet(size_t particle_i, size_t particle_j, Vecd &e_ij,
Real surface_area_ij, const StdVec<StdLargeVec<Real> *> &gradient_species_k)
{
for (size_t m = 0; m < this->all_diffusions_.size(); ++m)
{
Real diff_coff_ij =
this->all_diffusions_[m]->getInterParticleDiffusionCoff(particle_i, particle_j, e_ij);
this->all_diffusions_[m]->getInterParticleDiffusionCoff(particle_i, particle_i, e_ij);
Real phi_ij = (*this->gradient_species_[m])[particle_i] - (*gradient_species_k[m])[particle_j];
(*this->diffusion_dt_[m])[particle_i] += diff_coff_ij * phi_ij * surface_area_ij;
}
Expand All @@ -189,7 +189,7 @@ void DiffusionRelaxationDirichlet<ParticlesType, ContactParticlesType, KernelGra

const Vecd &grad_ijV_j = this->contact_kernel_gradients_[k](index_i, index_j, dW_ijV_j_, e_ij);
Real area_ij = 2.0 * grad_ijV_j.dot(e_ij) / r_ij_;
getDiffusionChangeRateDirichletContact(index_i, index_j, e_ij, area_ij, gradient_species_k);
getDiffusionChangeRateDirichlet(index_i, index_j, e_ij, area_ij, gradient_species_k);
}
}
}
Expand All @@ -213,7 +213,7 @@ DiffusionRelaxationNeumann<ParticlesType, ContactParticlesType, KernelGradientTy
//=================================================================================================//
template <class ParticlesType, class ContactParticlesType, class KernelGradientType>
void DiffusionRelaxationNeumann<ParticlesType, ContactParticlesType, KernelGradientType>::
getDiffusionChangeRateNeumannContact(size_t particle_i, size_t particle_j,
getDiffusionChangeRateNeumann(size_t particle_i, size_t particle_j,
Real surface_area_ij_Neumann, StdLargeVec<Real> &heat_flux_k)
{
for (size_t m = 0; m < this->all_diffusions_.size(); ++m)
Expand Down Expand Up @@ -241,7 +241,7 @@ void DiffusionRelaxationNeumann<ParticlesType, ContactParticlesType, KernelGradi
const Vecd &grad_ijV_j = this->contact_kernel_gradients_[k](index_i, index_j, dW_ijV_j_, e_ij);
Vecd n_ij = n_[index_i] - n_k[index_j];
Real area_ij_Neumann = grad_ijV_j.dot(n_ij);
getDiffusionChangeRateNeumannContact(index_i, index_j, area_ij_Neumann, heat_flux_k);
getDiffusionChangeRateNeumann(index_i, index_j, area_ij_Neumann, heat_flux_k);
}
}
}
Expand All @@ -268,7 +268,7 @@ DiffusionRelaxationRobin<ParticlesType, ContactParticlesType, KernelGradientType
//=================================================================================================//
template <class ParticlesType, class ContactParticlesType, class KernelGradientType>
void DiffusionRelaxationRobin<ParticlesType, ContactParticlesType, KernelGradientType>::
getDiffusionChangeRateRobinContact(size_t particle_i, size_t particle_j,
getDiffusionChangeRateRobin(size_t particle_i, size_t particle_j,
Real surface_area_ij_Robin, StdLargeVec<Real> &convection_k, Real &T_infinity_k)
{
for (size_t m = 0; m < this->all_diffusions_.size(); ++m)
Expand Down Expand Up @@ -299,7 +299,7 @@ void DiffusionRelaxationRobin<ParticlesType, ContactParticlesType, KernelGradien
const Vecd &grad_ijV_j = this->contact_kernel_gradients_[k](index_i, index_j, dW_ijV_j_, e_ij);
Vecd n_ij = n_[index_i] - n_k[index_j];
Real area_ij_Robin = grad_ijV_j.dot(n_ij);
getDiffusionChangeRateRobinContact(index_i, index_j, area_ij_Robin, convection_k, T_infinity_k);
getDiffusionChangeRateRobin(index_i, index_j, area_ij_Robin, convection_k, T_infinity_k);
}
}
}
Expand Down
Loading