Closed tyszwh closed 7 years ago
Your outflow boundary conditions effectively sends particles out of the domain, and therefore you must enable the 'particleEscape' parameter or you will encounter the message above. Note that this error message occurs because you are trying to evaluate the velocity field for a particle outside the mesh, which is not possible.
Also, looking at your model, I can see that you have setup outflow conditions, but you have not provided some measure to compensate for the mass flowing out, so therefore you are violating mass conservation and your model is inconsistent. This is most probably why your models are running much slower than UW1. For identical configurations, UW1/UW2 simulation should have very similar run times.
To allow for mass outflow/inflow, there are a few option. Often people will include a compressible layer to accommodate, or you can provide a BC which explicitly compensates the in/out flow. Or, you can leave some part of the boundary open (ie, the zero stress neumann condition which is obtained by not setting any bc).
Yes, It's right. It means I must set 'particleEscape' as true when I give a outflow boundary. And I change the boundary condition. The code running velocity normally. But I still got a wrong message. I did not understand it very well. I change the boundary as (iWalls, base, kWalls), If I dont set pop_control.repopulate(), The code stoped after 2 timestep without any mention in notebook. The terminal show like this.
Error running Underworld - Signal 11 'SIGSEGV' (Segmentation Fault).
This is probably caused by an illegal access of memory.
We recommend running the code in a debugger to work out where the problem is (e.g. 'gdb')
and also to contact the developers.
If I set the pop_control.repopulate(), The code also stoped but with a wrong message in jupyter notebook.
RuntimeError: Error encountered. Full restart recommended as exception safety not guaranteed. Error message: Something went wrong in _PCDVC_Calculate3D: Problem has an under resolved cell (Cell Id = 57). You may need to check your initial particle layout configuration. A per cell layout might give better results than a global layout, especially where you have a deformed mesh. Also, if particles are able to escape the domain, you can enable aggressive population control by setting the 'particleEscape' swarm constructor parameter.
This problem seemly can be fixed by add the aggressive in pop_control, But the reason, I cant understand well,Because, this situation did not occured in 2D model (we do not need to add the aggressive in pop_control in 2d, works fine ), But for saving image, there also have a warong message in jupyter notebook
LavaVu error: OpenGL error [ gLucifer/Viewer/src/OpenGLViewer.cpp : 56 ] "Invalid operation".
Traceback (most recent call last):
File "/root/build/underworld2dev2/glucifer/_glucifer.py", line 654, in _generate_image
imagestr = lv.image(filename, size[0], size[1])
File "/root/build/underworld2dev2/libUnderworld/libUnderworldPy/lavavu.py", line 357, in any_method
return method(*args, **kwargs)
RuntimeError: OpenGL error [ gLucifer/Viewer/src/OpenGLViewer.cpp : 56 ] "Invalid operation".
=====================================================================================
Beside, How many material flow in domain to accommodate? I did not understand well what different bettweem compressible layer to accommodate, explicitly compensates the in/out flow or leave some part of the boundary open.
Ok, About the passive tracers can disappear,I think the flow out is main reason of it. I set the particleEscape is True . I close it now in underwolrd2. But I still got a wrong message in mainloop. And the code in jupyter notebook run really slower with 3d mesh(with low res, very fast in underwrold1, may be something wrong with my setting?). Any way the code show below may help me to find the problem. It should have problem which I have not found it.
The wrong message
Test3d.ipynb.tar.gz
------------------------------
I tried to delete the RemovalRoutine, SplittingRoutine and EscapedRoutine in underworld1 input scripts. But the number of tracer still change with time.