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

Help in writing udf for adjacent cells

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 1, 2019, 15:17
Lightbulb Help in writing udf for adjacent cells
  #1
New Member
 
VK
Join Date: Dec 2018
Posts: 9
Rep Power: 8
vkumar12 is on a distinguished road
I have a problem where a mass source term is dependent on the temperature of the adjacent cells. The equation which i want to put in the udf form is given like this:

Smj = (A * ▲ Tj)/ Vj

Where Smj = Mass source of a species in jth cell
A - constant
▲ Tj - Temperature diff between two adjacent cells
Vj - Volume of Jth cell

I think i understand the basic udf, and I dont know how do i put temperature of two adjacent cells in the udf. If any one help writing a UDF , i would be very grateful

I am trying to write but stuck, It may be simple for those who are experienced in this.

DEFINE_SOURCE(_mass, c, t, dS, eqn)
{
real source;
real temp = C_T(c,t);
if (673<=C_T(c,t)<=1073)
source = -----------------------???
else
source = 0;
dS[eqn] = 0;
return source;
}

Thanks
Varun
vkumar12 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
[blockMesh] Create internal faces as patch in blockMesh m.delta68 OpenFOAM Meshing & Mesh Conversion 14 July 12, 2018 15:43
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 10:38
snappyhexmesh remove blockmesh geometry philipp1 OpenFOAM Running, Solving & CFD 2 December 12, 2014 11:58
[snappyHexMesh] snappyHexMesh aborting Tobi OpenFOAM Meshing & Mesh Conversion 0 November 10, 2010 04:23
Setting pressure value for specific cells, UDF Amir FLUENT 2 September 1, 2005 19:59


All times are GMT -4. The time now is 13:17.