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

segmentation Fault #f object error

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By AlexanderZ

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 29, 2020, 07:59
Default segmentation Fault #f object error
  #1
New Member
 
Abbas Raza
Join Date: Nov 2020
Posts: 27
Rep Power: 5
Abbas20000220 is on a distinguished road
Hi all of you.

I have compiled a UDF and on running simulation, Fluent is giving error Segmentation Fault #f object error.
Variables are defined. Can anyone please tell me? Why its occurring?

Regards,

Abbas Raza

DEFINE_PROFILE(masshot,thread,position)
{
double mh,mc,fh,fc;
real x[ND_ND];
face_t f;
Thread *t0, *t1;
cell_t c0, c1;

begin_f_loop(f,thread)
{
c0=F_C0(f,thread);
t0=THREAD_T0(thread);
c1=F_C1(f,thread);
t1=THREAD_T1(thread);

fh=C_YI(c0.t0,0);
fc=C_YI(c1,t1,0);

mh=fh*0.13
mc=fc+fh-mh;

F_PROFILE(f,thread,position)=mh;
}
end_f_loop(f,thread)
}
Abbas20000220 is offline   Reply With Quote

Old   December 30, 2020, 06:59
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
you have types in code, read log file while compiling

from my point of view,
you are trying to use DEFINE_PROFILE macro, which can be applied to external boundaries only
it means, you don't have c1 and t1 (which are cell/thread adjust to face but from the other side, comparing to c0,t0)

so in concept you code is not able to work.

Segmentation Fault #f occurs, when you are trying to access memory, which is not allocated
Abbas20000220 likes this.
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   December 30, 2020, 07:53
Default segmentation fault
  #3
New Member
 
Abbas Raza
Join Date: Nov 2020
Posts: 27
Rep Power: 5
Abbas20000220 is on a distinguished road
Thanks a lot for your response.

its working now.

Regards,

Abbas Raza
Abbas20000220 is offline   Reply With Quote

Old   January 1, 2021, 02:56
Default Moisture h20 mass fraction inlet
  #4
New Member
 
Abbas Raza
Join Date: Nov 2020
Posts: 27
Rep Power: 5
Abbas20000220 is on a distinguished road
Hi Alexander Z,

I have one more query. I want to know that while adding mass fraction of h20 in Ansys Fluent the unit of this moisture what we adding. The default unit of H20 mass fraction is either kg/kg or g/kg?

I hope you will answer this.

Regards,

Abbas Raza
Attached Images
File Type: png error22dec.PNG (147.3 KB, 5 views)
Abbas20000220 is offline   Reply With Quote

Old   January 3, 2021, 18:55
Default
  #5
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 don't know exactly, but by default Fluent uses SI, so it should be kg/kg
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   January 3, 2021, 21:03
Default segmentation fault
  #6
New Member
 
Abbas Raza
Join Date: Nov 2020
Posts: 27
Rep Power: 5
Abbas20000220 is on a distinguished road
Thanks a lot.

Regards,

Abbas Raza
Abbas20000220 is offline   Reply With Quote

Old   January 11, 2021, 03:54
Default Moisture Transfer across membrane
  #7
New Member
 
Abbas Raza
Join Date: Nov 2020
Posts: 27
Rep Power: 5
Abbas20000220 is on a distinguished road
Hi Mr Alexander,

I am here to ask you a one more question. Please give your invaluable suggestion.

I have two fluids (One is air & other is Licl solution) in a rectangular ducts (stacking to each other). I am considering sliding face of both fluids as a membrane by considering in a single part & here now I want to introduce membrane resistance & its diffusivity of water vapours. I have a confusion where I have to load UDF ? As membrane is a coupled wall it is giving mass fraction H20.

Moreover, I have inlet of Air & outlet of Air. And inlet & outlet of Licl solution.

One more question, As I have given Air as a mixture template (Air + H20 vapours). Now I want this H2O vapours in LICL duct. For this, What can I do as mixture template is only of (Air + H20) by default by using species transport model. How I can change the licl in to mixture of h20 + Licl mixture?

Please let me know, If you could not be able to get my querry.

Thanks in Advance!

Regards,

Abbas Raza
Attached Images
File Type: png error11jan1.PNG (173.5 KB, 1 views)
File Type: jpg error11jan.jpg (65.4 KB, 1 views)
Abbas20000220 is offline   Reply With Quote

