CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > ANSYS > FLUENT

Elliptic equation UDF

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

LinkBack Thread Tools Display Modes
Old   February 28, 2005, 11:45
Default Elliptic equation UDF
Posts: n/a

Has anyone ever implemented in fluent an elliptic differential equation (helmholtz) of the form: a*LAPLACIAN(phi)=phi-1, with phi the scalar field that has to be resolved and a a constant? I tried to program it in a UDF using User defined scalars (UDS), but it didn't work. the solution is not stable (as I expected). does anyone knows a better implementation? Could anyone help me? its urgent!

this is how I programmed it now:

in the ADJUST function:

C_UDSI(c,t,F)=MAX(MIN(C_UDSI(c,t,F),const_1),const _2);

C_UDSI(c,t,DFDX) = C_UDSI_G(c,t,F)[0]; /*with this you can calculate the derivative of an UDS, [0] denotes the x-component*/ C_UDSI(c,t,DFDY) = C_UDSI_G(c,t,F)[1]; C_UDSI(c,t,DFDZ) = C_UDSI_G(c,t,F)[2]; C_UDSI(c,t,D2FDX2) = C_UDSI_G(c,t,DFDX)[0]; C_UDSI(c,t,D2FDY2) = C_UDSI_G(c,t,DFDY)[1]; C_UDSI(c,t,D2FDZ2) = C_UDSI_G(c,t,DFDZ)[2];

C_UDSI(c,t,F) =a*(C_UDSI(c,t,D2FDX2)+ C_UDSI(c,t,D2FDY2)+ C_UDSI(c,t,D2FDZ2))+1.;

thanks for your help Dieter
  Reply With Quote

Old   March 7, 2005, 06:28
Default Re: Elliptic equation UDF
Posts: n/a
I think you've mistaken Fluent for Mathcad. To solve this equation:

1. Turn off the convective flux. 2. Set the diffusivity of the scalar to a. 3. Set the source term for the UDS to C_UDSI(c,ct,0)-1, which you'll have to linearise: dS[eqn] = 1.

All these things can be found in the UDF manual.

  Reply With Quote


Thread Tools
Display Modes

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Implicit elliptic pressure field equation. TheBoyce Main CFD Forum 2 June 3, 2011 13:08
UDF for Powell vortex sound equation dipole Fluent UDF and Scheme Programming 0 October 8, 2010 09:48
mass flow in is not equal to mass flow out saii CFX 2 September 18, 2009 08:07
udf temperature/velocity profile-> equation problems roka1mtr FLUENT 2 August 25, 2009 04:44
UDF sourse term for VOF equation ROOZBEH FLUENT 5 April 22, 2003 06:56

All times are GMT -4. The time now is 12:36.