|
[Sponsors] |
July 1, 2019, 15:17 |
Help in writing udf for adjacent cells
|
#1 |
New Member
VK
Join Date: Dec 2018
Posts: 9
Rep Power: 8 |
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 |
|
|
|
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 |