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

connecting two lines

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 14, 2013, 22:09
Default connecting two lines
  #1
New Member
 
Mahboobe Mahdavi
Join Date: Mar 2013
Posts: 22
Rep Power: 13
Mahboobe365 is on a distinguished road
dear all, I wan to write udf to connect to lines together. I am going to define the temperature of line one equals to temperature of line two. one of the line belongs to the solid parts and the other belongs to fluid part. I can not use form new part, since I want to define line two as velocity inlet. can any one help me please?
Mahboobe365 is offline   Reply With Quote

Old   June 15, 2013, 14:48
Default Could not undrestand the problem
  #2
New Member
 
Pouria
Join Date: Jan 2012
Location: U.S
Posts: 9
Rep Power: 14
Pouria is on a distinguished road
Hi,

I could not fully understand what the problem is. Can you provide some image here and explain the problem based on that?

Thank you.

Pouria
Pouria is offline   Reply With Quote

Old   June 15, 2013, 18:41
Default image
  #3
New Member
 
Mahboobe Mahdavi
Join Date: Mar 2013
Posts: 22
Rep Power: 13
Mahboobe365 is on a distinguished road
I have uploaded the picture. I should add this point that I have created the geometries in design modeler . so I have two bodies and in fact I have two lines for the interface. I am set the temperature of these lines equal. I have written the udf for boundary condition. As a test I have defined a linear temperature for the line belongs to vapor chamber(lets call it inlet) and write another udf for the line belongs to the solid(wall) in order to set its temperature equals to the inlet, but the temperatures will not be exactly equal
Attached Images
File Type: png Untitled.png (4.8 KB, 11 views)
Mahboobe365 is offline   Reply With Quote

Old   June 15, 2013, 19:05
Default
  #4
New Member
 
Pouria
Join Date: Jan 2012
Location: U.S
Posts: 9
Rep Power: 14
Pouria is on a distinguished road
The other thing you can try is to use a DEFINE-ADJUST macro to calculate the temperature at the inlet (or wall) at the beginning of each iteration. Then you can pass the calculated temperature to DEFINE_PROFILE macro to set the temperature at the Wall (or Inlet).

Thank you.

Pouria.
Pouria is offline   Reply With Quote

Old   June 15, 2013, 19:17
Default
  #5
New Member
 
Mahboobe Mahdavi
Join Date: Mar 2013
Posts: 22
Rep Power: 13
Mahboobe365 is on a distinguished road
thank you very much. My udf for the inlet is :
DEFINE_PROFILE(tempif_profile,t,i)
{

real x[ND_ND],d[10000];
face_t f;
int k;

real hfg=4237.;

Domain*d1 = Get_Domain(1);
int IDif=13;
Thread *tfif = Lookup_Thread(d1,IDif);
Thread *tc;
cell_t c;



begin_f_loop(f,t)
{


F_PROFILE(f,t,i) =1./( 1./818-(.361/hfg)*log(((F_P(f,t)+1300.))/1300.));


end_f_loop(f,t)

and for the solid wall is:
DEFINE_PROFILE(tempis_profile,t,i)
{

real x[ND_ND]; double d[10000];
face_t f,f1;
int k,N;


int IDif=13;
int IDis=14;
Domain*d1 = Get_Domain(1);
Thread *tfif = Lookup_Thread(d1,IDif);
k=-1;

begin_f_loop(f,tfif)
{

k=k+1;
d[k]=F_T(f,tfif);


}
end_f_loop(f,tfif)
N=k;
k=-1;
begin_f_loop(f,t)
{
k=k+1;

F_PROFILE(f,t,i) =d[N-k];


}
end_f_loop(f,t)

}


}

the main problem is that without defining array d , my trend would be switched . I mean for example if my temperature for inlet is T=10*x
then the resulting temperature for solid would be T=10*(L-x)!
Even by defining array d and sorting the array , some points will be switched like the picture attached to this comment, Do you think by using adjusting macros this problem will be solved? I also have to use these two tempretures to obtain heat fluxes and calculate the velocity for inlet.
Attached Images
File Type: png 1.png (7.2 KB, 3 views)
Mahboobe365 is offline   Reply With Quote

Old   June 17, 2013, 12:28
Default
  #6
New Member
 
Mahboobe Mahdavi
Join Date: Mar 2013
Posts: 22
Rep Power: 13
Mahboobe365 is on a distinguished road
Hi again,

I have no idea how to use DEFINE-ADJUST macro, would you please help meee?
Mahboobe365 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
[Tutorials] Tutorial of how to plot residuals ! wolle1982 OpenFOAM Community Contributions 171 February 20, 2024 03:55
[Other] Connecting 3D bodies in Ansys Design Modeler chipper ANSYS Meshing & Geometry 4 January 25, 2018 10:45
path lines seeta FLUENT 1 September 4, 2011 02:07
Plotting Residuals ata OpenFOAM 12 July 8, 2011 03:50
Tecplot 10 - connecting lines between blank values fractals Tecplot 0 February 17, 2011 04:49


All times are GMT -4. The time now is 04:12.