Flexible Gate
Hello all,
I've been playing with the Flexible Gate example. I created a 2D channel and hinged it to the upper boundary, then added in/out layers and it seems like it's working.

However, when I try to make the channel height and the gate height smaller, all the floating objects float freely and eventually leave the domain.

I created new id's for each block thinking that would be the problem but it did not help. When I run the same xml file with a bigger domain it works. I don't think it's normal but I might be missing something.
Thank you!
I've been playing with the Flexible Gate example. I created a 2D channel and hinged it to the upper boundary, then added in/out layers and it seems like it's working.

However, when I try to make the channel height and the gate height smaller, all the floating objects float freely and eventually leave the domain.

I created new id's for each block thinking that would be the problem but it did not help. When I run the same xml file with a bigger domain it works. I don't think it's normal but I might be missing something.
Thank you!
Debug Trace
Notice |
Cannot assign an empty string to a string offset #0 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1203): gdn_ErrorHandler(2, 'Cannot assign a...', '/var/www/forums...', 1203, Array) #1 /var/www/forums-dual-sphysics-org/library/core/class.format.php(958): Gdn_Format::formatMentionsCallback('') #2 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1292): Gdn_Format::tagContent('@Asalih3d I've ...', 'Gdn_Format::for...') #3 /var/www/forums-dual-sphysics-org/library/Vanilla/Formatting/Html/HtmlEnhancer.php(59): Gdn_Format::mentions('@Asalih3d I've ...') #4 /var/www/forums-dual-sphysics-org/library/Vanilla/Formatting/Formats/HtmlFormat.php(74): Vanilla\Formatting\Html\HtmlEnhancer->enhance('@Asalih3d I've ...') #5 /var/www/forums-dual-sphysics-org/library/Vanilla/Formatting/FormatService.php(34): Vanilla\Formatting\Formats\HtmlFormat->renderHtml('@Asalih3d I've ...') #6 /var/www/forums-dual-sphysics-org/library/core/class.format.php(769): Vanilla\Formatting\FormatService->renderHTML('@Asalih3d I've ...', 'html') #7 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1479): Gdn_Format::html('@Asalih3d I've ...') #8 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/helper_functions.php(24): Gdn_Format::to('@Asalih3d I've ...', 'Html') #9 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/helper_functions.php(170): formatBody(Object(stdClass)) #10 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/comments.php(19): writeComment(Object(stdClass), Object(DiscussionController), Object(Gdn_Session), 5) #11 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/index.php(53): include('/var/www/forums...') #12 /var/www/forums-dual-sphysics-org/library/core/class.controller.php(778): include('/var/www/forums...') #13 /var/www/forums-dual-sphysics-org/library/core/class.controller.php(1382): Gdn_Controller->fetchView('', false, false) #14 /var/www/forums-dual-sphysics-org/library/core/class.pluggable.php(217): Gdn_Controller->xRender() #15 /var/www/forums-dual-sphysics-org/applications/vanilla/controllers/class.discussioncontroller.php(310): Gdn_Pluggable->__call('render', Array) #16 /var/www/forums-dual-sphysics-org/applications/vanilla/controllers/class.discussioncontroller.php(402): DiscussionController->index(1597, 'x', 'p1') #17 /var/www/forums-dual-sphysics-org/library/core/class.dispatcher.php(862): DiscussionController->comment('2955') #18 /var/www/forums-dual-sphysics-org/library/core/class.dispatcher.php(279): Gdn_Dispatcher->dispatchController(Object(Gdn_Request), Array) #19 /var/www/forums-dual-sphysics-org/index.php(29): Gdn_Dispatcher->dispatch() #20 {main} |
Notice |
Cannot assign an empty string to a string offset #0 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1203): gdn_ErrorHandler(2, 'Cannot assign a...', '/var/www/forums...', 1203, Array) #1 /var/www/forums-dual-sphysics-org/library/core/class.format.php(958): Gdn_Format::formatMentionsCallback('') #2 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1292): Gdn_Format::tagContent('@Asalih3d When ...', 'Gdn_Format::for...') #3 /var/www/forums-dual-sphysics-org/library/Vanilla/Formatting/Html/HtmlEnhancer.php(59): Gdn_Format::mentions('@Asalih3d When ...') #4 /var/www/forums-dual-sphysics-org/library/Vanilla/Formatting/Formats/HtmlFormat.php(74): Vanilla\Formatting\Html\HtmlEnhancer->enhance('@Asalih3d When ...') #5 /var/www/forums-dual-sphysics-org/library/Vanilla/Formatting/FormatService.php(34): Vanilla\Formatting\Formats\HtmlFormat->renderHtml('@Asalih3d When ...') #6 /var/www/forums-dual-sphysics-org/library/core/class.format.php(769): Vanilla\Formatting\FormatService->renderHTML('@Asalih3d When ...', 'html') #7 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1479): Gdn_Format::html('@Asalih3d When ...') #8 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/helper_functions.php(24): Gdn_Format::to('@Asalih3d When ...', 'Html') #9 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/helper_functions.php(170): formatBody(Object(stdClass)) #10 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/comments.php(19): writeComment(Object(stdClass), Object(DiscussionController), Object(Gdn_Session), 13) #11 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/index.php(53): include('/var/www/forums...') #12 /var/www/forums-dual-sphysics-org/library/core/class.controller.php(778): include('/var/www/forums...') #13 /var/www/forums-dual-sphysics-org/library/core/class.controller.php(1382): Gdn_Controller->fetchView('', false, false) #14 /var/www/forums-dual-sphysics-org/library/core/class.pluggable.php(217): Gdn_Controller->xRender() #15 /var/www/forums-dual-sphysics-org/applications/vanilla/controllers/class.discussioncontroller.php(310): Gdn_Pluggable->__call('render', Array) #16 /var/www/forums-dual-sphysics-org/applications/vanilla/controllers/class.discussioncontroller.php(402): DiscussionController->index(1597, 'x', 'p1') #17 /var/www/forums-dual-sphysics-org/library/core/class.dispatcher.php(862): DiscussionController->comment('2955') #18 /var/www/forums-dual-sphysics-org/library/core/class.dispatcher.php(279): Gdn_Dispatcher->dispatchController(Object(Gdn_Request), Array) #19 /var/www/forums-dual-sphysics-org/index.php(29): Gdn_Dispatcher->dispatch() #20 {main} |
Notice |
Cannot assign an empty string to a string offset #0 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1203): gdn_ErrorHandler(2, 'Cannot assign a...', '/var/www/forums...', 1203, Array) #1 /var/www/forums-dual-sphysics-org/library/core/class.format.php(958): Gdn_Format::formatMentionsCallback('') #2 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1292): Gdn_Format::tagContent('@circles nice t...', 'Gdn_Format::for...') #3 /var/www/forums-dual-sphysics-org/library/Vanilla/Formatting/Html/HtmlEnhancer.php(59): Gdn_Format::mentions('@circles nice t...') #4 /var/www/forums-dual-sphysics-org/library/Vanilla/Formatting/Formats/HtmlFormat.php(74): Vanilla\Formatting\Html\HtmlEnhancer->enhance('@circles nice t...') #5 /var/www/forums-dual-sphysics-org/library/Vanilla/Formatting/FormatService.php(34): Vanilla\Formatting\Formats\HtmlFormat->renderHtml('@circles nice t...') #6 /var/www/forums-dual-sphysics-org/library/core/class.format.php(769): Vanilla\Formatting\FormatService->renderHTML('@circles nice t...', 'html') #7 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1479): Gdn_Format::html('@circles nice t...') #8 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/helper_functions.php(24): Gdn_Format::to('@circles nice t...', 'Html') #9 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/helper_functions.php(170): formatBody(Object(stdClass)) #10 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/comments.php(19): writeComment(Object(stdClass), Object(DiscussionController), Object(Gdn_Session), 15) #11 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/index.php(53): include('/var/www/forums...') #12 /var/www/forums-dual-sphysics-org/library/core/class.controller.php(778): include('/var/www/forums...') #13 /var/www/forums-dual-sphysics-org/library/core/class.controller.php(1382): Gdn_Controller->fetchView('', false, false) #14 /var/www/forums-dual-sphysics-org/library/core/class.pluggable.php(217): Gdn_Controller->xRender() #15 /var/www/forums-dual-sphysics-org/applications/vanilla/controllers/class.discussioncontroller.php(310): Gdn_Pluggable->__call('render', Array) #16 /var/www/forums-dual-sphysics-org/applications/vanilla/controllers/class.discussioncontroller.php(402): DiscussionController->index(1597, 'x', 'p1') #17 /var/www/forums-dual-sphysics-org/library/core/class.dispatcher.php(862): DiscussionController->comment('2955') #18 /var/www/forums-dual-sphysics-org/library/core/class.dispatcher.php(279): Gdn_Dispatcher->dispatchController(Object(Gdn_Request), Array) #19 /var/www/forums-dual-sphysics-org/index.php(29): Gdn_Dispatcher->dispatch() #20 {main} |
Comments
Domain 1 has the exact same dimensions as in example flexibleGate.
Domain 2 is the intermediate case
Domain 3 has a channel height of 30 mm with a gate size of 13mm.
Domain 2
I'm limiting the domain size as follows
And it works for domains 1 and 2, but for domain 3 I still get the following error
Whenever I try to use a smaller domain, I can't get it to work.
x is the gate thickness .
i)When I take the particle spacing to be 5e-4, it works for a gate with 60mm thickness.
ii)A gate with 10,20,30mm thickness and 2e-4 initial spacing gives me error.
When I increase the thickness to 40mm with the same initial spacing(2e-4) it works.
iii) When I reduce the initial spacing to 1e-4, it still does not work for a gate with 10,20mm thickness but it works wen the gate is at least 30mm thick.
If,
n=thickness/dx
i) It works when the number of particles is at least 120.
ii) It only works when the number of particles is at least 200.
iii) The minimum required number of particles for this resolution is 300.
I think I am lost. I will keep trying and updating.
Kind regards
The error message reads
"Excluded for: velocity"
But in this post https://dual.sphysics.org/vanilla/discussion/1586/motion-error/p1
it says "Excluded for:position"
Maybe that tells me something.
I'm still trying but no luck yet. As written in the previous post, the error message said " Excluded for velocity", so instead of using in/out layers, I decided to give it a try with constant acceleration in x-direction just like is Case/Poiseuille, the error message still reads excluded for velocity and when I open Error_boundaryOut.vtk this is what I get
Light-colored region is the fluid domain and the blue rectangle is the gate, I don't know why there is a void region inside the gate and what is causing it. This is the case where the gate is 5mm thick.
When I reduce the thickness to 1mm, I get rid of that void but the gate moves out of the domain, I really don't know why it doesn't stay hinged.
Kind regards
Attached are my .xml files for large and small domains. If anyone could find a time to have a look at this, it'd be a huge help.
Thanks!
What does CfgChrono_Scheme.vtk exactly show? I've been looking at the source code and I'm still not quite clear.
When I open it in Paraview, I assume it is where the hinge is located.
By comparing with example/FlexibleGate it does show the hinges.
and here it says save CSV for debug, how can I reach that file? chrono_objs folder is empty.
Lastly, following is the moment of inertia for the smaller gate
Do you think since moment of inertia is almost zero, it causes the simulation to fail?
t=0.0s
t=0.005s
t=0.015s
t=0.025s
t=0.05s
t=0.1s
I don't know why fluid level goes down near the surface.
Is gravity enabled?
Have you tried making a much bigger domain? Just to test.
Try increasing number of particles drastically?
-With a bigger domain, it works and that's what confuses me the most.
-A simulation with 200,000 particles fails and gives the same error message. When I open Error_BoundaryOut.vtk in paraview, it shows me that the red particles are excluded for velocity.
This is what I found in DualSPHysics-Wiki/ PostProcessing
VELOCITY: One particle can be also removed from the system when its displacement exceeds 0.9*Scell during one time step (Scell is the size of the cell).
By forcing a CFL number are we not limiting the displacement already?
Do I have any control on particle velocity? Or do you believe using even smaller time steps would fix it? ( I am using a initial time step of 1e-6s and a minimum time step of 1e-5s)
When I run it with around 600,000 particles, it takes forever but it ran for about 200 time steps before I stopped it. I will let it run until tomorrow.
Regards
Using CFL you are indeed controlling displacement since you are making the time steps even smaller - often this will minimize displacement, but in some niche cases it might increase it.
Another way to control particle displacement is by setting a low constant time step, but it is smarter to just lower CFL in my opinion - and as you did a minimum time step.
Try letting the 600k run finish so we can see what happens.
Please take dualsphysics team up on their offer, maybe there is an error somewhere in the code, which can be ironed out.
Kind regards