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

Segmentation Fault on PEM fuel cell addon

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 17, 2019, 11:33
Post Segmentation Fault on PEM fuel cell addon
  #1
New Member
 
Adam
Join Date: Mar 2019
Location: Aberdeen
Posts: 5
Rep Power: 7
Adam404 is on a distinguished road
Hello, everytime I try to run the calculation, I receive this error:
Error: received a fatal signal (Segmentation fault).
Error Object: #f

I am not sure what object: #f is and so I am not sure what part of the file is not working. Any help would be greatly appreciated!

Regards,
Adam
Adam404 is offline   Reply With Quote

Old   March 17, 2019, 20:41
Default
  #2
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
it means you are trying to access memory, which is not allocated

best regards
AlexanderZ is offline   Reply With Quote

Old   March 18, 2019, 09:52
Default
  #3
New Member
 
Adam
Join Date: Mar 2019
Location: Aberdeen
Posts: 5
Rep Power: 7
Adam404 is on a distinguished road
Quote:
Originally Posted by AlexanderZ View Post
it means you are trying to access memory, which is not allocated

best regards
Okay, thank you. How do i allocate memory? I was running the program on the university's virtual desktop and have now switched to just the normal desktop, and I am still getting the same error.
Adam404 is offline   Reply With Quote

Old   March 18, 2019, 10:37
Default
  #4
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
It depends on which memory you are trying to access.


You have not really given enough details on your simulation to determine this. Are you using UDFs (functions)? Are you using UDS (scalars)? Are you using UDMs (memory locations)?
pakk is offline   Reply With Quote

Old   March 18, 2019, 10:40
Default
  #5
New Member
 
Adam
Join Date: Mar 2019
Location: Aberdeen
Posts: 5
Rep Power: 7
Adam404 is on a distinguished road
Quote:
Originally Posted by pakk View Post
It depends on which memory you are trying to access.


You have not really given enough details on your simulation to determine this. Are you using UDFs (functions)? Are you using UDS (scalars)? Are you using UDMs (memory locations)?
I am using all three that you have listed, as they are part of the PEM fuel cell addon module. What other information would you need?
Adam404 is offline   Reply With Quote

Old   March 18, 2019, 10:43
Default
  #6
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
Disable them all three. Do you still have a problem?
If not, turn one of them back on, and check. Do you still have a problem?
In this way, pinpoint the one that gives the problem.


If it is the UDF, and you have more than one function, use only one. Does it give a problem? If not, use another one. Does it give a problem? Find out which one contains the problem.


If you know which function gives the problem, and you can not fix it, post it here.
pakk is offline   Reply With Quote

Old   March 18, 2019, 13:49
Default
  #7
New Member
 
Adam
Join Date: Mar 2019
Location: Aberdeen
Posts: 5
Rep Power: 7
Adam404 is on a distinguished road
thank you! i will try this tomorrow
Adam404 is offline   Reply With Quote

Old   March 18, 2019, 20:41
Default
  #8
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
my recommendation for you:
there are tutorials on PEM simulations in Fluent,
go through it step by step

best regards
AlexanderZ is offline   Reply With Quote

Old   June 5, 2019, 18:56
Smile
  #9
New Member
 
Gongjin
Join Date: Jun 2019
Posts: 3
Rep Power: 6
maiyuebing is on a distinguished road
Quote:
Originally Posted by Adam404 View Post
thank you! I will try this tomorrow
Hi, I have the same situation as you. May I ask how did you solve it?

Thank you in advance.
maiyuebing is offline   Reply With Quote

Old   June 6, 2019, 05:02
Default
  #10
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
If your problem is "received a fatal signal (Segmentation fault)", then although you had the same error message, your problem is almost surely not "the same" as Adam404's problem.


Adam404's solution could be that he changed something in line 387 of his code, but that does not mean that you have to change the same line.




The best advice I can give to you (maiyuebing) is to find out where your problem is. Make your simulation simpler, switch off models, until you find out which part of your simulation is causing the problem.
pakk is offline   Reply With Quote

Old   June 7, 2019, 11:48
Default
  #11
New Member
 
Gongjin
Join Date: Jun 2019
Posts: 3
Rep Power: 6
maiyuebing is on a distinguished road
Quote:
Originally Posted by pakk View Post
If your problem is "received a fatal signal (Segmentation fault)", then although you had the same error message, your problem is almost surely not "the same" as Adam404's problem.


Adam404's solution could be that he changed something in line 387 of his code, but that does not mean that you have to change the same line.




The best advice I can give to you (maiyuebing) is to find out where your problem is. Make your simulation simpler, switch off models, until you find out which part of your simulation is causing the problem.
Thank you for your advice, how can I simulate the fuel cell model without using the PEM modules?

By the way, how to find out the code of my simulation?

Thank you
maiyuebing is offline   Reply With Quote

Old   June 9, 2019, 09:50
Default
  #12
Senior Member
 
Join Date: Nov 2013
Posts: 1,965
Rep Power: 26
pakk will become famous soon enough
Quote:
Originally Posted by maiyuebing View Post
Thank you for your advice, how can I simulate the fuel cell model without using the PEM modules?
You can't, but you can run the simulation without the module, just to see what happens. Disregard the result, only check if you get an error or not.
Quote:
By the way, how to find out the code of my simulation?

Thank you
If you added code to your simulation, you would know which code you added. If you have to ask which code you added, you probably don't have code.
pakk is offline   Reply With Quote

Old   June 17, 2019, 14:30
Default
  #13
New Member
 
Gongjin
Join Date: Jun 2019
Posts: 3
Rep Power: 6
maiyuebing is on a distinguished road
Quote:
Originally Posted by pakk View Post
You can't, but you can run the simulation without the module, just to see what happens. Disregard the result, only check if you get an error or not.

If you added code to your simulation, you would know which code you added. If you have to ask which code you added, you probably don't have code.
I have been finished the previous problem. However, when I start to calculate the model it shows Divergence detected in AMG solver: species-2.

Sometimes, the model can be calculated, some not. Could you give me some suggestion?
maiyuebing is offline   Reply With Quote

Old   June 18, 2019, 01:22
Default
  #14
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
I recommend you to make your model works well in all cases.

if you need help on that, you must describe your problem, steps which lead to this problem, show logs and errors

best regards
AlexanderZ is offline   Reply With Quote

Reply


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
problem with PEM fuel cell modeling and I-V curve AmiN.D FLUENT 3 July 24, 2017 01:39
Single channel PEM fuel Cell tutorial ramakant FLUENT 0 February 7, 2017 04:02
Journal file error magicalmarshmallow FLUENT 3 April 4, 2014 12:25
MEA assembly in PEM fuel cell poornima_n CFX 3 September 3, 2012 02:12
segmentation fault when installing OF-2.1.1 on a cluster Rebecca513 OpenFOAM Installation 9 July 31, 2012 15:06


All times are GMT -4. The time now is 18:37.