|
[Sponsors] |
February 28, 2005, 11:45 |
Elliptic equation UDF
|
#1 |
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 |
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. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
mass flow in is not equal to mass flow out | saii | CFX | 12 | March 19, 2018 06:21 |
Implicit elliptic pressure field equation. | TheBoyce | Main CFD Forum | 2 | June 3, 2011 14:08 |
UDF for Powell vortex sound equation | dipole | Fluent UDF and Scheme Programming | 0 | October 8, 2010 10:48 |
udf temperature/velocity profile-> equation problems | roka1mtr | FLUENT | 2 | August 25, 2009 05:44 |
UDF sourse term for VOF equation | ROOZBEH | FLUENT | 5 | April 22, 2003 07:56 |