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

error signal sigsegv when using C_VOLUME

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 24, 2022, 12:46
Default error signal sigsegv when using C_VOLUME
  #1
New Member
 
București
Join Date: Jan 2021
Posts: 3
Rep Power: 5
alexandraene is on a distinguished road
Hi everybody!
I have this very bothering issue with the C_VOLUME macro, as well as with the C_R(c,t). I'm using a one phase mixture model with water vapors and air and I would like to determine de partial pressure for water. For this I need to determine the volume for each cell. The issue is that every time I insert one of the following macros I receive the signal sigsegv error. Could you please help me determine the reason for this? I streamed down my code to this.

#include "udf.h"
#include "mem.h"

DEFINE_ON_DEMAND(mass)
{
Domain *d = Get_Domain(1);
Thread *t;
int ID = 5;

t = Lookup_Thread(d, ID);

cell_t c;
real vol;

begin_c_loop(c,t)
{
vol = C_VOLUME(c,t);
Message("%e\n", vol);
}
end_c_loop(c,t)
}

Last edited by alexandraene; February 25, 2022 at 06:23.
alexandraene is offline   Reply With Quote

Old   February 25, 2022, 08:49
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
in code you've posted thread (t) is not defined

you may do following
Code:
#include "udf.h"

DEFINE_ON_DEMAND(mass)
{
Domain *d = Get_Domain(1);
Thread *t;
cell_t c;
real vol;
int zone_ID = 12;
t = Lookup_Thread(d,zone_ID);
begin_c_loop(c,t)
{
vol = C_VOLUME(c,t);
Message0("%e\n", vol);
}
end_c_loop(c,t)
}
however, this code is doing nothing but printing volume of each finite cell in zone 12
__________________
best regards


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

Old   February 25, 2022, 08:58
Default
  #3
New Member
 
București
Join Date: Jan 2021
Posts: 3
Rep Power: 5
alexandraene is on a distinguished road
Hi! Thank you for your replay! I attach my code with the ID changed in accordance with my geometry. The issue is that I want it to show me all the volumes of the cells in ID 5, but it does not. I compile the file and then when I want to execute it I receive the signal sigsegv error. I do not know what else to do.

#include "udf.h"
#include "mem.h"

DEFINE_ON_DEMAND(mass)
{
Domain *d = Get_Domain(1);
Thread *t;
cell_t c;
real vol;
int zone_ID = 5;
t = Lookup_Thread(d,zone_ID);
begin_c_loop(c,t)
{
vol = C_VOLUME(c,t);
Message0("%e\n", vol);
}
end_c_loop(c,t)
}
alexandraene is offline   Reply With Quote

Reply

Tags
cell volume, density property, sigsegv


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
Error SIGSEGV using VOF and UDF JERC_UTFSM Fluent UDF and Scheme Programming 14 November 8, 2021 00:17
Negative cell volume generated / SIGSEGV issue michu STAR-CCM+ 2 July 12, 2021 21:34
SIGSEGV error when running UDF tricha122 Fluent UDF and Scheme Programming 2 November 26, 2020 11:27
error: Received signal SIGSEGV ianziti92 Fluent UDF and Scheme Programming 2 December 5, 2018 17:25
define_wall_functions density and dynamic viscosity Ionut G Fluent UDF and Scheme Programming 3 March 15, 2017 11:10


All times are GMT -4. The time now is 07:25.