|
[Sponsors] |
February 22, 2019, 05:20 |
UDF Initialize temperature in solid objects
|
#1 |
New Member
Sérgio Cavaleiro Costa
Join Date: Nov 2017
Location: Lisbon, Portugal
Posts: 12
Rep Power: 9 |
Hi all,
In the Workbench I have created a fluid domain and 5 solid domains independently and merged all to a fluent. All solids are immersed in the fluid and linked using the mesh interface. Inside solids, I only want to solve heat conduction. I would like to initialize them with different temperatures without using the patch way. My code so far is the following: Code:
#include "udf.h" DEFINE_INIT(initMaterial, domain) { cell_t c; Thread *t1 = Lookup_Thread(domain, 77); Thread *t2 = Lookup_Thread(domain, 74); Thread *t3 = Lookup_Thread(domain, 71); Thread *t4 = Lookup_Thread(domain, 68); Thread *t5 = Lookup_Thread(domain, 65); /*----------------body 1 -----------------*/ thread_loop_c (t, domain) { /* loop over all cells */ begin_c_loop (c, t) { C_T(c, t) = 500.; } end_c_loop (c, t) } /*----------------body 2 -----------------*/ thread_loop_c (t2, domain) { begin_c_loop (c, t2) { C_T(c, t2) = 600.; } end_c_loop (c, t2) } /*----------------body 3 -----------------*/ thread_loop_c (t3, domain) { begin_c_loop (c, t3) { C_T(c, t3) = 700.; } end_c_loop (c, t3) } /*----------------body 4 ----------------- */ thread_loop_c (t4, domain) { begin_c_loop (c, t4) { C_T(c, t4) = 800.; } end_c_loop (c, t4) } /*----------------body 5 -----------------*/ thread_loop_c (t5, domain) { begin_c_loop (c, t5) { C_T(c, t5) = 900.; } end_c_loop (c, t5) } } Can anyone help me? I have been searching for something similar but everything in my code looks logical and can't figure out I is it being ignored. Thank you all for your help. |
|
Tags |
fluid, initialisation, solid, temperature, udf |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Outlet temperature to temperature boundary condition of velocity inlet. (UDF) | dillon | Fluent UDF and Scheme Programming | 3 | March 25, 2018 12:06 |
UDF to modify inlet fluid temperature | Vipul_Patel | Fluent UDF and Scheme Programming | 0 | February 22, 2016 22:11 |
Problem in setting Boundary Condition | Madhatter92 | CFX | 12 | January 12, 2016 05:39 |
Help please! UDF for Temperature profile in 3D | subhankar_bhandari | Fluent UDF and Scheme Programming | 2 | August 16, 2010 09:37 |
CFX4.3 -build analysis form | Chie Min | CFX | 5 | July 13, 2001 00:19 |