{"action":"created","issue":{"url":"https://api.github.com/repos/GPUSPH/gpusph/issues/10","labels_url":"https://api.github.com/repos/GPUSPH/gpusph/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/GPUSPH/gpusph/issues/10/comments","events_url":"https://api.github.com/repos/GPUSPH/gpusph/issues/10/events","html_url":"https://github.com/GPUSPH/gpusph/issues/10","id":55760659,"number":10,"title":"Rigidbodies: time dependent properties / and / rigid body outputs","user":{"login":"Ehsanizadi","id":7814193,"avatar_url":"https://avatars.githubusercontent.com/u/7814193?v=3","gravatar_id":"","url":"https://api.github.com/users/Ehsanizadi","html_url":"https://github.com/Ehsanizadi","followers_url":"https://api.github.com/users/Ehsanizadi/followers","following_url":"https://api.github.com/users/Ehsanizadi/following{/other_user}","gists_url":"https://api.github.com/users/Ehsanizadi/gists{/gist_id}","starred_url":"https://api.github.com/users/Ehsanizadi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ehsanizadi/subscriptions","organizations_url":"https://api.github.com/users/Ehsanizadi/orgs","repos_url":"https://api.github.com/users/Ehsanizadi/repos","events_url":"https://api.github.com/users/Ehsanizadi/events{/privacy}","received_events_url":"https://api.github.com/users/Ehsanizadi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-28T14:14:22Z","updated_at":"2015-01-29T15:34:28Z","closed_at":null,"body":"Hi,\r\nI've simulated a falling cylinder hitting a mud layer. the cylinder will penetrate intor the mud layer. I have two questions:\r\n\r\n* As you see [here] (https://www.youtube.com/watch?v=WWNho4FAXaE) the mud layer still fluctuating when the cylinder is hitting it.  I needed the mud layer to be settle and reaches an almost stable situation when the cylinder hits it. So, I tried to make some delay in the time of application of gravity. I used gcallback, but I did not change the gravity of the fluid (since it should be there until the movements of the mud to be damped). In the gcallback class I used suchg code:\r\n```\r\nfloat3 Trial::g_callback(const float t)\r\n{\r\n\tif(t<15){\r\n                ODEGravity=make_float3(0.0, 0.0, 0.0);\r\n\t\tdWorldSetGravity(m_ODEWorld, ODEGravity.x, ODEGravity.y, ODEGravity.z);\r\n\t\tm_physparams.gravity=make_float3(0.,0.,-9.81f);\r\n\t}\r\n\telse{\r\n\t\tODEGravity=make_float3(0.0, 0.0, -9.81);\r\n\t\tdWorldSetGravity(m_ODEWorld, ODEGravity.x, ODEGravity.y, ODEGravity.z);\r\n\t\tm_physparams.gravity=make_float3(0.,0.,-9.81f);\r\n\t}\r\n\treturn m_physparams.gravity;\r\n}\r\n```\r\nit worked. My question is that can I change whatever paramater as I wish within the time, like this method?\r\nI was thinking that perhaps a having a function would be appreciated for changing the properties of rigid bodies, or even the fluid itself with regard to time.  For example changing viscosity with time. \r\n\r\n* For the case I described above, how can I get the accelration/velocity/ and position of the rigid body (cylinder)? I don't think I can get them using \"TESTPOINTSPART\" sinc ethe rigid body is not in a fixed position always. "},"comment":{"url":"https://api.github.com/repos/GPUSPH/gpusph/issues/comments/72044544","html_url":"https://github.com/GPUSPH/gpusph/issues/10#issuecomment-72044544","issue_url":"https://api.github.com/repos/GPUSPH/gpusph/issues/10","id":72044544,"user":{"login":"Ehsanizadi","id":7814193,"avatar_url":"https://avatars.githubusercontent.com/u/7814193?v=3","gravatar_id":"","url":"https://api.github.com/users/Ehsanizadi","html_url":"https://github.com/Ehsanizadi","followers_url":"https://api.github.com/users/Ehsanizadi/followers","following_url":"https://api.github.com/users/Ehsanizadi/following{/other_user}","gists_url":"https://api.github.com/users/Ehsanizadi/gists{/gist_id}","starred_url":"https://api.github.com/users/Ehsanizadi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ehsanizadi/subscriptions","organizations_url":"https://api.github.com/users/Ehsanizadi/orgs","repos_url":"https://api.github.com/users/Ehsanizadi/repos","events_url":"https://api.github.com/users/Ehsanizadi/events{/privacy}","received_events_url":"https://api.github.com/users/Ehsanizadi/received_events","type":"User","site_admin":false},"created_at":"2015-01-29T15:34:28Z","updated_at":"2015-01-29T15:34:28Z","body":"By studying some simple examples of ODE I found the answer to the second questions.\r\nAt the end of g_callback class, I added this:\r\n```\r\nif (t>15.5 && t<16) {\r\n\t\toutputData << t << \" \" << dBodyGetForce(cylinder.m_ODEBody)[2] << \" \" << dBodyGetLinearVel(cylinder.m_ODEBody)[2] << endl;\r\n}\r\n```\r\nIt writes time, force and its velocity in z direction.\r\n\r\n"}}