SPHinXsys icon indicating copy to clipboard operation
SPHinXsys copied to clipboard

Modified algorithm for heat flow calculation

Open Harmon9802 opened this issue 1 year ago • 3 comments

Describe the bug The right hand side of diffusion_dt_ algorithm in all of diffusion types (Inner, Robin, etc. ) only calculate the rate of heat flow per unit volume (W/m3), we need to multiply a particle volume term to get heat flow (W), then we can use it for heat flux calculation.

Trace to the source Steps to trace the source:

  1. Go to 'diffusion_dynamics.hpp'.
  2. Scroll down to 'DiffusionRelaxation<Robin<...>>' for example.
  3. Find two functions inside of the class ”getDiffusionChangeRateRobin“ and "interaction".
  4. Check the algorithm of diffusion_dt_.

Modified algorithm The modified diffusion_dt_m should be: diffusion_dt_m = diffusion_dt_ * particle_volume

Additional context However, this bug does not effect the final temperature field calculation, it is only useful if we want to calculate overall heat flow instead of volumetric heat flow.

Harmon9802 avatar Dec 21 '23 16:12 Harmon9802

Please check the thermal_diffusion branch, where more general thermal dynamics equations are solved.

DrChiZhang avatar Dec 27 '23 11:12 DrChiZhang

@DrChiZhang could you make a pull request if you think the changes are done?

Xiangyu-Hu avatar Mar 21 '24 08:03 Xiangyu-Hu

@DrChiZhang could you make a pull request if you think the changes are done?

Sure, I will try to merge master to this branch first.

DrChiZhang avatar Mar 22 '24 19:03 DrChiZhang