|
[Sponsors] |
segmentation fault in multiphase flow simulation |
![]() |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
![]() |
![]() |
#1 |
New Member
zhaoweijie
Join Date: Mar 2019
Posts: 6
Rep Power: 7 ![]() |
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.
![]() ![]() ![]() ![]() ![]() Best regards, Zhao |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
Moritz Kuhn
Join Date: Apr 2010
Location: Germany, Dresden
Posts: 208
Rep Power: 17 ![]() |
Why you will use a macro? Did you try to write a simple output file using "Report Definitions" --> "Monitors" --> "Report Files"?
|
|
![]() |
![]() |
![]() |
![]() |
#3 |
New Member
zhaoweijie
Join Date: Mar 2019
Posts: 6
Rep Power: 7 ![]() |
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!
|
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,728
Rep Power: 66 ![]() ![]() ![]() |
Did you forget to go to user defined memory and allocate space for the var?
|
|
![]() |
![]() |
![]() |
![]() |
#5 |
New Member
zhaoweijie
Join Date: Mar 2019
Posts: 6
Rep Power: 7 ![]() |
||
![]() |
![]() |
![]() |
![]() |
#6 |
Senior Member
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,728
Rep Power: 66 ![]() ![]() ![]() |
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? |
|
![]() |
![]() |
![]() |
![]() |
#7 |
New Member
zhaoweijie
Join Date: Mar 2019
Posts: 6
Rep Power: 7 ![]() |
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?
|
|
![]() |
![]() |
![]() |
![]() |
#8 |
New Member
zhaoweijie
Join Date: Mar 2019
Posts: 6
Rep Power: 7 ![]() |
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.
|
|
![]() |
![]() |
![]() |
![]() |
#9 | |
Senior Member
Moritz Kuhn
Join Date: Apr 2010
Location: Germany, Dresden
Posts: 208
Rep Power: 17 ![]() |
Quote:
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? |
||
![]() |
![]() |
![]() |
Tags |
define_on_demand, segmentation fault, wall shear stress |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
mpi run problem signal 11 (segmentation fault) FGM simulation | Fedindras | CONVERGE | 1 | October 26, 2017 16:05 |
Segmentation Fault - Fuel Spray Simulation | vignesh123 | OpenFOAM Running, Solving & CFD | 1 | April 6, 2016 09:07 |
Calculating mass flow rate at multiphase flows | Kuslo187 | OpenFOAM Post-Processing | 1 | August 21, 2015 18:11 |
Multiphase flow and conjugate heat transfer simulation | awacs | OpenFOAM Running, Solving & CFD | 8 | March 1, 2013 05:25 |
ParaView segmentation fault only for multiphase | gwierink | OpenFOAM | 9 | March 25, 2010 07:23 |