Xiangyu-Hu / SPHinXsys

SPHinXsys provides C++ APIs for engineering simulation and optimization. It aims at complex systems driven by fluid, structure, multi-body dynamics and beyond. The multi-physics library is based on a unique and unified computational framework by which strong coupling has been achieved for all involved physics.

Home Page:https://www.sphinxsys.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A problem in Dirichlet boundary condition for diffusion

WeiyiVirtonomy opened this issue · comments

Please check line 178 in diffusion_dynamics.hpp:
this->all_diffusions_[m]->getInterParticleDiffusionCoff(particle_i, particle_j, e_ij);

particle_j is the index of a contact particle and cannot be used in function getInterParticleDiffusionCoff.

@Xiangyu-Hu Prof. Hu, could you please add my account to collaborators? Thanks a lot : )

Please check line 178 in diffusion_dynamics.hpp: this->all_diffusions_[m]->getInterParticleDiffusionCoff(particle_i, particle_j, e_ij);

particle_j is the index of a contact particle and cannot be used in function getInterParticleDiffusionCoff.

Would do you please specify the branch you are working on?

Please check line 178 in diffusion_dynamics.hpp: this->all_diffusions_[m]->getInterParticleDiffusionCoff(particle_i, particle_j, e_ij);
particle_j is the index of a contact particle and cannot be used in function getInterParticleDiffusionCoff.

Would do you please specify the branch you are working on?

That's from the master branch

Hi Weiyi,
I have changed the getInterParticleDiffusionCoff() function of the Dirichlet wall boundary. (see the linked branch)

The diffusion coefficient of the diffusion process interacting with walls is unrelated to the wall boundary, so the old one getInterParticleDiffusionCoff(particle_i, particle_j, e_ij) tends to confuse the SPHinXsys users.
The new one getInterParticleDiffusionCoff(particle_i, particle_i, Vecd::Zero()) is more clear that the diffusion coefficient in this process (diffusion body contacted with Dirichlet boundary) has nothing to do with the contact walls.

For the diffusion part, we just have done the diffusion body interacting with the wall boundaries. Later, we will do the diffusion process referring to the interaction between two diffusion bodies.

Hi Weiyi, I have changed the getInterParticleDiffusionCoff() function of the Dirichlet wall boundary. (see the linked branch)

The diffusion coefficient of the diffusion process interacting with walls is unrelated to the wall boundary, so the old one getInterParticleDiffusionCoff(particle_i, particle_j, e_ij) tends to confuse the SPHinXsys users. The new one getInterParticleDiffusionCoff(particle_i, particle_i, Vecd::Zero()) is more clear that the diffusion coefficient in this process (diffusion body contacted with Dirichlet boundary) has nothing to do with the contact walls.

For the diffusion part, we just have done the diffusion body interacting with the wall boundaries. Later, we will do the diffusion process referring to the interaction between two diffusion bodies.

Thanks

Hi Weiyi, I have changed the getInterParticleDiffusionCoff() function of the Dirichlet wall boundary. (see the linked branch)

The diffusion coefficient of the diffusion process interacting with walls is unrelated to the wall boundary, so the old one getInterParticleDiffusionCoff(particle_i, particle_j, e_ij) tends to confuse the SPHinXsys users. The new one getInterParticleDiffusionCoff(particle_i, particle_i, Vecd::Zero()) is more clear that the diffusion coefficient in this process (diffusion body contacted with Dirichlet boundary) has nothing to do with the contact walls.

For the diffusion part, we just have done the diffusion body interacting with the wall boundaries. Later, we will do the diffusion process referring to the interaction between two diffusion bodies.

@ChenxiZhaoTUM So, now the diffusion process between two bodies can not be handled?