# Elliptic equation UDF

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

 February 28, 2005, 11:45 Elliptic equation UDF #1 dieter Guest   Posts: n/a Hi, 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

 March 7, 2005, 06:28 Re: Elliptic equation UDF #2 mcfiggis Guest   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.

 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 TheBoyce Main CFD Forum 2 June 3, 2011 13:08 dipole Fluent UDF and Scheme Programming 0 October 8, 2010 09:48 saii CFX 2 September 18, 2009 08:07 roka1mtr FLUENT 2 August 25, 2009 04:44 ROOZBEH FLUENT 5 April 22, 2003 06:56

All times are GMT -4. The time now is 16:21.