CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   Can FLUENT solve our own defined equation (https://www.cfd-online.com/Forums/fluent/31337-can-fluent-solve-our-own-defined-equation.html)

 Sebeci April 22, 2003 09:11

Can FLUENT solve our own defined equation

Hi all Can FLUENT solve our own equation, with omitting (mass,momentum and energy)and defining new equation by UDS.

 ap April 22, 2003 10:24

Re: Can FLUENT solve our own defined equation

In FLUENT you can solve scalar user-defined equation which can be implemented via UDS.

You can disable pre-defined equations in the Solve->Controls->Solution panel.

I'm not sure if you can completely replace contnuity, momentum and energy equation via UDS. This seems difficult because you'd have to split all vector equations in their scalar components and to consider them as separate UDS.

However, you can add terms to these equations by UDF, considering them as sources. This should allow you to obtain the equations you need.

Hi and good work.

ap

 Sebeci April 22, 2003 11:24

Re: Can FLUENT solve our own defined equation

As another question, I didn't exactly understand (from FLUENT manual) that the derivatives of source term should be obtained from which variable(s)?If you don't mind please let me know with an example.

Regards

 ap April 22, 2003 15:20

Re: Can FLUENT solve our own defined equation

The derivative term dS of the source term is dS/d(phi), where phi is the scalar you're defining. Suppose you have to define the source:

S = 3*phi+5*sin(phi)

you should put dS = 3+5*cos(phi).

The DEFINE_SOURCE routine is:

{

real phi, source;

source = 3* phi + 5*sin(phi);

dS[eqn] = 3 + 5*cos(phi);

return source;

}

Notice that the dS term is used by FLUENT only to stabilize the solution, if needed. However, you can put dS = 0.0, if you don't want to declare the derivative term. This may result in a less stable solution, because you force FLUENT to handle the source term explicitly.

P.S. Do you know where I can find some example of UDS applied to multiphase systems?

Hi.

ap

 All times are GMT -4. The time now is 22:44.