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

create a poisson field in fluent

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 28, 2021, 23:00
Default create a poisson field in fluent
  #1
New Member
 
Diwei Liu
Join Date: Apr 2021
Posts: 2
Rep Power: 0
Diwei Liu is on a distinguished road
hello,
now I have a question in how to add the source term of the poisson eqn in the UDF. eqn is
b* laplacian rho = - rho /a ;
while a and b is constant . it is just like a scalar transport equation. I just use the DEFINE_SOURCE macro like this:
DEFINE_SOURCE(source0, cell, thread, dS, eqn)
{
real d = 0.001 ;
real source ;

C_UDMI(cell,thread,0) = C_UDSI_M1(cell,thread,0) /d/d ; // the right part of the eqn

source = - C_UDMI(cell,thread,0);

return source ;
}
result is bad

maybe I am not sure about how a source term is working .
I really need you help !
thank you!
Diwei Liu is offline   Reply With Quote

Old   May 6, 2021, 10:10
Default
  #2
New Member
 
Diwei Liu
Join Date: Apr 2021
Posts: 2
Rep Power: 0
Diwei Liu is on a distinguished road
I have fixed it ,thank you for click!
Diwei Liu 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
Results from field function integration are different in Fluent and CFD-Post SJRC ANSYS 0 February 15, 2021 08:16
External Magnetic Field Data Format for FLUENT MHD Module eduardvinter FLUENT 0 January 24, 2019 01:54
[Other] dynamicTopoFVMesh and pointDisplacement RandomUser OpenFOAM Meshing & Mesh Conversion 6 April 26, 2018 07:30
Import thermal field in FLUENT for initials conditions of a CHT probleme Kodebar FLUENT 2 March 19, 2018 06:59
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 06:51


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