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

UDF for k–ε-zeta-f turbulence model

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 10, 2017, 10:03
Default UDF for k–ε-zeta-f turbulence model
  #1
New Member
 
Abdelkader
Join Date: Mar 2015
Posts: 6
Rep Power: 11
abdelkader_f is on a distinguished road
I have implemented a UDF for the k–ε-zeta-f turbulence model and I was able to compile it with no issue. However, when initializing the solution I'm getting a segmentation fault which I know it is coming from UDM non allocated variables! . In the ADJUST subroutine I have allocated UDM for all necessary variable but still getting the same issue!

Has anyone implemented this model in Fluent and can share the UDF so that I can compare and trace my mistake ?

is there anyway on how to trace the variable causing this issue ?

Regards,

Kader
abdelkader_f is offline   Reply With Quote

Old   May 11, 2017, 13:35
Default
  #2
Senior Member
 
ali
Join Date: Oct 2009
Posts: 318
Rep Power: 18
alinik is on a distinguished road
I have done something like that.
I rewrote k-omega model using UDF and it was working fine. The only problem I had was at the wall boundaries.
My UDF did not do well in those regions.
You can output something onto the screen at different locations using Message() command. This way you can trace back to the source of the error.
Also if you can upload your udf here, I can take a look at that.
alinik is offline   Reply With Quote

Old   May 12, 2017, 04:45
Default
  #3
New Member
 
Abdelkader
Join Date: Mar 2015
Posts: 6
Rep Power: 11
abdelkader_f is on a distinguished road
Dear alinik,

Many thanks for your feedback. Could you please explain more on how to trace the issue using the message option ? I have tried that before but it did not work! I was not able to see any message in the sceen!

Could you please share your UDF for the k-w model, so that I can have a look to it and compare ? as my UDF is so long.

Kind regards
abdelkader_f is offline   Reply With Quote

Old   May 12, 2017, 16:39
Default
  #4
Senior Member
 
ali
Join Date: Oct 2009
Posts: 318
Rep Power: 18
alinik is on a distinguished road
Just print messages at different locations in your code and this way you can see exactly what line in creating the problem. The syntax is easy:

Message ("text");
alinik is offline   Reply With Quote

Old   May 14, 2017, 08:29
Default
  #5
New Member
 
Abdelkader
Join Date: Mar 2015
Posts: 6
Rep Power: 11
abdelkader_f is on a distinguished road
Many thanks alinik,

Should I do this in LINUX platform or this can be done within Windows platform ?
actually I'm using Windows and I'm not able to get this printed message!

Could you please advise ?

Regards,
abdelkader_f is offline   Reply With Quote

Old   May 14, 2017, 15:47
Default
  #6
Senior Member
 
ali
Join Date: Oct 2009
Posts: 318
Rep Power: 18
alinik is on a distinguished road
It does not make a difference.
Just add the line to your code and look for the massage in the white section of fluent screen(down at the bottom).
If you do not see the message, then it means that the error is occurring prior to that location in the code.
alinik is offline   Reply With Quote

Old   May 16, 2017, 08:01
Default
  #7
New Member
 
Abdelkader
Join Date: Mar 2015
Posts: 6
Rep Power: 11
abdelkader_f is on a distinguished road
Dear Alinik,

I have simplified the problem by considering the UDS for k-epsilon scalars only. (Please see below the UDF). I have included printed message within different lines, but when initilizing the solution I'm still getting segmentation error.
Could you please advise what is wrong here ?

Regards

Last edited by abdelkader_f; June 1, 2017 at 13:08.
abdelkader_f is offline   Reply With Quote

Old   May 17, 2017, 19:20
Default
  #8
Senior Member
 
ali
Join Date: Oct 2009
Posts: 318
Rep Power: 18
alinik is on a distinguished road
It seems that you require a large number of UDMs. Are you sure you have created the same UDMs before initializing the case?
Have you hooked the initialization code that you have written?
Put a Message at the very first line of the initialization subroutine and see if it pops up.
Let me know how it works out?
alinik is offline   Reply With Quote

Old   May 18, 2017, 06:59
Default
  #9
New Member
 
Abdelkader
Join Date: Mar 2015
Posts: 6
Rep Power: 11
abdelkader_f is on a distinguished road
Hi,
I'm sure I have defined all required memory and hooked the solution.

