|
[Sponsors] |
December 23, 2014, 06:43 |
DEFINE_PROFILE on circular inlet
|
#1 |
New Member
Khan
Join Date: Dec 2014
Posts: 1
Rep Power: 0 |
Hi,
I am trying define temperature profile on the circumference of a tube cross-section (circle). I learned that it has to use DEFIFE_PROFILE macro, but all examples show a straight line inlet. Can anybody show me how to include cartisean coordinates in C language. or is it that I am assuming it and nothing needs to be done here? I am modeling heat flux on a parabolic trough receiver without using the parabolic reflector to work on the temperature contours of the liquid inside . thanks in advance |
|
March 11, 2016, 02:41 |
heat_flux
|
#2 |
New Member
asmita
Join Date: Feb 2016
Location: Mumbai
Posts: 11
Rep Power: 10 |
Hello,
have you got the solution ? actually I am also facing the same kind of problem, can you give suggestion regarding this kind of problem? thank you. |
|
March 11, 2016, 06:05 |
|
#3 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
What profile are you trying to apply to your inlet? The DEFINE_PROFILE macro can be used in cases where the variable is space and/or time dependent. For example, a non-uniform (space dependent) profile could be a parabolic velocity inlet of a fully developed pipe flow. Furthermore, a space and time dependent inlet velocity profile could be a pulsatile flow within an artery. First, form an equation of your variable as a function of the coordinates.
|
|
March 11, 2016, 06:27 |
surface heat flux
|
#4 |
New Member
asmita
Join Date: Feb 2016
Location: Mumbai
Posts: 11
Rep Power: 10 |
hi,
I have to apply heat flux on surface.and in my case heat flux and wall temperature is varying wrt x direction and time. |
|
March 11, 2016, 06:47 |
|
#5 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
||
March 13, 2016, 08:53 |
|
#6 |
New Member
asmita
Join Date: Feb 2016
Location: Mumbai
Posts: 11
Rep Power: 10 |
Hi,
please check and tel me is this correct or not? #include "udf.h" #include "mem.h" #include "stdio.h" #define Ta 27. #define h 7.528 #define PRINT printf #define C_S 1710.0 DEFINE_ADJUST(udf9,d) { real FC[2]; cell_t c; int ID = 5; Thread *t; d=Get_Domain(1); real temp_wall; real q_wall; t = Lookup_Thread(d,ID); begin_c_loop(c,t) { F_CENTROID(FC,c,t); temp_wall=C_UDSI(c,t,1)/C_S-273.; q_wall=h*(Ta-temp_wall); /*printf("x-coord = %f y-coord = %f", FC[0], FC[1]); */ /* printf("temp_wall=%f",temp_wall) printf("q_wall=%f",q_wall);*/ C_UDMI(c,t,11) = q_wall; return q_wall; } end_c_loop(c,t) } DEFINE_PROFILE(udf10,t,i) { real FC [2]; real y; face_t f; cell_t c; real heat_flux; begin_c_loop(c,t) { F_CENTROID(FC,c,t); F_PROFILE(f,t,i) = C_UDMI(c,t,11); C_UDMI(c,t,12)= heat_flux; return heat_flux; } end_c_loop(c,t) } |
|
March 13, 2016, 17:24 |
|
#7 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
The DEFINE_ADJUST macro should return void, whereas you're returning 'q_wall'. Have a read of the section on DEFINE_HEAT_FLUX in the UDF manual to determine if this macro is suitable, otherwise use another DEFINE_PROFILE for your heat flux boundary.
For your DEFINE_PROFILE code block, you've assigned 'heat_flux' to UDM-12 which hasn't been initialised (only declared), and then returning this 'heat_flux' variable. I suspect you'd get errors when running this UDF (garbage numbers being used). I recommend you step back and check your boundary condition definitions and explain them in detail so we can better help you. |
|
March 14, 2016, 02:18 |
|
#8 |
New Member
asmita
Join Date: Feb 2016
Location: Mumbai
Posts: 11
Rep Power: 10 |
Hi,
actualy, I didnt get any error. but what u mentioned is correct. I will consider your suggestion and redo udf. thank you. |
|
March 21, 2016, 04:36 |
Temperature dependent property
|
#9 |
New Member
asmita
Join Date: Feb 2016
Location: Mumbai
Posts: 11
Rep Power: 10 |
Hi,
i am solving PCM problem, in this all pcm properties are dependent on temperature, i am using fluent software and energy equation is solving through UDF. so how i incorporate specific heat in udf |
|
March 21, 2016, 05:43 |
|
#10 | |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
Quote:
The specific heat can be modified with the DEFINE_SPECIFIC_HEAT macro. |
||
March 23, 2016, 04:42 |
how to write udf for temperature dependent CP
|
#11 |
New Member
asmita
Join Date: Feb 2016
Location: Mumbai
Posts: 11
Rep Power: 10 |
I am using UDF for solving energy equation (UDS) not fluent energy eqn.
all thermophysical properties are temperature dependent . (Cp is used for calculating temperature in present case) |
|
March 23, 2016, 07:00 |
|
#12 |
Senior Member
Join Date: Mar 2015
Posts: 892
Rep Power: 18 |
What do you currently have for your UDF? Have a read of the theory guide if you want the equations of the energy equation. If you want to have temperature-dependent specific heat then you could either use a function (if one exists; probably an approximation) or a look up table (reads and interpolates specific heat from a range of values according to temperature).
|
|
April 6, 2016, 03:36 |
about specific heat
|
#13 |
New Member
asmita
Join Date: Feb 2016
Location: Mumbai
Posts: 11
Rep Power: 10 |
hello,
actualy, I tried a lot to incorporate specific heat through udf for solving energy equation but result is not coming correct. now, i have insert all temperature dependent thermophysical properties through udf except specific heat. (I consider avg specific heat).and result is coming according to trend. once again thank you for your suggestion. |
|
Tags |
define_profile, udf |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Total pressure and mass flow boundary condition at inlet | bscphil | OpenFOAM Pre-Processing | 3 | July 9, 2017 15:39 |
Problem with assigned inlet velocity profile as a boundary condition | Ozgur_ | FLUENT | 5 | August 25, 2015 05:58 |
boundary condition for coupled inlet and outlet | xxxx | OpenFOAM Pre-Processing | 2 | August 13, 2013 16:51 |
Inlet Velocity in CFX | aeroman | CFX | 12 | August 6, 2009 19:42 |
Diffusion component at inlet | Balaji | FLUENT | 2 | August 8, 2005 08:37 |