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

Define a boundary condition

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 19, 2023, 08:28
Default Define a boundary condition
  #1
New Member
 
LiLAJ
Join Date: Feb 2023
Posts: 6
Rep Power: 3
LiLAJ is on a distinguished road
dear all,
I'm working on 2d heated vertical channel,
Inlet boundary :
pressure inlet is local bernoulli equation P= -0.5*v^2
inlet velocity gradient equals zero.
the problem how to define the velocity
I used the following udf code but results were dissatisfied.

include "udf.h"
DEFINE_PROFILE(inlet_boundary, thread, position)
{
real x[ND_ND];
real y;
face_t f;
begin_f_loop(f, thread)
{
F_CENTROID(x, f, thread);
y = x[1];
if (y == 0.0)
{
cell_t c0 = F_C0(f, thread);
real v = /* calculate or obtain the velocity from your simulation */
F_U(f, thread) = 0.0;
F_V(f, thread) = v;
F_W(f, thread) = 0.0;
C_V_G(c0, thread)[1] = 0.0;
F_P(f, thread) = -0.5 * v * v;
}
}
end_f_loop(f, thread);
}
LiLAJ is offline   Reply With Quote

Reply

Tags
laminar boundary, pressure, velocity


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
Question about different kinds of Boundaries and Boundary Conditions granzer Main CFD Forum 17 April 12, 2022 17:27
Radiation interface hinca CFX 15 January 26, 2014 17:11
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 17:44
CFX fails to calculate a diffuser pipe flow shenying0710 CFX 7 March 26, 2013 04:13
Free surface boudary conditions with SOLA-VOF Fan Main CFD Forum 10 September 9, 2006 12:24


All times are GMT -4. The time now is 19:52.