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

UDS n It's source term

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Thomas

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 16, 2003, 19:34
Default UDS n It's source term
  #1
Umesh
Guest
 
Posts: n/a
Dear all,

I have an equation to solve. I think I can use UDS for that. The eqn is like,

A div(phi)=-((phi)^2)/B Where A and B are constant values.

Now I need to solve this differential eqn. using UDS for phi. Can anybody suggest how I can do that.

Thanks for your time and effort.

Umesh
  Reply With Quote

Old   December 17, 2003, 12:45
Default Re: UDS n It's source term
  #2
thomas
Guest
 
Posts: n/a
Hi, I kinda face the same kind of problem recently but I did not have yet enought time to test my programm lines so I am interested in your problem and the way to solve it. Here is some thoughts.

According to your equation, I agree to say phi needs to be solved by a scalar (UDS or UDSI -> same thing). UDS transport equation transport are composed of 4 terms: advection, unsteaday, diffusion, source term. I think only the source term can help you to get the solution of your problem. So what I personaly did and what I would suggest is to declare in a UDF a DEFINE_SOURCE. In this define_source devlare a UDSI = phi. There you are gonna be able to get macro to calculate the gradient 'C_UDSI_G(c,t,i)'in all direction. Therefore you can calulate you DIV(phi) term and get your solution phi. According to what I read on the documentation C_UDSI_G seems to be a matrix, so you need to compute a dot product to calculate you divergenge term. Then hook you source term in your fluid zone panel next to the term scarlar_(i) (i = indenfier you gave to your UDSI (0,1,2,3....). Do not forget to declare your sclar BCs.

Hope I am enought clear and do not forget to let me know how your results are going and how is the life at Western ? Who are you working with ? What department are you in ?

Cheers Thomas
  Reply With Quote

Old   December 17, 2003, 13:07
Default Re: UDS n It's source term
  #3
Umesh
Guest
 
Posts: n/a
yeah Thomas, I need to to have the DEFINE_SOURCE to solve (phi^2)/B. But the problem is how can I implement this equation in UDS. What I mean is, the UDS solves

div^2(phi) = S

while my differential equation of kind,

div(phi) = S

How can I solve this equation. do you get my point?

Well, I m doing Masters' in Chemical engineering dept. My personal experience with western is good, I like the campus and work environment. Where are you and what do you do?

thanks

Umesh
  Reply With Quote

Old   December 17, 2003, 16:31
Default Re: UDS n It's source term
  #4
Thomas
Guest
 
Posts: n/a
Hey, Well I do not understand what you mean by 'UDS is solving div^2(phi) = S' and sincerely I have never seen the operator div^2 before, unless you try a way to mean the laplacian operator in the duffusivy term of the transport equation. your equation is A.div(phi)=-((phi)^2)/B so your solution will be to find in each cells the value of 'phi' which will be phi(cell) = square [A/B . div(phi)]. Am I wrong ? You might also discretize the 'phi(cell)' term but I don't see the interest of doing that as long as phi(cell) is the exact value of the solution you want. So the only unknown you have is div(phi)= d(phi)/dx + d(phi)/dy + d(phi)/dy (obviously phi is not a vector but a scalar also called potential). So the way to calculate that is to define phi as a UDSI(c,t,i) and calculate the right dot_product with the gradient matrix C_UDSI_G(c,t,i). Then put that in a DEFINE_SOURCE which will allow you to get the 'phi' value. Of course the source term will be the only term of your scalar transport equation which means when you declare your UDSI in fluent you are gonna to put 'none' to 'unsteady' and 'flux' term. So the DEFINE_SOURCE and the UDS is a way to solve your equation. However I wonder if you cannot replace the define_source and the UDS by modifying the DEFINE_FLUX macro, better user could answer. This is the way I see it. You or someone else can show me if I am wrong and I would be very interested to know why !

I was in western last year in the chem. department for an exchange. I did the 497 project with Prakash and Ali was my ghost TA . I am french and undergraduate in Process Eng.

Wait for your answer.

thomas

johnwinter likes this.
  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
Problem of SOURCE term gradient in UDS wind Fluent UDF and Scheme Programming 6 December 1, 2022 14:21
[swak4Foam] swak4foam building problem GGerber OpenFOAM Community Contributions 54 April 24, 2015 16:02
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 01:24
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51
UDFs for Scalar Eqn - Fluid/Solid HT Greg Perkins FLUENT 0 October 13, 2000 23:03


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