|
[Sponsors] |
December 29, 2020, 08:59 |
segmentation Fault #f object error
|
#1 |
New Member
Abbas Raza
Join Date: Nov 2020
Posts: 27
Rep Power: 6 |
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) } |
|
December 30, 2020, 07:59 |
|
#2 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
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
__________________
best regards ****************************** press LIKE if this message was helpful |
|
December 30, 2020, 08:53 |
segmentation fault
|
#3 |
New Member
Abbas Raza
Join Date: Nov 2020
Posts: 27
Rep Power: 6 |
Thanks a lot for your response.
its working now. Regards, Abbas Raza |
|
January 1, 2021, 03:56 |
Moisture h20 mass fraction inlet
|
#4 |
New Member
Abbas Raza
Join Date: Nov 2020
Posts: 27
Rep Power: 6 |
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 |
|
January 3, 2021, 19:55 |
|
#5 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
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 |
|
January 3, 2021, 22:03 |
segmentation fault
|
#6 |
New Member
Abbas Raza
Join Date: Nov 2020
Posts: 27
Rep Power: 6 |
Thanks a lot.
Regards, Abbas Raza |
|
January 11, 2021, 04:54 |
Moisture Transfer across membrane
|
#7 |
New Member
Abbas Raza
Join Date: Nov 2020
Posts: 27
Rep Power: 6 |
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 |
|
January 15, 2021, 04:24 |
|
#8 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
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 |
|
January 15, 2021, 04:47 |
segmentation fault
|
#9 |
New Member
Abbas Raza
Join Date: Nov 2020
Posts: 27
Rep Power: 6 |
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 |
|
January 15, 2021, 06:41 |
|
#10 |
Senior Member
Alexander
Join Date: Apr 2013
Posts: 2,363
Rep Power: 34 |
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 |
|
January 20, 2021, 04:35 |
Moisture Transfer across membrane
|
#11 |
New Member
Abbas Raza
Join Date: Nov 2020
Posts: 27
Rep Power: 6 |
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 |
|
February 5, 2021, 06:41 |
Moisture Transfer across membrane
|
#12 |
New Member
Abbas Raza
Join Date: Nov 2020
Posts: 27
Rep Power: 6 |
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 |
|
Tags |
fluent - udf, udf and programming |
|
|
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 15:56 |
[OpenFOAM.org] Compile OF 2.3 on Mac OS X .... the patch | gschaider | OpenFOAM Installation | 225 | August 25, 2015 20:43 |
Compiling dynamicTopoFvMesh for OpenFOAM 2.1.x | Saxwax | OpenFOAM Installation | 25 | November 29, 2013 06:34 |
Version 15 on Mac OS X | gschaider | OpenFOAM Installation | 113 | December 2, 2009 11:23 |
DecomposePar links against liblamso0 with OpenMPI | jens_klostermann | OpenFOAM Bugs | 11 | June 28, 2007 18:51 |