|
[Sponsors] |
November 8, 2017, 01:18 |
fatal signal (segmentation fault) error
|
#1 |
New Member
Hirakjyoti Barman
Join Date: Sep 2017
Posts: 7
Rep Power: 9 |
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); } |
|
November 8, 2017, 01:30 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
Initialize first, than load UDF.
Same problem had been discussed on forum not long ago. Use search Best regards |
|
November 8, 2017, 04:19 |
|
#3 |
New Member
Hirakjyoti Barman
Join Date: Sep 2017
Posts: 7
Rep Power: 9 |
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 |
|
November 8, 2017, 05:46 |
|
#4 |
New Member
Lin Bing Han
Join Date: Aug 2015
Posts: 1
Rep Power: 0 |
Do you want to return a function C_R (c,t) which is defined by you?
|
|
November 8, 2017, 07:17 |
|
#5 |
New Member
Hirakjyoti Barman
Join Date: Sep 2017
Posts: 7
Rep Power: 9 |
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.
|
|
November 8, 2017, 22:09 |
|
#6 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
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; } |
|
November 9, 2017, 00:45 |
|
#7 |
New Member
Hirakjyoti Barman
Join Date: Sep 2017
Posts: 7
Rep Power: 9 |
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.
|
|
|
|
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 |