micmog / LaserbeamFoam

Laser Ray Tracing Implementation and fluid flow simulation framework for Additive Manufacturing, laser welding, laser drilling applications
GNU General Public License v3.0
38 stars 19 forks source link

Ray Visualisation doesnt seem to always capture reflections #31

Open tomflint22 opened 2 months ago

tomflint22 commented 2 months ago

The VTK write-out of the ray paths doesnt always seem to be working correctly.

This can be replicated by running the Plate2D case and then observing the rayQ fields, which is what the code uses for the calculations and comparing this with the VTK paths as shown below for the 1st timesteps. Maybe this is just an issue when the beam is not normal to the surface as some reflections are picked up later.

initial_time_rays

philipcardiff commented 2 months ago

Hi, Tom. To check, I understand: Is the problem that the reflected rays not being shown in the VTKs?

tomflint22 commented 2 months ago

Hi, Yeah so the code is working correctly in terms of calculating the reflections and deposition, it's just the VTK is not being written correctly. If you look at the VTK's they should lie on top of the rayQ (andrayNumber) fields; these 2 fields are the original way to visualise the rays.

tomflint22 commented 2 months ago

That's what I was trying to show in the image above. So the VTK rays should come in and be reflected at 90 degrees like the rayQ field is