# internal Field BC

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

March 11, 2011, 06:05
internal Field BC
#1
Senior Member

Join Date: Sep 2010
Location: France
Posts: 224
Rep Power: 10
Hi foamers,
I have a rectangular internal field, and i need to define different values at start (0 folder) for all cells of a circular part inside that internal field, that you can see in the attached image.
Any ideas with blockMesh?

note: BC1 and BC2 are not really boundaries, they represent two different regions, that i need give different initial values inside the whole total internal field

thanks a lot
Attached Images
 drawing.png (67.6 KB, 13 views)

 March 11, 2011, 08:19 #2 Senior Member     maddalena Join Date: Mar 2009 Posts: 436 Rep Power: 15 Hi, I think that setField does what you want... mad

 March 11, 2011, 09:30 #3 Senior Member   Join Date: Sep 2010 Location: France Posts: 224 Rep Power: 10 Hi, Thanks a lot, i found it at last lol, the funkySetFields thanks a lot T.D.

 March 13, 2011, 02:54 #4 New Member   hossein Join Date: Dec 2010 Posts: 14 Rep Power: 8 Hi T.D i m simulating the mass transfer from a single drop to a continuous stagnant phase. so for initial boundary i should define a spherical region for the drop phase. i did it for the alpha by funkySetField. now the question is can i do for the concentration of transporting species same as alpha using funky? thanks

 March 14, 2011, 04:51 #5 Senior Member   Join Date: Sep 2010 Location: France Posts: 224 Rep Power: 10 Hi hossein you can give any values you like inside any region for any volume field you have defined, that's by simply writing the equations that describe that shape of the seeked region in your domain. For example, if you have a 2D disk, you can simply add the following code before the time loop inside the solver: //the disk equation is (x-xc)^2 + (y-yc)^2 <= R^2, here i took xc=0.25,yc=0.05,R=0.015, but you can do similarly for any equation (sphere, cylinder, etc..) and any field, here my field was "c" where i gave it 0.30 values inside the disk, and zeroes anywhere else where, where it is defined in the 0 Folder. //the code just before the time loop forAll(mesh.cells(),cellI) { if (sqr(mesh.C()[cellI].component(0) - 0.25) + sqr(mesh.C()[cellI].component(1) - 0.05) <= sqr(0.015)) { c[cellI] = 0.30; } } I hope that your problem will be solved like that; T.D.

 March 14, 2011, 05:48 #6 New Member   hossein Join Date: Dec 2010 Posts: 14 Rep Power: 8 Hi T.D thanks for your quick reply, i will try like yours and will give you the results , i hope this help me.

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post Niklas Wikstrom (Wikstrom) OpenFOAM Running, Solving & CFD 122 June 15, 2014 06:20 atareen64 OpenFOAM Running, Solving & CFD 2 January 26, 2011 16:26 OFU OpenFOAM Running, Solving & CFD 1 October 5, 2009 03:35 gunnar OpenFOAM Paraview & paraFoam 4 June 25, 2009 12:00 matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 07:51

All times are GMT -4. The time now is 15:42.

 Contact Us - CFD Online - Privacy Statement - Top