gpusph icon indicating copy to clipboard operation
gpusph copied to clipboard

errors when run BuoyancyTest with chrono

Open Dongxueyang opened this issue 6 years ago • 21 comments

Hi I have compiled the gpusph successfully and can run some examples in src/problems. But when I run the example BuoyancyTest and Objects I got such errors with chrono

I think the error is related to the chrono. but I donnot know what: 1.I install the chrono successful but what can I do to make a link between chrono and GPUSPH 2.when I install chrono,at step cmake which mudule should be set "ON" to support basic functions of GPUSPH.I see all the modules should be set "OFF" from the install document of GPUSPH. 3.In my computer, I have install another program which is linked to chrono.So if will there be conflects when i use chrono in GPUSPH. The error is seems to related to another program"Yade-Dual4.3"

all regards

Dongxueyang avatar Dec 27 '18 07:12 Dongxueyang

Sorry I failed to past the picture and I am trying to upload it.

Dongxueyang avatar Dec 27 '18 07:12 Dongxueyang

screenshot from 2018-12-27 14_51_46

Dongxueyang avatar Dec 27 '18 07:12 Dongxueyang

Hi,

Have you managed to run your case?

Best regards, Agnès

agnesLeroy avatar Jan 14 '19 11:01 agnesLeroy

Hello,

the issue seems to be due to a mismatch between what GPUSPH thinks the binary layout of a Chrono object is, versus what the library thinks. A possible reason for this could be that Chrono and GPUSPH are being compiled with different compilers (or different versions of the same compiler). Can you verify if GPUSPH is being compiled with the same (host) compiler and version as what was used with Chrono?

Oblomov avatar Jan 14 '19 14:01 Oblomov

Yes I have run the test successfully, your suggestiogn is useful anges. These days I am busy with my test so pologize for my response not in time。

Dongxueyang avatar Jan 15 '19 03:01 Dongxueyang

@Oblomov Can you send your email to me , I have some question about the GPUSPH and want to get your help. In Github the communication is not in time. And my email is [email protected] All regards

Dongxueyang avatar Jan 23 '19 08:01 Dongxueyang

@agnesLeroy I have doubt about the accuracy of GPUSPH. I think we can not make a accurate simulation with GPUSPH. There days I make a simulation of a single ball falling into water . The density of ball is 860, and radius is 0.0127m, the origin posion is above still water surface 0.24m, which means the velocity of entering water is 2.17m/s. I make a figure of positonZ--time curve but it can not agree with the experiment. Another question. I try to change the density of floating (lilke a ball with density of 1000), I shoud be suspended in water. But it fall down the below of the box. So I think maybe I am mistake with some parameter. Do you have any idea? all regards Dongxueyang

Dongxueyang avatar Jan 23 '19 14:01 Dongxueyang

@agnesLeroy Hi I have a question on about the simulation results. Now I have complete a example of single ball entering water. The ball is floating bady. And I got the result with vtu format which contants all informations. But I can not get the postion information of the single ball. I think the position information can be got from chrono or from GPUSPH. But I do not know what to do. Could you give me some advice?

Dongxueyang avatar Jan 23 '19 14:01 Dongxueyang

Hi! You get this information in data/rbdata.txt where the objects' gravity centers (CM0) and orientations (Q0) are written. Cheers, Agnès

agnesLeroy avatar Jan 23 '19 15:01 agnesLeroy

@agnesLeroy I have checked the file rbdata just now and got the position information, Thanks for your reply. And I have another question about the accuracy of simulation. I have post the question before my last comment in this issue. Hope get your advice. If my explaination is not clear. please tell me and I will make a clarification in details. regards Dongxueyang

Dongxueyang avatar Jan 23 '19 15:01 Dongxueyang

Hi, What boundary formulation are you using for your simulation? Are you sure the object's center of gravity is correct at the initial time? Are the forces applied on it by the water correct? (you can check them in the file objectforces.txt). Cheers, Agnès

