-
-
August 28, 2023 at 3:37 am
namrata mishra
SubscriberHii
I am using a UDF at the inlet to simulate wind flow inside the domain. Now, I need this wind profile at 30 degrees to the inlet. how can i specify angle in my boundary conditions without changing the udf. I am attaching some screenshots for reference.
Also, I chose velocity specification method normal to boundary. If I change it to magnitude and direction, I cant clearly understand what to specify in X, Y and Z directions.
-
August 28, 2023 at 4:31 am
SRP
Ansys EmployeeHi,
You need to make changes in the UDF itself to make flow at 30 degree or make an expression at the inlet corresponding to 30 degree.
Thank you.
-
August 28, 2023 at 4:49 am
namrata mishra
SubscriberOk. Can you please suggest me what changes do I need to make . My udf code is as follows:
#include "udf.h"#define UREF 4.7/* ref. speed 3.0 m/s */#define CMU 0.09#define H 12#define u_star 0.52#define delta 36#define p_constant 0.4DEFINE_PROFILE(velocity_profile, thread, position){float x[ND_ND];float y;float u_in;face_t f;begin_f_loop(f, thread){F_CENTROID(x,f,thread);y=x[1];u_in = UREF*pow(y/H,0.3);F_PROFILE(f,thread,position) = u_in;}end_f_loop(f, thread)}/* profile for kinetic energy */DEFINE_PROFILE(k_profile, thread, position){float x[ND_ND];face_t f;float y;float k;begin_f_loop(f, thread){F_CENTROID(x,f,thread);y=x[1];k=(u_star*u_star/pow(CMU,0.5))*(1-(y/delta));F_PROFILE(f,thread,position)=k;}end_f_loop(f, thread)}/* profile for dissipation rate */DEFINE_PROFILE(dissip_profile, thread, position){float x[ND_ND];face_t f;float y;float eps;begin_f_loop(f, thread){F_CENTROID(x,f,thread);y=x[1];eps=(pow(u_star,3)/(p_constant*y))*(1-(y/delta));F_PROFILE(f,thread,position)=eps;}end_f_loop(f,thread)} -
August 29, 2023 at 2:22 pm
Rob
Ansys EmployeeChange to "components" rather than magnitude normal to boundary. You then need two DEFINE_PROFILE(velocity_profile, thread, position) blocks for the two components. Hint, don't call them both "velocity_profile".
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- Floating point exception in Fluent
- What are the differences between CFX and Fluent?
- Heat transfer coefficient
- Difference between K-epsilon and K-omega Turbulence Model
- Getting graph and tabular data from result in workbench mechanical
- The solver failed with a non-zero exit code of : 2
- Suppress Fluent to open with GUI while performing in journal file
- Mesh Interfaces in ANSYS FLUENT
- Time Step Size and Courant Number
- error: Received signal SIGSEGV
-
7592
-
4440
-
2953
-
1427
-
1322
© 2023 Copyright ANSYS, Inc. All rights reserved.