CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM

internal Field BC

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 11, 2011, 06:05
Default internal Field BC
  #1
Senior Member
 
Join Date: Sep 2010
Posts: 226
Rep Power: 17
T.D. is on a distinguished road
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
File Type: png drawing.png (67.6 KB, 14 views)
T.D. is offline   Reply With Quote

Old   March 11, 2011, 08:19
Default
  #2
Senior Member
 
maddalena's Avatar
 
maddalena
Join Date: Mar 2009
Posts: 436
Rep Power: 23
maddalena will become famous soon enough
Hi,
I think that setField does what you want...

mad
maddalena is offline   Reply With Quote

Old   March 11, 2011, 09:30
Default
  #3
Senior Member
 
Join Date: Sep 2010
Posts: 226
Rep Power: 17
T.D. is on a distinguished road
Hi,
Thanks a lot, i found it at last lol, the funkySetFields

thanks a lot

T.D.
T.D. is offline   Reply With Quote

Old   March 13, 2011, 02:54
Default
  #4
New Member
 
hossein
Join Date: Dec 2010
Posts: 12
Rep Power: 16
hossein.mashhadi is on a distinguished road
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
hossein.mashhadi is offline   Reply With Quote

Old   March 14, 2011, 04:51
Default
  #5
Senior Member
 
Join Date: Sep 2010
Posts: 226
Rep Power: 17
T.D. is on a distinguished road
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.
T.D. is offline   Reply With Quote

Old   March 14, 2011, 05:48
Default
  #6
New Member
 
hossein
Join Date: Dec 2010
Posts: 12
Rep Power: 16
hossein.mashhadi is on a distinguished road
Hi T.D
thanks for your quick reply, i will try like yours and will give you the results , i hope this help me.
hossein.mashhadi is offline   Reply With Quote

Reply


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 Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 01:45.