agnesLeroy avatar Jan 23 '19 15:01 agnesLeroy

@agnesLeroy I just modified the test model of Objects. And I delete the floating box and obstacle but use the sphere only. Then I changed the position, the density of sphere and the size of fluid. The boundary formulation is dynamic boundary I think. I will check the force. But can I make some output in chrono in the test case Objects? Thands for your advice Dongxueyang

Dongxueyang avatar Jan 23 '19 15:01 Dongxueyang

I suggest that you look at the BuoyancyTest example of GPUSPH to sort out your problem. Best regards, Agnès

agnesLeroy avatar Jan 23 '19 15:01 agnesLeroy

OK I will try and post my question if I have. Thanks for your patience. Best wishes Dongxueyang

Dongxueyang avatar Jan 23 '19 16:01 Dongxueyang

@agnesLeroy Hi I have another question on the floating number. We use chrono to run DEM simulaiton and achieve fluid-solid coupling. The chrono can simulate a large number of dem particles. But the GPUSPH can only make 16 floatings (you mentioned before). I want to know the reason about the limit. It is due to the code or other reasons about the storage capacity? best regards Dongxueyang

Dongxueyang avatar Jan 24 '19 05:01 Dongxueyang

Both reasons. The coding restriction is that the fluid and object number are encoded in the same area, using 4 bits for the fluid and 12 bits for the object number, so in theory it would be possible to have up to 2^4 = 16 fluids and 2^12 = 4096 objects. However, since some shared memory allocations are fixed, the number of fluids is limited to 4 and the number of objects is limited to 16. It should be possible to increase these limits up to the maximum allowed by changing the corresponding defines (MAX_FLUID_TYPES and MAX_BODIES in src/particledefine.h)

We could also consider a build time parameter (e.g. make maxfluids=... or make maxbodies=...). Would you mind opening a feature request for this?

Oblomov avatar Jan 24 '19 11:01 Oblomov

@Oblomov I read your comment. And do you think it is easy to achieve to release the limit? Or can we use a 16bits or 32bits for the object number to generate more objects. I do not mind opening a feature request for this. And I think it neccessary to do it. Thans for your reply Best regards Dongxueyang

Dongxueyang avatar Jan 25 '19 01:01 Dongxueyang

Hello @Dongxueyang

Releasing the limit altogether, or moving to 32-bit for the object it, would require much more extensive changes to the code. I think allowing custom configurations would be the first step anyway. But yes, please open a separate issue for this, so we can address it on its own.

Oblomov avatar Jan 25 '19 08:01 Oblomov

@Oblomov @agnesLeroy These days I make a simulation to check the accuracy of the GPHSPH, The model is a sphere,density=860, faling into the water with velocity of 2.17m/s. And the radius is 0.0127m. The model is based on the example of BuoyancyTest. And I adpted deltap=0.001 0.0015 0.002 0.003 and get four curves like this:

b

But the curve is different between each other and the experiment curve and theorical curve. So I think the value of deltap affects the accurancy of results obviousely? So how can I to select a deltap in a simulation?

Dongxueyang avatar Feb 21 '19 09:02 Dongxueyang

@agnesLeroy Could you help me ? I am confused with the problem pasted above.

Dongxueyang avatar Feb 26 '19 14:02 Dongxueyang

Hello @Dongxueyang

SPH, like any numerical method, approximates the analytical solution, with an approximation that is better (i.e. closer to the correct one) as the resolution grows. The plot seems to confirm this, as finer resolutions (smaller dp) provide solutions that are closer to both the experimental and theoretical line. So in general you should try running your simulations at the highest possible resolution.

At any given resolutions, there are also a few parameters that you can try tuning to get better results. For example, using a higher speed of sound will give a stiffer (less compressible) fluid. Also, if you are using the artificial viscosity model you can try lowering the artificial viscosity coefficient, or switch to a different viscous model (e.g. SPS).

Oblomov avatar Feb 26 '19 17:02 Oblomov