GPUSPH / gpusph

The world's first CUDA implementation of Weakly-Compressible Smoothed Particle Hydrodynamics
161 stars 67 forks source link

KEPSVISC with DYN_BOUNDARY issue #26

Open JabirSS opened 6 years ago

JabirSS commented 6 years ago

Dear gpusph developers,

First of all, thank you for making an excellent tool such as gpusph available to the public.

I am having an issue with running a simulation of a Dam Break with a gate using KEPSVISC with DYN_BOUNDARY boundary condition. The code compiles just fine, as it does not seem to be recognized as an invalid combination, however, when running the simulation, the following error is thrown and the simulation stops:

"Device 0 thread 139842695374592 iteration 0 last command: 7. Exception: src/cuda/forces.cu(504) : in unbind_textures() @ thread 0x139842695374592 : cudaSafeCall() runtime API error 77 : an illegal memory access was encountered GPUSPH aborted by worker thread"

Below is a copy of the summary file of simulation parameters:

Simulation parameters: deltap = 0.002 sfactor = 1.3 slength = 0.0026 kerneltype: 3 (Wendland) kernelradius = 2 influenceRadius = 0.0052 SPH formulation: 1 (F1) viscosity type: 5 (k-e model) periodicity: 0 (none) initial dt = 3.12e-05 simulation end time = 1.2 neib list construction every 1 iterations adaptive time stepping enabled safety factor for adaptive time step = 0.3 internal energy computation disabled XSPH correction disabled Density diffusion disabled Ferrari correction disabled moving bodies enabled open boundaries disabled water depth computation disabled time-dependent gravity disabled geometric boundaries: DEM: disabled planes: enabled, 6 defined Testpoints post-processing enabled

Physical parameters: gravity = (0, 0, -9.8) [9.8] fixed numFluids = 1 rho0[ 0 ] = 999.7 B[ 0 ] = 89258.9 gamma[ 0 ] = 7 sscoeff[ 0 ] = 25 sspowercoeff[ 0 ] = 3 sound speed[ 0 ] = 25 partsurf = 0 Dynamic boundary parameters: r0 = 0.002 k-e model viscosity parameters: kinematicvisc[ 0 ] = 1.30739e-06 (m^2/s) visccoeff[ 0 ] = 1.30739e-06 I have also uploaded the code of the problem's .cu and .h files to: http://www.mediafire.com/folder/9160kahh2zp1fcf,czc6m5a4i5zl5g1/shared

I have run a similar simulation but without moving bodies using the Semi-Analytical boundary condition without any issue.

I would greatly appreciate your help figuring out a solution for this problem.

Best regards,

Jabir

Oblomov commented 6 years ago

Hello, and thanks for the report. Currently the KEPSVISC model is only supported with semi-analytical boundary conditions, but a check for this is missing when the framework gets instantiated.

(I'm keeping the issue open until at least the check is implemented and pushed. Support for KEPSVISC with other boundary conditions is also planned for the near future.)

JabirSS commented 6 years ago

Dear Oblomov, Thank you for your quick response and I look forward to testing the KEPSVISC with other boundary conditions.

I have tried to run the same dam break simulation (without gate) with DYNAMICVISC and DYN_BOUNDARY and it worked well. However, when I added the gate the solution seemed unstable, particles stuck to the gate and the time step size went under machine epsilon. Reducing the time step, increasing the speed of sound and enabling Ferrari correction did not seem to help. What do you think the source of this problem is?

Many thanks and regards

agnesLeroy commented 6 years ago

Hello,

Sorry for the late reply, I hope you could find a solution for your case. If you couldn't, I think it would be better to have your files in order to b able to try your case. Which version of GPUSPH are you working with?

Best regards, Agnès