|
[Sponsors] |
March 11, 2011, 06:05 |
internal Field BC
|
#1 |
Senior Member
Join Date: Sep 2010
Posts: 226
Rep Power: 17 |
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 |
|
March 11, 2011, 08:19 |
|
#2 |
Senior Member
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23 |
Hi,
I think that setField does what you want... mad |
|
March 11, 2011, 09:30 |
|
#3 |
Senior Member
Join Date: Sep 2010
Posts: 226
Rep Power: 17 |
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: 12
Rep Power: 16 |
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
Posts: 226
Rep Power: 17 |
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: 12
Rep Power: 16 |
Hi T.D
thanks for your quick reply, i will try like yours and will give you the results , i hope this help me. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Moving mesh | Niklas Wikstrom (Wikstrom) | OpenFOAM Running, Solving & CFD | 122 | June 15, 2014 07:20 |
internal field question - PitzDaily Case | atareen64 | OpenFOAM Running, Solving & CFD | 2 | January 26, 2011 16:26 |
problem with internal field and nonuniform list | OFU | OpenFOAM Running, Solving & CFD | 1 | October 5, 2009 04:35 |
[OpenFOAM] Display internal field together with boundaries | gunnar | ParaView | 4 | June 25, 2009 13:00 |
Problem with rhoSimpleFoam | matteo_gautero | OpenFOAM Running, Solving & CFD | 0 | February 28, 2008 07:51 |