Hi
For that purpose I recom
Hi
For that purpose I recommend that you look into funkySetField. At the present it is not ready for the 1.5 version, thus you need to apply it in 1.4.1. If you by a cylinder mean a circle in 2D, then you could turn off gravity and let viscosity do the job. Best regards, Niels |
Hi
Thanks for the reply. If I
Hi
Thanks for the reply. If I don't want to use 1.4.1, I just installed 1.5 and just got it working http://www.cfd-online.com/OpenFOAM_D...part/happy.gif Instead of going back is it possible to read the location of a cell at position ( x,y,z )and "update" the value of gamma from 0 to 1. I found after reading around in the discussion "mesh.findCell(x,y,z)" that would give me the ID of the cell, how do I use that cell location update its value.( I guess I can do write some primitive code that makes a cylinder of fluid). Best regard and have a good weekend D |
Hi D
Well, then you would p
Hi D
Well, then you would probably be able to do something like this: gamma[mesh.findCell(x,y,z)] = 1; assumed that (x,y,z) is with in the cylinder. But say that the cylinder is placed along the z-axis, then wouldn't something like this do the trick!?! scalar xC(0.0), yC(0.0); // Center values of for the cross section. forAll(gamma,gI) { if (sqr(mesh.C()[gI].component(0) - xC) + sqr(mesh.C()[gI].component(1) - yC) <= sqr(radius)) { gamma[gI] = 1; } } Simply put this before the time loop and initialize gamma to zero in /0/gamma. This is primitive but it would work and basicly do the same as funkySetField. / Niels |
Thanks very much Niels..hope y
Thanks very much Niels..hope you had a good week
That works wonderfully ! |
Hi, dear Nammari, how about your progress on making a cylinder fluid? I am interested in this point. Thanks in advance.
best regards, Chiven |
It has been ages
Chiven,
It worked well and I have managed to change it to make the problem a little more intresting, now I am trying to create "empty" tanks using snappyhexmesh, but not succsesful at all D |
Quote:
Dear Bernard and All, I downloaded the swak4Foam package, tried to follow your instructions - additionally installed flex. Seems it was built without errors. But I still cannot get - should one use funkySetFields instead of setFields or after? I just placed your demo funkySetFields Dictionary in my case/system directory and run the funkySetFields utility. It returned me the error: FOAM FATAL ERROR:What does that mean? Thanks in advance for your advice, Regards, Gallyam |
Hi Gallyam,
Quote:
Code:
funkySetFields -time 0 Quote:
|
Hello, Gijsbert!
Thanks a lot for your reply! Now it works. Regards, Gallyam |
I want to create a sphere using funkysetfields, but I'm not having any success. Could anyone show me the proper code to accomplish my goal?
|
Quote:
.... for instance |
Thank you for your help, sorry it took so long for me to respond. Could you better help me understand the vector component of that expression? I'm not certain what purpose the vector(1,0,0) serves.
|
Quote:
|
Hi Sebastian,
You can do that easily with setFields like 18 defaultFieldValues 19 ( 20 volScalarFieldValue alpha1 0 21 ); 22 23 regions 24 ( 25 sphereToCell 26 { 27 centre (0.05 0.1 0.5); 28 radius 0.01; 29 fieldValues 30 ( 31 volScalarFieldValue alpha1 1 32 ); 33 } 34 ); cheers, Duong |
rising bubble
Hi Jaswi and Sebastian, i followed your posts about using funkysetfield for rising bubble case, may i ask for Jaswi code?
i want to simulate rising bubble and investigate terminal velocity like u (Sebastain). i am confuse with using setfield too. thanks in advance |
Quote:
Thank you! |
Quote:
How is going with your bubble rising from the water. I am currently working on the same thing, however, I am not able to figure out how to design a 3D bubble from the above picture given. Just wondering does someone has sent you the code for that? I have figured out the 2D model but not the 3D one. If you have the code, do you think you can send me a copy for that? my email address is liguifan@gmail.com Appreciated! |
Quote:
This is too crude .. just started openFoam 3 days ago what to after a cad model shape and how does it get its reference point... Thanks |
could you send me the code to create a sphere by funkysetfiled?
my email: hoaithanhbk281113@gmail.com Thank you so much! |
All times are GMT -4. The time now is 00:40. |