-
-
June 12, 2023 at 1:25 pm
Ramesh Chandra Mishra
SubscriberHi
I am trying to run a simulation both on my PC and HPC but velocity profile at the inlet is comletely different in both the results. My simulation involves a UDF. Can someone point out how this can be fixed?
I am attaching my journal file for reference.
define/user-defined/compiled-functions load "libudf"
/file/read-case STD_k-epsilon_2.cas.h5
/define/boundary-conditions/velocity-inlet inlet no no yes yes yes yes "udf" "velocity_profile::libudf" no 0 no 300 yes yes yes "udf" "k_profile::libudf" yes yes "udf" "dissip_profile::libudf" yes no 0
solve/initialize/compute-defaults/velocity-inlet/inlet
solve/initialize/initialize-flow
/solve/iterate 10000
quit/file
write-case-data
y
quit
quit
quit
quit
quit
quit
quit
quit
quit
quit
quit
quit
quitexit
-
June 12, 2023 at 3:34 pm
Rob
Ansys EmployeeSome images may help. Have you opened both cases to see what's going on?
As an aside missing the first / on the line opens you up for all sorts of fun if you happen to be in the wrong menu level when you trigger the journal.
-
June 13, 2023 at 2:52 am
-
June 13, 2023 at 8:33 am
Rob
Ansys EmployeeSo, the UDF profile didn't load on the HPC. Did you recompile the .c file on the cluster?
-
June 13, 2023 at 8:41 am
Ramesh Chandra Mishra
SubscriberYes I did and it did compile because I can see velocity at other portions of my domain but just at the inlet its zero.
-
June 13, 2023 at 8:47 am
Ramesh Chandra Mishra
SubscriberI think I am writing boundary conditions wrong in the jornal file. Can you somehow confirm whether the command in journal file is correct for booundary conditions.
-
June 13, 2023 at 8:57 am
Rob
Ansys EmployeeIf the inlet is zero how is flow happening elsewhere?
The command varies based on which models are on, open a case locally and see what happens when you try the command. One tip, in TUI journals the first / for /define forces the full command to run from root, define/whatever if launched from non-root level will fail.
-
June 13, 2023 at 9:08 am
-
June 13, 2023 at 10:35 am
Rob
Ansys EmployeeAs a guess you've got a pressure boundary and buoyancy?
You need to check the command. The exact form of the TUI commands (the yes/no bits) is very dependent on what other models are active. So, the turbulence model may add an extra yes/no and some number inputs.
In the TUI the command /define/something can be run from any level of the TUI menu. define/something will only work if run from root (top level).
-
June 13, 2023 at 11:26 am
Ramesh Chandra Mishra
SubscriberNo buoyancy. I have got velocity inlet and pressure outlet. In velocity inlet, I have specified UDF.
-
June 13, 2023 at 1:04 pm
Rob
Ansys EmployeeLooking at the image it's not hooked up correctly, so you need to check the command. I'd also be looking at the HPC result to understand how you got the flow pattern you're seeing.
-
June 13, 2023 at 1:20 pm
Ramesh Chandra Mishra
SubscriberHi Rob
Will it be okay if I send my case file and you could just verify if the command is right. I have struggling with this for quite a long time. I have tried but can't figure out what is wrong.
-
June 13, 2023 at 1:55 pm
Rob
Ansys EmployeeRun the journal line by line locally. Does it work? Does Fluent think it's looking for the local path for libudf, or the full path? Have you recompiled on the HPC noting that Linux/Windows have different libraries, as do each release of Fluent.
We're not able to review files, it's one of the rules we need to comply with for Export Control.
-
June 13, 2023 at 2:01 pm
-
June 13, 2023 at 2:04 pm
Rob
Ansys EmployeeYes, if the inlet is set as zero that's the velocity that Fluent will use.
-
June 13, 2023 at 2:06 pm
Ramesh Chandra Mishra
SubscriberOkay. But I cannot run my simulations with UDF loaded in case file. It gives errors. I have tried that.
Can you tell me the correct way?
-
June 13, 2023 at 2:08 pm
Ramesh Chandra Mishra
SubscriberPS: My velocity profile is specified in the UDF.
-
June 13, 2023 at 2:37 pm
Rob
Ansys EmployeeIf you don't load the UDF then you won't get the same velocity profile and so aren't modelling the same conditions.
What errors are you getting?
-
June 14, 2023 at 4:20 am
Ramesh Chandra Mishra
SubscriberHi Rob.
I got the correct results. The problem was with the inlet boundary conditions . Like you said, velocity magnitude zero will give the zero results. I corrected it.
Thanks.
-
- 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.