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

fatal signal (segmentation fault) error

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 8, 2017, 01:18
Default fatal signal (segmentation fault) error
  #1
New Member
 
Hirakjyoti Barman
Join Date: Sep 2017
Posts: 7
Rep Power: 9
Hirakjyoti is on a distinguished road
I am working on a multiphase model where the two phases are air and a salt solution. I have interpreted an UDF for density of the solution in terms of mass fraction of the solution. But while initializing it shows fatal error segmentation fault. Please help me by guiding me in the right direction.

#include "udf.h"
DEFINE_PROPERTY(cell_density,c,t)
{
real zeta =C_YI_M1(c,t,1);
real theta = zeta/(1-zeta);
C_R(c,t)= 997*( 1 + (.540966*theta) - (.303792*theta*theta) + (.100791*pow(theta,3)));
return C_R(c,t);
}
Hirakjyoti is offline   Reply With Quote

Old   November 8, 2017, 01:30
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
Initialize first, than load UDF.

Same problem had been discussed on forum not long ago. Use search

Best regards
AlexanderZ is offline   Reply With Quote

Old   November 8, 2017, 04:19
Default
  #3
New Member
 
Hirakjyoti Barman
Join Date: Sep 2017
Posts: 7
Rep Power: 9
Hirakjyoti is on a distinguished road
Thanks AlexanderZ. But after calculating 2 iterations it is showing
# Divergence detected in AMG for x-momentum: protective actions enabled!
# Divergence detected in AMG for x-momentum, temporarily solve with BCGSTAB!
i am facing big trouble with this model. plz help
Hirakjyoti is offline   Reply With Quote

Old   November 8, 2017, 05:46
Default
  #4
New Member
 
Lin Bing Han
Join Date: Aug 2015
Posts: 1
Rep Power: 0
jaguar3096 is on a distinguished road
Do you want to return a function C_R (c,t) which is defined by you?
jaguar3096 is offline   Reply With Quote

Old   November 8, 2017, 07:17
Default
  #5
New Member
 
Hirakjyoti Barman
Join Date: Sep 2017
Posts: 7
Rep Power: 9
Hirakjyoti is on a distinguished road
Quote:
Originally Posted by jaguar3096 View Post
Do you want to return a function C_R (c,t) which is defined by you?
Hi jaguar3096. In my problem LiCl concentration in the solution is changing with time by taking moisture from air, so the density will change. So, my UDF needs to return the density value to the solver.
Hirakjyoti is offline   Reply With Quote

Old   November 8, 2017, 22:09
Default
  #6
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
Did you try to look at manual?
C_YI_M1 macros returns species mass fraction, previous time step

Try this code. I did not test it
Code:
#include "udf.h"
DEFINE_PROPERTY(cell_density,c,t)
{
real udf_density;
real zeta =C_YI(c,t,1);
real theta = zeta/(1-zeta);
udf_density= 997*( 1 + (.540966*theta) - (.303792*theta*theta) + (.100791*pow(theta,3)));
return udf_density;
}
Best regards
AlexanderZ is offline   Reply With Quote

Old   November 9, 2017, 00:45
Default
  #7
New Member
 
Hirakjyoti Barman
Join Date: Sep 2017
Posts: 7
Rep Power: 9
Hirakjyoti is on a distinguished road
Thanks AlexanderZ for your guidance. But it is showing the same error. I have also checked the under relaxation factors but nothing is changing . Again i am looking for an UDF for mass diffusivity of LiCl in the solution in terms of concentration and temperature. But i am not getting any information.If possible plz provide some information.
Hirakjyoti 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
[OpenFOAM.org] compile error in dynamicMesh and thermophysicalModels libraries NickG OpenFOAM Installation 3 December 30, 2019 01:21
[OpenFOAM] Native ParaView Reader Bugs tj22 ParaView 270 January 4, 2016 12:39
Compile problem ivanyao OpenFOAM Running, Solving & CFD 1 October 12, 2012 10:31
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 11:23
user subroutine error CFDUSER CFX 2 December 9, 2006 07:31


All times are GMT -4. The time now is 17:06.