CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Fluent UDF and Scheme Programming (https://www.cfd-online.com/Forums/fluent-udf/)
-   -   DEFINE_SOURCE cancellation?? (https://www.cfd-online.com/Forums/fluent-udf/226615-define_source-cancellation.html)

mCiFlDk May 2, 2020 15:05

DEFINE_SOURCE cancellation??
 
1 Attachment(s)
Hi everyone,

My doubt concerns the interpretation that ANSYS does to the DEFINE_SOURCE macro, and how it is related to the User-defined Scalar transport equation. Last time I used this function, it was together with a non-zero diffusivity coefficient while simulating plasma, and I don't know if I should use DEFINE_SOURCE again if I'm not solving any kind of partial diff eq.

The equation I'm using is pretty simple (attached below); it only has two variables (x and y) that are referred to the position of the point on which it would be applied and the rest are constant values.

Thanks in advance.

vinerm May 2, 2020 16:01

Define_source
 
Source terms are used to model generation or depletion of some field due to a reason that is not included in the simulation. What you have is an algebraic equation and can be modeled using a custom-field-function. You do not require a UDF.

mCiFlDk May 2, 2020 16:28

1 Attachment(s)
Quote:

Originally Posted by vinerm (Post 768384)
Source terms are used to model generation or depletion of some field due to a reason that is not included in the simulation. What you have is an algebraic equation and can be modeled using a custom-field-function. You do not require a UDF.

Thanks a lot for the quick response. I've opened Fluent and I've been looking for the field functions that can be applied by the custom field. Sadly, body force [N/m^3] is not included within the options.

I'm even more confused, but as DEFINE_SOURCE is defined by [N/m^3] I thought it was the correct way to do it.

I'll wait for your reply. Thanks a lot

vinerm May 2, 2020 16:31

Body Force
 
Where is body force being used in the equation? Do you mean the thrust? Fluent only reports field variables and not integrals, which you might need. In that case, you have to write an expression instead of CFF.

mCiFlDk May 2, 2020 16:40

Quote:

Originally Posted by vinerm (Post 768403)
Where is body force being used in the equation? Do you mean the thrust? Fluent only reports field variables and not integrals, which you might need. In that case, you have to write an expression instead of CFF.

Yes, that's exactly what I meant. The equation output is thrust. Then I'll need a simple UDF where DEFINE_SOURCE is used or I'll need another macro? Because that is my headache.

Thank you.

vinerm May 2, 2020 16:42

Thrust
 
Output doesn't matter. There is a thrust component in the equation, which is multiplied with \pi^2, what is that? Is that a constant or do you want that to be determined based on some field in the Fluent?

mCiFlDk May 2, 2020 16:59

Quote:

Originally Posted by vinerm (Post 768406)
Output doesn't matter. There is a thrust component in the equation, which is multiplied with \pi^2, what is that? Is that a constant or do you want that to be determined based on some field in the Fluent?

This equation is defining the maximum thrust per unit depth in X axis that is produced by a plasma actuator. This term has to be applied directly as a source term to the NS equations, and is constant through time, it doesn't depend on any field apart from the distances x and y respect to a point defined by the user.

vinerm May 2, 2020 17:01

Source Term
 
I'd recommend you to read my first post again.

You need to use DEFINE_SOURCE.

mCiFlDk May 2, 2020 17:09

Quote:

Originally Posted by vinerm (Post 768411)
I'd recommend you to read my first post again.

You need to use DEFINE_SOURCE.

I've read it and yes, you're right.

Thanks a lot Vinerm


All times are GMT -4. The time now is 08:25.