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

segmentation fault in multiphase flow simulation

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By MKuhn

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 7, 2019, 06:54
Default segmentation fault in multiphase flow simulation
  #1
New Member
 
zhaoweijie
Join Date: Mar 2019
Posts: 6
Rep Power: 7
Zhao Weijie is on a distinguished road
Hello everyone, I'm doing a multiphase flow simulation using mixture model. I want to calculate wall shear stress during iteration and store it for postprocessing purpose. I use the DEFINE_ON_DEMAND macro to achieve this, and the whole udf is in the screenshot below. Everything is fine when l build library and load this udf, which, I think, means compilation is no problem. But when I try to hook the compiled udf to Fluent, segmentation fault comes up as below. I've read some relevant posts on this forum, but their solution just don't work for me. Anyone can help?




Best regards,

Zhao
Zhao Weijie is offline   Reply With Quote

Old   March 7, 2019, 07:13
Default
  #2
Senior Member
 
Moritz Kuhn
Join Date: Apr 2010
Location: Germany, Dresden
Posts: 218
Rep Power: 17
MKuhn is on a distinguished road
Why you will use a macro? Did you try to write a simple output file using "Report Definitions" --> "Monitors" --> "Report Files"?
Zhao Weijie likes this.
MKuhn is offline   Reply With Quote

Old   March 7, 2019, 10:00
Default
  #3
New Member
 
zhaoweijie
Join Date: Mar 2019
Posts: 6
Rep Power: 7
Zhao Weijie is on a distinguished road
Quote:
Originally Posted by MKuhn View Post
Why you will use a macro? Did you try to write a simple output file using "Report Definitions" --> "Monitors" --> "Report Files"?
Thank you for your advice MKuhn, I'm sure I have tried this method before, but somehow it didn't work and I conjectured that it's because my case is a multiphase flow problem, which tend to be more complicated. But I will try this again to make sure if I'm wrong or not. I'll share progress with you later, thank you!
Zhao Weijie is offline   Reply With Quote

Old   March 7, 2019, 16:23
Default
  #4
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,754
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Did you forget to go to user defined memory and allocate space for the var?
LuckyTran is offline   Reply With Quote

Old   March 7, 2019, 21:32
Default
  #5
New Member
 
zhaoweijie
Join Date: Mar 2019
Posts: 6
Rep Power: 7
Zhao Weijie is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
Did you forget to go to user defined memory and allocate space for the var?
Hi Tran, I didn't forget UDM space allocation, because I just follow the Fluent customization manual. But thanks anyway[handshake].
Zhao Weijie is offline   Reply With Quote

Old   March 8, 2019, 08:32
Default
  #6
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,754
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Did you initialize the case before hooking the udf?

Instead of just saying I've tried stuff and it didn't work. Tell us what you've done?
LuckyTran is offline   Reply With Quote

Old   March 9, 2019, 22:56
Default
  #7
New Member
 
zhaoweijie
Join Date: Mar 2019
Posts: 6
Rep Power: 7
Zhao Weijie is on a distinguished road
Quote:
Originally Posted by MKuhn View Post
Why you will use a macro? Did you try to write a simple output file using "Report Definitions" --> "Monitors" --> "Report Files"?
Hi MKuhn, hope you had a good time. I have rearranged my calculation using "report files" to calculate wall shear stress in my multiphase problem. But the segmentation fault message still exists. In the process, I wrote a user-defined definition of wall-shear-stress first using the DEFINE_REPORT_DEFINITION_FN macro, and then I assigned it to the report file. Anything wrong?
Zhao Weijie is offline   Reply With Quote

Old   March 9, 2019, 23:03
Default
  #8
New Member
 
zhaoweijie
Join Date: Mar 2019
Posts: 6
Rep Power: 7
Zhao Weijie is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
Did you initialize the case before hooking the udf?

Instead of just saying I've tried stuff and it didn't work. Tell us what you've done?
Hello Tran, hope you had a good time too. How negligent I was to forget details you need to help address my problem. I did initialize the case before hooking the udf. And now I try to initialize the case after hooking the udf. But unfortunately, it just didn't work out. If you need any other details, just let me know. Thanks.
Zhao Weijie is offline   Reply With Quote

Old   March 11, 2019, 03:50
Default
  #9
Senior Member
 
Moritz Kuhn
Join Date: Apr 2010
Location: Germany, Dresden
Posts: 218
Rep Power: 17
MKuhn is on a distinguished road
Quote:
Originally Posted by Zhao Weijie View Post
Hi MKuhn, hope you had a good time. I have rearranged my calculation using "report files" to calculate wall shear stress in my multiphase problem. But the segmentation fault message still exists. In the process, I wrote a user-defined definition of wall-shear-stress first using the DEFINE_REPORT_DEFINITION_FN macro, and then I assigned it to the report file. Anything wrong?

Hi Zhao Weijie, sorry I'm not an expert in UDF. Did you check that the segmentation fault message is caused by your UDF? Did you try to run your case without the UDF?
MKuhn is offline   Reply With Quote

Reply

Tags
define_on_demand, segmentation fault, wall shear stress


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
mpi run problem signal 11 (segmentation fault) FGM simulation Fedindras CONVERGE 1 October 26, 2017 17:05
Segmentation Fault - Fuel Spray Simulation vignesh123 OpenFOAM Running, Solving & CFD 1 April 6, 2016 10:07
Calculating mass flow rate at multiphase flows Kuslo187 OpenFOAM Post-Processing 1 August 21, 2015 19:11
Multiphase flow and conjugate heat transfer simulation awacs OpenFOAM Running, Solving & CFD 8 March 1, 2013 06:25
ParaView segmentation fault only for multiphase gwierink OpenFOAM 9 March 25, 2010 08:23


All times are GMT -4. The time now is 04:32.