-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Solver must be a power of 2, and seems to be o (n2) in complexity #10
Comments
I'm sorry, what exactly is the issue you are reporting? The only issues I see are in your title. The first issue in the title is that the solver must be a power of 2, but this is not quite right. The number of point in each direction needs to be proportional to a large power of 2. This is because the multi-grid solver interactively "restricts" the domain by a factor of two in each direction. It will be much more efficient if the solver can do that at least three times, and more is better. As for the second issue in the title: If n is the total number of points, the the fluid routines in the code are O(n) except for the multi-grid solver which is O(n log n). However, if you double the points in both x and y, then this is increasing n by a factor of 4. In addition, if you double the resolution then running a certain simulation (say two cycles of bluff body shedding) will require (about) twice as many time steps. Hope that helps. |
Thanks. I dont think its a bug. I think its an issue of rendering, or i am looking all over the internet.. On Mon, Sep 5, 2016 at 4:49 PM, Dr Weymouth notifications@github.com
|
Hello again.. maybe the last email was all over the place but I have some I got the two phase to work but I am not sure if it is working as well as static class MG{ SIMD processing : t when I move the circle near the surface, it is very slow... Even an i loaded http://www.lagers.org.uk/jasmine/ but i see no difference.. If there is parallelization to be done, i think that could be next, but i -I noticed the line seg object could not break the bubbles. I think the -But for a numerical wave take with some length , it seems it needs plenty -the bubbles could be compressible, that would be a nice look if resolved. -I would love to see a sample of a breaking , overturning , air gulping
onshore) , should make a mess.. ( i can see the wind blow on the water). I could not figure out how to change the density ratio, or any buoyancy
-would it be hard to add temperature? I would think that just advects -adaptive features such as grid refinement would give the most reward.. I am still not sure if this code is the right path for me, I like the idea I installed Jasmine to processing, didnt notice much of a difference... ( is there a less frendly and more performant code I could look at? I I now found some new flip code that is adaptive both with the size of the If i see a nice breaking wave demo, maybe i can fix some of this stuff... CBatty's variational cut cell method promises a coupling. it is using a I tried compling the java, so i think the main issue is the buffers, and i am gong to give a quick try to this: reuse the buffers by making static class MG{ int iter=0; float tol=1e-5; MG( PoissonMatrix pA, Field X, Field B ){ [image: Inline image 2] air is to thin, water not dense enoug..... I am only 5 month into CFL ,[image: Inline image 1] But runing at 2^ 6 2,^ 5 gives me barely interactive speeds. for 2d i was hoping to do the full NS... not using some hacks.. i still dont understand "periodic" boundary conditions, if there is only On Mon, Sep 5, 2016 at 9:33 PM, Damian Hallbauer <damian.hallbauer@gmail.com
|
My role in this open source project is to help people use and update lily If you have a bug, or usage question, then I'll try to help fix/answer it. This is my understanding of how open source works. So, if you're interested in making lily pad better for everyone, then pick On Sep 6, 2016 19:28, "damian-666" notifications@github.com wrote:
|
op, i just pulled up my processing to try another scheme and see that all out of the box, this code does more and is organized better than the other But reusing those buffers i always have optimized first, pretty sure and thinking about SIMD is something, flattening the buffers to 1d, i i can try to do it but my project is 2 years overdue and it might get But if you can point me to how to set *viscosity , fluid density, gravity direction, ( or general acceleration) Adding heat is not hard... but I had to hack to figure out how to adjust Im learning python, processing, fortran90. java, shaders opencl,.. all My project is 2 years overdue and I think i have read over 300 papers. thanks for makeing this code available., it might be my best water solution On Tue, Sep 6, 2016 at 8:58 PM, Dr Weymouth notifications@github.com
|
Hello again, i think made a little progress on the two phase "wave tank"....I hope i but for my simulations even with 1/10 density and a small immersed i hope to try it because it looks good when it works , but . , in the if I find a robust solver i can port to java and switch in i will try.. http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.457.5625&rep=rep1&type=pdf https://wissrech.ins.uni-bonn.de/research/projects/amg/ code licenses are ok.... http://www.prace-ri.eu/IMG/pdf/scalable-tools-for-fem-applications.pdf BoomerAMG of HYPRE code of the Laurence Livermore National Laboratory I use a c++ to c# converter.. there probably is one for java... i found also , i find papers that say FFT pressure solves can work with immersed my code was last like this but i feel its unstable more often than FloodPlot flood; Body body; // flow = new TwoPhase(n,m,2,0.01); TwoPhase flow; void setup() { int m=(int)pow(2, 5)*1; // size ( 400, 300); Window view = new Window(n,n/2); body = new CircleBody(n/3, m/2, L/2, view); // define geom flow = new TwoPhase(n,m,2,0.05); // length-scale in grid units } /* void draw() {
flow.update(body); flow.update2(); // flood.display(flow.u.curl()); } /*** void draw(){ void settings() On Tue, Sep 6, 2016 at 9:58 PM, Damian Hallbauer <damian.hallbauer@gmail.com
|
hello again, sorry to bug you bug im runny out of time, need guidance on I read in your wikik that the iVof and the two phase is still under But my focus is on swimmers and walkers in 2d... I dont know if a Incremental fluids" code on github has given me multi density , dust in the But in a port of that ot java, I found a solver for CG in Java... it here is a java version of the CG solver but with a different https://github.com/noSoulApophis/incremental-fluids-java/blob/master/src/ I dont konw if i am qualified to fix the two phase in Lilypad. i am self but unless you prescribe me a plan of action or proper test cases. for I might try the Nast2d code, but i dont konw if i can put a fish in thanks, Damian Hallbauer , On Wed, Sep 7, 2016 at 7:47 AM, Damian Hallbauer <damian.hallbauer@gmail.com
|
What's the problem with the current two phase implantation? Can you On Sep 8, 2016 19:42, "damian-666" notifications@github.com wrote:
|
Thanks.. yes. I will do this now. the sample code is there at the warning: the crashed processing sessions, leak, under Win 10, and On Thu, Sep 8, 2016 at 8:38 PM, Dr Weymouth notifications@github.com
|
Hello Dr: here is the minimum code to show the instability in two phase.. Almost changes:
TOO START FROM SCRATCH .. TAKE THE TWO PHASE CODE , CHANGE THE SETUP TODO : RESHAPE TO GET MORE OF A TANK LIKE LONGER RECTANGLE. SET THE MY TEST CODE, JUST REPLACE ALL IN LILYPAD FILE. /*********************************************************
Click the "Run" button to Run the simulation. Change the geometry, flow conditions, numercial parameters This screen has an example. Other examples are found at * *********************************************************/ //void setup(){ void setup(){ _// int n=(int)pow(2,6)_6 , m=(int)pow(2,6) ; *
// flood = new FloodPlot(view); // intialize a flood //the sample
/ for reference*
*/ void mousePressed(){body.mousePressed();} // user mouse... NOTES ON BREAKING WAVES AND BUBBLES A good sample for numerical wave take would be nice so i can see the NOTES: on hang up sessions, processes leak.. i use cntl alt delete or a names of the processes.. in Processing , that leak.. if you have lots of java platform SE binary. On Thu, Sep 8, 2016 at 10:35 PM, Damian Hallbauer <
|
I'm sorry, but that doesn't work because of all the little stars and weird tab stuff you've introduced. Can you please clean that up and put it in as a code block or attach as a single LilyPad.pde file? |
Thanks, I will find the Pde file and send. meanwhile, this might work // Circle that can be dragged by the mouse //void setup(){ // sample test code given void setup(){ // int n=(int)pow(2,6)*6 , m=(int)pow(2,6) ; //tried this.. not sure if size(1200,500); // display window size , trying for numerical wave float L = n/8.; // length-scale in grid units // body = new CircleBody(n/18,n/14,L/2,view); flow = new TwoPhase(n,m,2,0.01);
// flow.u = new VectorField(n+2,m+2,0.2,0); //breeze to the right at // flood = new FloodPlot(view); // intialize a flood // sample test code given void draw(){ body.follow(); // update the body flow.f.display(); void mousePressed(){body.mousePressed();} // user mouse... //WISH: WOULD LOVE TO HAVE A WITH NUMERICAL WAVE TANK... A MOVEABLE On Fri, Sep 9, 2016 at 10:40 AM, Dr Weymouth notifications@github.com
|
Sorry, to drop off the grid... ran out of 4g credits just as i was Maybe you can tune it properly, see what i did wrong , I am certain i I'm not too concerned about fluid mass conservation for the wave, i can Thx.. On Fri, Sep 9, 2016 at 11:35 AM, Damian Hallbauer <
|
I've reproduced the issue and migrated to a new issue with a clear title focused just on this topic. |
sounds good Doctor, thank s for looking at it right away. sorry, but i i must say, LilyPad is the only tool i found that give an interesting Yes, I see that the QUICK is stable, but .. using it at 64 x 32 is flow = new TwoPhase(n, m, 0, body, L/10.0, true, 0.01, 0.001); //QUICK and if go back to the stable quick with the moving ball, and i use 1/100 changing the last two params will stall it... flow = new TwoPhase(n, m, 0, body, L/10.0, true, 0.01, 0.1); //QUICK... if I had heat, this would not be predictable. if it were stable , some parallelisation , trivial.. as described in im still convinced its the pressure solve because of my parameter testing, here in this paper looks very promising: Here is says the approach allows for *800 to 1 density *with bubbles that An Adaptive Level Set Approach for Incompressible Two-Phase Flows1 flow = new TwoPhase(n, m, 0, body, L/10.0, true, 0.01, 0.001); //QUICK these researches love AMG for mud flows. and everything. while others say i think if it is lagging.. then the code can change to AMG->CG... in c# we have Parallel.ForEach loops... https://www.math.ucla.edu/~jteran/papers/MST10.pdf A parallel multigrid Poisson solver for fluids simulation on large grids https://wissrech.ins.uni-bonn.de/research/projects/amg/ Multigrid Methods on Adaptively Refined Grids my next step is to use MAC cut cell scheme to do multi density soot that i
- is there buoyancy?.. i search for bubbles and i find no explicit code.. -should i try convex, air containing shapes , are they supported? seems i might be able to prototype faster with processing ( but the leaks are Or more. I would port it to c#... apply trivial parallelization.. to On Sat, Sep 10, 2016 at 10:00 AM, Dr Weymouth notifications@github.com
|
found some speedups for java.. .net has better tools but MSFT hasnt pushed rendering.. using p2d or p3d makes a big difference. size(1400,700,P2D); https://blog.jooq.org/2015/02/05/top-10-easy-performance- http://stackoverflow.com/questions/5686200/parallelizing-a-for-loop memory leaks... they go by alot of names... soits hard to clear them... log people even fix the source ... |
Sorry if i don't even make any sense or have not read everything you have published, but i have some ideas , questions , or suggestions for the solver..
So, i have tried a few schemes, they are like this. . 64x64 grids. is all i can run in debug. But, when i try see your code, its it the Algebraic MD?, your converges in 2 , not 80 iterations.. that is great. But i cannot fill a sky or half an ocean on a laptop.. with a rough grid. And i think like Molemaker/ Cohen.. it can be fixed with the GPU and IOP .. but .. thats tricky...http://enu.kz/repository/2010/AIAA-2010-523.pdf . This paper mentions FEFLO andLOC - FCT flux corrected transport.. i thought they used IOP and SIMPLE... and Cuda.. anyways.. Cuda is no good for me..since Skylake is a good cpu.
So, i make three grids.. they compiled them. They were all fast.. there was some stuttering , i believe is due to memory being released ..and the GC'd when maybe it shoudnt. I suspect GC as the cause of the stutters, using 3 processing running ( i forgot which , a flow past some circle)
FFT2 pressure solves seems fast even at 1024 x 1024. 1ms... for the fft on cpu.. But I read "periodic boundary conditions.. However, if the window is one period + buffer. to randomize Y. I dont know if periodic boundary conditions means the immerses rockets, creatures, etc.. need to be symmetrical or what?... I think the doing solves.. in a loose coupled way, which may be good enough only for vfx...to solver for pressure, fft back... then move the think and collide with the air, push it away using a the panel method... then fft solves will be super fast,high res...and using stams way.. stable. I would try it on my force if you think its worth a try, even if not for a CFD IB solver.
Also, as i watch my 3 windows,then i wonder.. should i instead try I use Multigrid , Chimera style , overlapping by 2 boxes.. covery all the info form one grid to the next?.. I could use this for a long 2d ocean with wave.. without resorting to mixed methods, or even narrow band flip. For ortho grids , especially ,this seems doable..
agin TLDR....if i don't even make any sense or missed the published plan. I am reading and reading but i haven't make much progress in my coding. Frankly i am overwhelmed with too many schemes and i just want fast /simple /stable/believable, or perhaps, interchangeable. most are edge based..MAC style..
The text was updated successfully, but these errors were encountered: