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

Defining source terms at the wall located between two fluids

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

Like Tree1Likes
  • 1 Post By AlexanderZ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 12, 2017, 09:10
Default Defining source terms at the wall located between two fluids
  #1
Member
 
ehsan
Join Date: Sep 2014
Posts: 38
Rep Power: 10
e_cfd is on a distinguished road
Dear all,

I have tried to define source terms on a wall (which is a BC with zero thickness and located between two fluids) using F_C0 and F_C1 but the results are strange. I mean I want to have a fixed value of 500 on the top and -500 on the other side of the wall, but what I get is a range of [0 500] on the top and [-500 0] on the downside at two adjacent mesh cells (I need to define source terms on the very first mesh cells at the wall)!
Any help and suggestions are appreciated (or any alternative ways to define source terms).

My UDF code:

#include "udf.h"
DEFINE_ADJUST(a_source,domain)
{
Domain *d;

face_t f;
cell_t c;
Thread *t;
cell_t c0;
Thread *t0;
cell_t c1;
Thread *t1;

real source=500;
real sink=-500;

d = Get_Domain(1); /* it should be defined to point to the mixture level */

t = Lookup_Thread(d,3); /* the wall ID is 3 */


begin_f_loop(f,t)
{

c0 = F_C0(f,t); /* wall-up side */
t0 = THREAD_T0(t);

c1 = F_C1(f,t); /* wall-down side :
t1 = THREAD_T1(t);

C_UDMI(c0,t0,0)= source;
C_UDMI(c1,t1,1)= sink;

}


end_f_loop(f,t)

}
Attached Images
File Type: jpg up.jpg (143.1 KB, 8 views)
File Type: jpg down.jpg (178.4 KB, 7 views)

Last edited by e_cfd; December 15, 2017 at 10:43.
e_cfd is offline   Reply With Quote

Old   December 15, 2017, 10:43
Default
  #2
Member
 
ehsan
Join Date: Sep 2014
Posts: 38
Rep Power: 10
e_cfd is on a distinguished road
Any suggestion??
e_cfd is offline   Reply With Quote

Old   December 17, 2017, 21:11
Default
  #3
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,249
Rep Power: 32
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
I guess you have 2 elements wide wall?

This range is interpolation of cfd-viewer. You may try this see true picture:
results -> graphics -> contours -> switch off node values -> OK

Best regards
e_cfd likes this.
AlexanderZ is offline   Reply With Quote

Old   December 18, 2017, 10:14
Default
  #4
Member
 
ehsan
Join Date: Sep 2014
Posts: 38
Rep Power: 10
e_cfd is on a distinguished road
Dear Alexander,

Thank you for your help. Yes you are right about the nodal values.

P. S. : my wall has zero thickness, and if I am not mistaken, C0 and C1 are adjacent fluid elements.

Best regards,
e_cfd is offline   Reply With Quote

Reply

Tags
source term, udf, wall

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
Natural convection in a closed domain STILL NEEDING help! Yr0gErG FLUENT 4 December 2, 2019 01:04
[foam-extend.org] problem when installing foam-extend-1.6 Thomas pan OpenFOAM Installation 7 September 9, 2015 22:53
Custom Thermophysical Properties wsmith02 OpenFOAM 3 July 27, 2015 06:37
DxFoam reader update hjasak OpenFOAM Post-Processing 69 April 24, 2008 02:24
Errors running allwmake in OpenFOAM141dev with WM_COMPILE_OPTION%3ddebug unoder OpenFOAM Installation 11 January 30, 2008 21:30


All times are GMT -4. The time now is 21:13.