luchete80 / WeldFormGPU

CUDA implementation of Weakly-Compressible Smoothed Particle Hydrodynamics for Elasto Plastic and thermal coupled Mechanics
GNU General Public License v3.0
2 stars 2 forks source link

Error in stresses Shear Stress and Sigma not #66

Open luchete80 opened 2 years ago

luchete80 commented 2 years ago

Output No. 3 at 1.43948e-06 has been generated Current Time Step = 1.43948e-06 Total CPU time: 0.959133 , Nb: 0, StAcc: 0, PrAcc: 0Ls Acc: 0.653Contact: 0.002Msh: 0, BC: 0.001, mv: 0 Max plastic strain: 0in particle0 Steps count in this interval: 1Total Step count2 Total Nb search time in this interval: 0Average Nb search time in this interval: 0 Avg Neighbour Count42 Particle 1250 Pressure 969682 Particle 1250 ShearStress (3,3): [ 247886 0-8.02029e-12 ] [ 0 247886 1592.08 ] [ -8.02029e-12 1592.08 -495772 ]

Particle 1250 Sigma (3,3): [ -721795 0-8.02029e-12 ] [ 0 -721795 1592.08 ] [ -8.02029e-12 1592.08-1.46545e+06 ]

Particle 1250 StrRate (3,3): [ 0 0-2.15106e-16 ] [ 0 0 0.0426999 ] [ -2.15106e-16 0.0426999 -19.9451 ]


GPU

--------------------------- END STEP -------------------------- TOTAL (SUM) Strain Rate part 1250 0.000000 0.000000 -19.945057 PresEq[i], Cs[i], P0[i],Density[i], RefDensity[i]: 0.000000 5001.814486 0.000000 2700.038759 2700.000000 Time 1.4395e-06 Particle 1250, presure 969681.519080 , ShearStresszz 0.000000 Sigmazz -969681.519080 Time 2.87896e-06, GPU time 0.033 Max disp 2.28329e-08, 2.28329e-08, 0

luchete80 commented 2 years ago

Second step, strain rate is being readed.

--------------------------- END STEP -------------------------- TOTAL (SUM) Strain Rate part 1250 0.000000 0.000000 -19.945057 PresEq[i], Cs[i], P0[i],Density[i], RefDensity[i]: 0.000000 5001.814486 0.000000 2700.038759 2700.000000 StrainRate [0.000000 0.000000 -0.000000], [0.000000 0.000000 0.042700], [-0.000000 0.042700 -19.945057]. Time 1.4395e-06 Particle 1250, presure 969681.519080 , ShearStresszz 0.000000 Sigmazz -969681.519080 Time 2.87896e-06, GPU time 0.031 Max disp 2.28329e-08, 2.28329e-08, 0

luchete80 commented 2 years ago

G was not save and Strain rate A AND B were not updated. Now pressure is different.

--------------------------- END STEP -------------------------- TOTAL (SUM) Strain Rate part 1250 0.000000 0.000000 -19.945057 PresEq[i], Cs[i], P0[i],Density[i], RefDensity[i]: 0.000000 5001.814486 0.000000 2700.038759 2700.000000 StrainRate [0.000000 0.000000 -0.000000], [0.000000 0.000000 0.042700], [-0.000000 0.042700 -19.945057]. G, 25902000000.000000 Time 1.4395e-06 Particle 1250, presure 969681.519080 , ShearStresszz -495772.268175 Sigmazz -1465453.787255 Time 2.87896e-06, GPU time 0.032 Max disp 2.28329e-08, 2.28329e-08, 0 --------------------------- END STEP -------------------------- TOTAL (SUM) Strain Rate part 1250 0.001432 0.090479 -19.945628 PresEq[i], Cs[i], P0[i],Density[i], RefDensity[i]: 0.000000 5001.814486 0.000000 2700.135480 2700.000000 StrainRate [0.001432 0.000573 -0.000000], [0.000573 0.090479 0.042580], [-0.000000 0.042580 -19.945628]. G, 25902000000.000000 Time 2.8790e-06 Particle 1250, presure 3389458.452602 , ShearStresszz -1488473.312846 Sigmazz -4877931.765448 Time 4.31843e-06, GPU time 0.046 Max disp 1.08786e-07, 1.08786e-07, 9.49278e-10 --------------------------- END STEP -------------------------- Total steps: 3, time spent 0.048000 Program ended.

