Altering properties of fluid within the domain

 Register Blogs Members List Search Today's Posts Mark Forums Read

 December 10, 2008, 06:11 Altering properties of fluid within the domain #1 Nikhil Dani Guest   Posts: n/a Hi all I am a final year student at IIT Madras. Suppose I have a domain in which I have fluid flow. Now, I define a spherical surface within the domain, using the surface>>quadratic drop down menu. Now, I wish to alter, and fix the properties of the fluid within this surface. For instance, if the fluid density is 1000 kg/m3 in the domain, I want it to be 5000 kg/m3 within the surface. Is this possible? Thanking you all in advance.

 December 11, 2008, 10:03 Re: Altering properties of fluid within the domain #2 mange Guest   Posts: n/a i do not know the specifics of your problem or what you want to model. I am therefore not sure that this would be the way to do it but it is possible to make a UDF function and then specify density as function of coordinates. I am not sure what that will say for the physics of the problem though.

 December 11, 2008, 12:29 Re: Altering properties of fluid within the domain #3 Nikhil Dani Guest   Posts: n/a Thanks a lot Mange. I have indeed written a UDF in the following fashion to attain the result. --------------------------------------------------------------------------------------- #include "udf.h" DEFINE_PROPERTY(density,c,t) { real rho; real x[ND_ND]; C_CENTROID(x,c,t); if(sqrt((pow(x[0]-(0.001707),2.)+pow(x[1]-(0.192),2.)+pow(x[2]-(0.004513),2.)))<0.0005) rho=5000; else rho=998.2; return rho; } --------------------------------------------------------------------------------------- The issue with this UDF is that it works at some points, and at some other points it does not. For instance, I wanted this condition at 16 zones (in this case, 16 spheres of radius 0.0005m), but it was activated only at two places. Does mesh size have something to do with it? Or there could be several reasons why this does not work.

 December 12, 2008, 04:26 Re: Altering properties of fluid within the domain #4 mange Guest   Posts: n/a If the scale of your problem admits placement of your spheres (i.e. the coordinates you prescribe as centers for the spheres are inside the domain) you should get all your spheres activated. Of course your cell size will influence. for instance if you place a sphere at the face of a cell and your cell size is bigger then the radius, no cells would be activated.