Old   January 15, 2021, 03:24
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
I have no experience in this kind of simulations, but I feel like you should do mixture of all 3 species (air vapor LICl)from the very begging
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   January 15, 2021, 03:47
Default segmentation fault
  #9
New Member
 
Abbas Raza
Join Date: Nov 2020
Posts: 27
Rep Power: 5
Abbas20000220 is on a distinguished road
Thanks a lot!

I want to know one thing more.

I am using 16.1 version of Ansys.

I am getting an error you can see in pictures, the same UDF is interpreted easily without any error along with running but while compiling its giving error in the below pictures.

Need your invaluable suggestion.

Regards,

Abbas Raza
Attached Images
File Type: png error15jan10.PNG (182.8 KB, 2 views)
File Type: png error15jan11.PNG (174.9 KB, 2 views)
File Type: png error15jan12.PNG (171.1 KB, 2 views)
Abbas20000220 is offline   Reply With Quote

Old   January 15, 2021, 05:41
Default
  #10
Senior Member
 
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34
AlexanderZ will become famous soon enoughAlexanderZ will become famous soon enough
first one is just a warning to have your case file and source udf file (.c) in the same folder

under library name put the name you want for UDF library (problem was in the name, don't put path to folder in the name)
then press build and load
__________________
best regards


******************************
press LIKE if this message was helpful
AlexanderZ is offline   Reply With Quote

Old   January 20, 2021, 03:35
Default Moisture Transfer across membrane
  #11
New Member
 
Abbas Raza
Join Date: Nov 2020
Posts: 27
Rep Power: 5
Abbas20000220 is on a distinguished road
Having more questions & I am extremely thankful for your response.

I made a mixture of AIr + Licl solution + H20 vapor. These are 3 components & I want to add mass fraction in the boundary condition. In the screenshot, You can see its giving only two components H20 & licl but not giving Air.

What I am thinking , its gives only 2 components in this section & 3rd one (Air) is not showing. By default, Fluent will take the mass fraction of Air = 1- (MassFraction Licl+ Mass fraction H20). is it like this? Please clarify it.

Secondly, I have two ducts (I want to define Air + H20 in one duct while in the second duct Licl +H20. In this regard, I can define only one mixture. I am confuse how I can give two different mixtures? What I am thinking that I have to select all components (Air +Licl sol. +H20) in the mixture & then defining mass fraction, I have to kept Licl zero in one duct & air zero in the other duct. Is the right way to define it? Need suggestions.

Last but not the least, I am getting an error AMG Solver in the x momentum & AMG solver divergence in species-o. after interpreting the UDF , on running the simulations. One more thing I am here to add, model is working (simulations ) without UDF.

Regards,

Abbas Raza
Attached Images
File Type: png error20jan.PNG (173.4 KB, 0 views)
File Type: png error20jan3.PNG (147.3 KB, 0 views)
File Type: jpg error20jan2.jpg (72.6 KB, 0 views)
File Type: png error20jan1.PNG (171.4 KB, 0 views)
Abbas20000220 is offline   Reply With Quote

Old   February 5, 2021, 05:41
Default Moisture Transfer across membrane
  #12
New Member
 
Abbas Raza
Join Date: Nov 2020
Posts: 27
Rep Power: 5
Abbas20000220 is on a distinguished road
Hi Mr Alexander,

Thanks a lot for your support till date. I have came across another issue, I need your suggestion in this regard. Please give your invaluable suggestion.

My model is giving convergence after iterations. But On loading UDFs, solution is not getting converged after thousands of iterations. What will be possible reasons as without UDFs it is converged.

What I have to? boundary conditions & Mesh refine?
As i have refined mesh but not any fruitful result I experience.

Regards,

Abbas Raza
Abbas20000220 is offline   Reply With Quote

Reply

Tags
fluent - udf, udf and programming


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
[foam-extend.org] Error compiling OpenFOAM-1.6-ext Canesin OpenFOAM Installation 137 January 20, 2016 14:56
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch gschaider OpenFOAM Installation 225 August 25, 2015 19:43
Compiling dynamicTopoFvMesh for OpenFOAM 2.1.x Saxwax OpenFOAM Installation 25 November 29, 2013 05:34
Version 15 on Mac OS X gschaider OpenFOAM Installation 113 December 2, 2009 10:23
DecomposePar links against liblamso0 with OpenMPI jens_klostermann OpenFOAM Bugs 11 June 28, 2007 17:51


All times are GMT -4. The time now is 12:46.