I have reduced the number of memory (removed UDMs from 7 to 15) and kept only four UDMs (6,4,0,5), then I have put the printed message at the first line of the initilization subroutine but I did not get any printed message, below is what I'm getting (big number of list which I have shown a part of it only here)

/solve/initialize/hyb-initialization383938393839383938393839383938393839 38393839383938393839383938393839383938393839383938 39383938393839383938393839383938394041404140414041 40414041404140414041404140414041404140414041404140 41404140414041404140414041404140414041404140414041 40414041404140414041404140414041404140414041404140 41404140414041404140414041404140414041404140414041 40414041404140414041404140414041404140414041404140 414041404140414041404
404140414041404140414041404140414
Error: received a fatal signal (Segmentation fault).

Error: received a fatal signal (Segmentation fault).
Error Object: #f
38393839383938393839383938393839383938393839383938 39383938393839383938393839383938393839383938393839 38393839383938393839383938393839383938393839383938 39383938393839383938393839383938393839383938393839 38393839383938393839383938393839383938393839383938 39383938393839383938393839383938393839383938393839 38393839383938393839383938393839383938393839383938 39383938393839383938393839383938393839383938393839 38393839383938393839383938393839383938393839383938 39383938393839383938393839383938393839383938393839 38393839383938393839383938393839383938393839383938 39383938393839383938393839383938393839383938393839 38393839383938393839383938393839383938393839383938 39383938393839383938393839383938393839383938393839 38393839383938393839383938393839383938393839383938 39383938393839383938393839383938393839383938393839 38393839383938393839383938393839383938393839383938 39383938393839383938393839383938393839383938393839 38393839383938393839383938393839383938393839383938 39383938393839383938393839383938393839383938393839 38393839383938393839383938393839383938393839383938 39383938393839383938393839383938393839383938393839 38393839383938393839383938393839383938393839383938 39383938393839383938393839383938393839383938393839 38393839383938393839383938393839383938394041404140 41404140414041404140414041404140414041404140414041 40414041404140414041404140414041404140414041404140 41404140414041404140414041404140414041404140414041 40414041404140414041404140414041404140414041404140 41404140414041404140414041404140414041404140414041 40414041404140414041404140414041404140414041404140 41404140414041404140414041404140414041404140414041 404140414041404140414041404140414
Error: received a fatal signal (Segmentation fault).

Error: received a fatal signal (Segmentation fault).
Error Object: #f
abdelkader_f is offline   Reply With Quote

Old   May 24, 2017, 14:18
Default
  #10
Senior Member
 
ali
Join Date: Oct 2009
Posts: 318
Rep Power: 18
alinik is on a distinguished road
It looks like it receives error after DEFINE_PROFILE.
See what comes next.
You can add message at the first line of each subroutine so that you know what subroutine is being compiled at all times.
Also add \n to the end of your messages so that it goes to the next line each time it is printing a message.
alinik is offline   Reply With Quote

Old   May 24, 2017, 14:26
Default issue solved
  #11
New Member
 
Abdelkader
Join Date: Mar 2015
Posts: 6
Rep Power: 11
abdelkader_f is on a distinguished road
Dear alinik,

Many thanks for your kind follow up on this matter. I believe I found the issue and it was the wall boundary condition profiles! I have considered 0 constant values and the code is working now. I have fixed then the boundary condition profiles issue.

I'm working on the model now to make sure that everything was correctly implemented and I'm facing some issue to define a second derivative of scalar. I will work on it and see what can be done.

Many thanks again

Regards,

Abdelkader
abdelkader_f is offline   Reply With Quote

Reply

Tags
k–ε-zeta-f turbulence


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
Turbulence model via UDF dmfo Fluent UDF and Scheme Programming 0 August 3, 2016 14:45
Wrong flow in ratating domain problem Sanyo CFX 17 August 15, 2015 07:20
UDF for Heat Exchanger model francois louw FLUENT 2 July 16, 2010 03:21
question about turbulence model selection and sensitivity karananand Main CFD Forum 1 February 26, 2010 05:41
Centrifugal Pump and Turbulence Model Michiel CFX 12 January 25, 2010 04:20


All times are GMT -4. The time now is 20:41.