# Change porous properties in UDF?

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

 August 17, 2000, 05:26 Change porous properties in UDF? #1 Patrik Blix Guest   Posts: n/a How do I change the porous properties, for a porous zone, from a UDF? Especially I want to change the viscous and inertial resistances.

 August 17, 2000, 14:38 Re: Change porous properties in UDF? #2 Arturo Ortiz Guest   Posts: n/a Take a look at the first example on the UDF section 5.2.1 maybe is what you need. Regards

 August 31, 2000, 08:29 Re: Change porous properties in UDF? #4 Patrik Blix Guest   Posts: n/a Thanks Greg! Since you obviously know what you are doing, I have another question. My "Porous Zone" also rotates around an "Axis Origin" (x,y) with a "Rotational Velocity" (rad/s). How should I do to include this as well, i.e. a REVOLVING POROUS ZONE?

 August 31, 2000, 21:17 Re: Change porous properties in UDF? #5 Greg Perkins Guest   Posts: n/a There's probably a couple of ways - have you looked at the moving reference frame option in Fluent - you could use that. I have never used it so I really don't know. If you just want to rotate the source terms in the momentum eqns you can modify the udfs - bear in mind you won't account for other forces like centrifugal/coirolis (?) etc this way. Here's how I might approach it . . . Assume you have a 2D porous zone rotating at w rad/s about the origin and you know the material property distribution at time t=0 - this will be the values of C2 and alpha - ie. alpha(x,y,0) and C2(x,y,0). Now given a cell x,y at time t, you want to know alpha(x,y,t) and C2(x,y,t). Then 1. use the RP function (see udf) to determine the current time t. 2. determine how much rotation has occurred - this is wt (in rads). But we only need to know the extra above a whole revolution so let r = (wt mod 2*pi) (psuedo code, where mod returns the remainder after dividing wt by 2*pi) 3. determine the angle from the x axis (say) of the current point (x,y), thi. This is thi = arctan(y/x) Note: you need to add checks etc to avoid division by zero and to ensure it works in all quadrants - usual thing using trig functions on computers.... 4. also determine distance from origin (or centr of rotation). dist = sqrt(x^2+y^2) 5. Now the position at time t=0 which has the value of (x,y) at the current time t, can be determined:- x1 = dist*cos(thi+r) y1 = dist*sin(thi+r) again add necessary checks to make universal. 6. now use properties at the computed locations and return, ie. alpha(x,y,t) = alpha(x1,y1,0) C2(x,y,t) = C2(x1,y1,0) Hope it helps. Regards Greg Perkins

 September 3, 2000, 23:11 Re: Change porous properties in UDF? #6 Arturo Ortiz Guest   Posts: n/a For Gregg Hi... I am also working on porous media with variable ( time and spacially) properties and would like to ask you a question. As I analyzed your code you constructed the source in the porous media using the standard form of fluent, S=mu/alpha*Vi+(1/2)C2 rho* abs(Vi)*Vi. In the sort of porous material I am simulating, the source is in terms of the porosity and I would like to vary it with time and space. My question is the following: with Fluent I can define a constant value for the porosity of the media, if I change it in the UDF can I have some kind of problem or I can set it as default ( porosity=1) and change it in the UDF?. Or can I just define a region and as I am defining the source, can I leave it as non porous and proceed with the calculations?. Do you handle the problem of the non accelerating flow in any way? I am a beginer as you can see. Hope you can find time to answer and I thank you in advance. Arturo

 September 3, 2000, 23:24 Re: Change porous properties in UDF? #7 Greg Perkins Guest   Posts: n/a The source terms I have written as UDFs are just those as detailed in the Fluent manual. In the examples I think I just set high or low values for the permeability. Normally I use the Ergun equation to determine values of alpha and C2 from the materials porosity and particle diameter - this eqn assumes the porous material is a packed bed of particles - see Ch6 of Fluent 5 manuals (I think). If you use these UDFs you shouldn't activate the zone as a porous media zone using the Fluent GUI. These UDFs replace the standard terms, and allow you to program and variation as a function of x,y,z and t. If you have another form of the source term - just program it in - ultimately the term should have units compatible with the momentum eqn. All these udfs do is add a source term to the momentum eqns, which attempt to account for the effect of the solid material on the flow of fluid in the region. All models have a range of validity for your application - you need to establish what model is best for you and then program it in. You may like to evaluate several different cases to determine which is best.

 September 4, 2000, 11:26 Re: Change porous properties in UDF? #8 Arturo Ortiz Guest   Posts: n/a Thanks Greg. I also use some kind of generalized Ergun Equations and I would like to program in fluent. Do you have some experience in using VOF in porous media? Best regards. Arturo Ortiz

 September 10, 2000, 00:17 Re: Change porous properties in UDF? #9 Greg Perkins Guest   Posts: n/a No experience of VOF and porous media - sorry! But I imagine so long as you can derive reasonable source terms you shouldn't have too many problems implementing them in Fluent. Getting convergence is often the hard part! Greg

 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 ljp Fluent UDF and Scheme Programming 0 April 2, 2010 09:57 zou_mo FLUENT 0 June 30, 2009 07:15 Jose FLUENT 0 February 23, 2006 19:24 Aaron Smith FLUENT 0 February 21, 2006 10:14 Arturo Ortiz FLUENT 7 October 13, 2000 23:34

All times are GMT -4. The time now is 03:38.

 Contact Us - CFD Online - Privacy Statement - Top