|
[Sponsors] |
July 25, 2008, 10:38 |
Hi
For that purpose I recom
|
#21 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
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
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request. |
|
July 25, 2008, 15:12 |
Hi
Thanks for the reply. If I
|
#22 |
New Member
Diauddin Nammari
Join Date: Mar 2009
Posts: 8
Rep Power: 17 |
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 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 |
|
July 25, 2008, 16:03 |
Hi D
Well, then you would p
|
#23 |
Senior Member
Niels Gjoel Jacobsen
Join Date: Mar 2009
Location: Copenhagen, Denmark
Posts: 1,903
Rep Power: 37 |
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
__________________
Please note that I do not use the Friend-feature, so do not be offended, if I do not accept a request. |
|
July 28, 2008, 04:19 |
Thanks very much Niels..hope y
|
#24 |
New Member
Diauddin Nammari
Join Date: Mar 2009
Posts: 8
Rep Power: 17 |
Thanks very much Niels..hope you had a good week
That works wonderfully ! |
|
September 10, 2009, 23:01 |
|
#25 |
Senior Member
J. Cai
Join Date: Apr 2009
Posts: 180
Rep Power: 17 |
Hi, dear Nammari, how about your progress on making a cylinder fluid? I am interested in this point. Thanks in advance.
best regards, Chiven |
|
March 10, 2011, 14:45 |
It has been ages
|
#26 |
New Member
Diauddin Nammari
Join Date: Mar 2009
Posts: 8
Rep Power: 17 |
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 |
|
April 13, 2011, 10:54 |
|
#27 | |
New Member
agr
Join Date: Apr 2011
Posts: 2
Rep Power: 0 |
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 |
||
April 14, 2011, 04:41 |
|
#28 | ||
Senior Member
Gijsbert Wierink
Join Date: Mar 2009
Posts: 383
Rep Power: 18 |
Hi Gallyam,
Quote:
Code:
funkySetFields -time 0 Quote:
__________________
Regards, Gijs |
|||
April 14, 2011, 06:04 |
|
#29 |
New Member
agr
Join Date: Apr 2011
Posts: 2
Rep Power: 0 |
Hello, Gijsbert!
Thanks a lot for your reply! Now it works. Regards, Gallyam |
|
October 29, 2011, 17:42 |
|
#30 |
Member
Jason Eason
Join Date: Jan 2010
Location: Portage, Michigan
Posts: 45
Rep Power: 16 |
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?
__________________
Debian Squeeze - OpenFOAM-2.1.x, Paraview-3.12.0 |
|
October 29, 2011, 19:47 |
|
#31 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
||
November 1, 2011, 19:35 |
|
#32 |
Member
Jason Eason
Join Date: Jan 2010
Location: Portage, Michigan
Posts: 45
Rep Power: 16 |
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.
__________________
Debian Squeeze - OpenFOAM-2.1.x, Paraview-3.12.0 |
|
November 2, 2011, 13:26 |
|
#33 |
Assistant Moderator
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51 |
The purpose is to show how to do it in a general way (with a center of the sphere that is not the origin of the coordinate system). WHERE the center is in this concrete example is left as an exercise to the reader.
|
|
November 3, 2011, 09:11 |
|
#34 |
Member
|
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 |
|
February 17, 2012, 08:49 |
rising bubble
|
#35 |
New Member
navid
Join Date: Feb 2012
Posts: 3
Rep Power: 14 |
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 |
|
February 20, 2012, 04:39 |
|
#36 | |
New Member
anonymous
Join Date: Apr 2010
Posts: 14
Rep Power: 16 |
Quote:
Thank you! |
||
February 9, 2013, 13:19 |
|
#37 | |
Member
Guifan Li
Join Date: Apr 2011
Location: New York City, U.S.
Posts: 96
Rep Power: 15 |
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! |
||
March 11, 2016, 12:16 |
|
#38 | |
New Member
Alpha Beta
Join Date: Mar 2016
Posts: 28
Rep Power: 10 |
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 |
||
January 13, 2022, 01:39 |
|
#39 |
Member
ESI
Join Date: Sep 2017
Posts: 49
Rep Power: 9 |
could you send me the code to create a sphere by funkysetfiled?
my email: hoaithanhbk281113@gmail.com Thank you so much! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[blockMesh] Create a mesh for flow around a sphere | harly | OpenFOAM Meshing & Mesh Conversion | 7 | November 6, 2013 17:28 |
SetField problem in OpenFoam 14 | joakim | OpenFOAM Bugs | 17 | October 30, 2009 08:18 |
How to use SetField | tian | OpenFOAM Pre-Processing | 2 | May 18, 2009 05:06 |
cd of sphere | senthil | FLUENT | 3 | June 1, 2006 06:22 |
Sphere | tie | FLUENT | 0 | July 5, 2005 15:29 |