0% found this document useful (0 votes)
21 views7 pages

AT07.2a - Sinusoidal Velocity Profile-1

Uploaded by

Angel Blanco
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views7 pages

AT07.2a - Sinusoidal Velocity Profile-1

Uploaded by

Angel Blanco
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Application Tutorial 7.

2a:
Sinusoidal Velocity Profile

Fundamentals and Application of CFD

Master’s
Master’s DegreeDegree
ininNumerical
Numerical Simulation in Engineering
Simulation with Ansys with Ansys
in Engineering
© 2023 Ansys, Inc.
1Universidad Politécnica de Madrid - Ansys 12th EDITION
Introduction
The goal of this tutorial is to familiarize the user with all the stages required for creating an UDF using the
DEFINE_PROFILE macro in Ansys Fluent.
• For this tutorial, we choose a simple geometry: axisymmetric pipeline.
Wall

Outlet
Inlet

axis

• The velocity inlet boundary condition is to be modelled with a sinosoidal velocity profile given by the
following equation:

𝑼 = 𝑼𝟎 + 𝐀 × sin 𝝎𝒕

with U0 = 20 m/s, A = 5 m/s, ω = 10 rad/s


Master’s Degree in Numerical Simulation in Engineering with Ansys
© 2023 Ansys, Inc.
2
UDF Programming Procedure
Initial Procedure
1. Open your text editor and load “sinusoide_start.c”. This is a draft version of the UDF.
2. Complete/write the UDF to represent the unsteady profile shown in the AC07.2:
• You will need to loop over the boundary condition faces
• You will need to use the macro F_PROFILE
• You will need a time macro… Please check: help/flu_udf/flu_udf_RPVariables.html
NOTE:If you have any problem you could use the file “sinusoide_solution.c”

3. Save the UDF as “sinusoide.c”

Master’s Degree in Numerical Simulation in Engineering with Ansys


© 2023 Ansys, Inc.
3
UDF Setup
After finishing the UDF:
1. Open Fluent 2D
2. File > Read > Case
• Select file pipe.msh
3. Display Mesh
• Mesh → Display
4. Interpret the UDF
• User-Defined > Functions > Interpret
5. Browse created file
• Select sinusoide.c
• Select Display Assembly Listing (optionally)
• Select Use Contributed CPP (optionally)
6. Interpret

Master’s Degree in Numerical Simulation in Engineering with Ansys


© 2023 Ansys, Inc.
4
Case setup
Complete the case setup
1. In General
– Select 2D axisymmetric
– Select transient
2. In Materials, retain air as fluid
3. In Boundary Conditions
– Select entree as Inlet
– Set Velocity Magnitude as udf sinusoidal_inlet
4. Set convergence monitors
5. Initialize calculation
6. Iteration
– Set timestep = 0.04s for 50 time steps
• Run Calculation
– Check the transient behaviour at the outlet (sortie).

Master’s Degree in Numerical Simulation in Engineering with Ansys


© 2023 Ansys, Inc.
5
Case setup
Create a new Surface Monitor to obtain the inlet (entree)
behaviour.
Initialize Calculation.
Run Calculation.

Inlet Outlet

Master’s Degree in Numerical Simulation in Engineering with Ansys


© 2023 Ansys, Inc.
6
http://www.ansys.com/academic/learning-resources/online-masters-degree
Ansys and any and all Ansys, Inc. brand, product, service and feature names, logos and slogans are registered trademarks or trademarks of Ansys, Inc. or its subsidiaries in the United States or
other countries. All other brand, product, service and feature names or trademarks are the property of their respective owners.

© 2022 Ansys, Inc. All Rights Reserved

Master’s Degree in Numerical Simulation in Engineering with Ansys


© 2023 Ansys, Inc.
7

You might also like