|
[Sponsors] |
Segmentation error when initializing solver using UDFs |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 2, 2021, 04:58 |
Segmentation error when initializing solver using UDFs
|
#1 |
New Member
--
Join Date: Sep 2021
Posts: 4
Rep Power: 5 |
Hey everyone,
Thank you in advance for all your help. I am facing some trouble regarding using my Ansys Fluent UDF in customizing my "pressure-outlet" boundary condition. To give some context, I am using quadrilateral meshes and using the finite volume method to obtain the velocity gradient of the flow at the outlet. To do so, I need to obtain the velocities at the nodes and calculate the velocity gradient of the cell to be used at the outlet. The boundary condition that I am trying to set at the outlet is p = (-2/re)*(dv/dx). The UDF seems to be compiled so the error does not seem to be a syntax error but rather an error in trying to pull data from the software. The error occurs when I select "all" in the initialization tab of the fluent solver. I have attached a screenshot of the UDF code, the finite volume gradient formula that I am taking reference from and the error given by Ansys Fluent. Thank you so much for your help! |
|
October 2, 2021, 10:18 |
|
#2 |
Senior Member
Join Date: Nov 2013
Posts: 1,965
Rep Power: 27 |
Your UDF calculates pressure from velocity data.
If the initialization tries to set pressure before initializing velocities, it will fail. Solution can be to initialize before applying the UDF.
__________________
"The UDF library you are trying to load (libudf) is not compiled for parallel use on the current platform" is NOT the error after compiling. It is the error after loading. To see compiler errors, look at your screen after you click "build". |
|
October 2, 2021, 12:13 |
|
#3 |
New Member
--
Join Date: Sep 2021
Posts: 4
Rep Power: 5 |
Thank you so much! I understand how it works now thanks to your explanation
|
|
October 2, 2021, 23:19 |
|
#4 |
New Member
--
Join Date: Sep 2021
Posts: 4
Rep Power: 5 |
Hi Pakk, sorry to bother you again.
I am able to load the UDF by first initializing with the 0 pressure-outlet boundary condition, however, upon running the calculations, the solver crashes again with a bad termination error and also a segmentation error similar to when initializing my solution previously. I was wondering if there was anything wrong with the way my UDF is extracting data from the cell nodes which results in this error? Thank you so much! |
|
October 4, 2021, 11:08 |
|
#5 |
New Member
--
Join Date: Sep 2021
Posts: 4
Rep Power: 5 |
Hey everyone,
I have managed to make the UDF work, I've realized I did not define the node variable when looping through the cell nodes Here's the final version of the stress-free boundary condition UDF using the finite volume method to obtain the gradients, hope it helps anyone looking to implement this on Ansys Fluent one day. Thank you for the help! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
New solver and Segmentation fault (core dumped) | MinShin | OpenFOAM Running, Solving & CFD | 3 | September 4, 2021 06:00 |
foam-extend-4.1 release | hjasak | OpenFOAM Announcements from Other Sources | 19 | July 16, 2021 06:02 |
viscosity udf don't use correct temperature and strain rate | rezvani | Fluent UDF and Scheme Programming | 8 | May 27, 2021 06:40 |
Will the results of steady state solver and transient solver be same? | carye | OpenFOAM Running, Solving & CFD | 9 | December 28, 2019 06:21 |
Setting a B.C using UserFortran in 4.3 | tokai | CFX | 10 | July 17, 2001 17:25 |