|
[Sponsors] |
Outlet temperature to temperature boundary condition of velocity inlet. (UDF) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 22, 2018, 08:32 |
Outlet temperature to temperature boundary condition of velocity inlet. (UDF)
|
#1 |
New Member
dongsu park
Join Date: Aug 2016
Posts: 2
Rep Power: 0 |
Good day Guys.
I have a big problem to give temperature condition in inlet condition. Simulation is like under. there is a pipe in sea water. and initial temperature condition of sea water is 277.15K and pipe and fluid are 343.15K. I want to give outlet temperature to inlet temperature. like that time step 1 of outlet temperature to time step 2 of inlet temperature and time step 2 of outlet temperature to time step 3 of inlet temperature. I'm not familiar with c++ code and i think i couldn't make this for myself. this is code i found and revised.... #include "udf.h" #define get_temp_zone_ID 26 real Abstemperature =343.15; DEFINE_ADJUST(find_Abstemperature,domain) { #if !RP_HOST Thread *ft,*ct; face_t f; cell_t c; /* int ID = 26; */ Abstemperature =343.15; ft = Lookup_Thread(doamin,get_temp_zone_ID); ct = THREAD_T0(ft); Abstemperature =343.15; begin_f_loop(f,ft) { c = F_C0(f,ft); if(Abstemperature > C_T(c,ct)) Abstemperature = C_T(c,ct); } end_f_loop(f,ft) #endif } DEFINE_PROFILE(Abstemperature, t, enq) { face_t f; begin_f_loop(f, t) { F_PROFILE(f, t, enq) = Abstemperature; } end_f_loop(f, t) } If anyone professional in UDF.. Please help me Sincerely Dillon. |
|
March 24, 2018, 02:36 |
|
#2 |
New Member
Doruk Yelkenci
Join Date: Apr 2017
Posts: 20
Rep Power: 9 |
You cant carry variables between 2 different macros. Just use define profile.
|
|
March 24, 2018, 23:51 |
|
#3 | |
New Member
dongsu park
Join Date: Aug 2016
Posts: 2
Rep Power: 0 |
Quote:
as you say. I make code using only difine profile like this #include "udf.h" DEFINE_PROFILE(temp_in,thread,i) { Domain *d; real temp_in; int ID_outlet=26; face_t f; Thread *t; d = Get_Domain(14); t= Lookup_Thread(d, ID_outlet); begin_f_loop(f,thread) { temp_in = F_T(f,t); F_PROFILE(f, thread, i) = temp_in; } end_f_loop(f,thread) } ...but it cant work.. when i click 'Initialize' error pops up massage is "MPI Application rank 0 exited before MPI_Finalize() with status 2 The fl process could not be started." what should i d? |
||
March 25, 2018, 12:06 |
|
#4 |
New Member
Doruk Yelkenci
Join Date: Apr 2017
Posts: 20
Rep Power: 9 |
check your threads. You have defined t= Lookup_Thread(d, ID_outlet) but for the loop you are using begin_f_loop(f,thread).
Change it to begin_f_loop(f,t) Hope it works now Best Regards Doruk |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
The method on dealing with velocity in static pressure outlet boundary condition | mona.li | CFX | 2 | September 30, 2017 02:33 |
map outlet boundary profile as an inlet condition using UDF | Daniel_Khazaei | Fluent UDF and Scheme Programming | 2 | June 20, 2016 12:53 |
Basic Nozzle-Expander Design | karmavatar | CFX | 20 | March 20, 2016 09:44 |
RPM in Wind Turbine | Pankaj | CFX | 9 | November 23, 2009 05:05 |
How to mention neuman boundary condition for velocity at the outlet or inlet?? | Souviktor | FLUENT | 0 | June 1, 2009 14:30 |