CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT > Fluent UDF and Scheme Programming

DEFINE_SOURCE cancellation??

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 2, 2020, 15:05
Default DEFINE_SOURCE cancellation??
  #1
Member
 
mCiFlDk's Avatar
 
mCiFlDk
Join Date: Feb 2020
Posts: 56
Rep Power: 6
mCiFlDk is on a distinguished road
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.
Attached Images
File Type: png Capture_oned.PNG (6.9 KB, 9 views)
mCiFlDk is offline   Reply With Quote

Old   May 2, 2020, 16:01
Default Define_source
  #2
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 35
vinerm will become famous soon enough
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.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   May 2, 2020, 16:28
Default
  #3
Member
 
mCiFlDk's Avatar
 
mCiFlDk
Join Date: Feb 2020
Posts: 56
Rep Power: 6
mCiFlDk is on a distinguished road
Quote:
Originally Posted by vinerm View Post
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
Attached Images
File Type: png Capture_oned.PNG (24.8 KB, 3 views)
mCiFlDk is offline   Reply With Quote

Old   May 2, 2020, 16:31
Default Body Force
  #4
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 35
vinerm will become famous soon enough
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.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   May 2, 2020, 16:40
Default
  #5
Member
 
mCiFlDk's Avatar
 
mCiFlDk
Join Date: Feb 2020
Posts: 56
Rep Power: 6
mCiFlDk is on a distinguished road
Quote:
Originally Posted by vinerm View Post
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.
mCiFlDk is offline   Reply With Quote

Old   May 2, 2020, 16:42
Default Thrust
  #6
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 35
vinerm will become famous soon enough
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?
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   May 2, 2020, 16:59
Default
  #7
Member
 
mCiFlDk's Avatar
 
mCiFlDk
Join Date: Feb 2020
Posts: 56
Rep Power: 6
mCiFlDk is on a distinguished road
Quote:
Originally Posted by vinerm View Post
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.
mCiFlDk is offline   Reply With Quote

Old   May 2, 2020, 17:01
Default Source Term
  #8
Senior Member
 
vinerm's Avatar
 
Vinerm
Join Date: Jun 2009
Location: Nederland
Posts: 2,946
Blog Entries: 1
Rep Power: 35
vinerm will become famous soon enough
I'd recommend you to read my first post again.

You need to use DEFINE_SOURCE.
__________________
Regards,
Vinerm

PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority.
vinerm is offline   Reply With Quote

Old   May 2, 2020, 17:09
Default
  #9
Member
 
mCiFlDk's Avatar
 
mCiFlDk
Join Date: Feb 2020
Posts: 56
Rep Power: 6
mCiFlDk is on a distinguished road
Quote:
Originally Posted by vinerm View Post
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
mCiFlDk is offline   Reply With Quote

Reply


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
[OpenFOAM.com] swak4foam compiling issues on a cluster saj216 OpenFOAM Installation 5 January 17, 2023 16:05
[swak4Foam] funkyDoCalc with OF2.3 massflow NiFl OpenFOAM Community Contributions 14 November 25, 2020 03:30
[Other] How to use finite area method in official OpenFOAM 2.2.0? Detian Liu OpenFOAM Meshing & Mesh Conversion 4 November 3, 2015 03:04
[foam-extend.org] problem when installing foam-extend-1.6 Thomas pan OpenFOAM Installation 7 September 9, 2015 21:53
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51


All times are GMT -4. The time now is 00:35.