luchete80 commented 2 years ago

Accel has an error in z and displacements are null:

Total Nb search time in this interval: 0Average Nb search time in this interval: 0 Avg Neighbour Count40 Particle 1250 Acc 3 [ 12.3188 1244.53 -9620.66 ] Particle 1250 Disp 3 [ 2.55257e-112.57879e-09-1.99349e-08 ] Particle 1250 Pressure 2.90909e+06 Particle 1250 ShearStress (3,3): [ 7436653.4635e-11-0.00112699 ] [ 3.4635e-11 743665 4776.42 ] [ -0.00112699 4776.42-1.48733e+06 ]

---------- GPU

--------------------------- END STEP --------------------------

TOTAL (SUM) Strain Rate part 1250 0.001432 0.090479 -19.945628 Accel: 12.319131 1447.353295 80.024652 Disp: -0.000000 0.000000 0.000000 PresEq[i], Cs[i], P0[i],Density[i], RefDensity[i]: 0.000000 5001.814486 0.000000 2700.135480 2700.000000 StrainRate [0.001432 0.000573 -0.000000], [0.000573 0.090479 0.042580], [-0.000000 0.042580 -19.945628]. G, 25902000000.000000

luchete80 commented 2 years ago

Artif visc was enabled, and RotRate were not updated. Still wrong

--------------------------- END STEP -------------------------- TOTAL (SUM) Strain Rate part 1250 0.000000 0.000000 -19.945628 Accel: 12.318794 1244.529997 80.024896 Disp: 0.000000 0.000000 0.000000 PresEq[i], Cs[i], P0[i],Density[i], RefDensity[i]: 0.000000 5001.814486 0.000000 2700.135659 2700.000000 StrainRate [0.000000 0.000000 -0.000000], [0.000000 0.000000 0.042704],

luchete80 commented 2 years ago

Sigma values are wrong

correct: Particle 1250 Sigma (3,3): [ -2.16542e+063.4635e-11-0.00112699 ] [ 3.4635e-11-2.16542e+06 4776.42 ] [ -0.00112699 4776.42-4.39642e+06 ]

gpu:

[0.000000 0.000000 -0.000000], [0.000000 0.000000 0.042704], [-0.000000 0.042704 -19.945628]. G, 25902000000.000000 Time 2.8790e-06 Particle 1250, presure 3393927.007667 , ShearStresszz -1487331.002732 Sigmazz -4881258.010399 particle 1250 Sigma [-2650261.506252 0.000000 -0.001622], [0.000000 -2650261.506349 4776.422745], [-0.001622 4776.422745 -4881258.010399].

luchete80 commented 2 years ago

Stresses at first step are equal, but accel in the following step is not:

image image

luchete80 commented 2 years ago

Matricial ops are ok: Correct vs GPU image

but afer mult with grad kernel is wrong:

image

luchete80 commented 2 years ago

xij is ok CPU image

image

luchete80 commented 2 years ago

Accel and sigma are ok until fourth step, when sigma becomes different (accel and str rate remains equal) image

luchete80 commented 2 years ago

Pressure is not either the same

image

luchete80 commented 2 years ago

Difference is in drho

image

luchete80 commented 2 years ago

density incrementation is ok but pressure is still wrong: image

luchete80 commented 2 years ago

drho is ok but pressure is wrong

image

luchete80 commented 2 years ago

pressure is correctly calculated at first step, problem is with drho

image

luchete80 commented 2 years ago

No inline tensor functions branchs give same results (is not a mult issue)

luchete80 commented 2 years ago

pressure is calculated with different density values, hence the error

luchete80 commented 2 years ago

Now are ok. image

But in large steps model is wrong.

image

luchete80 commented 2 years ago

As always fixed ts= 1.43e-6, after 4 steps GPU image

CPU ORIG image

luchete80 commented 2 years ago

But with fixed ts= 1.43e-6 and final time=1e-4

image

luchete80 commented 2 years ago

image